gtkmm: Gtk::MenuToolButton Class Reference
A Gtk::ToolItem containing a toggle button. More...

Public Member Functions | |
| virtual | ~MenuToolButton () |
| GtkMenuToolButton* | gobj () |
| Provides access to the underlying C GtkObject. | |
| const GtkMenuToolButton* | gobj () const |
| Provides access to the underlying C GtkObject. | |
| MenuToolButton () | |
| Creates a new MenuToolButton. | |
| MenuToolButton (const Gtk::StockID& stock_id) | |
| Creates a new MenuToolButton from a StockID. | |
| MenuToolButton (const Glib::ustring& label) | |
| Creates a new MenuToolButton with a label. | |
| MenuToolButton (Widget& icon_widget, const Glib::ustring& label=Glib::ustring()) | |
| Creates a new MenuToolButton with an image. | |
| void | set_menu (Menu& menu) |
| Sets the Gtk::Menu that is popped up when the user clicks on the arrow. | |
| Menu* | get_menu () |
| Gets the Gtk::Menu associated with Gtk::MenuToolButton. | |
| const Menu* | get_menu () const |
| Gets the Gtk::Menu associated with Gtk::MenuToolButton. | |
| void | set_arrow_tooltip_text (const Glib::ustring& text) |
| Sets the tooltip text to be used as tooltip for the arrow button which pops up the menu. | |
| void | set_arrow_tooltip_markup (const Glib::ustring& markup) |
| Sets the tooltip markup text to be used as tooltip for the arrow button which pops up the menu. | |
| Glib::SignalProxy0< void > | signal_show_menu () |
| Glib::PropertyProxy< Menu* > | property_menu () |
| The dropdown menu. | |
| Glib::PropertyProxy_ReadOnly < Menu* > | property_menu () const |
| The dropdown menu. | |
Protected Member Functions | |
| virtual void | on_show_menu () |
| This is a default handler for the signal signal_show_menu(). | |
Related Functions | |
(Note that these are not member functions.) | |
| Gtk::MenuToolButton* | wrap (GtkMenuToolButton* object, bool take_copy=false) |
| A Glib::wrap() method for this object. | |
Detailed Description
A Gtk::ToolItem containing a toggle button.
A MenuToolButton is a Gtk::ToolItem that contains a menu.
Constructor & Destructor Documentation
| virtual Gtk::MenuToolButton::~MenuToolButton | ( | ) | [virtual] |
Creates a new MenuToolButton.
| Gtk::MenuToolButton::MenuToolButton | ( | const Gtk::StockID& | stock_id | ) | [explicit] |
Creates a new MenuToolButton from a StockID.
The MenuToolButton will be created according to the stock_id properties.
- Parameters:
-
stock_id The StockID which determines the look of the MenuToolButton.
| Gtk::MenuToolButton::MenuToolButton | ( | const Glib::ustring & | label | ) | [explicit] |
Creates a new MenuToolButton with a label.
The MenuToolButton will have the label label.
- Parameters:
-
label The string used to display the label for this MenuToolButton.
| Gtk::MenuToolButton::MenuToolButton | ( | Widget& | icon_widget, |
| const Glib::ustring & | label = Glib::ustring() |
||
| ) | [explicit] |
Creates a new MenuToolButton with an image.
The MenuToolButton will have the label label and an image widget icon_widget.
- Parameters:
-
icon_widget The widget placed as the MenuToolButton's icon. label The string used to display the label for this MenuToolButton.
Member Function Documentation
Gets the Gtk::Menu associated with Gtk::MenuToolButton.
- Returns:
- The Gtk::Menu associated with Gtk::MenuToolButton.
| const Menu* Gtk::MenuToolButton::get_menu | ( | ) | const |
Gets the Gtk::Menu associated with Gtk::MenuToolButton.
- Returns:
- The Gtk::Menu associated with Gtk::MenuToolButton.
| GtkMenuToolButton* Gtk::MenuToolButton::gobj | ( | ) | [inline] |
Provides access to the underlying C GtkObject.
Reimplemented from Gtk::ToolButton.
| const GtkMenuToolButton* Gtk::MenuToolButton::gobj | ( | ) | const [inline] |
Provides access to the underlying C GtkObject.
Reimplemented from Gtk::ToolButton.
| virtual void Gtk::MenuToolButton::on_show_menu | ( | ) | [protected, virtual] |
This is a default handler for the signal signal_show_menu().
The dropdown menu.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
The dropdown menu.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
| void Gtk::MenuToolButton::set_arrow_tooltip_markup | ( | const Glib::ustring & | markup | ) |
Sets the tooltip markup text to be used as tooltip for the arrow button which pops up the menu.
See Gtk::ToolItem::set_tooltip_text() for setting a tooltip on the whole Gtk::MenuToolButton.
- Parameters:
-
markup Markup text to be used as tooltip text for button's arrow button.
| void Gtk::MenuToolButton::set_arrow_tooltip_text | ( | const Glib::ustring & | text | ) |
Sets the tooltip text to be used as tooltip for the arrow button which pops up the menu.
See Gtk::ToolItem::set_tooltip_text() for setting a tooltip on the whole Gtk::MenuToolButton.
- Parameters:
-
text Text to be used as tooltip text for button's arrow button.
| void Gtk::MenuToolButton::set_menu | ( | Menu& | menu | ) |
Sets the Gtk::Menu that is popped up when the user clicks on the arrow.
If menu is 0, the arrow button becomes insensitive.
- Parameters:
-
menu The Gtk::Menu associated with Gtk::MenuToolButton.
- Slot Prototype:
void on_my_show_menu()
The signal_show_menu() signal is emitted before the menu is shown.
It can be used to populate the menu on demand, using Gtk::MenuToolButton::get_menu().
Note that even if you populate the menu dynamically in this way, you must set an empty menu on the Gtk::MenuToolButton beforehand, since the arrow is made insensitive if the menu is not set.
Friends And Related Function Documentation
| Gtk::MenuToolButton* wrap | ( | GtkMenuToolButton * | object, |
| bool | take_copy = false |
||
| ) | [related] |
A Glib::wrap() method for this object.
- Parameters:
-
object The C instance. take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
- Returns:
- A C++ instance that wraps this C instance.
The documentation for this class was generated from the following file:
- gtkmm/menutoolbutton.h
