Top | ![]() |
![]() |
![]() |
![]() |
GtkMenuToolButtonGtkMenuToolButton — A GtkToolItem containing a button with an additional dropdown menu |
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_new()
to create a new
GtkMenuToolButton.
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:
1 2 3 4 5 |
<object class="GtkMenuToolButton"> <child type="menu"> <object class="GtkMenu"/> </child> </object> |
GtkToolItem * gtk_menu_tool_button_new (GtkWidget *icon_widget
,const gchar *label
);
Creates a new GtkMenuToolButton using icon_widget
as icon and
label
as label.
Since: 2.6
void gtk_menu_tool_button_set_menu (GtkMenuToolButton *button
,GtkWidget *menu
);
Sets the GtkMenu that is popped up when the user clicks on the arrow.
If menu
is NULL, the arrow button becomes insensitive.
Since: 2.6
GtkWidget *
gtk_menu_tool_button_get_menu (GtkMenuToolButton *button
);
Gets the GtkMenu associated with GtkMenuToolButton.
Since: 2.6
void gtk_menu_tool_button_set_arrow_tooltip_text (GtkMenuToolButton *button
,const gchar *text
);
Sets the tooltip text to be used as tooltip for the arrow button which
pops up the menu. See gtk_tool_item_set_tooltip_text()
for setting a tooltip
on the whole GtkMenuToolButton.
Since: 2.12
void gtk_menu_tool_button_set_arrow_tooltip_markup (GtkMenuToolButton *button
,const gchar *markup
);
Sets the tooltip markup text to be used as tooltip for the arrow button
which pops up the menu. See gtk_tool_item_set_tooltip_text()
for setting
a tooltip on the whole GtkMenuToolButton.
Since: 2.12