Index

Package: Menu

Description

package Gtk.Menu is

A Gtk.Menu.Gtk_Menu is a Gtk.Menu_Shell.Gtk_Menu_Shell that implements a drop down menu consisting of a list of Gtk.Menu_Item.Gtk_Menu_Item objects which can be navigated and activated by the user to perform application functions.

A Gtk.Menu.Gtk_Menu is most commonly dropped down by activating a Gtk.Menu_Item.Gtk_Menu_Item in a Gtk.Menu_Bar.Gtk_Menu_Bar or popped up by activating a Gtk.Menu_Item.Gtk_Menu_Item in another Gtk.Menu.Gtk_Menu.

A Gtk.Menu.Gtk_Menu can also be popped up by activating a Gtk.Combo_Box.Gtk_Combo_Box. Other composite widgets such as the Gtk.Notebook.Gtk_Notebook can pop up a Gtk.Menu.Gtk_Menu as well.

Applications can display a Gtk.Menu.Gtk_Menu as a popup menu by calling the Gtk.Menu.Popup function. The example below shows how an application can pop up a menu when the 3rd mouse button is pressed. == Connecting the popup signal handler. == /<!---->* connect our handler which will popup the menu *<!---->/ g_signal_connect_swapped (window, "button_press_event", G_CALLBACK (my_popup_handler), menu); == Signal handler which displays a popup menu. == static gint my_popup_handler (GtkWidget *widget, GdkEvent *event) { GtkMenu *menu; GdkEventButton *event_button; g_return_val_if_fail (widget != NULL, FALSE); g_return_val_if_fail (GTK_IS_MENU (widget), FALSE); g_return_val_if_fail (event != NULL, FALSE); /<!---->* The "widget" is the menu that was supplied when * g_signal_connect_swapped was called. *<!---->/ menu = GTK_MENU (widget); if (event->type == GDK_BUTTON_PRESS) { event_button = (GdkEventButton *) event; if (event_button->button == GDK_BUTTON_SECONDARY) { gtk_menu_popup (menu, NULL, NULL, NULL, NULL, event_button->button, event_button->time); return TRUE; } } return FALSE; }

Packages

Popup_User_Data (generic)

Popup_For_Device_User_Data (generic)

Implements_Gtk_Buildable (new Glib.Types.Implements)

package Implements_Gtk_Buildable is new Glib.Types.Implements
     (Gtk.Buildable.Gtk_Buildable, Gtk_Menu_Record, Gtk_Menu);

Classes

Gtk_Menu_Record

type Gtk_Menu_Record is new Gtk_Menu_Shell_Record with null record;

Ancestors:

Immediate Children:

Primitive operations:

Attach_To_Widget
Get_Accel_Group
Get_Accel_Path
Get_Attach_Widget
Get_Reserve_Toggle_Size
Get_Tearoff_State
Glib.Object.Deallocate (Inherited)
Glib.Object.Get_Type (Inherited)
Glib.Object.Notify (Inherited)
Glib.Object.Ref (Inherited)
Glib.Object.Ref_Sink (Inherited)
Glib.Object.Unref (Inherited)
Gtk.Container.Add (Inherited)
Gtk.Container.Check_Resize (Inherited)
Gtk.Container.Child_Get_Property (Inherited)
Gtk.Container.Child_Notify (Inherited)
Gtk.Container.Child_Set_Property (Inherited)
Gtk.Container.Child_Type (Inherited)
Gtk.Container.Forall (Inherited)
Gtk.Container.Foreach (Inherited)
Gtk.Container.Get_Border_Width (Inherited)
Gtk.Container.Get_Children (Inherited)
Gtk.Container.Get_Focus_Child (Inherited)
Gtk.Container.Get_Focus_Hadjustment (Inherited)
Gtk.Container.Get_Focus_Vadjustment (Inherited)
Gtk.Container.Get_Path_For_Child (Inherited)
Gtk.Container.Get_Resize_Mode (Inherited)
Gtk.Container.On_Add (Inherited)
Gtk.Container.On_Add (Inherited)
Gtk.Container.On_Check_Resize (Inherited)
Gtk.Container.On_Check_Resize (Inherited)
Gtk.Container.On_Remove (Inherited)
Gtk.Container.On_Remove (Inherited)
Gtk.Container.On_Set_Focus_Child (Inherited)
Gtk.Container.On_Set_Focus_Child (Inherited)
Gtk.Container.Propagate_Draw (Inherited)
Gtk.Container.Remove (Inherited)
Gtk.Container.Resize_Children (Inherited)
Gtk.Container.Set_Border_Width (Inherited)
Gtk.Container.Set_Focus_Chain (Inherited)
Gtk.Container.Set_Focus_Child (Inherited)
Gtk.Container.Set_Focus_Hadjustment (Inherited)
Gtk.Container.Set_Focus_Vadjustment (Inherited)
Gtk.Container.Set_Reallocate_Redraws (Inherited)
Gtk.Container.Set_Resize_Mode (Inherited)
Gtk.Container.Unset_Focus_Chain (Inherited)
Gtk.Menu_Shell.Activate_Item (Inherited)
Gtk.Menu_Shell.Append (Inherited)
Gtk.Menu_Shell.Bind_Model (Inherited)
Gtk.Menu_Shell.Cancel (Inherited)
Gtk.Menu_Shell.Deactivate (Inherited)
Gtk.Menu_Shell.Deselect (Inherited)
Gtk.Menu_Shell.Get_Parent_Shell (Inherited)
Gtk.Menu_Shell.Get_Selected_Item (Inherited)
Gtk.Menu_Shell.Get_Take_Focus (Inherited)
Gtk.Menu_Shell.Insert (Inherited)
Gtk.Menu_Shell.On_Activate_Current (Inherited)
Gtk.Menu_Shell.On_Activate_Current (Inherited)
Gtk.Menu_Shell.On_Cancel (Inherited)
Gtk.Menu_Shell.On_Cancel (Inherited)
Gtk.Menu_Shell.On_Cycle_Focus (Inherited)
Gtk.Menu_Shell.On_Cycle_Focus (Inherited)
Gtk.Menu_Shell.On_Deactivate (Inherited)
Gtk.Menu_Shell.On_Deactivate (Inherited)
Gtk.Menu_Shell.On_Insert (Inherited)
Gtk.Menu_Shell.On_Insert (Inherited)
Gtk.Menu_Shell.On_Move_Current (Inherited)
Gtk.Menu_Shell.On_Move_Current (Inherited)
Gtk.Menu_Shell.On_Move_Selected (Inherited)
Gtk.Menu_Shell.On_Move_Selected (Inherited)
Gtk.Menu_Shell.On_Selection_Done (Inherited)
Gtk.Menu_Shell.On_Selection_Done (Inherited)
Gtk.Menu_Shell.Prepend (Inherited)
Gtk.Menu_Shell.Select_First (Inherited)
Gtk.Menu_Shell.Select_Item (Inherited)
Gtk.Menu_Shell.Set_Take_Focus (Inherited)
Gtk.Widget.Activate (Inherited)
Gtk.Widget.Add_Accelerator (Inherited)
Gtk.Widget.Add_Device_Events (Inherited)
Gtk.Widget.Add_Events (Inherited)
Gtk.Widget.Add_Mnemonic_Label (Inherited)
Gtk.Widget.Add_Tick_Callback (Inherited)
Gtk.Widget.Can_Activate_Accel (Inherited)
Gtk.Widget.Child_Focus (Inherited)
Gtk.Widget.Child_Notify (Inherited)
Gtk.Widget.Compute_Expand (Inherited)
Gtk.Widget.Create_Pango_Context (Inherited)
Gtk.Widget.Create_Pango_Layout (Inherited)
Gtk.Widget.Destroy (Inherited)
Gtk.Widget.Destroyed (Inherited)
Gtk.Widget.Device_Is_Shadowed (Inherited)
Gtk.Widget.Drag_Check_Threshold (Inherited)
Gtk.Widget.Drag_Dest_Add_Image_Targets (Inherited)
Gtk.Widget.Drag_Dest_Add_Text_Targets (Inherited)
Gtk.Widget.Drag_Dest_Add_Uri_Targets (Inherited)
Gtk.Widget.Drag_Dest_Get_Track_Motion (Inherited)
Gtk.Widget.Drag_Dest_Set_Proxy (Inherited)
Gtk.Widget.Drag_Dest_Set_Track_Motion (Inherited)
Gtk.Widget.Drag_Dest_Unset (Inherited)
Gtk.Widget.Drag_Get_Data (Inherited)
Gtk.Widget.Drag_Highlight (Inherited)
Gtk.Widget.Drag_Source_Add_Image_Targets (Inherited)
Gtk.Widget.Drag_Source_Add_Uri_Targets (Inherited)
Gtk.Widget.Drag_Source_Set_Icon_Pixbuf (Inherited)
Gtk.Widget.Drag_Source_Unset (Inherited)
Gtk.Widget.Drag_Unhighlight (Inherited)
Gtk.Widget.Draw (Inherited)
Gtk.Widget.Ensure_Style (Inherited)
Gtk.Widget.Error_Bell (Inherited)
Gtk.Widget.Event (Inherited)
Gtk.Widget.Freeze_Child_Notify (Inherited)
Gtk.Widget.Get_Allocated_Height (Inherited)
Gtk.Widget.Get_Allocated_Width (Inherited)
Gtk.Widget.Get_Allocation (Inherited)
Gtk.Widget.Get_Ancestor (Inherited)
Gtk.Widget.Get_App_Paintable (Inherited)
Gtk.Widget.Get_Can_Default (Inherited)
Gtk.Widget.Get_Can_Focus (Inherited)
Gtk.Widget.Get_Child_Requisition (Inherited)
Gtk.Widget.Get_Child_Visible (Inherited)
Gtk.Widget.Get_Composite_Name (Inherited)
Gtk.Widget.Get_Device_Enabled (Inherited)
Gtk.Widget.Get_Device_Events (Inherited)
Gtk.Widget.Get_Direction (Inherited)
Gtk.Widget.Get_Display (Inherited)
Gtk.Widget.Get_Double_Buffered (Inherited)
Gtk.Widget.Get_Events (Inherited)
Gtk.Widget.Get_Frame_Clock (Inherited)
Gtk.Widget.Get_Halign (Inherited)
Gtk.Widget.Get_Has_Tooltip (Inherited)
Gtk.Widget.Get_Has_Window (Inherited)
Gtk.Widget.Get_Hexpand (Inherited)
Gtk.Widget.Get_Hexpand_Set (Inherited)
Gtk.Widget.Get_Mapped (Inherited)
Gtk.Widget.Get_Margin_Bottom (Inherited)
Gtk.Widget.Get_Margin_Left (Inherited)
Gtk.Widget.Get_Margin_Right (Inherited)
Gtk.Widget.Get_Margin_Top (Inherited)
Gtk.Widget.Get_Modifier_Mask (Inherited)
Gtk.Widget.Get_Name (Inherited)
Gtk.Widget.Get_No_Show_All (Inherited)
Gtk.Widget.Get_Opacity (Inherited)
Gtk.Widget.Get_Pango_Context (Inherited)
Gtk.Widget.Get_Parent (Inherited)
Gtk.Widget.Get_Parent_Window (Inherited)
Gtk.Widget.Get_Path (Inherited)
Gtk.Widget.Get_Pointer (Inherited)
Gtk.Widget.Get_Preferred_Height (Inherited)
Gtk.Widget.Get_Preferred_Height_For_Width (Inherited)
Gtk.Widget.Get_Preferred_Size (Inherited)
Gtk.Widget.Get_Preferred_Width (Inherited)
Gtk.Widget.Get_Preferred_Width_For_Height (Inherited)
Gtk.Widget.Get_Realized (Inherited)
Gtk.Widget.Get_Receives_Default (Inherited)
Gtk.Widget.Get_Request_Mode (Inherited)
Gtk.Widget.Get_Requisition (Inherited)
Gtk.Widget.Get_Root_Window (Inherited)
Gtk.Widget.Get_Screen (Inherited)
Gtk.Widget.Get_Sensitive (Inherited)
Gtk.Widget.Get_Size_Request (Inherited)
Gtk.Widget.Get_State (Inherited)
Gtk.Widget.Get_State_Flags (Inherited)
Gtk.Widget.Get_Style (Inherited)
Gtk.Widget.Get_Support_Multidevice (Inherited)
Gtk.Widget.Get_Tooltip_Markup (Inherited)
Gtk.Widget.Get_Tooltip_Text (Inherited)
Gtk.Widget.Get_Tooltip_Window (Inherited)
Gtk.Widget.Get_Toplevel (Inherited)
Gtk.Widget.Get_Valign (Inherited)
Gtk.Widget.Get_Vexpand (Inherited)
Gtk.Widget.Get_Vexpand_Set (Inherited)
Gtk.Widget.Get_Visible (Inherited)
Gtk.Widget.Get_Visual (Inherited)
Gtk.Widget.Get_Window (Inherited)
Gtk.Widget.Grab_Add (Inherited)
Gtk.Widget.Grab_Default (Inherited)
Gtk.Widget.Grab_Focus (Inherited)
Gtk.Widget.Grab_Remove (Inherited)
Gtk.Widget.Has_Default (Inherited)
Gtk.Widget.Has_Focus (Inherited)
Gtk.Widget.Has_Grab (Inherited)
Gtk.Widget.Has_Rc_Style (Inherited)
Gtk.Widget.Has_Screen (Inherited)
Gtk.Widget.Has_Visible_Focus (Inherited)
Gtk.Widget.Hide (Inherited)
Gtk.Widget.Hide_On_Delete (Inherited)
Gtk.Widget.In_Destruction (Inherited)
Gtk.Widget.Input_Shape_Combine_Region (Inherited)
Gtk.Widget.Intersect (Inherited)
Gtk.Widget.Is_Ancestor (Inherited)
Gtk.Widget.Is_Composited (Inherited)
Gtk.Widget.Is_Drawable (Inherited)
Gtk.Widget.Is_Focus (Inherited)
Gtk.Widget.Is_Sensitive (Inherited)
Gtk.Widget.Is_Toplevel (Inherited)
Gtk.Widget.Is_Visible (Inherited)
Gtk.Widget.Keynav_Failed (Inherited)
Gtk.Widget.List_Mnemonic_Labels (Inherited)
Gtk.Widget.Map (Inherited)
Gtk.Widget.Mnemonic_Activate (Inherited)
Gtk.Widget.Modify_Base (Inherited)
Gtk.Widget.Modify_Bg (Inherited)
Gtk.Widget.Modify_Cursor (Inherited)
Gtk.Widget.Modify_Fg (Inherited)
Gtk.Widget.Modify_Font (Inherited)
Gtk.Widget.Modify_Text (Inherited)
Gtk.Widget.On_Accel_Closures_Changed (Inherited)
Gtk.Widget.On_Accel_Closures_Changed (Inherited)
Gtk.Widget.On_Button_Press_Event (Inherited)
Gtk.Widget.On_Button_Press_Event (Inherited)
Gtk.Widget.On_Button_Release_Event (Inherited)
Gtk.Widget.On_Button_Release_Event (Inherited)
Gtk.Widget.On_Can_Activate_Accel (Inherited)
Gtk.Widget.On_Can_Activate_Accel (Inherited)
Gtk.Widget.On_Child_Notify (Inherited)
Gtk.Widget.On_Child_Notify (Inherited)
Gtk.Widget.On_Composited_Changed (Inherited)
Gtk.Widget.On_Composited_Changed (Inherited)
Gtk.Widget.On_Configure_Event (Inherited)
Gtk.Widget.On_Configure_Event (Inherited)
Gtk.Widget.On_Damage_Event (Inherited)
Gtk.Widget.On_Damage_Event (Inherited)
Gtk.Widget.On_Delete_Event (Inherited)
Gtk.Widget.On_Delete_Event (Inherited)
Gtk.Widget.On_Destroy (Inherited)
Gtk.Widget.On_Destroy (Inherited)
Gtk.Widget.On_Destroy_Event (Inherited)
Gtk.Widget.On_Destroy_Event (Inherited)
Gtk.Widget.On_Direction_Changed (Inherited)
Gtk.Widget.On_Direction_Changed (Inherited)
Gtk.Widget.On_Drag_Begin (Inherited)
Gtk.Widget.On_Drag_Begin (Inherited)
Gtk.Widget.On_Drag_Data_Delete (Inherited)
Gtk.Widget.On_Drag_Data_Delete (Inherited)
Gtk.Widget.On_Drag_Data_Get (Inherited)
Gtk.Widget.On_Drag_Data_Get (Inherited)
Gtk.Widget.On_Drag_Data_Received (Inherited)
Gtk.Widget.On_Drag_Data_Received (Inherited)
Gtk.Widget.On_Drag_Drop (Inherited)
Gtk.Widget.On_Drag_Drop (Inherited)
Gtk.Widget.On_Drag_End (Inherited)
Gtk.Widget.On_Drag_End (Inherited)
Gtk.Widget.On_Drag_Failed (Inherited)
Gtk.Widget.On_Drag_Failed (Inherited)
Gtk.Widget.On_Drag_Leave (Inherited)
Gtk.Widget.On_Drag_Leave (Inherited)
Gtk.Widget.On_Drag_Motion (Inherited)
Gtk.Widget.On_Drag_Motion (Inherited)
Gtk.Widget.On_Draw (Inherited)
Gtk.Widget.On_Draw (Inherited)
Gtk.Widget.On_Enter_Notify_Event (Inherited)
Gtk.Widget.On_Enter_Notify_Event (Inherited)
Gtk.Widget.On_Event (Inherited)
Gtk.Widget.On_Event (Inherited)
Gtk.Widget.On_Event_After (Inherited)
Gtk.Widget.On_Event_After (Inherited)
Gtk.Widget.On_Focus (Inherited)
Gtk.Widget.On_Focus (Inherited)
Gtk.Widget.On_Focus_In_Event (Inherited)
Gtk.Widget.On_Focus_In_Event (Inherited)
Gtk.Widget.On_Focus_Out_Event (Inherited)
Gtk.Widget.On_Focus_Out_Event (Inherited)
Gtk.Widget.On_Grab_Broken_Event (Inherited)
Gtk.Widget.On_Grab_Broken_Event (Inherited)
Gtk.Widget.On_Grab_Focus (Inherited)
Gtk.Widget.On_Grab_Focus (Inherited)
Gtk.Widget.On_Grab_Notify (Inherited)
Gtk.Widget.On_Grab_Notify (Inherited)
Gtk.Widget.On_Hide (Inherited)
Gtk.Widget.On_Hide (Inherited)
Gtk.Widget.On_Hierarchy_Changed (Inherited)
Gtk.Widget.On_Hierarchy_Changed (Inherited)
Gtk.Widget.On_Key_Press_Event (Inherited)
Gtk.Widget.On_Key_Press_Event (Inherited)
Gtk.Widget.On_Key_Release_Event (Inherited)
Gtk.Widget.On_Key_Release_Event (Inherited)
Gtk.Widget.On_Keynav_Failed (Inherited)
Gtk.Widget.On_Keynav_Failed (Inherited)
Gtk.Widget.On_Leave_Notify_Event (Inherited)
Gtk.Widget.On_Leave_Notify_Event (Inherited)
Gtk.Widget.On_Map (Inherited)
Gtk.Widget.On_Map (Inherited)
Gtk.Widget.On_Map_Event (Inherited)
Gtk.Widget.On_Map_Event (Inherited)
Gtk.Widget.On_Mnemonic_Activate (Inherited)
Gtk.Widget.On_Mnemonic_Activate (Inherited)
Gtk.Widget.On_Motion_Notify_Event (Inherited)
Gtk.Widget.On_Motion_Notify_Event (Inherited)
Gtk.Widget.On_Move_Focus (Inherited)
Gtk.Widget.On_Move_Focus (Inherited)
Gtk.Widget.On_Parent_Set (Inherited)
Gtk.Widget.On_Parent_Set (Inherited)
Gtk.Widget.On_Popup_Menu (Inherited)
Gtk.Widget.On_Popup_Menu (Inherited)
Gtk.Widget.On_Property_Notify_Event (Inherited)
Gtk.Widget.On_Property_Notify_Event (Inherited)
Gtk.Widget.On_Proximity_In_Event (Inherited)
Gtk.Widget.On_Proximity_In_Event (Inherited)
Gtk.Widget.On_Proximity_Out_Event (Inherited)
Gtk.Widget.On_Proximity_Out_Event (Inherited)
Gtk.Widget.On_Query_Tooltip (Inherited)
Gtk.Widget.On_Query_Tooltip (Inherited)
Gtk.Widget.On_Realize (Inherited)
Gtk.Widget.On_Realize (Inherited)
Gtk.Widget.On_Screen_Changed (Inherited)
Gtk.Widget.On_Screen_Changed (Inherited)
Gtk.Widget.On_Scroll_Event (Inherited)
Gtk.Widget.On_Scroll_Event (Inherited)
Gtk.Widget.On_Selection_Clear_Event (Inherited)
Gtk.Widget.On_Selection_Clear_Event (Inherited)
Gtk.Widget.On_Selection_Get (Inherited)
Gtk.Widget.On_Selection_Get (Inherited)
Gtk.Widget.On_Selection_Notify_Event (Inherited)
Gtk.Widget.On_Selection_Notify_Event (Inherited)
Gtk.Widget.On_Selection_Received (Inherited)
Gtk.Widget.On_Selection_Received (Inherited)
Gtk.Widget.On_Selection_Request_Event (Inherited)
Gtk.Widget.On_Selection_Request_Event (Inherited)
Gtk.Widget.On_Show (Inherited)
Gtk.Widget.On_Show (Inherited)
Gtk.Widget.On_Show_Help (Inherited)
Gtk.Widget.On_Show_Help (Inherited)
Gtk.Widget.On_Size_Allocate (Inherited)
Gtk.Widget.On_Size_Allocate (Inherited)
Gtk.Widget.On_State_Changed (Inherited)
Gtk.Widget.On_State_Changed (Inherited)
Gtk.Widget.On_State_Flags_Changed (Inherited)
Gtk.Widget.On_State_Flags_Changed (Inherited)
Gtk.Widget.On_Style_Set (Inherited)
Gtk.Widget.On_Style_Set (Inherited)
Gtk.Widget.On_Style_Updated (Inherited)
Gtk.Widget.On_Style_Updated (Inherited)
Gtk.Widget.On_Touch_Event (Inherited)
Gtk.Widget.On_Touch_Event (Inherited)
Gtk.Widget.On_Unmap (Inherited)
Gtk.Widget.On_Unmap (Inherited)
Gtk.Widget.On_Unmap_Event (Inherited)
Gtk.Widget.On_Unmap_Event (Inherited)
Gtk.Widget.On_Unrealize (Inherited)
Gtk.Widget.On_Unrealize (Inherited)
Gtk.Widget.On_Visibility_Notify_Event (Inherited)
Gtk.Widget.On_Visibility_Notify_Event (Inherited)
Gtk.Widget.On_Window_State_Event (Inherited)
Gtk.Widget.On_Window_State_Event (Inherited)
Gtk.Widget.Override_Background_Color (Inherited)
Gtk.Widget.Override_Color (Inherited)
Gtk.Widget.Override_Cursor (Inherited)
Gtk.Widget.Override_Font (Inherited)
Gtk.Widget.Override_Symbolic_Color (Inherited)
Gtk.Widget.Queue_Compute_Expand (Inherited)
Gtk.Widget.Queue_Draw (Inherited)
Gtk.Widget.Queue_Draw_Area (Inherited)
Gtk.Widget.Queue_Draw_Region (Inherited)
Gtk.Widget.Queue_Resize (Inherited)
Gtk.Widget.Queue_Resize_No_Redraw (Inherited)
Gtk.Widget.Realize (Inherited)
Gtk.Widget.Region_Intersect (Inherited)
Gtk.Widget.Register_Window (Inherited)
Gtk.Widget.Remove_Accelerator (Inherited)
Gtk.Widget.Remove_Mnemonic_Label (Inherited)
Gtk.Widget.Remove_Tick_Callback (Inherited)
Gtk.Widget.Render_Icon (Inherited)
Gtk.Widget.Render_Icon_Pixbuf (Inherited)
Gtk.Widget.Reparent (Inherited)
Gtk.Widget.Reset_Rc_Styles (Inherited)
Gtk.Widget.Reset_Style (Inherited)
Gtk.Widget.Send_Expose (Inherited)
Gtk.Widget.Send_Focus_Change (Inherited)
Gtk.Widget.Set_Accel_Path (Inherited)
Gtk.Widget.Set_Allocation (Inherited)
Gtk.Widget.Set_App_Paintable (Inherited)
Gtk.Widget.Set_Can_Default (Inherited)
Gtk.Widget.Set_Can_Focus (Inherited)
Gtk.Widget.Set_Child_Visible (Inherited)
Gtk.Widget.Set_Composite_Name (Inherited)
Gtk.Widget.Set_Device_Enabled (Inherited)
Gtk.Widget.Set_Device_Events (Inherited)
Gtk.Widget.Set_Direction (Inherited)
Gtk.Widget.Set_Double_Buffered (Inherited)
Gtk.Widget.Set_Events (Inherited)
Gtk.Widget.Set_Halign (Inherited)
Gtk.Widget.Set_Has_Tooltip (Inherited)
Gtk.Widget.Set_Has_Window (Inherited)
Gtk.Widget.Set_Hexpand (Inherited)
Gtk.Widget.Set_Hexpand_Set (Inherited)
Gtk.Widget.Set_Mapped (Inherited)
Gtk.Widget.Set_Margin_Bottom (Inherited)
Gtk.Widget.Set_Margin_Left (Inherited)
Gtk.Widget.Set_Margin_Right (Inherited)
Gtk.Widget.Set_Margin_Top (Inherited)
Gtk.Widget.Set_Name (Inherited)
Gtk.Widget.Set_No_Show_All (Inherited)
Gtk.Widget.Set_Opacity (Inherited)
Gtk.Widget.Set_Parent (Inherited)
Gtk.Widget.Set_Parent_Window (Inherited)
Gtk.Widget.Set_Realized (Inherited)
Gtk.Widget.Set_Receives_Default (Inherited)
Gtk.Widget.Set_Redraw_On_Allocate (Inherited)
Gtk.Widget.Set_Sensitive (Inherited)
Gtk.Widget.Set_Size_Request (Inherited)
Gtk.Widget.Set_State (Inherited)
Gtk.Widget.Set_State_Flags (Inherited)
Gtk.Widget.Set_Style (Inherited)
Gtk.Widget.Set_Support_Multidevice (Inherited)
Gtk.Widget.Set_Tooltip_Markup (Inherited)
Gtk.Widget.Set_Tooltip_Text (Inherited)
Gtk.Widget.Set_Tooltip_Window (Inherited)
Gtk.Widget.Set_Valign (Inherited)
Gtk.Widget.Set_Vexpand (Inherited)
Gtk.Widget.Set_Vexpand_Set (Inherited)
Gtk.Widget.Set_Visible (Inherited)
Gtk.Widget.Set_Visual (Inherited)
Gtk.Widget.Set_Window (Inherited)
Gtk.Widget.Shape_Combine_Region (Inherited)
Gtk.Widget.Show (Inherited)
Gtk.Widget.Show_All (Inherited)
Gtk.Widget.Show_Now (Inherited)
Gtk.Widget.Size_Allocate (Inherited)
Gtk.Widget.Size_Request (Inherited)
Gtk.Widget.Style_Attach (Inherited)
Gtk.Widget.Style_Get_Property (Inherited)
Gtk.Widget.Thaw_Child_Notify (Inherited)
Gtk.Widget.Translate_Coordinates (Inherited)
Gtk.Widget.Trigger_Tooltip_Query (Inherited)
Gtk.Widget.Unmap (Inherited)
Gtk.Widget.Unparent (Inherited)
Gtk.Widget.Unrealize (Inherited)
Gtk.Widget.Unregister_Window (Inherited)
Gtk.Widget.Unset_State_Flags (Inherited)
On_Move_Scroll
On_Move_Scroll
Popup_For_Device
Reorder_Child
Set_Accel_Group
Set_Accel_Path
Set_Reserve_Toggle_Size
Set_Tearoff_State

Types

Gtk_Menu

type Gtk_Menu is access all Gtk_Menu_Record'Class;

Gtk_Menu_Detach_Func

type Gtk_Menu_Detach_Func is access procedure (Attach_Widget : System.Address; Menu : System.Address);
A user function supplied when calling Gtk.Menu.Attach_To_Widget which will be called when the menu is later detached from the widget. "attach_widget": the Gtk.Widget.Gtk_Widget that the menu is being detached from. "menu": the Gtk.Menu.Gtk_Menu being detached.

Gtk_Menu_Position_Func

type Gtk_Menu_Position_Func is access procedure
     (Menu    : not null access Gtk_Menu_Record'Class;
      X       : in out Gint;
      Y       : in out Gint;
      Push_In : out Boolean);
A user function supplied when calling Gtk.Menu.Popup which controls the positioning of the menu when it is displayed. The function sets the X and Y parameters to the coordinates where the menu is to be drawn. To make the menu appear on a different monitor than the mouse pointer, gtk_menu_set_monitor must be called. "menu": a Gtk.Menu.Gtk_Menu. "x": address of the Gint representing the horizontal position where the menu shall be drawn. "y": address of the Gint representing the vertical position where the menu shall be drawn. This is an output parameter. "push_in": This parameter controls how menus placed outside the monitor are handled. If this is set to True and part of the menu is outside the monitor then GTK+ pushes the window into the visible area, effectively modifying the popup position. Note that moving and possibly resizing the menu around will alter the scroll position to keep the menu items "in place", i.e. at the same monitor position they would have been without resizing. In practice, this behavior is only useful for combobox popups or option menus and cannot be used to simply confine a menu to monitor boundaries. In that case, changing the scroll offset is not desirable.

Cb_Gtk_Menu_Gtk_Scroll_Type_Void

type Cb_Gtk_Menu_Gtk_Scroll_Type_Void is not null access procedure
     (Self        : access Gtk_Menu_Record'Class;
      Scroll_Type : Gtk.Enums.Gtk_Scroll_Type);

Cb_GObject_Gtk_Scroll_Type_Void

type Cb_GObject_Gtk_Scroll_Type_Void is not null access procedure
     (Self        : access Glib.Object.GObject_Record'Class;
      Scroll_Type : Gtk.Enums.Gtk_Scroll_Type);

Constants & Global variables

Accel_Group_Property (Glib.Properties.Property_Object)

Accel_Group_Property : constant Glib.Properties.Property_Object;
Type: Gtk.Accel_Group.Gtk_Accel_Group The accel group holding accelerators for the menu.

Accel_Path_Property (Glib.Properties.Property_String)

Accel_Path_Property : constant Glib.Properties.Property_String;
An accel path used to conveniently construct accel paths of child items.

Active_Property (Glib.Properties.Property_Int)

Active_Property : constant Glib.Properties.Property_Int;
The index of the currently selected menu item, or -1 if no menu item is selected.

Attach_Widget_Property (Glib.Properties.Property_Object)

Attach_Widget_Property : constant Glib.Properties.Property_Object;
Type: Gtk.Widget.Gtk_Widget The widget the menu is attached to. Setting this property attaches the menu without a Gtk_Menu_Detach_Func. If you need to use a detacher, use Gtk.Menu.Attach_To_Widget directly.

Monitor_Property (Glib.Properties.Property_Int)

Monitor_Property : constant Glib.Properties.Property_Int;
The monitor the menu will be popped up on.

Reserve_Toggle_Size_Property (Glib.Properties.Property_Boolean)

Reserve_Toggle_Size_Property : constant Glib.Properties.Property_Boolean;
A boolean that indicates whether the menu reserves space for toggles and icons, regardless of their actual presence. This property should only be changed from its default value for special-purposes such as tabular menus. Regular menus that are connected to a menu bar or context menus should reserve toggle space for consistency.

Tearoff_State_Property (Glib.Properties.Property_Boolean)

Tearoff_State_Property : constant Glib.Properties.Property_Boolean;
A boolean that indicates whether the menu is torn-off.

Tearoff_Title_Property (Glib.Properties.Property_String)

Tearoff_Title_Property : constant Glib.Properties.Property_String;

Signal_Move_Scroll (Glib.Signal_Name)

Signal_Move_Scroll : constant Glib.Signal_Name := "move-scroll";

Subprograms & Entries

Gtk_New

procedure Gtk_New 
(Menu: out Gtk_Menu);

Initialize

procedure Initialize 
(Menu: not null access Gtk_Menu_Record'Class);
Creates a new Gtk.Menu.Gtk_Menu

Gtk_Menu_New

function Gtk_Menu_New return Gtk_Menu;
Creates a new Gtk.Menu.Gtk_Menu

Gtk_New_From_Model

procedure Gtk_New_From_Model 
(Menu: out Gtk_Menu;
Model: not null access Glib.Menu_Model.Gmenu_Model_Record'Class);

Initialize_From_Model

procedure Initialize_From_Model 
(Menu: not null access Gtk_Menu_Record'Class;
Model: not null access Glib.Menu_Model.Gmenu_Model_Record'Class);
Creates a Gtk.Menu.Gtk_Menu and populates it with menu items and submenus according to Model. The created menu items are connected to actions found in the Gtk.Application_Window.Gtk_Application_Window to which the menu belongs - typically by means of being attached to a widget (see Gtk.Menu.Attach_To_Widget) that is contained within the Gtk_Application_Windows widget hierarchy. Since: gtk+ 3.4 "model": a Glib.Menu_Model.Gmenu_Model

Gtk_Menu_New_From_Model

function Gtk_Menu_New_From_Model 
(Model: not null access Glib.Menu_Model.Gmenu_Model_Record'Class) return Gtk_Menu;
Creates a Gtk.Menu.Gtk_Menu and populates it with menu items and submenus according to Model. The created menu items are connected to actions found in the Gtk.Application_Window.Gtk_Application_Window to which the menu belongs - typically by means of being attached to a widget (see Gtk.Menu.Attach_To_Widget) that is contained within the Gtk_Application_Windows widget hierarchy. Since: gtk+ 3.4 "model": a Glib.Menu_Model.Gmenu_Model

Get_Type

function Get_Type return Glib.GType;

Attach

procedure Attach 
(Menu: not null access Gtk_Menu_Record;
Child: not null access Gtk.Widget.Gtk_Widget_Record'Class;
Left_Attach: Guint;
Right_Attach: Guint;
Top_Attach: Guint;
Bottom_Attach: Guint);
Adds a new Gtk.Menu_Item.Gtk_Menu_Item to a (table) menu. The number of 'cells' that an item will occupy is specified by Left_Attach, Right_Attach, Top_Attach and Bottom_Attach. These each represent the leftmost, rightmost, uppermost and lower column and row numbers of the table. (Columns and rows are indexed from zero). Note that this function is not related to Gtk.Menu.Detach. Since: gtk+ 2.4 "child": a Gtk.Menu_Item.Gtk_Menu_Item "left_attach": The column number to attach the left side of the item to "right_attach": The column number to attach the right side of the item to "top_attach": The row number to attach the top of the item to "bottom_attach": The row number to attach the bottom of the item to

Attach_To_Widget

procedure Attach_To_Widget 
(Menu: not null access Gtk_Menu_Record;
Attach_Widget: not null access Gtk.Widget.Gtk_Widget_Record'Class;
Detacher: Gtk_Menu_Detach_Func);
Attaches the menu to the widget and provides a callback function that will be invoked when the menu calls Gtk.Menu.Detach during its destruction. "attach_widget": the Gtk.Widget.Gtk_Widget that the menu will be attached to "detacher": the user supplied callback function that will be called when the menu calls Gtk.Menu.Detach

Detach

procedure Detach 
(Menu: not null access Gtk_Menu_Record);
Detaches the menu from the widget to which it had been attached. This function will call the callback function, Detacher, provided when the Gtk.Menu.Attach_To_Widget function was called.

Get_Accel_Group

function Get_Accel_Group 
(Menu: not null access Gtk_Menu_Record) return Gtk.Accel_Group.Gtk_Accel_Group;
Gets the Gtk.Accel_Group.Gtk_Accel_Group which holds global accelerators for the menu. See Gtk.Menu.Set_Accel_Group.

Set_Accel_Group

procedure Set_Accel_Group 
(Menu: not null access Gtk_Menu_Record;
Accel_Group: access Gtk.Accel_Group.Gtk_Accel_Group_Record'Class);
Set the Gtk.Accel_Group.Gtk_Accel_Group which holds global accelerators for the menu. This accelerator group needs to also be added to all windows that this menu is being used in with Gtk.Window.Add_Accel_Group, in order for those windows to support all the accelerators contained in this group. "accel_group": the Gtk.Accel_Group.Gtk_Accel_Group to be associated with the menu.

Get_Accel_Path

function Get_Accel_Path 
(Menu: not null access Gtk_Menu_Record) return UTF8_String;
Retrieves the accelerator path set on the menu. Since: gtk+ 2.14

Set_Accel_Path

procedure Set_Accel_Path 
(Menu: not null access Gtk_Menu_Record;
Accel_Path: UTF8_String := "");
Sets an accelerator path for this menu from which accelerator paths for its immediate children, its menu items, can be constructed. The main purpose of this function is to spare the programmer the inconvenience of having to call Gtk.Menu_Item.Set_Accel_Path on each menu item that should support runtime user changable accelerators. Instead, by just calling Gtk.Menu.Set_Accel_Path on their parent, each menu item of this menu, that contains a label describing its purpose, automatically gets an accel path assigned. For example, a menu containing menu items "New" and "Exit", will, after 'gtk_menu_set_accel_path (menu, "<Gnumeric-Sheet>/File");' has been called, assign its items the accel paths: '"<Gnumeric-Sheet>/File/New"' and '"<Gnumeric-Sheet>/File/Exit"'. Assigning accel paths to menu items then enables the user to change their accelerators at runtime. More details about accelerator paths and their default setups can be found at Gtk.Accel_Map.Add_Entry. Note that Accel_Path string will be stored in a Glib.GQuark. Therefore, if you pass a static string, you can save some memory by interning it first with g_intern_static_string. "accel_path": a valid accelerator path

Get_Active

function Get_Active 
(Menu: not null access Gtk_Menu_Record) return Gtk.Menu_Item.Gtk_Menu_Item;
Returns the selected menu item from the menu. This is used by the Gtk.Combo_Box.Gtk_Combo_Box.

Set_Active

procedure Set_Active 
(Menu: not null access Gtk_Menu_Record;
Index: Guint);
Selects the specified menu item within the menu. This is used by the Gtk.Combo_Box.Gtk_Combo_Box and should not be used by anyone else. "index": the index of the menu item to select. Iindex values are from 0 to n-1

Get_Attach_Widget

function Get_Attach_Widget 
(Menu: not null access Gtk_Menu_Record) return Gtk.Widget.Gtk_Widget;
Returns the Gtk.Widget.Gtk_Widget that the menu is attached to.

Get_Monitor

function Get_Monitor 
(Menu: not null access Gtk_Menu_Record) return Gint;
Retrieves the number of the monitor on which to show the menu. Since: gtk+ 2.14

Set_Monitor

procedure Set_Monitor 
(Menu: not null access Gtk_Menu_Record;
Monitor_Num: Gint);
Informs GTK+ on which monitor a menu should be popped up. See Gdk.Screen.Get_Monitor_Geometry. This function should be called from a Gtk_Menu_Position_Func if the menu should not appear on the same monitor as the pointer. This information can't be reliably inferred from the coordinates returned by a Gtk_Menu_Position_Func, since, for very long menus, these coordinates may extend beyond the monitor boundaries or even the screen boundaries. Since: gtk+ 2.4 "monitor_num": the number of the monitor on which the menu should be popped up

Get_Reserve_Toggle_Size

function Get_Reserve_Toggle_Size 
(Menu: not null access Gtk_Menu_Record) return Boolean;
Returns whether the menu reserves space for toggles and icons, regardless of their actual presence. Since: gtk+ 2.18

Set_Reserve_Toggle_Size

procedure Set_Reserve_Toggle_Size 
(Menu: not null access Gtk_Menu_Record;
Reserve_Toggle_Size: Boolean);
Sets whether the menu should reserve space for drawing toggles or icons, regardless of their actual presence. Since: gtk+ 2.18 "reserve_toggle_size": whether to reserve size for toggles

Get_Tearoff_State

function Get_Tearoff_State 
(Menu: not null access Gtk_Menu_Record) return Boolean;
Returns whether the menu is torn off. See Gtk.Menu.Set_Tearoff_State.

Set_Tearoff_State

procedure Set_Tearoff_State 
(Menu: not null access Gtk_Menu_Record;
Torn_Off: Boolean);
Changes the tearoff state of the menu. A menu is normally displayed as drop down menu which persists as long as the menu is active. It can also be displayed as a tearoff menu which persists until it is closed or reattached. "torn_off": If True, menu is displayed as a tearoff menu.

Get_Title

function Get_Title 
(Menu: not null access Gtk_Menu_Record) return UTF8_String;
Returns the title of the menu. See Gtk.Menu.Set_Title.

Set_Title

procedure Set_Title 
(Menu: not null access Gtk_Menu_Record;
Title: UTF8_String);
Sets the title string for the menu. The title is displayed when the menu is shown as a tearoff menu. If Title is null, the menu will see if it is attached to a parent menu item, and if so it will try to use the same text as that menu item's label. "title": a string containing the title for the menu

Popdown

procedure Popdown 
(Menu: not null access Gtk_Menu_Record);
Removes the menu from the screen.

Popup

procedure Popup 
(Menu: not null access Gtk_Menu_Record;
Parent_Menu_Shell: Gtk.Menu_Shell.Gtk_Menu_Shell := null;
Parent_Menu_Item: Gtk.Menu_Item.Gtk_Menu_Item := null;
Func: Gtk_Menu_Position_Func := null;
Button: Guint := 1;
Activate_Time: Guint32 := 0);
Displays a menu and makes it available for selection. Applications can use this function to display context-sensitive menus, and will typically supply null for the Parent_Menu_Shell, Parent_Menu_Item, Func and Data parameters. The default menu positioning function will position the menu at the current mouse cursor position. The Button parameter should be the mouse button pressed to initiate the menu popup. If the menu popup was initiated by something other than a mouse button press, such as a mouse button release or a keypress, Button should be 0. The Activate_Time parameter is used to conflict-resolve initiation of concurrent requests for mouse/keyboard grab requests. To function properly, this needs to be the timestamp of the user event (such as a mouse click or key press) that caused the initiation of the popup. Only if no such event is available, Gtk.Main.Get_Current_Event_Time can be used instead. "parent_menu_shell": the menu shell containing the triggering menu item, or null "parent_menu_item": the menu item whose activation triggered the popup, or null "func": a user supplied function used to position the menu, or null "button": the mouse button which was pressed to initiate the event. "activate_time": the time at which the activation event occurred.

Popup_For_Device

procedure Popup_For_Device 
(Menu: not null access Gtk_Menu_Record;
Device: access Gdk.Device.Gdk_Device_Record'Class;
Parent_Menu_Shell: access Gtk.Widget.Gtk_Widget_Record'Class;
Parent_Menu_Item: access Gtk.Widget.Gtk_Widget_Record'Class;
Func: Gtk_Menu_Position_Func;
Button: Guint;
Activate_Time: Guint32);
Displays a menu and makes it available for selection. Applications can use this function to display context-sensitive menus, and will typically supply null for the Parent_Menu_Shell, Parent_Menu_Item, Func, Data and Destroy parameters. The default menu positioning function will position the menu at the current position of Device (or its corresponding pointer). The Button parameter should be the mouse button pressed to initiate the menu popup. If the menu popup was initiated by something other than a mouse button press, such as a mouse button release or a keypress, Button should be 0. The Activate_Time parameter is used to conflict-resolve initiation of concurrent requests for mouse/keyboard grab requests. To function properly, this needs to be the time stamp of the user event (such as a mouse click or key press) that caused the initiation of the popup. Only if no such event is available, Gtk.Main.Get_Current_Event_Time can be used instead. Since: gtk+ 3.0 "device": a Gdk.Device.Gdk_Device "parent_menu_shell": the menu shell containing the triggering menu item, or null "parent_menu_item": the menu item whose activation triggered the popup, or null "func": a user supplied function used to position the menu, or null "button": the mouse button which was pressed to initiate the event "activate_time": the time at which the activation event occurred

Reorder_Child

procedure Reorder_Child 
(Menu: not null access Gtk_Menu_Record;
Child: not null access Gtk.Widget.Gtk_Widget_Record'Class;
Position: Gint);
Moves Child to a new Position in the list of Menu children. "child": the Gtk.Menu_Item.Gtk_Menu_Item to move "position": the new position to place Child. Positions are numbered from 0 to n - 1

Reposition

procedure Reposition 
(Menu: not null access Gtk_Menu_Record);
Repositions the menu according to its position function.

Set_Screen

procedure Set_Screen 
(Menu: not null access Gtk_Menu_Record;
Screen: access Gdk.Screen.Gdk_Screen_Record'Class);
Sets the Gdk.Screen.Gdk_Screen on which the menu will be displayed. Since: gtk+ 2.2 "screen": a Gdk.Screen.Gdk_Screen, or null if the screen should be determined by the widget the menu is attached to

Get_For_Attach_Widget

function Get_For_Attach_Widget 
(Widget: not null access Gtk.Widget.Gtk_Widget_Record'Class) return Gtk.Widget.Widget_List.Glist;
Returns a list of the menus which are attached to this widget. This list is owned by GTK+ and must not be modified. Since: gtk+ 2.6 "widget": a Gtk.Widget.Gtk_Widget

On_Move_Scroll

procedure On_Move_Scroll 
(Self: not null access Gtk_Menu_Record;
Call: Cb_Gtk_Menu_Gtk_Scroll_Type_Void;
After: Boolean := False);

On_Move_Scroll

procedure On_Move_Scroll 
(Self: not null access Gtk_Menu_Record;
Call: Cb_GObject_Gtk_Scroll_Type_Void;
Slot: not null access Glib.Object.GObject_Record'Class;
After: Boolean := False);