#include <menu.h>
Inheritance diagram for Menu:

Public Methods | |
| Menu () | |
| Constructor. More... | |
| virtual | ~Menu () |
| Destructor. | |
| void | addOption (string const &option) |
| Add an option. More... | |
| vector< string > const & | getOptions () const |
| Get the options. More... | |
| virtual void | moveUp () |
| Select the previous item of the menu. More... | |
| virtual void | moveDown () |
| Select the next item of the menu. More... | |
| virtual unsigned int | getSelectedIndex () const |
| Get the index selected item. More... | |
| virtual string const & | getSelectedItem () const |
| Get the selected item. More... | |
Protected Attributes | |
| vector< string > | options |
| Vector of options. | |
| unsigned int | selectedItem |
| Index of the selected item. | |
It holds a list of strings representing options and handles the selected item. You have to call the addOption method in order to fill the menu with options.
|
|
Constructor. Just put the selectedItem to 0 (the first item). |
|
|
Add an option. Add a copy of the string to the list of options of this menu.
|
|
|
Get the options. Get the list of options of this menu.
|
|
|
Get the index selected item. This does not check if the options has no items.
Reimplemented in InfoMenu. |
|
|
Get the selected item. This does not check if the options has no items.
Reimplemented in InfoMenu. |
|
|
Select the next item of the menu. Move the selected item index down. Reimplemented in InfoMenu. |
|
|
Select the previous item of the menu. Move the selected item index up. Reimplemented in InfoMenu. |
1.2.15