type Gmenu_Record is new Gmenu_Model_Record with null record;
type Gmenu_Item_Record is new GObject_Record with null record;
type Gmenu is access all Gmenu_Record'Class;
type Gmenu_Item is access all Gmenu_Item_Record'Class;
procedure G_New
( | Self | : out Gmenu); |
procedure Initialize
( | Self | : not null access Gmenu_Record'Class); |
function Gmenu_New return Gmenu;
function Get_Type_Menu return Glib.GType;
procedure G_New
( | Self | : out Gmenu_Item; |
Label | : UTF8_String := ""; | |
Detailed_Action | : UTF8_String := ""); |
procedure Initialize
( | Self | : not null access Gmenu_Item_Record'Class; |
Label | : UTF8_String := ""; | |
Detailed_Action | : UTF8_String := ""); |
function Gmenu_Item_New
( | Label | : UTF8_String := ""; |
Detailed_Action | : UTF8_String := "") return Gmenu_Item; |
procedure G_New_From_Model
( | Self | : out Gmenu_Item; |
Model | : not null access Glib.Menu_Model.Gmenu_Model_Record'Class; | |
Item_Index | : Gint); |
procedure Initialize_From_Model
( | Self | : not null access Gmenu_Item_Record'Class; |
Model | : not null access Glib.Menu_Model.Gmenu_Model_Record'Class; | |
Item_Index | : Gint); |
function Gmenu_Item_New_From_Model
( | Model | : not null access Glib.Menu_Model.Gmenu_Model_Record'Class; |
Item_Index | : Gint) return Gmenu_Item; |
procedure G_New_Section
( | Self | : out Gmenu_Item; |
Label | : UTF8_String := ""; | |
Section | : not null access Glib.Menu_Model.Gmenu_Model_Record'Class); |
procedure Initialize_Section
( | Self | : not null access Gmenu_Item_Record'Class; |
Label | : UTF8_String := ""; | |
Section | : not null access Glib.Menu_Model.Gmenu_Model_Record'Class); |
function Gmenu_Item_New_Section
( | Label | : UTF8_String := ""; |
Section | : not null access Glib.Menu_Model.Gmenu_Model_Record'Class) return Gmenu_Item; |
procedure G_New_Submenu
( | Self | : out Gmenu_Item; |
Label | : UTF8_String := ""; | |
Submenu | : not null access Glib.Menu_Model.Gmenu_Model_Record'Class); |
procedure Initialize_Submenu
( | Self | : not null access Gmenu_Item_Record'Class; |
Label | : UTF8_String := ""; | |
Submenu | : not null access Glib.Menu_Model.Gmenu_Model_Record'Class); |
function Gmenu_Item_New_Submenu
( | Label | : UTF8_String := ""; |
Submenu | : not null access Glib.Menu_Model.Gmenu_Model_Record'Class) return Gmenu_Item; |
function Get_Type_Menu_Item return Glib.GType;
procedure Append
( | Self | : not null access Gmenu_Record; |
Label | : UTF8_String := ""; | |
Detailed_Action | : UTF8_String := ""); |
procedure Append_Item
( | Self | : not null access Gmenu_Record; |
Item | : not null access Gmenu_Item_Record'Class); |
procedure Append_Section
( | Self | : not null access Gmenu_Record; |
Label | : UTF8_String := ""; | |
Section | : not null access Glib.Menu_Model.Gmenu_Model_Record'Class); |
procedure Append_Submenu
( | Self | : not null access Gmenu_Record; |
Label | : UTF8_String := ""; | |
Submenu | : not null access Glib.Menu_Model.Gmenu_Model_Record'Class); |
procedure Freeze
( | Self | : not null access Gmenu_Record); |
procedure Insert
( | Self | : not null access Gmenu_Record; |
Position | : Gint; | |
Label | : UTF8_String := ""; | |
Detailed_Action | : UTF8_String := ""); |
procedure Insert_Item
( | Self | : not null access Gmenu_Record; |
Position | : Gint; | |
Item | : not null access Gmenu_Item_Record'Class); |
procedure Insert_Section
( | Self | : not null access Gmenu_Record; |
Position | : Gint; | |
Label | : UTF8_String := ""; | |
Section | : not null access Glib.Menu_Model.Gmenu_Model_Record'Class); |
procedure Insert_Submenu
( | Self | : not null access Gmenu_Record; |
Position | : Gint; | |
Label | : UTF8_String := ""; | |
Submenu | : not null access Glib.Menu_Model.Gmenu_Model_Record'Class); |
procedure Prepend
( | Self | : not null access Gmenu_Record; |
Label | : UTF8_String := ""; | |
Detailed_Action | : UTF8_String := ""); |
procedure Prepend_Item
( | Self | : not null access Gmenu_Record; |
Item | : not null access Gmenu_Item_Record'Class); |
procedure Prepend_Section
( | Self | : not null access Gmenu_Record; |
Label | : UTF8_String := ""; | |
Section | : not null access Glib.Menu_Model.Gmenu_Model_Record'Class); |
procedure Prepend_Submenu
( | Self | : not null access Gmenu_Record; |
Label | : UTF8_String := ""; | |
Submenu | : not null access Glib.Menu_Model.Gmenu_Model_Record'Class); |
procedure Remove
( | Self | : not null access Gmenu_Record; |
Position | : Gint); |
function Get_Attribute_Value
( | Self | : not null access Gmenu_Item_Record; |
Attribute | : UTF8_String; | |
Expected_Type | : Glib.Variant.Gvariant_Type) return Glib.Variant.Gvariant; |
procedure Set_Attribute_Value
( | Self | : not null access Gmenu_Item_Record; |
Attribute | : UTF8_String; | |
Value | : Glib.Variant.Gvariant); |
function Get_Link
( | Self | : not null access Gmenu_Item_Record; |
Link | : UTF8_String) return Glib.Menu_Model.Gmenu_Model; |
procedure Set_Link
( | Self | : not null access Gmenu_Item_Record; |
Link | : UTF8_String; | |
Model | : access Glib.Menu_Model.Gmenu_Model_Record'Class); |
procedure Set_Action_And_Target_Value
( | Self | : not null access Gmenu_Item_Record; |
Action | : UTF8_String := ""; | |
Target_Value | : Glib.Variant.Gvariant); |
procedure Set_Detailed_Action
( | Self | : not null access Gmenu_Item_Record; |
Detailed_Action | : UTF8_String); |
procedure Set_Label
( | Self | : not null access Gmenu_Item_Record; |
Label | : UTF8_String := ""); |
procedure Set_Section
( | Self | : not null access Gmenu_Item_Record; |
Section | : access Glib.Menu_Model.Gmenu_Model_Record'Class); |
procedure Set_Submenu
( | Self | : not null access Gmenu_Item_Record; |
Submenu | : access Glib.Menu_Model.Gmenu_Model_Record'Class); |
Glib.Menu.Gmenu is a simple implementation of Glib.Menu_Model.Gmenu_Model.
You populate a Glib.Menu.Gmenu by adding Glib.Menu.Gmenu_Item instances to it.
There are some convenience functions to allow you to directly add items (avoiding Glib.Menu.Gmenu_Item) for the common cases. To add a regular item, use Glib.Menu.Insert. To add a section, use Glib.Menu.Insert_Section.
To add a submenu, use Glib.Menu.Insert_Submenu.