#include <Menu.H>
Inheritance diagram for xchen::Menu:

Public Types | |
| enum | { max_items = 1000 } |
Public Methods | |
| Menu (KeyBoard *kb, const string &nm="") | |
| virtual | ~Menu () |
| KeyBoard & | GetKeyBoard () |
| ItemID | AddItem (string str, KeyEventCB cb, KeyValue k=0) |
| converted-key is menu-item-id | |
| ItemID | AddGlobalItem (string str, KeyEventCB cb, KeyValue k=0) |
| converted-key is global-item-id | |
| ItemID | AddItem (string str, KeyEventCB cb, KeyValue k, ConvertedKeyValue k2) |
| customize conterted-key | |
| void | AddSubMenu (const string &doc_str, MenuID sub_menu_id) |
| void | AddSeparator (const string &str="") |
| MenuID | GetMenuID () const |
| void | Attach (int button=GLUT_RIGHT_BUTTON) |
| glutAttach this menu. | |
| void | Detach (int button=GLUT_RIGHT_BUTTON) |
| glutDetach this menu. | |
Static Public Methods | |
| Menu * | GetMenu (MenuID menu_id) |
Protected Methods | |
| void | init_menu (KeyBoard *kb) |
| Menu (const Menu &) | |
| Menu & | operator= (const Menu &) |
Protected Attributes | |
| const string | name |
| MenuID | menu_id |
| int | cur_item_id |
| vector< MenuID > | submenus |
| KeyValue | item2key [max_items] |
| KeyBoard * | keyboard |
Simulating menu callback by sending menu-item-ID-index-ed key to embeded KeyBoard object
|
|
|
|
||||||||||||
|
|
|
|
|
|
|
|
|
||||||||||||||||
|
converted-key is global-item-id
|
|
||||||||||||||||||||
|
customize conterted-key
|
|
||||||||||||||||
|
converted-key is menu-item-id
|
|
|
|
|
||||||||||||
|
|
|
|
glutAttach this menu.
|
|
|
glutDetach this menu.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.2.18