11.87Class GtkMenuToolButton

A GtkToolItem containing a button with an additional dropdown menu

Class GtkMenuToolButton( icon_widget, label )
icon_widget a widget that will be used as icon widget, or NULL.
label a string that will be used as label, or NULL.

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.

Methods
get_menuGets the GtkMenu associated with GtkMenuToolButton.
new_from_stockCreates a new GtkMenuToolButton.
set_arrow_tooltip_markupSets the tooltip markup text to be used as tooltip for the arrow button which pops up the menu.
set_arrow_tooltip_textSets the tooltip text to be used as tooltip for the arrow button which pops up the menu.
set_menuSets the GtkMenu that is popped up when the user clicks on the arrow.
signal_show_menuThe show-menu signal is emitted before the menu is shown.

Methods

get_menu

Gets the GtkMenu associated with GtkMenuToolButton.

GtkMenuToolButton.get_menu()
Returnthe GtkMenu associated with GtkMenuToolButton

new_from_stock

Creates a new GtkMenuToolButton.

GtkMenuToolButton.new_from_stock( stock_id )
stock_id the name of a stock item
Returnthe new GtkMenuToolButton

The new GtkMenuToolButton will contain an icon and label from the stock item indicated by stock_id.

set_arrow_tooltip_markup

Sets the tooltip markup text to be used as tooltip for the arrow button which pops up the menu.

GtkMenuToolButton.set_arrow_tooltip_markup( markup )
markup markup text to be used as tooltip text for button's arrow button

See gtk_tool_item_set_tooltip() for setting a tooltip on the whole GtkMenuToolButton.

set_arrow_tooltip_text

Sets the tooltip text to be used as tooltip for the arrow button which pops up the menu.

GtkMenuToolButton.set_arrow_tooltip_text( text )
text text to be used as tooltip text for button's arrow button

See gtk_tool_item_set_tooltip() for setting a tooltip on the whole GtkMenuToolButton.

set_menu

Sets the GtkMenu that is popped up when the user clicks on the arrow.

GtkMenuToolButton.set_menu( menu )
menu the GtkMenu associated with GtkMenuToolButton, or nil.

If menu is NULL, the arrow button becomes insensitive.

signal_show_menu

The show-menu signal is emitted before the menu is shown.

GtkMenuToolButton.signal_show_menu()

It can be used to populate the menu on demand, using gtk_menu_tool_button_get_menu().

Note that even if you populate the menu dynamically in this way, you must set an empty menu on the GtkMenuToolButton beforehand, since the arrow is made insensitive if the menu is not set.

Made with http://www.falconpl.org