VR-Engage  2.2
Loading...
Searching...
No Matches
makVre::DtMenu::Item Struct Reference

Detailed Description

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

DtMenuElementelement
 
int enabledIndex
 

Constructor & Destructor Documentation

◆ Item()

makVre::DtMenu::Item::Item ( DtMenuElement * _element)
inline

Constructor.

Parameters
_elementPointer to the menu element to wrap

Creates a new Item wrapping the specified menu element.

References element.

◆ ~Item()

makVre::DtMenu::Item::~Item ( )
inline

Destructor.

Deletes the wrapped menu element, ensuring proper cleanup.

References element.

Member Function Documentation

◆ isEnabled()

bool makVre::DtMenu::Item::isEnabled ( )
inline

Checks if the wrapped element is currently enabled.

Returns
True if the element is enabled, false otherwise

References element.

Member Data Documentation

◆ element

DtMenuElement* makVre::DtMenu::Item::element

Pointer to the wrapped menu element.

Referenced by isEnabled(), Item(), and ~Item().

◆ enabledIndex

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.


The documentation for this struct was generated from the following file: