class XtList: public XObject

Selectable list of items

Inheritance:

XtList - XObject - XEventBroker


Public Methods

[more]XtList(XRect __r, unsigned long __Flags, LItem *__Items)
Constructs a new XtList
[more]~XtList()
Destructs the object's instance
[more]virtual void Draw()
Draws the object
[more]virtual unsigned GetItemsNumber()
Returns the items number
[more]virtual int GetValue(unsigned __Item)
Returns the value of the specified item number
[more]virtual LItem* GetValue()
Returns the list content
[more]virtual void InitScrollBar()
Initialize the associated scroll bar
[more]virtual bool ProcessKeyboardEvent(XKeyboardEvent *__Event)
Process keyboard events
[more]virtual bool ProcessMessage(XMessage *__Event)
Process message events
[more]virtual bool ProcessMouseEvent(XMouseEvent *__Event)
Process mouse events
[more]virtual int Run()
"Runs" the list: waits for events until an item is choosed or the dialog is closed
[more]virtual void SetState(unsigned long __Mask, bool __BoolValue)
Sets the object's state
[more]virtual void SetValue(LItem *__Items)
Sets a new list content
[more]virtual void SetValue(unsigned __Item, unsigned __Value)
Sets the value of the specified item number

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 bool ProcessEvent(XEvent *__Event)
virtual void RegisterClient(XObject *__Client)
virtual void Resize(XPoint __delta)
virtual void SetPalette(char *__Pal, unsigned __PalLen)
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 ProcessCommand(XMessage *__Event)
virtual bool ProcessSignal(XEvent *__Event)
virtual bool ProcessBroadcast(XEvent *__Event)

Inherited from XEventListener:


Documentation

Selectable list of items
XtList(XRect __r, unsigned long __Flags, LItem *__Items)
Constructs a new XtList
Parameters:
__r - list bounds
__Flags - options, which can be:

SELECTABLE_ITEMS - to allow selection (enable/disable) of items

CIRCULAR_SELECTION - make the list a circular one

HIDE_DISABLED_LIST_ITEMS - hide the items that are disabled
__Items - linked list of items:

struct LItem {
char *Text;
int Value;
LItem *Next;
};

This list can be constructed using the following 2 functions:

LItem *NewLItem(char *__Text, int __Value, LItem *__ANextItem) which builds the entire list, and:

LItem *NewList(char **__Text, unsigned __Count) which builds from a list of char*, containing __Count items, a linked list of items

~XtList()
Destructs the object's instance

virtual void Draw()
Draws the object

virtual unsigned GetItemsNumber()
Returns the items number

virtual int GetValue(unsigned __Item)
Returns the value of the specified item number
Parameters:
__Item - item number, 0 = current item, >0 = item's value

virtual LItem* GetValue()
Returns the list content

virtual void InitScrollBar()
Initialize the associated scroll bar

virtual bool ProcessKeyboardEvent(XKeyboardEvent *__Event)
Process keyboard events

virtual bool ProcessMessage(XMessage *__Event)
Process message events

virtual bool ProcessMouseEvent(XMouseEvent *__Event)
Process mouse events

virtual int Run()
"Runs" the list: waits for events until an item is choosed or the dialog is closed

virtual void SetState(unsigned long __Mask, bool __BoolValue)
Sets the object's state

virtual void SetValue(LItem *__Items)
Sets a new list content

virtual void SetValue(unsigned __Item, unsigned __Value)
Sets the value of the specified item number
Parameters:
__Item - item number, 0 = current item, >0 = item's value
__Value - value


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++.