|
Milo
0.1
Milo:EquationManipulationProgram
|
#include <menu.h>


Public Member Functions | |
| void | addItem (MenuBaseItem *m) |
| Menu * | getParent () |
| void | highlight_next (int step) |
| void | refresh_window () |
| bool | isCurrent () |
Constructor and Virtual Destructor | |
| Menu (const StringMap &tags) | |
| ~Menu () | |
Overriden Pure Virtual Member Functions | |
| void | drawInBar (int x, bool fHighlight=false) |
| bool | handleKey (int code) |
| void | select () |
| const std::string & | getTitle () |
| bool | getActive () |
| int | calc_width () |
| void | draw (bool fHighlight, const int y0, const int x0, const int w) |
Public Member Functions inherited from MenuBaseItem | |
| const std::string & | getName () |
| const std::string & | getType () |
| int | getWidth () |
| MenuBaseItem (const StringMap &tags) | |
| virtual | ~MenuBaseItem () |
Private Attributes | |
| bool | m_active |
| True if active. | |
| const std::string | m_title |
| Title of menu. | |
| std::vector< MenuBasePtr > | m_items |
| List of menu items. | |
| Menu * | m_parent |
| Parent menu. Menu bar if null. | |
| int | m_xbar |
| Position on menubar if needed. | |
| int | m_wbar |
| Width on menubar if needed. | |
| std::vector< MenuBasePtr >::iterator | m_highlight |
| Index of item highlighted. | |
| int | m_x0 |
| Horiz origin of menu. | |
| int | m_y0 |
| Vertical origin of menu. | |
| int | m_width |
| Width of where menu. | |
| int | m_height |
| Height of menu. | |
Static Private Attributes | |
| static Menu * | m_current = 0 |
| current active menu | |
Friends | |
| class | MenuBar |
Additional Inherited Members | |
Protected Member Functions inherited from MenuBaseItem | |
| void | draw_menu (bool fHighlight, const int y0, const int x0, const int w, const std::string &key=std::string()) |
Submenu class also for top menu.
|
inline |
Add menu item to menu
| m | Menu item to add menu |
|
virtual |
Calc width of menu
Implements MenuBaseItem.
|
inlinevirtual |
Draw menu title in drop down box at given coordinates
| fHighlight | Highlight this item if true |
| y0 | y origin of item |
| x0 | x origin of item |
| w | width of item |
Implements MenuBaseItem.
| void Menu::drawInBar | ( | int | x, |
| bool | fHighlight = false |
||
| ) |
Draw menu title in menu bar
| Horizontal | location of menu title |
|
inlinevirtual |
|
inline |
Get parent menu
|
inlinevirtual |
| bool Menu::handleKey | ( | int | code | ) |
Handle key event
| code | Key code. |
| void Menu::highlight_next | ( | int | step | ) |
Highlight next item
| step | direction of change |
| bool Menu::isCurrent | ( | ) |
Is this menu the current menu?
| void Menu::refresh_window | ( | ) |
Refresh menu window containing menu items.
|
virtual |
Select this menu item
Implements MenuBaseItem.
1.8.11