|
Freya
0.0.1
A Gtk3 MPD Client
|
A Baseclass for Widgets that want to implement easily popup widgets. More...
#include <BasePopup.hh>
Public Member Functions | |
| BasePopup (Gtk::Widget *to_register, Glib::ustring &ui_definition) | |
| Glib::SignalProxy0< void > | get_action (const char *name) |
| Get a signal proxy of a certain Gtk::Action in the menu. | |
Protected Member Functions | |
| void | menu_add_item (Glib::RefPtr< Gtk::Action > &action, Glib::ustring item_name, Glib::ustring item_label, Glib::ustring item_tooltip, Gtk::StockID icon) |
| Add an item to the Menu Popup. | |
| void | menu_construct (Glib::ustring menu_name) |
| Call this when done with adding actions. | |
Protected Attributes | |
| Glib::RefPtr< Gtk::UIManager > | m_refUIManager |
| This object stores the parsed UI Definition. | |
| Glib::RefPtr< Gtk::ActionGroup > | m_refActionGroup |
| All actions are added to this object. | |
| Glib::ustring * | m_UiDefinition |
| The actual definition. | |
| Gtk::Menu * | mp_Popup |
| The visible popup. | |
A Baseclass for Widgets that want to implement easily popup widgets.
This class registers the needed signals and parses a UI Definition given by the derived class. See QueuePopup, DatabasePopup or PlaylistManagerPopup for examples how this exactly works.
Definition at line 44 of file BasePopup.hh.
| Browser::BasePopup::BasePopup | ( | Gtk::Widget * | to_register, |
| Glib::ustring & | ui_definition | ||
| ) |
| to_register | The widget to register, for example a Gtk::TreeView |
| ui_definition | The ui definition defining the Menu structure |
| Glib::SignalProxy0<void> Browser::BasePopup::get_action | ( | const char * | name | ) |
Get a signal proxy of a certain Gtk::Action in the menu.
| name | The name of the menu. |
| void Browser::BasePopup::menu_add_item | ( | Glib::RefPtr< Gtk::Action > & | action, |
| Glib::ustring | item_name, | ||
| Glib::ustring | item_label, | ||
| Glib::ustring | item_tooltip, | ||
| Gtk::StockID | icon | ||
| ) | [protected] |
Add an item to the Menu Popup.
| action | the action defined in the UI definition |
| item_name | The name of the titem |
| item_label | The visual name of the item |
| item_tooltip | A tooltip, that is actually not shown |
| icon | The icon shown lefthand to the label |
| void Browser::BasePopup::menu_construct | ( | Glib::ustring | menu_name | ) | [protected] |
Call this when done with adding actions.
Glib::RefPtr<Gtk::ActionGroup> Browser::BasePopup::m_refActionGroup [protected] |
All actions are added to this object.
Definition at line 74 of file BasePopup.hh.
Glib::RefPtr<Gtk::UIManager> Browser::BasePopup::m_refUIManager [protected] |
This object stores the parsed UI Definition.
Definition at line 70 of file BasePopup.hh.
Glib::ustring* Browser::BasePopup::m_UiDefinition [protected] |
The actual definition.
Definition at line 78 of file BasePopup.hh.
Gtk::Menu* Browser::BasePopup::mp_Popup [protected] |
The visible popup.
Definition at line 82 of file BasePopup.hh.
1.8.0