#include <menu.h>
|
void | removeAll () |
|
void | add (int id, Common::String text, short x, short y, int shortcutKey=-1) |
|
MenuItem * | add (int id, MenuItem *item) |
|
void | addShortcutKey (int id, int shortcutKey) |
|
void | setClosesMenu (int id) |
|
MenuItemList::iterator | getCurrent () |
|
void | setCurrent (MenuItemList::iterator i) |
|
void | setCurrent (int id) |
|
void | show (TextView *view) |
|
bool | isVisible () |
|
void | next () |
|
void | prev () |
|
void | highlight (MenuItem *item) |
|
MenuItemList::iterator | begin () |
|
MenuItemList::iterator | end () |
|
MenuItemList::iterator | begin_visible () |
|
void | reset (bool highlightFirst=true) |
|
MenuItemList::iterator | getById (int id) |
|
MenuItem * | getItemById (int id) |
|
void | activateItemAtPos (TextView *view, const Common::Point &pt) |
|
void | activateItem (int id, MenuEvent::Type action) |
|
bool | activateItemByShortcut (int key, MenuEvent::Type action) |
|
bool | getClosed () const |
|
void | setClosed (bool closed) |
|
void | setTitle (const Common::String &text, int x, int y) |
|
void | addObserver (Observer< Menu *, MenuEvent & > *o) |
|
int | countObservers () const |
|
void | deleteObserver (Observer< Menu *, MenuEvent & > *o) |
|
void | deleteObservers () |
|
bool | hasChanged () const |
|
void | notifyObservers (MenuEvent & arg) |
|
|
void | clearChanged () |
|
void | setChanged () |
|
◆ add()
void Ultima::Ultima4::Menu::add |
( |
int |
id, |
|
|
Common::String |
text, |
|
|
short |
x, |
|
|
short |
y, |
|
|
int |
shortcutKey = -1 |
|
) |
| |
Adds an item to the menu list and returns the menu
◆ getCurrent()
Returns the menu item that is currently selected/highlighted
◆ setCurrent()
Sets the current menu item to the one indicated by the iterator
◆ isVisible()
bool Ultima::Ultima4::Menu::isVisible |
( |
| ) |
|
Checks the menu to ensure that there is at least 1 visible item in the list. Returns true if there is at least 1 visible item, false if nothing is visible.
◆ next()
void Ultima::Ultima4::Menu::next |
( |
| ) |
|
Sets the selected iterator to the next visible menu item and highlights it
◆ prev()
void Ultima::Ultima4::Menu::prev |
( |
| ) |
|
Sets the selected iterator to the previous visible menu item and highlights it
◆ highlight()
void Ultima::Ultima4::Menu::highlight |
( |
MenuItem * |
item | ) |
|
Highlights a single menu item, un-highlighting any others
◆ begin()
Returns an iterator pointing to the first menu item
◆ end()
Returns an iterator pointing just past the last menu item
◆ begin_visible()
Returns an iterator pointing to the first visible menu item
◆ reset()
void Ultima::Ultima4::Menu::reset |
( |
bool |
highlightFirst = true | ) |
|
'Resets' the menu. This does the following:
- un-highlights all menu items
- highlights the first menu item
- selects the first visible menu item
◆ getById()
Returns an iterator pointing to the item associated with the given 'id'
◆ getItemById()
MenuItem* Ultima::Ultima4::Menu::getItemById |
( |
int |
id | ) |
|
Returns the menu item associated with the given 'id'
◆ activateItemAtPos()
Activates any menu item at a given position
◆ activateItem()
void Ultima::Ultima4::Menu::activateItem |
( |
int |
id, |
|
|
MenuEvent::Type |
action |
|
) |
| |
Activates the menu item given by 'id', using 'action' to activate it. If the menu item cannot be activated using 'action', then it is not activated. This also un-highlights the menu item given by 'menu' and highlights the new menu item that was found for 'id'.
◆ activateItemByShortcut()
bool Ultima::Ultima4::Menu::activateItemByShortcut |
( |
int |
key, |
|
|
MenuEvent::Type |
action |
|
) |
| |
Activates a menu item by it's shortcut key. True is returned if a menu item get activated, false otherwise.
◆ getClosed()
bool Ultima::Ultima4::Menu::getClosed |
( |
| ) |
const |
Returns true if the menu has been closed.
◆ setClosed()
void Ultima::Ultima4::Menu::setClosed |
( |
bool |
closed | ) |
|
Update whether the menu has been closed.
The documentation for this class was generated from the following file:
- engines/ultima/ultima4/views/menu.h