MGUI::MENU Class Reference

#include <mgui/command.h>

List of all members.

Public Types

enum  FLAGS {
  FLAG_None = 0, FLAG_Selected = MxMENU_SELECTED, FLAG_OneOfMany = MxMENU_ONE_OF_MANY, FLAG_Toggle = MxMENU_TOGGLE,
  FLAG_Disabled = MxMENU_DISABLED, FLAG_Label = MxMENU_LABEL, FLAG_Ignore = MxMENU_IGNORE, FLAG_Programmer = MxMENU_PROGRAMMER
}

Public Member Functions

void Append (MENU &submenu, const char *label)
void Append (const UNICODE *label, COMMAND_TARGET &target, FLAGS flags=FLAG_None)
void Append (const char *label, COMMAND_TARGET &target, FLAGS flags=FLAG_None)
void AppendSeparator ()
void CreateMenu ()
void CreatePopupMenu ()
MENUITEMGetMenuItems ()
 MENU ()
void TrackPopupMenu (Widget parent, XButtonEvent *event)
 ~MENU ()


Member Enumeration Documentation

enum MGUI::MENU::FLAGS
 

Enumeration values:
FLAG_None 
FLAG_Selected 
FLAG_OneOfMany 
FLAG_Toggle 
FLAG_Disabled 
FLAG_Label 
FLAG_Ignore 
FLAG_Programmer 

Definition at line 461 of file command.h.


Constructor & Destructor Documentation

MGUI::MENU::MENU  ) 
 

MGUI::MENU::~MENU  ) 
 


Member Function Documentation

void MGUI::MENU::Append MENU submenu,
const char *  label
 

Append a submenu (pull-right) to a menu.

The submenu must already have all its items added and must not be modified or go out of scope until we're done using it.

Parameters:
submenu  Submenu to add
label  Label to lookup in resource file

void MGUI::MENU::Append const UNICODE label,
COMMAND_TARGET target,
FLAGS  flags = FLAG_None
 

Append an item to the menu.

Note that the flags are ignored in the MFC version

Parameters:
target  Command target to notify on selection

void MGUI::MENU::Append const char *  label,
COMMAND_TARGET target,
FLAGS  flags = FLAG_None
 

Append an item to the menu.

Note that the flags are ignored in the MFC version

Parameters:
label  Label to look up in resource file
target  Command target to notify on selection

void MGUI::MENU::AppendSeparator  ) 
 

The following methods come from the CMenu base class in MFC version.

void MGUI::MENU::CreateMenu  )  [inline]
 

Used to specify that this is to be a menu bar.

Menu bar can only have other menus as children Note: in the MFC version, you MUST call this before adding anything. In the X version, this really does nothing and is just here for completeness.

Definition at line 523 of file command.h.

void MGUI::MENU::CreatePopupMenu  )  [inline]
 

Used to specify that this is to be a popup menu.

This includes menus on a menu bar. Note: in the MFC version, you MUST call this before adding anything. In the X version, this really does nothing and is just here for completeness.

Definition at line 530 of file command.h.

MENUITEM* MGUI::MENU::GetMenuItems  )  [inline]
 

Get the array of MENUITEMS for menu creation X version only.

Definition at line 534 of file command.h.

void MGUI::MENU::TrackPopupMenu Widget  parent,
XButtonEvent *  event
 

Pop up a popup menu (X Version).

The function is named to match the MFC version that does the same thing, although the parameters are not the same.


The documentation for this class was generated from the following file:
Generated on Tue Dec 14 13:21:00 2004 for TNTsdk by  doxygen 1.3.8-20040913