package Implements_Gtk_Actionable is new Glib.Types.Implements (Gtk.Actionable.Gtk_Actionable, Gtk_Menu_Item_Record, Gtk_Menu_Item);
package Implements_Gtk_Activatable is new Glib.Types.Implements (Gtk.Activatable.Gtk_Activatable, Gtk_Menu_Item_Record, Gtk_Menu_Item);
package Implements_Gtk_Buildable is new Glib.Types.Implements (Gtk.Buildable.Gtk_Buildable, Gtk_Menu_Item_Record, Gtk_Menu_Item);
type Gtk_Menu_Item_Record is new Gtk_Bin_Record with null record;
type Gtk_Menu_Item is access all Gtk_Menu_Item_Record'Class;
type Cb_Gtk_Menu_Item_Void is not null access procedure (Self : access Gtk_Menu_Item_Record'Class);
type Cb_GObject_Void is not null access procedure (Self : access Glib.Object.GObject_Record'Class);
type Cb_Gtk_Menu_Item_Gint_Void is not null access procedure (Self : access Gtk_Menu_Item_Record'Class; Object : Gint);
type Cb_GObject_Gint_Void is not null access procedure (Self : access Glib.Object.GObject_Record'Class; Object : Gint);
type Cb_Gtk_Menu_Item_Address_Void is not null access procedure (Self : access Gtk_Menu_Item_Record'Class; Object : System.Address);
type Cb_GObject_Address_Void is not null access procedure (Self : access Glib.Object.GObject_Record'Class; Object : System.Address);
Accel_Path_Property : constant Glib.Properties.Property_String;
Label_Property : constant Glib.Properties.Property_String;
Right_Justified_Property : constant Glib.Properties.Property_Boolean;
Submenu_Property : constant Glib.Properties.Property_Object;
Use_Underline_Property : constant Glib.Properties.Property_Boolean;
Signal_Activate : constant Glib.Signal_Name := "activate";
Signal_Activate_Item : constant Glib.Signal_Name := "activate-item";
Signal_Deselect : constant Glib.Signal_Name := "deselect";
Signal_Gtk_Select : constant Glib.Signal_Name := "select";
Signal_Toggle_Size_Allocate : constant Glib.Signal_Name := "toggle-size-allocate";
Signal_Toggle_Size_Request : constant Glib.Signal_Name := "toggle-size-request";
procedure Gtk_New
( | Menu_Item | : out Gtk_Menu_Item); |
procedure Initialize
( | Menu_Item | : not null access Gtk_Menu_Item_Record'Class); |
function Gtk_Menu_Item_New return Gtk_Menu_Item;
procedure Gtk_New_With_Label
( | Menu_Item | : out Gtk_Menu_Item; |
Label | : UTF8_String); |
procedure Initialize_With_Label
( | Menu_Item | : not null access Gtk_Menu_Item_Record'Class; |
Label | : UTF8_String); |
function Gtk_Menu_Item_New_With_Label
( | Label | : UTF8_String) return Gtk_Menu_Item; |
procedure Gtk_New_With_Mnemonic
( | Menu_Item | : out Gtk_Menu_Item; |
Label | : UTF8_String); |
procedure Initialize_With_Mnemonic
( | Menu_Item | : not null access Gtk_Menu_Item_Record'Class; |
Label | : UTF8_String); |
function Gtk_Menu_Item_New_With_Mnemonic
( | Label | : UTF8_String) return Gtk_Menu_Item; |
function Get_Type return Glib.GType;
procedure Activate
( | Menu_Item | : not null access Gtk_Menu_Item_Record); |
procedure Deselect
( | Menu_Item | : not null access Gtk_Menu_Item_Record); |
function Get_Accel_Path
( | Menu_Item | : not null access Gtk_Menu_Item_Record) return UTF8_String; |
procedure Set_Accel_Path
( | Menu_Item | : not null access Gtk_Menu_Item_Record; |
Accel_Path | : UTF8_String := ""); |
function Get_Label
( | Menu_Item | : not null access Gtk_Menu_Item_Record) return UTF8_String; |
procedure Set_Label
( | Menu_Item | : not null access Gtk_Menu_Item_Record; |
Label | : UTF8_String); |
function Get_Reserve_Indicator
( | Menu_Item | : not null access Gtk_Menu_Item_Record) return Boolean; |
procedure Set_Reserve_Indicator
( | Menu_Item | : not null access Gtk_Menu_Item_Record; |
Reserve | : Boolean); |
function Get_Right_Justified
( | Menu_Item | : not null access Gtk_Menu_Item_Record) return Boolean; |
procedure Set_Right_Justified
( | Menu_Item | : not null access Gtk_Menu_Item_Record; |
Right_Justified | : Boolean := True); |
function Get_Submenu
( | Menu_Item | : not null access Gtk_Menu_Item_Record) return Gtk.Widget.Gtk_Widget; |
procedure Set_Submenu
( | Menu_Item | : not null access Gtk_Menu_Item_Record; |
Submenu | : access Gtk.Widget.Gtk_Widget_Record'Class); |
function Get_Use_Underline
( | Menu_Item | : not null access Gtk_Menu_Item_Record) return Boolean; |
procedure Set_Use_Underline
( | Menu_Item | : not null access Gtk_Menu_Item_Record; |
Setting | : Boolean); |
procedure Gtk_Select
( | Menu_Item | : not null access Gtk_Menu_Item_Record); |
procedure Toggle_Size_Allocate
( | Menu_Item | : not null access Gtk_Menu_Item_Record; |
Allocation | : Gint); |
procedure Toggle_Size_Request
( | Menu_Item | : not null access Gtk_Menu_Item_Record; |
Requisition | : in out Gint); |
procedure Gtk_New
( | Menu_Item | : out Gtk_Menu_Item; |
Label | : UTF8_String) renames Gtk_New_With_Label; |
procedure Initialize
( | Menu_Item | : access Gtk_Menu_Item_Record'Class; |
Label | : UTF8_String) renames Initialize_With_Label; |
function Get_Action_Name
( | Self | : not null access Gtk_Menu_Item_Record) return UTF8_String; |
procedure Set_Action_Name
( | Self | : not null access Gtk_Menu_Item_Record; |
Action_Name | : UTF8_String); |
function Get_Action_Target_Value
( | Self | : not null access Gtk_Menu_Item_Record) return Glib.Variant.Gvariant; |
procedure Set_Action_Target_Value
( | Self | : not null access Gtk_Menu_Item_Record; |
Target_Value | : Glib.Variant.Gvariant); |
procedure Set_Detailed_Action_Name
( | Self | : not null access Gtk_Menu_Item_Record; |
Detailed_Action_Name | : UTF8_String); |
procedure Do_Set_Related_Action
( | Self | : not null access Gtk_Menu_Item_Record; |
Action | : not null access Gtk.Action.Gtk_Action_Record'Class); |
function Get_Related_Action
( | Self | : not null access Gtk_Menu_Item_Record) return Gtk.Action.Gtk_Action; |
procedure Set_Related_Action
( | Self | : not null access Gtk_Menu_Item_Record; |
Action | : not null access Gtk.Action.Gtk_Action_Record'Class); |
function Get_Use_Action_Appearance
( | Self | : not null access Gtk_Menu_Item_Record) return Boolean; |
procedure Set_Use_Action_Appearance
( | Self | : not null access Gtk_Menu_Item_Record; |
Use_Appearance | : Boolean); |
procedure Sync_Action_Properties
( | Self | : not null access Gtk_Menu_Item_Record; |
Action | : access Gtk.Action.Gtk_Action_Record'Class); |
procedure On_Activate
( | Self | : not null access Gtk_Menu_Item_Record; |
Call | : Cb_Gtk_Menu_Item_Void; | |
After | : Boolean := False); |
procedure On_Activate
( | Self | : not null access Gtk_Menu_Item_Record; |
Call | : Cb_GObject_Void; | |
Slot | : not null access Glib.Object.GObject_Record'Class; | |
After | : Boolean := False); |
procedure On_Activate_Item
( | Self | : not null access Gtk_Menu_Item_Record; |
Call | : Cb_Gtk_Menu_Item_Void; | |
After | : Boolean := False); |
procedure On_Activate_Item
( | Self | : not null access Gtk_Menu_Item_Record; |
Call | : Cb_GObject_Void; | |
Slot | : not null access Glib.Object.GObject_Record'Class; | |
After | : Boolean := False); |
procedure On_Deselect
( | Self | : not null access Gtk_Menu_Item_Record; |
Call | : Cb_Gtk_Menu_Item_Void; | |
After | : Boolean := False); |
procedure On_Deselect
( | Self | : not null access Gtk_Menu_Item_Record; |
Call | : Cb_GObject_Void; | |
Slot | : not null access Glib.Object.GObject_Record'Class; | |
After | : Boolean := False); |
procedure On_Gtk_Select
( | Self | : not null access Gtk_Menu_Item_Record; |
Call | : Cb_Gtk_Menu_Item_Void; | |
After | : Boolean := False); |
procedure On_Gtk_Select
( | Self | : not null access Gtk_Menu_Item_Record; |
Call | : Cb_GObject_Void; | |
Slot | : not null access Glib.Object.GObject_Record'Class; | |
After | : Boolean := False); |
procedure On_Toggle_Size_Allocate
( | Self | : not null access Gtk_Menu_Item_Record; |
Call | : Cb_Gtk_Menu_Item_Gint_Void; | |
After | : Boolean := False); |
procedure On_Toggle_Size_Allocate
( | Self | : not null access Gtk_Menu_Item_Record; |
Call | : Cb_GObject_Gint_Void; | |
Slot | : not null access Glib.Object.GObject_Record'Class; | |
After | : Boolean := False); |
procedure On_Toggle_Size_Request
( | Self | : not null access Gtk_Menu_Item_Record; |
Call | : Cb_Gtk_Menu_Item_Address_Void; | |
After | : Boolean := False); |
procedure On_Toggle_Size_Request
( | Self | : not null access Gtk_Menu_Item_Record; |
Call | : Cb_GObject_Address_Void; | |
Slot | : not null access Glib.Object.GObject_Record'Class; | |
After | : Boolean := False); |
function "+"
( | Widget | : access Gtk_Menu_Item_Record'Class) return Gtk.Actionable.Gtk_Actionable renames Implements_Gtk_Actionable.To_Interface; |
function "-"
( | Interf | : Gtk.Actionable.Gtk_Actionable) return Gtk_Menu_Item renames Implements_Gtk_Actionable.To_Object; |
function "+"
( | Widget | : access Gtk_Menu_Item_Record'Class) return Gtk.Activatable.Gtk_Activatable renames Implements_Gtk_Activatable.To_Interface; |
function "-"
( | Interf | : Gtk.Activatable.Gtk_Activatable) return Gtk_Menu_Item renames Implements_Gtk_Activatable.To_Object; |
function "+"
( | Widget | : access Gtk_Menu_Item_Record'Class) return Gtk.Buildable.Gtk_Buildable renames Implements_Gtk_Buildable.To_Interface; |
function "-"
( | Interf | : Gtk.Buildable.Gtk_Buildable) return Gtk_Menu_Item renames Implements_Gtk_Buildable.To_Object; |
The Gtk.Menu_Item.Gtk_Menu_Item widget and the derived widgets are the only valid childs for menus. Their function is to correctly handle highlighting, alignment, events and submenus.
As it derives from Gtk.Bin.Gtk_Bin it can hold any valid child widget, altough only a few are really useful. == GtkMenuItem as GtkBuildable == The GtkMenuItem implementation of the GtkBuildable interface supports adding a submenu by specifying "submenu" as the "type" attribute of a <child> element. == A UI definition fragment with submenus == <object class="GtkMenuItem"> <child type="submenu"> <object class="GtkMenu"/> </child> </object>