1. ------------------------------------------------------------------------------ 
  2. --                                                                          -- 
  3. --      Copyright (C) 1998-2000 E. Briot, J. Brobecker and A. Charlet       -- 
  4. --                     Copyright (C) 2000-2014, AdaCore                     -- 
  5. --                                                                          -- 
  6. -- This library is free software;  you can redistribute it and/or modify it -- 
  7. -- under terms of the  GNU General Public License  as published by the Free -- 
  8. -- Software  Foundation;  either version 3,  or (at your  option) any later -- 
  9. -- version. This library is distributed in the hope that it will be useful, -- 
  10. -- but WITHOUT ANY WARRANTY;  without even the implied warranty of MERCHAN- -- 
  11. -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE.                            -- 
  12. --                                                                          -- 
  13. -- As a special exception under Section 7 of GPL version 3, you are granted -- 
  14. -- additional permissions described in the GCC Runtime Library Exception,   -- 
  15. -- version 3.1, as published by the Free Software Foundation.               -- 
  16. --                                                                          -- 
  17. -- You should have received a copy of the GNU General Public License and    -- 
  18. -- a copy of the GCC Runtime Library Exception along with this program;     -- 
  19. -- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    -- 
  20. -- <http://www.gnu.org/licenses/>.                                          -- 
  21. --                                                                          -- 
  22. ------------------------------------------------------------------------------ 
  23.  
  24. --  <description> 
  25. --  Gtk.Tool_Item.Gtk_Tool_Item<!-- -->s are widgets that can appear on a 
  26. --  toolbar. To create a toolbar item that contain something else than a 
  27. --  button, use Gtk.Tool_Item.Gtk_New. Use Gtk.Container.Add to add a child 
  28. --  widget to the tool item. 
  29. -- 
  30. --  For toolbar items that contain buttons, see the 
  31. --  Gtk.Tool_Button.Gtk_Tool_Button, 
  32. --  Gtk.Toggle_Tool_Button.Gtk_Toggle_Tool_Button and 
  33. --  Gtk.Radio_Tool_Button.Gtk_Radio_Tool_Button classes. 
  34. -- 
  35. --  See the Gtk.Toolbar.Gtk_Toolbar class for a description of the toolbar 
  36. --  widget, and Gtk.Tool_Shell.Gtk_Tool_Shell for a description of the tool 
  37. --  shell interface. 
  38. -- 
  39. --  </description> 
  40. pragma Ada_2005; 
  41.  
  42. pragma Warnings (Off, "*is already use-visible*"); 
  43. with Glib;            use Glib; 
  44. with Glib.Object;     use Glib.Object; 
  45. with Glib.Properties; use Glib.Properties; 
  46. with Glib.Types;      use Glib.Types; 
  47. with Gtk.Action;      use Gtk.Action; 
  48. with Gtk.Activatable; use Gtk.Activatable; 
  49. with Gtk.Bin;         use Gtk.Bin; 
  50. with Gtk.Buildable;   use Gtk.Buildable; 
  51. with Gtk.Enums;       use Gtk.Enums; 
  52. with Gtk.Menu_Item;   use Gtk.Menu_Item; 
  53. with Gtk.Size_Group;  use Gtk.Size_Group; 
  54. with Pango.Layout;    use Pango.Layout; 
  55.  
  56. package Gtk.Tool_Item is 
  57.  
  58.    type Gtk_Tool_Item_Record is new Gtk_Bin_Record with null record; 
  59.    type Gtk_Tool_Item is access all Gtk_Tool_Item_Record'Class; 
  60.  
  61.    ------------------ 
  62.    -- Constructors -- 
  63.    ------------------ 
  64.  
  65.    procedure Gtk_New (Tool_Item : out Gtk_Tool_Item); 
  66.    procedure Initialize 
  67.       (Tool_Item : not null access Gtk_Tool_Item_Record'Class); 
  68.    --  Creates a new Gtk.Tool_Item.Gtk_Tool_Item 
  69.    --  Since: gtk+ 2.4 
  70.  
  71.    function Gtk_Tool_Item_New return Gtk_Tool_Item; 
  72.    --  Creates a new Gtk.Tool_Item.Gtk_Tool_Item 
  73.    --  Since: gtk+ 2.4 
  74.  
  75.    function Get_Type return Glib.GType; 
  76.    pragma Import (C, Get_Type, "gtk_tool_item_get_type"); 
  77.  
  78.    ------------- 
  79.    -- Methods -- 
  80.    ------------- 
  81.  
  82.    function Get_Ellipsize_Mode 
  83.       (Tool_Item : not null access Gtk_Tool_Item_Record) 
  84.        return Pango.Layout.Pango_Ellipsize_Mode; 
  85.    --  Returns the ellipsize mode used for Tool_Item. Custom subclasses of 
  86.    --  Gtk.Tool_Item.Gtk_Tool_Item should call this function to find out how 
  87.    --  text should be ellipsized. 
  88.    --  Since: gtk+ 2.20 
  89.  
  90.    function Get_Expand 
  91.       (Tool_Item : not null access Gtk_Tool_Item_Record) return Boolean; 
  92.    --  Returns whether Tool_Item is allocated extra space. See 
  93.    --  Gtk.Tool_Item.Set_Expand. 
  94.    --  Since: gtk+ 2.4 
  95.  
  96.    procedure Set_Expand 
  97.       (Tool_Item : not null access Gtk_Tool_Item_Record; 
  98.        Expand    : Boolean); 
  99.    --  Sets whether Tool_Item is allocated extra space when there is more room 
  100.    --  on the toolbar then needed for the items. The effect is that the item 
  101.    --  gets bigger when the toolbar gets bigger and smaller when the toolbar 
  102.    --  gets smaller. 
  103.    --  Since: gtk+ 2.4 
  104.    --  "expand": Whether Tool_Item is allocated extra space 
  105.  
  106.    function Get_Homogeneous 
  107.       (Tool_Item : not null access Gtk_Tool_Item_Record) return Boolean; 
  108.    --  Returns whether Tool_Item is the same size as other homogeneous items. 
  109.    --  See Gtk.Tool_Item.Set_Homogeneous. 
  110.    --  Since: gtk+ 2.4 
  111.  
  112.    procedure Set_Homogeneous 
  113.       (Tool_Item   : not null access Gtk_Tool_Item_Record; 
  114.        Homogeneous : Boolean); 
  115.    --  Sets whether Tool_Item is to be allocated the same size as other 
  116.    --  homogeneous items. The effect is that all homogeneous items will have 
  117.    --  the same width as the widest of the items. 
  118.    --  Since: gtk+ 2.4 
  119.    --  "homogeneous": whether Tool_Item is the same size as other homogeneous 
  120.    --  items 
  121.  
  122.    function Get_Icon_Size 
  123.       (Tool_Item : not null access Gtk_Tool_Item_Record) 
  124.        return Gtk.Enums.Gtk_Icon_Size; 
  125.    --  Returns the icon size used for Tool_Item. Custom subclasses of 
  126.    --  Gtk.Tool_Item.Gtk_Tool_Item should call this function to find out what 
  127.    --  size icons they should use. 
  128.    --  Since: gtk+ 2.4 
  129.  
  130.    function Get_Is_Important 
  131.       (Tool_Item : not null access Gtk_Tool_Item_Record) return Boolean; 
  132.    --  Returns whether Tool_Item is considered important. See 
  133.    --  Gtk.Tool_Item.Set_Is_Important 
  134.    --  Since: gtk+ 2.4 
  135.  
  136.    procedure Set_Is_Important 
  137.       (Tool_Item    : not null access Gtk_Tool_Item_Record; 
  138.        Is_Important : Boolean); 
  139.    --  Sets whether Tool_Item should be considered important. The 
  140.    --  Gtk.Tool_Button.Gtk_Tool_Button class uses this property to determine 
  141.    --  whether to show or hide its label when the toolbar style is 
  142.    --  Gtk.Enums.Toolbar_Both_Horiz. The result is that only tool buttons with 
  143.    --  the "is_important" property set have labels, an effect known as 
  144.    --  "priority text" 
  145.    --  Since: gtk+ 2.4 
  146.    --  "is_important": whether the tool item should be considered important 
  147.  
  148.    function Get_Orientation 
  149.       (Tool_Item : not null access Gtk_Tool_Item_Record) 
  150.        return Gtk.Enums.Gtk_Orientation; 
  151.    --  Returns the orientation used for Tool_Item. Custom subclasses of 
  152.    --  Gtk.Tool_Item.Gtk_Tool_Item should call this function to find out what 
  153.    --  size icons they should use. 
  154.    --  Since: gtk+ 2.4 
  155.  
  156.    function Get_Proxy_Menu_Item 
  157.       (Tool_Item    : not null access Gtk_Tool_Item_Record; 
  158.        Menu_Item_Id : UTF8_String) return Gtk.Menu_Item.Gtk_Menu_Item; 
  159.    --  If Menu_Item_Id matches the string passed to 
  160.    --  Gtk.Tool_Item.Set_Proxy_Menu_Item return the corresponding 
  161.    --  Gtk.Menu_Item.Gtk_Menu_Item. 
  162.    --  Custom subclasses of Gtk.Tool_Item.Gtk_Tool_Item should use this 
  163.    --  function to update their menu item when the Gtk.Tool_Item.Gtk_Tool_Item 
  164.    --  changes. That the Menu_Item_Id<!-- -->s must match ensures that a 
  165.    --  Gtk.Tool_Item.Gtk_Tool_Item will not inadvertently change a menu item 
  166.    --  that they did not create. 
  167.    --  Since: gtk+ 2.4 
  168.    --  "menu_item_id": a string used to identify the menu item 
  169.  
  170.    procedure Set_Proxy_Menu_Item 
  171.       (Tool_Item    : not null access Gtk_Tool_Item_Record; 
  172.        Menu_Item_Id : UTF8_String; 
  173.        Menu_Item    : not null access Gtk.Menu_Item.Gtk_Menu_Item_Record'Class); 
  174.    --  Sets the Gtk.Menu_Item.Gtk_Menu_Item used in the toolbar overflow menu. 
  175.    --  The Menu_Item_Id is used to identify the caller of this function and 
  176.    --  should also be used with Gtk.Tool_Item.Get_Proxy_Menu_Item. 
  177.    --  Since: gtk+ 2.4 
  178.    --  "menu_item_id": a string used to identify Menu_Item 
  179.    --  "menu_item": a Gtk.Menu_Item.Gtk_Menu_Item to be used in the overflow 
  180.    --  menu 
  181.  
  182.    function Get_Relief_Style 
  183.       (Tool_Item : not null access Gtk_Tool_Item_Record) 
  184.        return Gtk.Enums.Gtk_Relief_Style; 
  185.    --  Returns the relief style of Tool_Item. See Gtk.Button.Set_Relief. 
  186.    --  Custom subclasses of Gtk.Tool_Item.Gtk_Tool_Item should call this 
  187.    --  function in the handler of the 
  188.    --  Gtk.Tool_Item.Gtk_Tool_Item::toolbar_reconfigured signal to find out the 
  189.    --  relief style of buttons. 
  190.    --  Since: gtk+ 2.4 
  191.  
  192.    function Get_Text_Alignment 
  193.       (Tool_Item : not null access Gtk_Tool_Item_Record) return Gfloat; 
  194.    --  Returns the text alignment used for Tool_Item. Custom subclasses of 
  195.    --  Gtk.Tool_Item.Gtk_Tool_Item should call this function to find out how 
  196.    --  text should be aligned. 
  197.    --  Since: gtk+ 2.20 
  198.  
  199.    function Get_Text_Orientation 
  200.       (Tool_Item : not null access Gtk_Tool_Item_Record) 
  201.        return Gtk.Enums.Gtk_Orientation; 
  202.    --  Returns the text orientation used for Tool_Item. Custom subclasses of 
  203.    --  Gtk.Tool_Item.Gtk_Tool_Item should call this function to find out how 
  204.    --  text should be orientated. 
  205.    --  Since: gtk+ 2.20 
  206.  
  207.    function Get_Text_Size_Group 
  208.       (Tool_Item : not null access Gtk_Tool_Item_Record) 
  209.        return Gtk.Size_Group.Gtk_Size_Group; 
  210.    --  Returns the size group used for labels in Tool_Item. Custom subclasses 
  211.    --  of Gtk.Tool_Item.Gtk_Tool_Item should call this function and use the 
  212.    --  size group for labels. 
  213.    --  Since: gtk+ 2.20 
  214.  
  215.    function Get_Toolbar_Style 
  216.       (Tool_Item : not null access Gtk_Tool_Item_Record) 
  217.        return Gtk.Enums.Gtk_Toolbar_Style; 
  218.    --  Returns the toolbar style used for Tool_Item. Custom subclasses of 
  219.    --  Gtk.Tool_Item.Gtk_Tool_Item should call this function in the handler of 
  220.    --  the GtkToolItem::toolbar_reconfigured signal to find out in what style 
  221.    --  the toolbar is displayed and change themselves accordingly 
  222.    --  Possibilities are: 
  223.    --     * GTK_TOOLBAR_BOTH, meaning the tool item should show both an icon 
  224.    --  and a label, stacked vertically 
  225.    --     * GTK_TOOLBAR_ICONS, meaning the toolbar shows only icons 
  226.    --     * GTK_TOOLBAR_TEXT, meaning the tool item should only show text 
  227.    --     * GTK_TOOLBAR_BOTH_HORIZ, meaning the tool item should show both an 
  228.    --  icon and a label, arranged horizontally 
  229.    --  Since: gtk+ 2.4 
  230.  
  231.    function Get_Use_Drag_Window 
  232.       (Tool_Item : not null access Gtk_Tool_Item_Record) return Boolean; 
  233.    --  Returns whether Tool_Item has a drag window. See 
  234.    --  Gtk.Tool_Item.Set_Use_Drag_Window. 
  235.    --  Since: gtk+ 2.4 
  236.  
  237.    procedure Set_Use_Drag_Window 
  238.       (Tool_Item       : not null access Gtk_Tool_Item_Record; 
  239.        Use_Drag_Window : Boolean); 
  240.    --  Sets whether Tool_Item has a drag window. When True the toolitem can be 
  241.    --  used as a drag source through gtk_drag_source_set. When Tool_Item has a 
  242.    --  drag window it will intercept all events, even those that would 
  243.    --  otherwise be sent to a child of Tool_Item. 
  244.    --  Since: gtk+ 2.4 
  245.    --  "use_drag_window": Whether Tool_Item has a drag window. 
  246.  
  247.    function Get_Visible_Horizontal 
  248.       (Tool_Item : not null access Gtk_Tool_Item_Record) return Boolean; 
  249.    --  Returns whether the Tool_Item is visible on toolbars that are docked 
  250.    --  horizontally. 
  251.    --  Since: gtk+ 2.4 
  252.  
  253.    procedure Set_Visible_Horizontal 
  254.       (Tool_Item          : not null access Gtk_Tool_Item_Record; 
  255.        Visible_Horizontal : Boolean); 
  256.    --  Sets whether Tool_Item is visible when the toolbar is docked 
  257.    --  horizontally. 
  258.    --  Since: gtk+ 2.4 
  259.    --  "visible_horizontal": Whether Tool_Item is visible when in horizontal 
  260.    --  mode 
  261.  
  262.    function Get_Visible_Vertical 
  263.       (Tool_Item : not null access Gtk_Tool_Item_Record) return Boolean; 
  264.    --  Returns whether Tool_Item is visible when the toolbar is docked 
  265.    --  vertically. See Gtk.Tool_Item.Set_Visible_Vertical. 
  266.    --  Since: gtk+ 2.4 
  267.  
  268.    procedure Set_Visible_Vertical 
  269.       (Tool_Item        : not null access Gtk_Tool_Item_Record; 
  270.        Visible_Vertical : Boolean); 
  271.    --  Sets whether Tool_Item is visible when the toolbar is docked 
  272.    --  vertically. Some tool items, such as text entries, are too wide to be 
  273.    --  useful on a vertically docked toolbar. If Visible_Vertical is False 
  274.    --  Tool_Item will not appear on toolbars that are docked vertically. 
  275.    --  Since: gtk+ 2.4 
  276.    --  "visible_vertical": whether Tool_Item is visible when the toolbar is in 
  277.    --  vertical mode 
  278.  
  279.    procedure Rebuild_Menu (Tool_Item : not null access Gtk_Tool_Item_Record); 
  280.    --  Calling this function signals to the toolbar that the overflow menu 
  281.    --  item for Tool_Item has changed. If the overflow menu is visible when 
  282.    --  this function it called, the menu will be rebuilt. 
  283.    --  The function must be called when the tool item changes what it will do 
  284.    --  in response to the Gtk.Tool_Item.Gtk_Tool_Item::create-menu-proxy 
  285.    --  signal. 
  286.    --  Since: gtk+ 2.6 
  287.  
  288.    function Retrieve_Proxy_Menu_Item 
  289.       (Tool_Item : not null access Gtk_Tool_Item_Record) 
  290.        return Gtk.Menu_Item.Gtk_Menu_Item; 
  291.    --  Returns the Gtk.Menu_Item.Gtk_Menu_Item that was last set by 
  292.    --  Gtk.Tool_Item.Set_Proxy_Menu_Item, ie. the Gtk.Menu_Item.Gtk_Menu_Item 
  293.    --  that is going to appear in the overflow menu. 
  294.    --  Since: gtk+ 2.4 
  295.  
  296.    procedure Set_Tooltip_Markup 
  297.       (Tool_Item : not null access Gtk_Tool_Item_Record; 
  298.        Markup    : UTF8_String); 
  299.    --  Sets the markup text to be displayed as tooltip on the item. See 
  300.    --  Gtk.Widget.Set_Tooltip_Markup. 
  301.    --  Since: gtk+ 2.12 
  302.    --  "markup": markup text to be used as tooltip for Tool_Item 
  303.  
  304.    procedure Set_Tooltip_Text 
  305.       (Tool_Item : not null access Gtk_Tool_Item_Record; 
  306.        Text      : UTF8_String); 
  307.    --  Sets the text to be displayed as tooltip on the item. See 
  308.    --  Gtk.Widget.Set_Tooltip_Text. 
  309.    --  Since: gtk+ 2.12 
  310.    --  "text": text to be used as tooltip for Tool_Item 
  311.  
  312.    procedure Toolbar_Reconfigured 
  313.       (Tool_Item : not null access Gtk_Tool_Item_Record); 
  314.    --  Emits the signal Gtk.Tool_Item.Gtk_Tool_Item::toolbar_reconfigured on 
  315.    --  Tool_Item. Gtk.Toolbar.Gtk_Toolbar and other 
  316.    --  Gtk.Tool_Shell.Gtk_Tool_Shell implementations use this function to 
  317.    --  notify children, when some aspect of their configuration changes. 
  318.    --  Since: gtk+ 2.14 
  319.  
  320.    --------------------------------------------- 
  321.    -- Inherited subprograms (from interfaces) -- 
  322.    --------------------------------------------- 
  323.    --  Methods inherited from the Buildable interface are not duplicated here 
  324.    --  since they are meant to be used by tools, mostly. If you need to call 
  325.    --  them, use an explicit cast through the "-" operator below. 
  326.  
  327.    procedure Do_Set_Related_Action 
  328.       (Self   : not null access Gtk_Tool_Item_Record; 
  329.        Action : not null access Gtk.Action.Gtk_Action_Record'Class); 
  330.  
  331.    function Get_Related_Action 
  332.       (Self : not null access Gtk_Tool_Item_Record) 
  333.        return Gtk.Action.Gtk_Action; 
  334.  
  335.    procedure Set_Related_Action 
  336.       (Self   : not null access Gtk_Tool_Item_Record; 
  337.        Action : not null access Gtk.Action.Gtk_Action_Record'Class); 
  338.  
  339.    function Get_Use_Action_Appearance 
  340.       (Self : not null access Gtk_Tool_Item_Record) return Boolean; 
  341.  
  342.    procedure Set_Use_Action_Appearance 
  343.       (Self           : not null access Gtk_Tool_Item_Record; 
  344.        Use_Appearance : Boolean); 
  345.  
  346.    procedure Sync_Action_Properties 
  347.       (Self   : not null access Gtk_Tool_Item_Record; 
  348.        Action : access Gtk.Action.Gtk_Action_Record'Class); 
  349.  
  350.    ---------------- 
  351.    -- Properties -- 
  352.    ---------------- 
  353.    --  The following properties are defined for this widget. See 
  354.    --  Glib.Properties for more information on properties) 
  355.  
  356.    Is_Important_Property : constant Glib.Properties.Property_Boolean; 
  357.  
  358.    Visible_Horizontal_Property : constant Glib.Properties.Property_Boolean; 
  359.  
  360.    Visible_Vertical_Property : constant Glib.Properties.Property_Boolean; 
  361.  
  362.    ------------- 
  363.    -- Signals -- 
  364.    ------------- 
  365.  
  366.    type Cb_Gtk_Tool_Item_Boolean is not null access function 
  367.      (Self : access Gtk_Tool_Item_Record'Class) return Boolean; 
  368.  
  369.    type Cb_GObject_Boolean is not null access function 
  370.      (Self : access Glib.Object.GObject_Record'Class) 
  371.    return Boolean; 
  372.  
  373.    Signal_Create_Menu_Proxy : constant Glib.Signal_Name := "create-menu-proxy"; 
  374.    procedure On_Create_Menu_Proxy 
  375.       (Self  : not null access Gtk_Tool_Item_Record; 
  376.        Call  : Cb_Gtk_Tool_Item_Boolean; 
  377.        After : Boolean := False); 
  378.    procedure On_Create_Menu_Proxy 
  379.       (Self  : not null access Gtk_Tool_Item_Record; 
  380.        Call  : Cb_GObject_Boolean; 
  381.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  382.        After : Boolean := False); 
  383.    --  This signal is emitted when the toolbar needs information from 
  384.    --  Tool_Item about whether the item should appear in the toolbar overflow 
  385.    --  menu. In response the tool item should either 
  386.    -- 
  387.    --     * call Gtk.Tool_Item.Set_Proxy_Menu_Item with a null pointer and 
  388.    --  return True to indicate that the item should not appear in the overflow 
  389.    --  menu 
  390.    -- 
  391.    --     * call Gtk.Tool_Item.Set_Proxy_Menu_Item with a new menu item and 
  392.    --  return True, or 
  393.    -- 
  394.    --     * return False to indicate that the signal was not handled by the 
  395.    --  item. This means that the item will not appear in the overflow menu 
  396.    --  unless a later handler installs a menu item. 
  397.    -- 
  398.    --  The toolbar may cache the result of this signal. When the tool item 
  399.    --  changes how it will respond to this signal it must call 
  400.    --  Gtk.Tool_Item.Rebuild_Menu to invalidate the cache and ensure that the 
  401.    --  toolbar rebuilds its overflow menu. 
  402.    --  
  403.    --  Callback parameters: 
  404.    --    --  Returns True if the signal was handled, False if not 
  405.  
  406.    type Cb_Gtk_Tool_Item_Void is not null access procedure (Self : access Gtk_Tool_Item_Record'Class); 
  407.  
  408.    type Cb_GObject_Void is not null access procedure 
  409.      (Self : access Glib.Object.GObject_Record'Class); 
  410.  
  411.    Signal_Toolbar_Reconfigured : constant Glib.Signal_Name := "toolbar-reconfigured"; 
  412.    procedure On_Toolbar_Reconfigured 
  413.       (Self  : not null access Gtk_Tool_Item_Record; 
  414.        Call  : Cb_Gtk_Tool_Item_Void; 
  415.        After : Boolean := False); 
  416.    procedure On_Toolbar_Reconfigured 
  417.       (Self  : not null access Gtk_Tool_Item_Record; 
  418.        Call  : Cb_GObject_Void; 
  419.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  420.        After : Boolean := False); 
  421.    --  This signal is emitted when some property of the toolbar that the item 
  422.    --  is a child of changes. For custom subclasses of 
  423.    --  Gtk.Tool_Item.Gtk_Tool_Item, the default handler of this signal use the 
  424.    --  functions 
  425.    -- 
  426.    --     * gtk_tool_shell_get_orientation 
  427.    -- 
  428.    --     * gtk_tool_shell_get_style 
  429.    -- 
  430.    --     * gtk_tool_shell_get_icon_size 
  431.    -- 
  432.    --     * gtk_tool_shell_get_relief_style 
  433.    -- 
  434.    --  to find out what the toolbar should look like and change themselves 
  435.    --  accordingly. 
  436.  
  437.    ---------------- 
  438.    -- Interfaces -- 
  439.    ---------------- 
  440.    --  This class implements several interfaces. See Glib.Types 
  441.    -- 
  442.    --  - "Activatable" 
  443.    -- 
  444.    --  - "Buildable" 
  445.  
  446.    package Implements_Gtk_Activatable is new Glib.Types.Implements 
  447.      (Gtk.Activatable.Gtk_Activatable, Gtk_Tool_Item_Record, Gtk_Tool_Item); 
  448.    function "+" 
  449.      (Widget : access Gtk_Tool_Item_Record'Class) 
  450.    return Gtk.Activatable.Gtk_Activatable 
  451.    renames Implements_Gtk_Activatable.To_Interface; 
  452.    function "-" 
  453.      (Interf : Gtk.Activatable.Gtk_Activatable) 
  454.    return Gtk_Tool_Item 
  455.    renames Implements_Gtk_Activatable.To_Object; 
  456.  
  457.    package Implements_Gtk_Buildable is new Glib.Types.Implements 
  458.      (Gtk.Buildable.Gtk_Buildable, Gtk_Tool_Item_Record, Gtk_Tool_Item); 
  459.    function "+" 
  460.      (Widget : access Gtk_Tool_Item_Record'Class) 
  461.    return Gtk.Buildable.Gtk_Buildable 
  462.    renames Implements_Gtk_Buildable.To_Interface; 
  463.    function "-" 
  464.      (Interf : Gtk.Buildable.Gtk_Buildable) 
  465.    return Gtk_Tool_Item 
  466.    renames Implements_Gtk_Buildable.To_Object; 
  467.  
  468. private 
  469.    Visible_Vertical_Property : constant Glib.Properties.Property_Boolean := 
  470.      Glib.Properties.Build ("visible-vertical"); 
  471.    Visible_Horizontal_Property : constant Glib.Properties.Property_Boolean := 
  472.      Glib.Properties.Build ("visible-horizontal"); 
  473.    Is_Important_Property : constant Glib.Properties.Property_Boolean := 
  474.      Glib.Properties.Build ("is-important"); 
  475. end Gtk.Tool_Item;