Representation of an item on a menu. More...
#include <vgui_menu.h>
Classes | |
struct | invocation |
Description of keyboard shortcut (makes no sense for separators). More... | |
Public Member Functions | |
vgui_menu_item () | |
Constructor - create a default menu item. | |
vgui_menu_item (vgui_menu_item const &) | |
Constructor - create menu item same as given item. | |
~vgui_menu_item () | |
Destructor. | |
bool | is_command () const |
Return true if the item is a command (item which performs an action). | |
bool | is_submenu () const |
Returns true if the item is a sub-menu. | |
bool | is_toggle_button () const |
Returns true if the item is a toggle button. | |
bool | is_separator () const |
Returns true if the item is a separator. | |
Public Attributes | |
vcl_string | name |
Name of item, "" for separators. | |
vgui_command_sptr | cmnd |
Pointer to the command to be executed. | |
vgui_menu * | menu |
Pointer to a submenu. | |
struct vgui_menu_item::invocation | short_cut |
Representation of an item on a menu.
Definition of vgui_menu::item = vgui_menu_item.
Each item is either a command : . name . action (command) . invocation (eg. shortcuts) or a submenu : . name . another menu . invocation or a toggle button : . name . toggle_command . invocation or a separator : . -----------
Definition at line 51 of file vgui_menu.h.
vgui_menu_item::vgui_menu_item | ( | ) |
Constructor - create a default menu item.
Definition at line 13 of file vgui_menu.cxx.
vgui_menu_item::vgui_menu_item | ( | vgui_menu_item const & | that | ) |
Constructor - create menu item same as given item.
Definition at line 21 of file vgui_menu.cxx.
vgui_menu_item::~vgui_menu_item | ( | ) |
Destructor.
Definition at line 31 of file vgui_menu.cxx.
bool vgui_menu_item::is_command | ( | ) | const [inline] |
Return true if the item is a command (item which performs an action).
Definition at line 81 of file vgui_menu.h.
bool vgui_menu_item::is_separator | ( | ) | const [inline] |
Returns true if the item is a separator.
Definition at line 90 of file vgui_menu.h.
bool vgui_menu_item::is_submenu | ( | ) | const [inline] |
Returns true if the item is a sub-menu.
Definition at line 84 of file vgui_menu.h.
bool vgui_menu_item::is_toggle_button | ( | ) | const |
Returns true if the item is a toggle button.
Definition at line 38 of file vgui_menu.cxx.
Pointer to the command to be executed.
Non-zero for command items only.
Definition at line 67 of file vgui_menu.h.
Pointer to a submenu.
The object pointed to is owned (ie managed) by the menu. non-zero for submenu items only.
Definition at line 72 of file vgui_menu.h.
vcl_string vgui_menu_item::name |
Name of item, "" for separators.
Definition at line 63 of file vgui_menu.h.