gtk.menu_tool_button
Module for [MenuToolButton] class
Types 3
A #GtkMenuToolButton is a #GtkToolItem 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.MenuToolButton.new_] to create a new #GtkMenuToolButton.
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.
An example for a UI definition fragment with menus:
<object class="GtkMenuToolButton">
<child type="menu">
<object class="GtkMenu"/>
</child>
</object>Methods
MenuToolButton self()Returns `this`, for use in `with` statements.MenuToolButtonGidBuilder builder()Get builder for [gtk.menutoolbutton.MenuToolButton] Returns: New builder objectgtk.menu.Menu menu() @propertyvoid menu(gtk.menu.Menu propval) @propertygtk.menu_tool_button.MenuToolButton newFromStock(string stockId)Creates a new #GtkMenuToolButton. The new #GtkMenuToolButton will contain an icon and label from the stock item indicated by stock_id.gtk.widget.Widget getMenu()Gets the #GtkMenu associated with #GtkMenuToolButton. Returns: the #GtkMenu associated with #GtkMenuToolButtonvoid setArrowTooltipMarkup(string markup)Sets the tooltip markup text to be used as tooltip for the arrow button which pops up the menu. See [gtk.tool_item.ToolItem.setTooltipText] for setting a tooltip on the whole #GtkMenuToolButton.void setArrowTooltipText(string text)Sets the tooltip text to be used as tooltip for the arrow button which pops up the menu. See [gtk.tool_item.ToolItem.setTooltipText] for setting a tooltip on the whole #GtkMenuToolButton.void setMenu(gtk.widget.Widget menu)Sets the #GtkMenu that is popped up when the user clicks on the arrow. If menu is NULL, the arrow button becomes insensitive.gulong connectShowMenu(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtk.menu_tool_button.MenuToolButton)))
&& Parameters!T.length < 2)Connect to `ShowMenu` signal.Constructors
this(gtk.widget.Widget iconWidget = null, string label = null)Creates a new #GtkMenuToolButton using icon_widget as icon and label as label.Methods
T menu(gtk.menu.Menu propval)Fluent builder for [gtk.menu_tool_button.MenuToolButton]
Methods