Definition at line 31 of file menu.h.
Public Member Functions | |
void | addMenuItem (const string &menuItem) |
void | draw () const |
Menu (const string &title, const string &prompt) | |
int | menuItem (const string &menuItem) const |
int | selectMenuItem () const |
void | setFeedback (const string &feedback) |
Static Public Attributes | |
static const int | MENU_EXIT = -100 |
Private Attributes | |
string | m_clearScreen |
string | m_feedback |
char | m_menuChar |
vector< string > | m_menuItems |
string | m_prompt |
string | m_title |
Static Private Attributes | |
static const string | DEFAULT_MESSAGE = "- - - - - - - - - - - - - - - - - - - - " |
static const int | MAX_WIDTH = 80 |
static const int | MENU_ITEM_SPACERS = 5 |
|
General constructor.
Definition at line 27 of file menu.cpp. References DEFAULT_MESSAGE, m_clearScreen, m_feedback, m_menuChar, m_prompt, and m_title. |
|
Adds an option to the menu.
Definition at line 41 of file menu.cpp. References m_menuItems. Referenced by createCluster(), interactiveRun(), and selectSimulation(). |
|
Draws the menu.
Definition at line 63 of file menu.cpp. References DEFAULT_MESSAGE, m_clearScreen, m_feedback, m_menuChar, m_menuItems, m_title, MAX_WIDTH, and MENU_ITEM_SPACERS. Referenced by createCluster(), interactiveRun(), selectMenuItem(), and selectSimulation(). |
|
Gets the menuItem's ID which can be used in if statements.
Definition at line 50 of file menu.cpp. References m_menuItems. Referenced by createCluster(), interactiveRun(), and selectSimulation(). |
|
Prompts a user to select an option.
Definition at line 108 of file menu.cpp. References draw(), m_feedback, m_menuItems, m_prompt, and MENU_EXIT. Referenced by createCluster(), interactiveRun(), and selectSimulation(). Here is the call graph for this function: |
|
This will set the feedback the the user will see.
Definition at line 58 of file menu.cpp. References m_feedback. Referenced by interactiveRun(), and selectSimulation(). |
|
|
|
|
|
Definition at line 86 of file menu.h. Referenced by draw(), Menu(), selectMenuItem(), and setFeedback(). |
|
|
|
Definition at line 90 of file menu.h. Referenced by addMenuItem(), draw(), menuItem(), and selectMenuItem(). |
|
Definition at line 82 of file menu.h. Referenced by Menu(), and selectMenuItem(). |
|
|
|
Definition at line 73 of file menu.h. Referenced by draw(). |
|
Definition at line 35 of file menu.h. Referenced by createCluster(), interactiveRun(), selectMenuItem(), and selectSimulation(). |
|
Definition at line 75 of file menu.h. Referenced by draw(). |