Libraries:Gtk:Gtk:MenuToolButton
Types
T
Inherits from:A T is a Gtk.Gtk.ToolItem.T that contains a button and a small additional button with an arrow. When clicked, the arrow button pops up a dropdown menu.
Use gtk_menu_tool_button_new() to create a new T. Use gtk_menu_tool_button_new_from_stock() to create a new T containing a stock item.
GtkMenuToolButton as GtkBuildable
The GtkMenuToolButton implementation of the GtkBuildable interface supports adding a menu by specifying "menu" as the "type" attribute of a <child> element.
Example 35. A UI definition fragment with menus
1 2 3 4 5 |
<object class="GtkMenuToolButton"> <child type="menu"> <object class="GtkMenu"/> </child> </object> |
Constants
Nil : T
Functions
GetType() : Gtk.GObject.Type.T
New(icon_widget @ Gtk.Gtk.Widget.T, label @ Std.String.T) : Gtk.Gtk.MenuToolButton.T
Creates a new T using icon_widget as icon and label as label.
icon_widget | a widget that will be used as icon widget, or NULL. [allow-none] |
label | a string that will be used as label, or NULL. [allow-none] |
Returns | the new T |
NewFromStock(stock_id @ Std.String.T) : Gtk.Gtk.MenuToolButton.T
Creates a new T. The new T will contain an icon and label from the stock item indicated by stock_id.
stock_id | the name of a stock item |
Returns | the new T |
Methods
:GetMenu(self @ T) : Gtk.Gtk.Widget.T
Gets the Gtk.Gtk.Menu.T associated with T.
button | a T |
Returns | the Gtk.Gtk.Menu.T associated with T. [transfer none] |
:SetArrowTooltip(self @ T, tooltips @ Gtk.Gtk.Tooltips.T, tip_text @ Std.String.T, tip_private @ Std.String.T) : Std.Object.T
Warning
SetArrowTooltip has been deprecated since version 2.12 and should not be used in newly-written code. Use SetArrowTooltipText instead.
:SetArrowTooltipMarkup(self @ T, markup @ Std.String.T) : Std.Object.T
Sets the tooltip markup text to be used as tooltip for the arrow button which pops up the menu. See Gtk.Gtk.ToolItem.SetTooltip for setting a tooltip on the whole T.
button | a T |
markup | markup text to be used as tooltip text for button's arrow button |
:SetArrowTooltipText(self @ T, text @ Std.String.T) : Std.Object.T
Sets the tooltip text to be used as tooltip for the arrow button which pops up the menu. See Gtk.Gtk.ToolItem.SetTooltip for setting a tooltip on the whole T.
button | a T |
text | text to be used as tooltip text for button's arrow button |
:SetMenu(self @ T, menu @ Gtk.Gtk.Widget.T) : Std.Object.T
Sets the Gtk.Gtk.Menu.T that is popped up when the user clicks on the arrow. If menu is NULL, the arrow button becomes insensitive.
button | a T |
menu | the Gtk.Gtk.Menu.T associated with T |