![]() |
appkit
1.5.1
RoadNarrows Robotics Application Kit
|
GTK window derived button menu class. More...
#include <WinGtkMenu.h>
Public Member Functions | |
| WinGtkButtonMenu (const std::string &strIconPath=WinIconDirDft) | |
| WinGtkButtonMenu initialization constructor. More... | |
| virtual | ~WinGtkButtonMenu () |
| WinGtkButtonMenu destructor. | |
| virtual bool | addImageButton (int nEvent, WidgetState eInitState, AlignOp eAlign, const std::string &strAltText, const std::string &strIconNormal, const std::string &strToolTipNormal="", const std::string &strIconActive="", const std::string &strToolTipActive="") |
| Add button with image to menu. More... | |
| virtual bool | addLabelButton (int nEvent, WidgetState eInitState, AlignOp eAlign, const std::string &strLabelNormal, const std::string &strToolTipNormal="", const std::string &strLabelActive="", const std::string &strToolTipActive="") |
| Add button with text label to menu. More... | |
Public Member Functions inherited from rnr::WinButtonMenu | |
| WinButtonMenu (const std::string &strIconPath=WinIconDirDft) | |
| WinButtonMenu initialization constructor. More... | |
| virtual | ~WinButtonMenu () |
| WinButtonMenu destructor. | |
| void | appendIconDir (const std::string &strIconDir) |
| Append directory to icon search path. More... | |
| void | prependIconDir (const std::string &strIconDir) |
| Prepend directory to icon search path. More... | |
| void | setIconPath (const std::string &strIconPath) |
| Set icon search path. More... | |
| std::string | getIconPath () |
| Get icon search path. More... | |
| virtual void | bind (Win *pWin) |
| Bind the button menu to the given window. More... | |
| virtual void | unbind () |
| Unbind the menu from the currently bound window. | |
| int | getCurrentEvent () |
| Get the current button menu event. More... | |
| int | setCurrentEvent (int nNewEvent) |
| Set the current button menu event. More... | |
| int | getPreviousEvent () |
| Get the previous menu event. More... | |
| size_t | getNumMenuButtons () |
| Get the current number of menu items;. More... | |
| WidgetState | getButtonState (int nEvent) |
| Get the given button state. More... | |
| void | setButtonState (int nEvent, WidgetState eNewState) |
| Set the given button state. More... | |
| void | setButtonStateList (const std::string &strEvent,...) |
| Set the states of the given buttons. More... | |
| void | resetAllButtonStates () |
| Reset all menu buttons states to their initial states. | |
Additional Inherited Members | |
Public Types inherited from rnr::WinButtonMenu | |
| typedef std::map< int, WinButton * > | MapBttns_T |
| map of added menu buttons | |
Protected Member Functions inherited from rnr::WinButtonMenu | |
| std::string | makeIconPath (const std::string &strIconFile) |
| Make icon image file path. More... | |
| void | changeButtonState (WinButton *pButton, WidgetState eNewState) |
| Change the state and gui look of the given button. More... | |
Static Protected Member Functions inherited from rnr::WinButtonMenu | |
| static void | onMenuButtonClick (int nEvent, void *user_data) |
| Menu button press callback. More... | |
Protected Attributes inherited from rnr::WinButtonMenu | |
| Win * | m_pWin |
| menus are bound to this window | |
| std::string | m_strIconPath |
| icon directories search path | |
| int | m_nCurrentEvent |
| current (user) menu event | |
| int | m_nPreviousEvent |
| previous (user) menu event | |
| MapBttns_T | m_mapButtons |
| menu button map | |
GTK window derived button menu class.
Buttons with icons or text are placed on the left or right side of the application window. Each icon is associated with an application defined event.
Definition at line 178 of file WinGtkMenu.h.
|
inline |
WinGtkButtonMenu initialization constructor.
| strIconPath | Icon path of search directories. |
Definition at line 187 of file WinGtkMenu.h.
|
virtual |
Add button with image to menu.
| nEvent | Unique event (and id) associated with button press. |
| eInitState | Button widget initial state. See GUI Widget State. |
| eAlign | Button alignment. See rnmpwin_align. |
| strAltText | Button alternative text string. |
| strIconNormal | Button icon image file name for normal state. |
| strToolTipNormal | Button tooltip for normal state. |
| strIconActive | Button icon image file name for active state. Empty for no icon. |
| strToolTipActive | Button tooltip for active state. |
Reimplemented from rnr::WinButtonMenu.
Definition at line 156 of file WinGtkMenu.cxx.
References rnr::WinButtonTypeImage, rnr::WinButtonTypeLabel, and rnr::WinGtkButton::WinGtkButton().
|
virtual |
Add button with text label to menu.
| nEvent | Unique event (and id) associated with button press. |
| eInitState | Button widget initial state. See GUI Widget State. |
| eAlign | Button alignment. See rnmpwin_align. |
| strLabelNormal | Button text label for normal state. |
| strToolTipNormal | Button tooltip for normal state. |
| strLabelActive | Button text label for active state. Empty for no label. |
| strToolTipActive | Button tooltip for active state. |
Reimplemented from rnr::WinButtonMenu.
Definition at line 204 of file WinGtkMenu.cxx.
References rnr::WinButtonTypeLabel, and rnr::WinGtkButton::WinGtkButton().