Package: gtk

Class gtk:menu-tool-button

Superclasses

Documented Subclasses

None

Direct Slots

menu
The menu property of type gtk:menu-tool-button (Read / Write)
The dropdown menu.

Details

A gtk:menu-tool-button widget is a gtk:tool-item that contains a button and a small additional button with an arrow. When clicked, the arrow button pops up a dropdown menu.

Use the gtk:menu-tool-button-new function to create a new gtk:menu-tool-button widget. Use the gtk:menu-tool-button-new-from-stock function to create a new gtk:menu-tool-button widget containing a stock item.

GtkMenuToolButton as GtkBuildable

The gtk:menu-tool-button implementation of the gtk:buildable interface supports adding a menu by specifying "menu" as the "type" attribute of a <child> element.

Example: A UI definition fragment with menus
<object class="GtkMenuToolButton">
  <child type="menu">
    <object class="GtkMenu"/>
  </child>
</object>    

Signal Details

The "show-menu" signal
lambda (button)    :run-first      
The signal is emitted before the menu is shown. It can be used to populate the menu on demand, using the gtk:menu-tool-button-menu function. Note that even if you populate the menu dynamically in this way, you must set an empty menu on the gtk:menu-tool-button widget beforehand, since the arrow is made insensitive if the menu is not set.
button
The gtk:menu-tool-button widget on which the signal is emitted.
 

Returned by

Slot Access Functions

Inherited Slot Access Functions

See also

#2023-2-27