|
VR-Engage
2.3
|
Item wraps a menu element with additional state information needed for menu management, such as enabled index and ownership tracking. The Item structure takes ownership of the contained element and deletes it when the Item is destroyed.
#include <actionMenu.h>
Public Member Functions | |
| Item (DtMenuElement *_element) | |
| ~Item () | |
| bool | isEnabled () |
Public Attributes | |
| DtMenuElement * | element |
| int | enabledIndex |
|
inline |
Constructor.
| _element | Pointer to the menu element to wrap |
Creates a new Item wrapping the specified menu element.
References element, and enabledIndex.
|
inline |
|
inline |
Checks if the wrapped element is currently enabled.
References element.
| DtMenuElement* makVre::DtMenu::Item::element |
Pointer to the wrapped menu element.
Referenced by isEnabled(), Item(), and ~Item().
| int makVre::DtMenu::Item::enabledIndex |
Index of this element in the enabled elements list.
This is used to track the element's position in the visible menu. Only enabled elements are given an index for selection purposes.
Referenced by Item().