GlsMenu
1.5.4
|
#include <gls_menu.h>
Public Types | |
typedef MenuItem_t | Item_t |
typedef MenuItemId_t | ItemId_t |
typedef GlsMenuHandlerGroup_T< MenuItem_t > | ItemGroup_t |
Public Member Functions | |
GlsMenu_T (const std::string &name, GlsMenuDictionary &dataDict, GlsMenuAction::HandlerCont_t &actionHandlers) | |
virtual | ~GlsMenu_T () |
ItemGroup_t * | Items () const |
MenuItem_t * | Item (const ItemId_t &itemId) const |
void | SelectItem (const ItemId_t &itemId) |
virtual void | Hide () |
virtual void | Show () |
const GlsMenuDictionary & | Attributes () const |
virtual std::istream & | ReadValue (std::istream &instr) |
virtual std::ostream & | WriteValue (std::ostream &outstr) |
virtual void | Inc (long amount=1) |
Protected Attributes | |
GlsMenuDictionary | _attr |
The dictionary of attributes for the group attribute. More... | |
Private Attributes | |
ItemGroup_t * | _menuItems |
Container of menu items within the menu. More... | |
The GlsMenu_T class provides support for a menu class with a specific menu item class and type to identify the items.
The MenuItem_t template parameter should provide a menu item class derived from the GlsMenuItem base class. The MenuItemId_t template parameter should provide an id type that when streamed out using the << operator, will provide a unique key for a specific menu item within a menu.
Definition at line 126 of file gls_menu.h.
typedef MenuItem_t GlsMenu_T< MenuItem_t, MenuItemId_t >::Item_t |
Definition at line 129 of file gls_menu.h.
typedef GlsMenuHandlerGroup_T<MenuItem_t> GlsMenu_T< MenuItem_t, MenuItemId_t >::ItemGroup_t |
Definition at line 131 of file gls_menu.h.
typedef MenuItemId_t GlsMenu_T< MenuItem_t, MenuItemId_t >::ItemId_t |
Definition at line 130 of file gls_menu.h.
|
inline |
Class constructor.
Definition at line 138 of file gls_menu.h.
|
inlinevirtual |
Class destructor.
Definition at line 155 of file gls_menu.h.
|
inlineinherited |
Read attribute dictionary from an input stream.
instr | input stream to read value from. |
Definition at line 78 of file gls_menu_data_group.h.
References GlsMenuDataGroup::_attr.
Referenced by GlsMFDMenu_T< MenuItem_t, Submenu_t, PageId_t >::ReadValue().
|
virtualinherited |
Hide the menu. Perform necessary logic for when a menu is newly hidden for the first time after being shown. This should not be called on a cyclical basis, but when a "hide menu" event occurs.
|
virtualinherited |
Increment the data item. Derived classes must override this as the default is a no-op.
Reimplemented in GlsMenuDiscrete_T< T >.
Referenced by GlsMenuSet_T< MenuType_t, DataFactory_t >::IncData().
|
inline |
Gain access to the specified menu item.
itemId | id of the menu item. |
Definition at line 179 of file gls_menu.h.
|
inline |
Gain access to a container of all the menu items in the menu.
Definition at line 164 of file gls_menu.h.
|
virtualinherited |
Read attribute dictionary from an input stream.
instr | input stream to read value from. |
Reimplemented in GlsMFDMenu_T< MenuItem_t, Submenu_t, PageId_t >, and GlsMenuDynDataGroup.
Referenced by GlsMFDMenu_T< MenuItem_t, Submenu_t, PageId_t >::ReadValue().
|
inline |
Handle selection of one of the menu items.
itemId | id of the menu item. |
Definition at line 195 of file gls_menu.h.
|
virtualinherited |
Show the menu. Perform necessary logic for when a menu is newly shown for the first time or after being hidden. This should not be called on a cyclical basis, but when a "show menu" event occurs.
|
virtualinherited |
Read attribute dictionary from an input stream.
instr | input stream to read value from. |
|
protectedinherited |
The dictionary of attributes for the group attribute.
Definition at line 100 of file gls_menu_data_group.h.
Referenced by GlsMenuDataGroup::Attributes(), GlsMenu_T< MenuItem_t, GlsMFD::MenuItemId_t >::GlsMenu_T(), GlsMFDMenu_T< MenuItem_t, Submenu_t, PageId_t >::GlsMFDMenu_T(), GlsMFDSubmenu_T< MenuItemId_t >::GlsMFDSubmenu_T(), GlsMenuDataGroup_T< T >::Item(), GlsMenuHandlerGroup_T< Menu_t >::Item(), GlsMFDMenu_T< MenuItem_t, Submenu_t, PageId_t >::ReadValue(), and GlsMenuItem_T< State_t >::State().
|
private |
Container of menu items within the menu.
Definition at line 206 of file gls_menu.h.
Referenced by GlsMenu_T< MenuItem_t, GlsMFD::MenuItemId_t >::GlsMenu_T(), GlsMenu_T< MenuItem_t, GlsMFD::MenuItemId_t >::Item(), GlsMenu_T< MenuItem_t, GlsMFD::MenuItemId_t >::Items(), and GlsMenu_T< MenuItem_t, GlsMFD::MenuItemId_t >::SelectItem().