Crea  Modifica  FrontPage  Indici  Cerca  Ultime modifiche  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

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
Ultima modifica:2005/11/17 02:43:41
Parola chiave:
Referenze:[Gtk::ToolButton] [Gtk::MenuToolButton] [Gtk::RecentChooserMenu]