Next: , Previous: GtkToolButton, Up: Top


69 GtkMenuToolButton

A GtkToolItem containing a button with an additional dropdown menu

69.1 Overview

A <gtk-menu-tool-button> 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 gtk-menu-tool-button-new to create a new <gtk-menu-tool-button>. Use gtk-menu-tool-button-new-from-stock to create a new <gtk-menu-tool-button> containing a stock item.

69.2 Usage

— Class: <gtk-menu-tool-button>

Derives from <gtk-tool-button>.

This class defines the following slots:

menu
The dropdown menu
— Signal on <gtk-menu-tool-button>: show-menu
— Function: gtk-menu-tool-button-new (icon_widget <gtk-widget>) (label mchars) ⇒  (ret <gtk-tool-item>)

Creates a new <gtk-menu-tool-button> using icon-widget as icon and label as label.

icon-widget
a widget that will be used as icon widget, or ‘#f
label
a string that will be used as label, or ‘#f
ret
the new <gtk-menu-tool-button>

Since 2.6

— Function: gtk-menu-tool-button-new-from-stock (stock_id mchars) ⇒  (ret <gtk-tool-item>)

Creates a new <gtk-menu-tool-button>. The new <gtk-menu-tool-button> will contain an icon and label from the stock item indicated by stock-id.

stock-id
the name of a stock item
ret
the new <gtk-menu-tool-button>

Since 2.6

— Function: gtk-menu-tool-button-set-menu (self <gtk-menu-tool-button>) (menu <gtk-widget>)
— Method: set-menu

Sets the <gtk-menu> that is popped up when the user clicks on the arrow. If menu is NULL, the arrow button becomes insensitive.

button
a <gtk-menu-tool-button>
menu
the <gtk-menu> associated with <gtk-menu-tool-button>

Since 2.6

— Function: gtk-menu-tool-button-get-menu (self <gtk-menu-tool-button>) ⇒  (ret <gtk-widget>)
— Method: get-menu

Gets the <gtk-menu> associated with <gtk-menu-tool-button>.

button
a <gtk-menu-tool-button>
ret
the <gtk-menu> associated with <gtk-menu-tool-button>

Since 2.6