Toc Gallery Index Tree Gtk.Tool_Item

Hierarchy

Description

This package defines the base class for all items that can be added into a toolbar (see gtk-toolbar.ads). See also Gtk.Tool_Button (gtk-tool_button.ads). See also Gtk.Separator_Tool_Item (gtk-separator_tool_item).

Types

  • type Gtk_Tool_Item is access all Gtk_Tool_Item_Record'Class;
  • type Gtk_Tool_Item_Record is new Gtk.Bin.Gtk_Bin_Record with null record;

Subprograms

    Creating items

  • procedure Gtk_New (Item : out Gtk_Tool_Item);
    procedure Initialize (Item : access Gtk_Tool_Item_Record'Class);
    Create a new tool item, which contains a single child.
  • function Get_Type return GType;
    Return the internal value associated with a Gtk_Button.
  • procedure Set_Expand (Tool_Item : access Gtk_Tool_Item_Record; Expand : Boolean);
    function Get_Expand (Tool_Item : access Gtk_Tool_Item_Record) return Boolean;
    Sets whether Tool_Item is allocated extra space when there is more room on the toolbar than needed for the items. The effect is that the item gets bigger when the toolbar gets bigger.
  • procedure Set_Homogeneous (Tool_Item : access Gtk_Tool_Item_Record; Homogeneous : Boolean);
    function Get_Homogeneous (Tool_Item : access Gtk_Tool_Item_Record) return Boolean;
    Sets whether Tool_Item is to be allocated the same size as other homogeneous items. The effect is that all homogeneous items will have the same width as the widest of the items.
  • function Get_Icon_Size (Tool_Item : access Gtk_Tool_Item_Record) return Gtk.Enums.Gtk_Icon_Size;
    Returns the icon size used for Tool_Item. Custom subclasses of Gtk_Tool_Item_Record should call this function to find out what size icons they should use. This settings depends on the toolbar that contains the item
  • procedure Set_Is_Important (Tool_Item : access Gtk_Tool_Item_Record; Is_Important : Boolean);
    function Get_Is_Important (Tool_Item : access Gtk_Tool_Item_Record) return Boolean;
    Sets whether Tool_Item should be considered important. The Gtk_Tool_Button class uses this property to determine whether to show or hide its label when the toolbar style is Toolbar_Both_Horiz. The result is that only tool buttons with the "is_important" property set have labels, an effect known as "priority text".
  • function Get_Orientation (Tool_Item : access Gtk_Tool_Item_Record) return Gtk.Enums.Gtk_Orientation;
    Returns the orientation used for Tool_Item.
  • procedure Set_Proxy_Menu_Item (Tool_Item : access Gtk_Tool_Item_Record; Menu_Item_Id : String; Menu_Item : Gtk.Menu_Item.Gtk_Menu_Item);
    function Get_Proxy_Menu_Item (Tool_Item : access Gtk_Tool_Item_Record; Menu_Item_Id : String) return Gtk.Menu_Item.Gtk_Menu_Item;
    Sets the menu item used in the toolbar overflow menu. Menu_Item_Id is used to identify the caller of this function and should also be used with Get_Proxy_Menu_Item. Custom subclasses of Gtk_Tool_Item_Record should use this function to update their menu item when the tool item changes. See also Gtk.Toolbar.Set_Show_Arrow.
  • function Retrieve_Proxy_Menu_Item (Tool_Item : access Gtk_Tool_Item_Record) return Gtk.Menu_Item.Gtk_Menu_Item;
    Returns the menu item that was last set by Set_Proxy_Menu_Item, ie the menu item that will appear in the overflow menu. This might be different from the one set through Set_Proxy_Menu_Item, if someone else has overriden the menu afterward.
  • procedure Rebuild_Menu (Tool_Item : access Gtk_Tool_Item_Record);
    Calling this function signals to the toolbar that the overflow menu item for Tool_Item has changed. If the overflow menu is visible when this function it called, the menu will be rebuilt.
  • procedure Set_Tooltip (Tool_Item : access Gtk_Tool_Item_Record; Tooltips : access Gtk.Tooltips.Gtk_Tooltips_Record'Class; Tip_Text : String; Tip_Private : String := "");
    Sets the tooltips object to be used for Tool item, the text to be displayed as tooltip on the item and the private text to be used
  • procedure Set_Visible_Vertical (Toolitem : access Gtk_Tool_Item_Record; Visible_Vertical : Boolean);
    function Get_Visible_Vertical (Toolitem : access Gtk_Tool_Item_Record) return Boolean;
    Sets whether Toolitem is visible when the toolbar is docked vertically. Some tool items, such as text entries, are too wide to be useful on a vertically docked toolbar. If visible_vertical is False Toolitem will not appear on toolbars that are docked vertically.
  • procedure Set_Visible_Horizontal (Toolitem : access Gtk_Tool_Item_Record; Visible_Horizontal : Boolean);
    function Get_Visible_Horizontal (Toolitem : access Gtk_Tool_Item_Record) return Boolean;
    Same as Set_Visible_Vertical, but for a horizontal orientation
  • procedure Set_Use_Drag_Window (Toolitem : access Gtk_Tool_Item_Record; Use_Drag_Window : Boolean);
    function Get_Use_Drag_Window (Toolitem : access Gtk_Tool_Item_Record) return Boolean;
    Sets whether Toolitem has a drag window. When True the toolitem can be used as a drag source through gtk_drag_source_set(). When Toolitem has a drag window it will intercept all events, even those that would otherwise be sent to a child of Toolitem.
  • function Get_Relief_Style (Tool_Item : access Gtk_Tool_Item_Record) return Gtk.Enums.Gtk_Relief_Style;
    Get the relief style of the item
  • function Get_Toolbar_Style (Tool_Item : access Gtk_Tool_Item_Record) return Gtk.Enums.Gtk_Toolbar_Style;
    Get the style of the toolbar that contains the item

Signals

  • create_menu_proxy
    function Handler (Item : access Gtk_Tool_Item_Record'Class) return Boolean;
    Emitted when the toolbar needs information from the item about whether the item should appear in the toolbar overflow menu. In response, the item should either: - call Set_Proxy_Menu_Item with a null parameter, and return True, to indicate that the item should not appear - call Set_Proxy_Menu_Item with a new menu item, and return True - return False to indicate that the signal wasn't handled. The item will not appear in the overflow menu unless a later handler installs a menu item The toolbar may cache the result of this signal. See Rebuild_Menu to invalidate the cache.
  • set_tooltip
    function Handler (Item : access Gtk_Tool_Item_Record'Class; Tooltips : access Gtk_Tooltips_Record'Class; Tip : String; Tip_Private : String) return Boolean;
    Emitted when the item's tooltip has changed through Set_Tooltip. Should return True if the signal was handled.
  • toolbar_reconfigured
    procedure Handler (Item : access Gtk_Tool_Item_Record'Class);
    Emitted when some property of the toolbar that Item belongs to has changed.

Properties

  • Is_Important_Property
    Boolean
  • Visible_Horizontal_Property
    Boolean
  • Visible_Vertical_Property
    Boolean

Alphabetical Index