Create  Edit  FrontPage  Index  Search  Changes  History  RSS  Login

Gtk::MenuToolButton

class Gtk::MenuToolButton

A Gtk::MenuToolButton is a Gtk::ToolItem that contains a button and a small additional button with an arrow. When clicked, the arrow button pops up a dropdown menu.

Use Gtk::MenuToolButton.new to create a new Gtk::MenuToolButton. Use Gtk::MenuToolButton.new to create a new Gtk::MenuToolButton containing a stock item.

Class Methods

Gtk::MenuToolButton.new(icon_widget = nil, label = nil)
Creates a new Gtk::MenuToolButton using icon_widget as icon and label as label. Since 2.6
  • icon_widget: a widget that will be used as icon widget, or nil
  • label: a string that will be used as label, or nil
  • Returns: the new Gtk::MenuToolButton
Gtk::MenuToolButton.new(stock_id)
Creates a new Gtk::MenuToolButton. The new Gtk::MenuToolButton will contain an icon and label from the stock item indicated by stock_id. Since 2.6

Instance Methods

menu
Gets the Gtk::Menu associated with Gtk::MenuToolButton. Since 2.6
menu=(menu)
Sets the Gtk::Menu that is popped up when the user clicks on the arrow. If menu is nil, the arrow button becomes insensitive. Since 2.6
set_menu(menu)
Same as Gtk::MenuToolButton#menu=. Since 2.6
set_arrow_tooltip(tooltips, tip_text = nil, tip_private = nil)
Sets the Gtk::Tooltips object to be used for arrow button which pops up the menu. See Gtk::ToolItem#set_tooltip for setting a tooltip on the whole Gtk::MenuToolButton. Since 2.6
  • tooltips: the Gtk::Tooltips object to be used
  • tip_text: text to be used as tooltip text for tool_item or nil
  • tip_private: text to be used as private tooltip text or nil
  • Returns: self
ref_accessible
See Atk::Implementor#ref_accessible.
add_child
See Gtk::Buildable#add_child.
construct_child
See Gtk::Buildable#construct_child.
get_internal_child
See Gtk::Buildable#get_internal_child.
name
See Gtk::Buildable#name.
name=
See Gtk::Buildable#name=.
set_buildable_property
See Gtk::Buildable#set_buildable_property.
set_name
See Gtk::Buildable#set_name.
builder_name
See Gtk::Buildable#builder_name.
builder_name=
See Gtk::Buildable#builder_name=.
set_builder_name
See Gtk::Buildable#set_builder_name.

Properties

menu: Gtk::Menu (Read/Write)
The dropdown menu Since 2.6

See Also

Gtk::Toolbar, Gtk::ToolButton

The toolbar widget

The parent class of Gtk::MenuToolButton. The properties "label_widget", "label", "icon_widget", and "stock_id" on Gtk::ToolButton determine the label and icon used on Gtk::MenuToolButtons?.

ChangeLog

  • 2005-05-06 Added - Masao