#include <menu.h>
| MenuBar::MenuBar |
( |
const std::string & |
xml | ) |
|
Constructor for class MenuBar
- Parameters
-
| xml | Filename of xml file for menubar |
Returns if menus are active
- Returns
- m_root not null
| void MenuBar::add |
( |
Menu * |
menu | ) |
|
Add menu to bar
- Parameters
-
| void MenuBar::define_menu |
( |
const StringMap & |
attributes | ) |
|
|
virtual |
Start of menu with attributes
- Parameters
-
| attributes | All menu settings in map. |
Implements UI::MenuXML.
| void MenuBar::define_menu_end |
( |
const std::string & |
name | ) |
|
|
virtual |
No more menu items for current menu
- Parameters
-
| name | Name of menu coming to end |
Implements UI::MenuXML.
| void MenuBar::define_menu_item |
( |
const StringMap & |
attributes | ) |
|
|
virtual |
Menu item for current menu
- Parameters
-
| attributes | All menu item settings in map. |
Implements UI::MenuXML.
| void MenuBar::define_menu_line |
( |
| ) |
|
|
virtual |
Static function to call function that corresponds to menu key
- Parameters
-
- Returns
- True if menu key found
| bool MenuBar::handleKey |
( |
int |
code | ) |
|
Send key code to active menu
- Parameters
-
- Returns
- True if key code was handled.
| bool MenuBar::select |
( |
int |
mouse_x = 1 | ) |
|
Handle event loop for menu bar
- Parameters
-
| mouse_x | Menu clicked (default first menu) |
- Returns
- Menu was selected
| std::unordered_map<UI::KeyEvent, std::string> MenuBar::key_menu_map |
|
private |
Map ncurses keys to a name representing a function to call.
The documentation for this class was generated from the following files: