class XtMenu: public XObject

Pull-down menu

Inheritance:

XtMenu - XObject - XEventBroker


Public Methods

[more]XtMenu(XRect __r, unsigned long __Flags, MenuItem *__Items)
Constructs a new XtMenu
[more]~XtMenu()
Destructs the object's instance
[more]virtual void Draw()
Draws the object
[more]virtual XtContextualHelp* GetHelp()
Returns the current contextual help
[more]virtual MenuItem* GetValue()
Returns the menu content
[more]virtual bool ProcessEvent(XEvent *__Event)
Process incoming events by calling XObjectEventListener's ProcessEvent()
[more]virtual bool ProcessCommand(XMessage *__Event)
Process commands
[more]virtual bool ProcessKeyboardEvent(XKeyboardEvent *__Event)
Process keyboard events
[more]virtual bool ProcessMessage(XMessage *__Event)
Process messages
[more]virtual bool ProcessMouseEvent(XMouseEvent *__Event)
Process mouse events
[more]virtual void SetHelp(XRect __r, unsigned __Alignment, unsigned long __Flags)
Setup a contextual help for menu items
[more]virtual void SetValue(MenuItem *__Items)
Change the menu content

Inherited from XObject:

Public Methods

virtual void CalculateBounds()
XRect GetBounds()
virtual XEvent* GetEvent()
unsigned long GetId()
char* GetObjClass()
XPoint GetOrigin()
virtual char* GetPalette()
virtual unsigned GetPalEntry(unsigned __Index)
XPoint GetSize()
unsigned long GetState()
virtual bool GetState(unsigned long __Mask)
virtual void HandleEvent(XEvent *__Event)
virtual void MoveTo(XPoint __p)
virtual void RegisterClient(XObject *__Client)
virtual void Resize(XPoint __delta)
virtual void SetPalette(char *__Pal, unsigned __PalLen)
virtual void SetState(unsigned long __Mask, bool __BoolValue)
virtual void UnregisterClient(XObject *__Client)

Protected Fields

unsigned long Id
unsigned long State
XPoint Origin
XPoint Size
XPoint Cursor
XRect Bounds
char ObjClass[40]
char Pal[80]
unsigned PalLen
XObject* Server
ClientList Clients

Protected Methods

bool SendMessage(unsigned long __Receiver, unsigned long __Class, long __Message)
bool SendMessage(unsigned long __Receiver, unsigned long __Class, void *__Body, unsigned long __Size)

Inherited from XEventBroker:

Public Methods

virtual void AddListener(unsigned long __Listener, unsigned __Class)
virtual void DelListener(unsigned long __Listener, unsigned __Class)
virtual void DelListener(unsigned long __Listener)

Protected Fields

Map __map

Inherited from XObjectEventListener:

Public Methods

virtual bool ProcessSignal(XEvent *__Event)
virtual bool ProcessBroadcast(XEvent *__Event)

Inherited from XEventListener:


Documentation

Pull-down menu
XtMenu(XRect __r, unsigned long __Flags, MenuItem *__Items)
Constructs a new XtMenu
Parameters:
__r - menu bounds
__Flags - options, which can be:

VERTICAL_MENU - to position the menu vertically

HIDE_DISABLED_ITEMS - to hide the disabled items
__Items - linked list of menu items:

struct MenuItem {
char *Text;
char *KeyText;
int Key, Command;
unsigned Value;
XtWindow *ChildWindow;
MenuItem *Child, *Parent;
MenuItem *Next;
};

This list can be constructed using the following 2 functions:

MenuItem *NewMenuItem(char *__Text, char *__KeyText, int __Key, int __Command, MenuItem *__Child, MenuItem *__ANextItem) which builds the entire list, and:

MenuItem *NewLine(MenuItem *__ANextItem) which builds a line separator

~XtMenu()
Destructs the object's instance

virtual void Draw()
Draws the object

virtual XtContextualHelp* GetHelp()
Returns the current contextual help

virtual MenuItem* GetValue()
Returns the menu content

virtual bool ProcessEvent(XEvent *__Event)
Process incoming events by calling XObjectEventListener's ProcessEvent()

virtual bool ProcessCommand(XMessage *__Event)
Process commands

virtual bool ProcessKeyboardEvent(XKeyboardEvent *__Event)
Process keyboard events

virtual bool ProcessMessage(XMessage *__Event)
Process messages

virtual bool ProcessMouseEvent(XMouseEvent *__Event)
Process mouse events

virtual void SetHelp(XRect __r, unsigned __Alignment, unsigned long __Flags)
Setup a contextual help for menu items

virtual void SetValue(MenuItem *__Items)
Change the menu content


This class has no child classes.

Go to the
hierarchy of classes.


Copyright ©1998-99 Dragos Acostachioaie
Last update on March 9, 1999

This page was generated with the help of doc++.