#include <menus.h>
Inheritance diagram for TMenuItem::
Public Methods | |
TMenuItem (const char *aName, ushort aCommand, ushort aKeyCode, ushort aHelpCtx=hcNoContext, char *p=0, TMenuItem *aNext=0) | |
TMenuItem (const char *aName, ushort aKeyCode, TMenu *aSubMenu, ushort aHelpCtx=hcNoContext, TMenuItem *aNext=0) | |
~TMenuItem () | |
void | append (TMenuItem *aNext) |
Public Attributes | |
TMenuItem* | next |
const char* | name |
ushort | command |
Boolean | disabled |
ushort | keyCode |
ushort | helpCtx |
const char* | param |
TMenu* | subMenu |
They can be individual menu items that cause a command to be generated or a TSubMenu pull-down menu that contains other TMenuItem instances. TMenuItem's different constructors set the data members appropriately. TMenuItem also serves as a base class for TSubMenu.
Definition at line 52 of file menus.h.
|
Creates an individual menu item with the given values. Data member disabled is set if `aCommand' is disabled. |
|
Creates a pull-down submenu object with the given values. Data member command is set to zero. |
|
If param is used, deallocates the space used to store name and param. If subMenu is used, deallocates space used to store name and subMenu. |
|
Appends the given TMenuItem to the list of TMenuItems by setting next data member to `aNext'. |
|
The command word of the event generated when this menu item is selected if there isn't a submenu item. |
|
True if the menu item is disabled. The menu item will be drawn using the appropriate palette entry. |
|
The menu item's help context. When the menu item is selected, this data member represents the help context of the application, unless the context number is hcNoContext, in which case there is no help context.
|
|
The scan code for the associated hot key. |
|
The name of the item that appears in the menu box. |
|
A non-zero next points to the next TMenuItem object in the linked list associated with a menu. If next = 0, this is the last item in the list. |
|
param is used to display the hot key associated with this menu item. |
|
subMenu points to the submenu to be created when this menu item is selected, if a command is not generated. |