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. --  The Gtk.Menu_Item.Gtk_Menu_Item widget and the derived widgets are the 
  26. --  only valid childs for menus. Their function is to correctly handle 
  27. --  highlighting, alignment, events and submenus. 
  28. -- 
  29. --  As it derives from Gtk.Bin.Gtk_Bin it can hold any valid child widget, 
  30. --  altough only a few are really useful. 
  31. -- 
  32. --  == GtkMenuItem as GtkBuildable == 
  33. -- 
  34. --  The GtkMenuItem implementation of the GtkBuildable interface supports 
  35. --  adding a submenu by specifying "submenu" as the "type" attribute of a 
  36. --  <child> element. 
  37. -- 
  38. --  == A UI definition fragment with submenus == 
  39. -- 
  40. --    <object class="GtkMenuItem"> 
  41. --    <child type="submenu"> 
  42. --    <object class="GtkMenu"/> 
  43. --    </child> 
  44. --    </object> 
  45. --  </description> 
  46. pragma Ada_2005; 
  47.  
  48. pragma Warnings (Off, "*is already use-visible*"); 
  49. with Glib;            use Glib; 
  50. with Glib.Object;     use Glib.Object; 
  51. with Glib.Properties; use Glib.Properties; 
  52. with Glib.Types;      use Glib.Types; 
  53. with Glib.Variant;    use Glib.Variant; 
  54. with Gtk.Action;      use Gtk.Action; 
  55. with Gtk.Actionable;  use Gtk.Actionable; 
  56. with Gtk.Activatable; use Gtk.Activatable; 
  57. with Gtk.Bin;         use Gtk.Bin; 
  58. with Gtk.Buildable;   use Gtk.Buildable; 
  59. with Gtk.Widget;      use Gtk.Widget; 
  60.  
  61. package Gtk.Menu_Item is 
  62.  
  63.    type Gtk_Menu_Item_Record is new Gtk_Bin_Record with null record; 
  64.    type Gtk_Menu_Item is access all Gtk_Menu_Item_Record'Class; 
  65.  
  66.    ------------------ 
  67.    -- Constructors -- 
  68.    ------------------ 
  69.  
  70.    procedure Gtk_New (Menu_Item : out Gtk_Menu_Item); 
  71.    procedure Initialize 
  72.       (Menu_Item : not null access Gtk_Menu_Item_Record'Class); 
  73.    --  Creates a new Gtk.Menu_Item.Gtk_Menu_Item. 
  74.  
  75.    function Gtk_Menu_Item_New return Gtk_Menu_Item; 
  76.    --  Creates a new Gtk.Menu_Item.Gtk_Menu_Item. 
  77.  
  78.    procedure Gtk_New_With_Label 
  79.       (Menu_Item : out Gtk_Menu_Item; 
  80.        Label     : UTF8_String); 
  81.    procedure Initialize_With_Label 
  82.       (Menu_Item : not null access Gtk_Menu_Item_Record'Class; 
  83.        Label     : UTF8_String); 
  84.    --  Creates a new Gtk.Menu_Item.Gtk_Menu_Item whose child is a 
  85.    --  Gtk.Label.Gtk_Label. 
  86.    --  "label": the text for the label 
  87.  
  88.    function Gtk_Menu_Item_New_With_Label 
  89.       (Label : UTF8_String) return Gtk_Menu_Item; 
  90.    --  Creates a new Gtk.Menu_Item.Gtk_Menu_Item whose child is a 
  91.    --  Gtk.Label.Gtk_Label. 
  92.    --  "label": the text for the label 
  93.  
  94.    procedure Gtk_New_With_Mnemonic 
  95.       (Menu_Item : out Gtk_Menu_Item; 
  96.        Label     : UTF8_String); 
  97.    procedure Initialize_With_Mnemonic 
  98.       (Menu_Item : not null access Gtk_Menu_Item_Record'Class; 
  99.        Label     : UTF8_String); 
  100.    --  Creates a new Gtk.Menu_Item.Gtk_Menu_Item containing a label. 
  101.    --  The label will be created using Gtk.Label.Gtk_New_With_Mnemonic, so 
  102.    --  underscores in Label indicate the mnemonic for the menu item. 
  103.    --  "label": The text of the button, with an underscore in front of the 
  104.    --  mnemonic character 
  105.  
  106.    function Gtk_Menu_Item_New_With_Mnemonic 
  107.       (Label : UTF8_String) return Gtk_Menu_Item; 
  108.    --  Creates a new Gtk.Menu_Item.Gtk_Menu_Item containing a label. 
  109.    --  The label will be created using Gtk.Label.Gtk_New_With_Mnemonic, so 
  110.    --  underscores in Label indicate the mnemonic for the menu item. 
  111.    --  "label": The text of the button, with an underscore in front of the 
  112.    --  mnemonic character 
  113.  
  114.    function Get_Type return Glib.GType; 
  115.    pragma Import (C, Get_Type, "gtk_menu_item_get_type"); 
  116.  
  117.    ------------- 
  118.    -- Methods -- 
  119.    ------------- 
  120.  
  121.    procedure Activate (Menu_Item : not null access Gtk_Menu_Item_Record); 
  122.    --  Emits the Gtk.Menu_Item.Gtk_Menu_Item::activate signal on the given 
  123.    --  item 
  124.  
  125.    procedure Deselect (Menu_Item : not null access Gtk_Menu_Item_Record); 
  126.    --  Emits the Gtk.Menu_Item.Gtk_Menu_Item::deselect signal on the given 
  127.    --  item. Behaves exactly like gtk_item_deselect. 
  128.  
  129.    function Get_Accel_Path 
  130.       (Menu_Item : not null access Gtk_Menu_Item_Record) return UTF8_String; 
  131.    --  Retrieve the accelerator path that was previously set on Menu_Item. 
  132.    --  See Gtk.Menu_Item.Set_Accel_Path for details. 
  133.    --  Since: gtk+ 2.14 
  134.  
  135.    procedure Set_Accel_Path 
  136.       (Menu_Item  : not null access Gtk_Menu_Item_Record; 
  137.        Accel_Path : UTF8_String := ""); 
  138.    --  Set the accelerator path on Menu_Item, through which runtime changes of 
  139.    --  the menu item's accelerator caused by the user can be identified and 
  140.    --  saved to persistent storage (see Gtk.Accel_Map.Save on this). To set up 
  141.    --  a default accelerator for this menu item, call Gtk.Accel_Map.Add_Entry 
  142.    --  with the same Accel_Path. See also Gtk.Accel_Map.Add_Entry on the 
  143.    --  specifics of accelerator paths, and Gtk.Menu.Set_Accel_Path for a more 
  144.    --  convenient variant of this function. 
  145.    --  This function is basically a convenience wrapper that handles calling 
  146.    --  Gtk.Widget.Set_Accel_Path with the appropriate accelerator group for the 
  147.    --  menu item. 
  148.    --  Note that you do need to set an accelerator on the parent menu with 
  149.    --  Gtk.Menu.Set_Accel_Group for this to work. 
  150.    --  Note that Accel_Path string will be stored in a Glib.GQuark. Therefore, 
  151.    --  if you pass a static string, you can save some memory by interning it 
  152.    --  first with g_intern_static_string. 
  153.    --  "accel_path": accelerator path, corresponding to this menu item's 
  154.    --  functionality, or null to unset the current path. 
  155.  
  156.    function Get_Label 
  157.       (Menu_Item : not null access Gtk_Menu_Item_Record) return UTF8_String; 
  158.    --  Sets Text on the Menu_Item label 
  159.    --  Since: gtk+ 2.16 
  160.  
  161.    procedure Set_Label 
  162.       (Menu_Item : not null access Gtk_Menu_Item_Record; 
  163.        Label     : UTF8_String); 
  164.    --  Sets Text on the Menu_Item label 
  165.    --  Since: gtk+ 2.16 
  166.    --  "label": the text you want to set 
  167.  
  168.    function Get_Reserve_Indicator 
  169.       (Menu_Item : not null access Gtk_Menu_Item_Record) return Boolean; 
  170.    --  Returns whether the Menu_Item reserves space for the submenu indicator, 
  171.    --  regardless if it has a submenu or not. 
  172.    --  Since: gtk+ 3.0 
  173.  
  174.    procedure Set_Reserve_Indicator 
  175.       (Menu_Item : not null access Gtk_Menu_Item_Record; 
  176.        Reserve   : Boolean); 
  177.    --  Sets whether the Menu_Item should reserve space for the submenu 
  178.    --  indicator, regardless if it actually has a submenu or not. 
  179.    --  There should be little need for applications to call this functions. 
  180.    --  Since: gtk+ 3.0 
  181.    --  "reserve": the new value 
  182.  
  183.    function Get_Right_Justified 
  184.       (Menu_Item : not null access Gtk_Menu_Item_Record) return Boolean; 
  185.    pragma Obsolescent (Get_Right_Justified); 
  186.    --  Gets whether the menu item appears justified at the right side of the 
  187.    --  menu bar. 
  188.    --  Deprecated since 3.2, See Gtk.Menu_Item.Set_Right_Justified 
  189.  
  190.    procedure Set_Right_Justified 
  191.       (Menu_Item       : not null access Gtk_Menu_Item_Record; 
  192.        Right_Justified : Boolean := True); 
  193.    pragma Obsolescent (Set_Right_Justified); 
  194.    --  Sets whether the menu item appears justified at the right side of a 
  195.    --  menu bar. This was traditionally done for "Help" menu items, but is now 
  196.    --  considered a bad idea. (If the widget layout is reversed for a 
  197.    --  right-to-left language like Hebrew or Arabic, right-justified-menu-items 
  198.    --  appear at the left.) 
  199.    --  Deprecated since 3.2, If you insist on using it, use 
  200.    --  Gtk.Widget.Set_Hexpand and Gtk.Widget.Set_Halign. 
  201.    --  "right_justified": if True the menu item will appear at the far right 
  202.    --  if added to a menu bar 
  203.  
  204.    function Get_Submenu 
  205.       (Menu_Item : not null access Gtk_Menu_Item_Record) 
  206.        return Gtk.Widget.Gtk_Widget; 
  207.    --  Gets the submenu underneath this menu item, if any. See 
  208.    --  Gtk.Menu_Item.Set_Submenu. 
  209.  
  210.    procedure Set_Submenu 
  211.       (Menu_Item : not null access Gtk_Menu_Item_Record; 
  212.        Submenu   : access Gtk.Widget.Gtk_Widget_Record'Class); 
  213.    --  Sets or replaces the menu item's submenu, or removes it when a null 
  214.    --  submenu is passed. 
  215.    --  "submenu": the submenu, or null 
  216.  
  217.    function Get_Use_Underline 
  218.       (Menu_Item : not null access Gtk_Menu_Item_Record) return Boolean; 
  219.    --  Checks if an underline in the text indicates the next character should 
  220.    --  be used for the mnemonic accelerator key. 
  221.    --  Since: gtk+ 2.16 
  222.  
  223.    procedure Set_Use_Underline 
  224.       (Menu_Item : not null access Gtk_Menu_Item_Record; 
  225.        Setting   : Boolean); 
  226.    --  If true, an underline in the text indicates the next character should 
  227.    --  be used for the mnemonic accelerator key. 
  228.    --  Since: gtk+ 2.16 
  229.    --  "setting": True if underlines in the text indicate mnemonics 
  230.  
  231.    procedure Gtk_Select (Menu_Item : not null access Gtk_Menu_Item_Record); 
  232.    --  Emits the Gtk.Menu_Item.Gtk_Menu_Item::select signal on the given item. 
  233.    --  Behaves exactly like gtk_item_select. 
  234.  
  235.    procedure Toggle_Size_Allocate 
  236.       (Menu_Item  : not null access Gtk_Menu_Item_Record; 
  237.        Allocation : Gint); 
  238.    --  Emits the Gtk.Menu_Item.Gtk_Menu_Item::toggle-size-allocate signal on 
  239.    --  the given item. 
  240.    --  "allocation": the allocation to use as signal data. 
  241.  
  242.    procedure Toggle_Size_Request 
  243.       (Menu_Item   : not null access Gtk_Menu_Item_Record; 
  244.        Requisition : in out Gint); 
  245.    --  Emits the Gtk.Menu_Item.Gtk_Menu_Item::toggle-size-request signal on 
  246.    --  the given item. 
  247.    --  "requisition": the requisition to use as signal data. 
  248.  
  249.    ---------------------- 
  250.    -- GtkAda additions -- 
  251.    ---------------------- 
  252.  
  253.    procedure Gtk_New 
  254.      (Menu_Item : out Gtk_Menu_Item; 
  255.       Label     : UTF8_String) renames Gtk_New_With_Label; 
  256.    procedure Initialize 
  257.      (Menu_Item : access Gtk_Menu_Item_Record'Class; 
  258.       Label     : UTF8_String) renames Initialize_With_Label; 
  259.    --  For backwards compatibility. 
  260.  
  261.    --------------------------------------------- 
  262.    -- Inherited subprograms (from interfaces) -- 
  263.    --------------------------------------------- 
  264.    --  Methods inherited from the Buildable interface are not duplicated here 
  265.    --  since they are meant to be used by tools, mostly. If you need to call 
  266.    --  them, use an explicit cast through the "-" operator below. 
  267.  
  268.    function Get_Action_Name 
  269.       (Self : not null access Gtk_Menu_Item_Record) return UTF8_String; 
  270.  
  271.    procedure Set_Action_Name 
  272.       (Self        : not null access Gtk_Menu_Item_Record; 
  273.        Action_Name : UTF8_String); 
  274.  
  275.    function Get_Action_Target_Value 
  276.       (Self : not null access Gtk_Menu_Item_Record) 
  277.        return Glib.Variant.Gvariant; 
  278.  
  279.    procedure Set_Action_Target_Value 
  280.       (Self         : not null access Gtk_Menu_Item_Record; 
  281.        Target_Value : Glib.Variant.Gvariant); 
  282.  
  283.    procedure Set_Detailed_Action_Name 
  284.       (Self                 : not null access Gtk_Menu_Item_Record; 
  285.        Detailed_Action_Name : UTF8_String); 
  286.  
  287.    procedure Do_Set_Related_Action 
  288.       (Self   : not null access Gtk_Menu_Item_Record; 
  289.        Action : not null access Gtk.Action.Gtk_Action_Record'Class); 
  290.  
  291.    function Get_Related_Action 
  292.       (Self : not null access Gtk_Menu_Item_Record) 
  293.        return Gtk.Action.Gtk_Action; 
  294.  
  295.    procedure Set_Related_Action 
  296.       (Self   : not null access Gtk_Menu_Item_Record; 
  297.        Action : not null access Gtk.Action.Gtk_Action_Record'Class); 
  298.  
  299.    function Get_Use_Action_Appearance 
  300.       (Self : not null access Gtk_Menu_Item_Record) return Boolean; 
  301.  
  302.    procedure Set_Use_Action_Appearance 
  303.       (Self           : not null access Gtk_Menu_Item_Record; 
  304.        Use_Appearance : Boolean); 
  305.  
  306.    procedure Sync_Action_Properties 
  307.       (Self   : not null access Gtk_Menu_Item_Record; 
  308.        Action : access Gtk.Action.Gtk_Action_Record'Class); 
  309.  
  310.    ---------------- 
  311.    -- Properties -- 
  312.    ---------------- 
  313.    --  The following properties are defined for this widget. See 
  314.    --  Glib.Properties for more information on properties) 
  315.  
  316.    Accel_Path_Property : constant Glib.Properties.Property_String; 
  317.    --  Sets the accelerator path of the menu item, through which runtime 
  318.    --  changes of the menu item's accelerator caused by the user can be 
  319.    --  identified and saved to persistant storage. 
  320.  
  321.    Label_Property : constant Glib.Properties.Property_String; 
  322.    --  The text for the child label. 
  323.  
  324.    Right_Justified_Property : constant Glib.Properties.Property_Boolean; 
  325.    --  Sets whether the menu item appears justified at the right side of a 
  326.    --  menu bar. 
  327.  
  328.    Submenu_Property : constant Glib.Properties.Property_Object; 
  329.    --  Type: Gtk.Menu.Gtk_Menu 
  330.    --  The submenu attached to the menu item, or null if it has none. 
  331.  
  332.    Use_Underline_Property : constant Glib.Properties.Property_Boolean; 
  333.    --  True if underlines in the text indicate mnemonics. 
  334.  
  335.    ------------- 
  336.    -- Signals -- 
  337.    ------------- 
  338.  
  339.    type Cb_Gtk_Menu_Item_Void is not null access procedure (Self : access Gtk_Menu_Item_Record'Class); 
  340.  
  341.    type Cb_GObject_Void is not null access procedure 
  342.      (Self : access Glib.Object.GObject_Record'Class); 
  343.  
  344.    Signal_Activate : constant Glib.Signal_Name := "activate"; 
  345.    procedure On_Activate 
  346.       (Self  : not null access Gtk_Menu_Item_Record; 
  347.        Call  : Cb_Gtk_Menu_Item_Void; 
  348.        After : Boolean := False); 
  349.    procedure On_Activate 
  350.       (Self  : not null access Gtk_Menu_Item_Record; 
  351.        Call  : Cb_GObject_Void; 
  352.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  353.        After : Boolean := False); 
  354.    --  Emitted when the item is activated. 
  355.  
  356.    Signal_Activate_Item : constant Glib.Signal_Name := "activate-item"; 
  357.    procedure On_Activate_Item 
  358.       (Self  : not null access Gtk_Menu_Item_Record; 
  359.        Call  : Cb_Gtk_Menu_Item_Void; 
  360.        After : Boolean := False); 
  361.    procedure On_Activate_Item 
  362.       (Self  : not null access Gtk_Menu_Item_Record; 
  363.        Call  : Cb_GObject_Void; 
  364.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  365.        After : Boolean := False); 
  366.    --  Emitted when the item is activated, but also if the menu item has a 
  367.    --  submenu. For normal applications, the relevant signal is 
  368.    --  Gtk.Menu_Item.Gtk_Menu_Item::activate. 
  369.  
  370.    Signal_Deselect : constant Glib.Signal_Name := "deselect"; 
  371.    procedure On_Deselect 
  372.       (Self  : not null access Gtk_Menu_Item_Record; 
  373.        Call  : Cb_Gtk_Menu_Item_Void; 
  374.        After : Boolean := False); 
  375.    procedure On_Deselect 
  376.       (Self  : not null access Gtk_Menu_Item_Record; 
  377.        Call  : Cb_GObject_Void; 
  378.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  379.        After : Boolean := False); 
  380.  
  381.    Signal_Gtk_Select : constant Glib.Signal_Name := "select"; 
  382.    procedure On_Gtk_Select 
  383.       (Self  : not null access Gtk_Menu_Item_Record; 
  384.        Call  : Cb_Gtk_Menu_Item_Void; 
  385.        After : Boolean := False); 
  386.    procedure On_Gtk_Select 
  387.       (Self  : not null access Gtk_Menu_Item_Record; 
  388.        Call  : Cb_GObject_Void; 
  389.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  390.        After : Boolean := False); 
  391.  
  392.    type Cb_Gtk_Menu_Item_Gint_Void is not null access procedure 
  393.      (Self   : access Gtk_Menu_Item_Record'Class; 
  394.       Object : Gint); 
  395.  
  396.    type Cb_GObject_Gint_Void is not null access procedure 
  397.      (Self   : access Glib.Object.GObject_Record'Class; 
  398.       Object : Gint); 
  399.  
  400.    Signal_Toggle_Size_Allocate : constant Glib.Signal_Name := "toggle-size-allocate"; 
  401.    procedure On_Toggle_Size_Allocate 
  402.       (Self  : not null access Gtk_Menu_Item_Record; 
  403.        Call  : Cb_Gtk_Menu_Item_Gint_Void; 
  404.        After : Boolean := False); 
  405.    procedure On_Toggle_Size_Allocate 
  406.       (Self  : not null access Gtk_Menu_Item_Record; 
  407.        Call  : Cb_GObject_Gint_Void; 
  408.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  409.        After : Boolean := False); 
  410.  
  411.    type Cb_Gtk_Menu_Item_Address_Void is not null access procedure 
  412.      (Self   : access Gtk_Menu_Item_Record'Class; 
  413.       Object : System.Address); 
  414.  
  415.    type Cb_GObject_Address_Void is not null access procedure 
  416.      (Self   : access Glib.Object.GObject_Record'Class; 
  417.       Object : System.Address); 
  418.  
  419.    Signal_Toggle_Size_Request : constant Glib.Signal_Name := "toggle-size-request"; 
  420.    procedure On_Toggle_Size_Request 
  421.       (Self  : not null access Gtk_Menu_Item_Record; 
  422.        Call  : Cb_Gtk_Menu_Item_Address_Void; 
  423.        After : Boolean := False); 
  424.    procedure On_Toggle_Size_Request 
  425.       (Self  : not null access Gtk_Menu_Item_Record; 
  426.        Call  : Cb_GObject_Address_Void; 
  427.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  428.        After : Boolean := False); 
  429.  
  430.    ---------------- 
  431.    -- Interfaces -- 
  432.    ---------------- 
  433.    --  This class implements several interfaces. See Glib.Types 
  434.    -- 
  435.    --  - "Actionable" 
  436.    -- 
  437.    --  - "Activatable" 
  438.    -- 
  439.    --  - "Buildable" 
  440.  
  441.    package Implements_Gtk_Actionable is new Glib.Types.Implements 
  442.      (Gtk.Actionable.Gtk_Actionable, Gtk_Menu_Item_Record, Gtk_Menu_Item); 
  443.    function "+" 
  444.      (Widget : access Gtk_Menu_Item_Record'Class) 
  445.    return Gtk.Actionable.Gtk_Actionable 
  446.    renames Implements_Gtk_Actionable.To_Interface; 
  447.    function "-" 
  448.      (Interf : Gtk.Actionable.Gtk_Actionable) 
  449.    return Gtk_Menu_Item 
  450.    renames Implements_Gtk_Actionable.To_Object; 
  451.  
  452.    package Implements_Gtk_Activatable is new Glib.Types.Implements 
  453.      (Gtk.Activatable.Gtk_Activatable, Gtk_Menu_Item_Record, Gtk_Menu_Item); 
  454.    function "+" 
  455.      (Widget : access Gtk_Menu_Item_Record'Class) 
  456.    return Gtk.Activatable.Gtk_Activatable 
  457.    renames Implements_Gtk_Activatable.To_Interface; 
  458.    function "-" 
  459.      (Interf : Gtk.Activatable.Gtk_Activatable) 
  460.    return Gtk_Menu_Item 
  461.    renames Implements_Gtk_Activatable.To_Object; 
  462.  
  463.    package Implements_Gtk_Buildable is new Glib.Types.Implements 
  464.      (Gtk.Buildable.Gtk_Buildable, Gtk_Menu_Item_Record, Gtk_Menu_Item); 
  465.    function "+" 
  466.      (Widget : access Gtk_Menu_Item_Record'Class) 
  467.    return Gtk.Buildable.Gtk_Buildable 
  468.    renames Implements_Gtk_Buildable.To_Interface; 
  469.    function "-" 
  470.      (Interf : Gtk.Buildable.Gtk_Buildable) 
  471.    return Gtk_Menu_Item 
  472.    renames Implements_Gtk_Buildable.To_Object; 
  473.  
  474. private 
  475.    Use_Underline_Property : constant Glib.Properties.Property_Boolean := 
  476.      Glib.Properties.Build ("use-underline"); 
  477.    Submenu_Property : constant Glib.Properties.Property_Object := 
  478.      Glib.Properties.Build ("submenu"); 
  479.    Right_Justified_Property : constant Glib.Properties.Property_Boolean := 
  480.      Glib.Properties.Build ("right-justified"); 
  481.    Label_Property : constant Glib.Properties.Property_String := 
  482.      Glib.Properties.Build ("label"); 
  483.    Accel_Path_Property : constant Glib.Properties.Property_String := 
  484.      Glib.Properties.Build ("accel-path"); 
  485. end Gtk.Menu_Item;