#include <key_menu.H>
Inheritance diagram for KeyMenu:
Public Types | |
typedef int(* | key_callback_t )(const Event &, State *&) |
typedef CallMeth_t< KeyMenu, Event > | _callb |
typedef GuardMeth_t< KeyMenu, Event > | _guard |
Public Member Functions | |
KeyMenu (State *start_in) | |
void | add_menu_item (char key, const std::string &desc, key_callback_t cb) |
Add a single key/operation pair to the menu. | |
void | add_menu_item (const char *keys, const std::string &desc, key_callback_t cb) |
Add multiple keys all with the same operation and description. | |
void | remove_menu_item (char key) |
Remove a single key/operation pair from the menu. | |
void | remove_menu_item (const char *keys) |
Remove multiple key/operation pairs from the menu. | |
std::string | get_item_desc (char key) |
Get the description for the supplied key. | |
void | display_menu (std::ostream &out) |
Display the menu to the supplied output stream. | |
_callb * | Cb (TYPENAME _callb::_method m) |
_callb * | Cb (TYPENAME _callb::_method m, State_t< Event > *s) |
_guard * | Gd (const Event &e, TYPENAME _guard::_method m) |
State * | entry () |
const State * | entry () const |
Protected Attributes | |
State | _entry |
Private Attributes | |
State * | start |
State | button_down |
std::vector< KeyMenuItem > | menu_items |
Each key/operation pair also has a corresponding description so that the menu can be displayed to a standard output stream.
Definition at line 29 of file key_menu.H.
|
|
|
|
|
Definition at line 33 of file key_menu.H. |
|
Definition at line 38 of file key_menu.C. |
|
Add multiple keys all with the same operation and description.
|
|
Add a single key/operation pair to the menu.
Referenced by TestSPSapp::init_kbd(), SMVIEWapp::init_kbd(), and BaseJOTapp::init_kbd(). |
|
|
|
|
|
Display the menu to the supplied output stream.
Referenced by BaseJOTapp::keymenu_help_cb(). |
|
Definition at line 403 of file fsa.H. References Interactor< T, EVENT, STATE >::_entry. |
|
Definition at line 402 of file fsa.H. References Interactor< T, EVENT, STATE >::_entry. |
|
|
|
Get the description for the supplied key.
Definition at line 170 of file key_menu.C. References menu_items. |
|
Remove multiple key/operation pairs from the menu.
Definition at line 150 of file key_menu.C. References remove_menu_item(). |
|
Remove a single key/operation pair from the menu.
Definition at line 114 of file key_menu.C. References KEYD, menu_items, and start. Referenced by remove_menu_item(). |
|
|
|
Definition at line 56 of file key_menu.H. |
|
Definition at line 58 of file key_menu.H. Referenced by get_item_desc(), and remove_menu_item(). |
|
Definition at line 55 of file key_menu.H. Referenced by remove_menu_item(). |