class XtList: public XObject

Selectable list of items

Inheritance:

XtList - XObject - XEventBroker


Public Methods

[more] XtList(XRect __r, unsigned long __Flags, LItem *__Items = 0)
Constructs a new XtList.
[more] ~XtList()
Destructs the object's instance
[more]virtual void AddFirst(const char *__Text, long __Value, short __Flags)
Add LItem at top of the list
[more]virtual void AddFirst(const char *__Text)
Add LItem at top of the list
[more]virtual void AddLast(const char *__Text, long __Value, short __Flags)
Add LItem at end of the list
[more]virtual void AddLast(const char *__Text)
Add LItem at end of the list
[more]virtual void ClearSelected()
Mark all the selected items as not selected
[more]virtual void DeSelect(LItem *__Item)
Mark the specified item as not selected
[more]virtual void DecNumberSelected()
Decrement the number of selected items
[more]virtual bool DeleteItem(unsigned long __Item)
Deletes the specified item number
[more]virtual void Draw()
Draws the object
[more]virtual unsigned GetColsNumber()
Returns the columns number
[more]virtual unsigned long GetCurrentItem()
Returns the item number of the current cursor position
[more]virtual short GetFlags(unsigned long __Item)
Returns the flags value of the specified item number
[more]virtual unsigned long GetItemsNumber()
Returns the items number
[more]virtual unsigned long GetSelected(unsigned long __Item)
Returns the item number of the selected items or zero if end of list
[more]virtual char* GetText(unsigned long __Item)
Returns the text of the specified item number
[more]virtual long GetValue(unsigned long __Item)
Returns the value of the specified item number
[more]virtual LItem* GetValue()
Returns the list content
[more]virtual void IncNumberSelected()
Increments the number of selected items
[more]virtual bool InsertItem(unsigned long __Position, LItem *__Item)
Insert the item as defined position
[more]virtual unsigned long MaxSelected()
Returns the maximum number of selectable items
[more]virtual unsigned long NumberSelected()
Returns the number of selected items
[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 Select(LItem *__Item)
Mark the specified item as selected
[more]virtual void SetCurrentItem(LItem *__Item)
Sets the current item number
[more]virtual void SetCurrentItem(unsigned long __Item)
Sets the current item number
[more]virtual void SetFlags(unsigned long __Item, short __Flags)
Sets the flags of the specified item number.
[more]virtual void SetMaxSelectable(unsigned long __max)
Changes the maximum number of selectable items
[more]virtual void SetState(unsigned long __Mask, bool __BoolValue)
Sets the object's state
[more]virtual bool SetText(unsigned long __Item, const char *__Text)
Sets the text of the specified item number.
[more]virtual void SetValue(LItem *__Items)
Sets a new list content
[more]virtual void SetValue(unsigned long __Item, long __Value)
Sets the value of the specified item number.

Protected Methods

[more]virtual void CountSelected()
Counts the selected items
[more]virtual void InitScrollBar()
Initialize the associated scroll bar
[more]virtual void SetScrollBar()
Sets the associated scroll bar values


Inherited from XObject:

Public Methods

ovirtual void CalculateBounds()
oXRect GetBounds()
ovirtual XEvent* GetEvent()
ounsigned long GetId()
ochar* GetObjClass()
oXPoint GetOrigin()
ovirtual char* GetPalette()
ovirtual unsigned GetPalEntry(unsigned __Index)
oXPoint GetSize()
ounsigned long GetState()
ovirtual bool GetState(unsigned long __Mask)
ovirtual void HandleEvent(XEvent *__Event)
ovirtual void MoveTo(XPoint __p)
ovirtual bool ProcessEvent(XEvent *__Event)
ovirtual void RegisterClient(XObject *__Client)
ovirtual void Resize(XPoint __delta)
ovirtual void SetPalette(char *__Pal, unsigned __PalLen)
ovirtual void UnregisterClient(XObject *__Client)

Protected Fields

ounsigned long Id
ounsigned long State
oXPoint Origin
oXPoint Size
oXPoint Cursor
oXRect Bounds
ochar ObjClass[40]
ochar Pal[80]
ounsigned PalLen
oXObject* Server
oClientList Clients

Protected Methods

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


Inherited from XEventBroker:

Public Methods

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

Protected Fields

oMap __map


Inherited from XObjectEventListener:

Public Methods

ovirtual bool ProcessCommand(XMessage *__Event)
ovirtual bool ProcessSignal(XEvent *__Event)
ovirtual bool ProcessBroadcast(XEvent *__Event)


Inherited from XEventListener:


Documentation

Selectable list of items
o XtList(XRect __r, unsigned long __Flags, LItem *__Items = 0)
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

LIST_V_SCROLLBAR - to provide a vertical scroll bar

LIST_H_SCROLLBAR - to provide a horizontal scroll bar

MAX_SELECTED - do not allow more than maximum selectable items
__Items - linked list of items:

struct LItem {
char *Text;
short Flags;
long Value;
LItem *Next;
};

This list can be constructed using the following 2 functions:

LItem *NewLItem(char *__Text, long __Value, short __Flags, 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

o ~XtList()
Destructs the object's instance

ovirtual void AddFirst(const char *__Text, long __Value, short __Flags)
Add LItem at top of the list

ovirtual void AddFirst(const char *__Text)
Add LItem at top of the list

ovirtual void AddLast(const char *__Text, long __Value, short __Flags)
Add LItem at end of the list

ovirtual void AddLast(const char *__Text)
Add LItem at end of the list

ovirtual void ClearSelected()
Mark all the selected items as not selected

ovirtual void DeSelect(LItem *__Item)
Mark the specified item as not selected

ovirtual void DecNumberSelected()
Decrement the number of selected items

ovirtual bool DeleteItem(unsigned long __Item)
Deletes the specified item number
Parameters:
__Item - item number

ovirtual void Draw()
Draws the object

ovirtual unsigned GetColsNumber()
Returns the columns number

ovirtual unsigned long GetCurrentItem()
Returns the item number of the current cursor position

ovirtual short GetFlags(unsigned long __Item)
Returns the flags value of the specified item number
Parameters:
__Item - item number

ovirtual unsigned long GetItemsNumber()
Returns the items number

ovirtual unsigned long GetSelected(unsigned long __Item)
Returns the item number of the selected items or zero if end of list
Parameters:
__Item - item number, 0 = start first item, >0 = next item

ovirtual char* GetText(unsigned long __Item)
Returns the text of the specified item number
Parameters:
__Item - item number

ovirtual long GetValue(unsigned long __Item)
Returns the value of the specified item number
Parameters:
__Item - item number

ovirtual LItem* GetValue()
Returns the list content

ovirtual void IncNumberSelected()
Increments the number of selected items

ovirtual bool InsertItem(unsigned long __Position, LItem *__Item)
Insert the item as defined position

ovirtual unsigned long MaxSelected()
Returns the maximum number of selectable items

ovirtual unsigned long NumberSelected()
Returns the number of selected items

ovirtual bool ProcessKeyboardEvent(XKeyboardEvent *__Event)
Process keyboard events

ovirtual bool ProcessMessage(XMessage *__Event)
Process message events

ovirtual bool ProcessMouseEvent(XMouseEvent *__Event)
Process mouse events

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

ovirtual void Select(LItem *__Item)
Mark the specified item as selected

ovirtual void SetCurrentItem(LItem *__Item)
Sets the current item number

ovirtual void SetCurrentItem(unsigned long __Item)
Sets the current item number

ovirtual void SetFlags(unsigned long __Item, short __Flags)
Sets the flags of the specified item number.
Parameters:
__Item - item number
__Flags - flags

ovirtual void SetMaxSelectable(unsigned long __max)
Changes the maximum number of selectable items

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

ovirtual bool SetText(unsigned long __Item, const char *__Text)
Sets the text of the specified item number.
Parameters:
__Item - item number
__Text - text

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

ovirtual void SetValue(unsigned long __Item, long __Value)
Sets the value of the specified item number.
Parameters:
__Item - item number
__Value - value

ovirtual void CountSelected()
Counts the selected items

ovirtual void InitScrollBar()
Initialize the associated scroll bar

ovirtual void SetScrollBar()
Sets the associated scroll bar values


This class has no child classes.

Go to the
hierarchy of classes.


Copyright ©1998-2001 Dragos Acostachioaie
Last update on October 27, 2001

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