Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

TColorItem Class Reference

Information about a color item. More...

#include <colorsel.h>

List of all members.

Public Methods

 TColorItem (const char *nm, uchar idx, TColorItem *nxt=0)
virtual ~TColorItem ()

Public Attributes

const char* name
uchar index
TColorItem* next

Friends

TColorGroupoperator+ (TColorGroup &g, TColorItem &i)
TColorItem& operator+ (TColorItem &i1, TColorItem &i2)


Detailed Description

Stores information about a color item. TColorItem defines a linked list of color names and indexes.

The interrelated classes TColorItem, TColorGroup, TColorSelector, TMonoSelector, TColorDisplay, TColorGroupList, TColorItemList and TColorDialog provide viewers and dialog boxes from which the user can select and change the color assignments from available palettes with immediate effect on the screen.

Definition at line 52 of file colorsel.h.


Constructor & Destructor Documentation

TColorItem::TColorItem ( const char * nm,
uchar idx,
TColorItem * nxt = 0 )
 

Constructor.

Creates a color item object with name set to `nm', index set to `idx' and, by default, next set to 0.

`nm' is a pointer to the name of the color item. A local copy of the string is created. `idx' is the color index. `nxt' is a pointer to the next color item (its default value is 0).

See file `demo/tvdemo2.cc' for an example.

TColorItem::~TColorItem ( ) [virtual]
 

Destructor.


Friends And Related Function Documentation

TColorItem & operator+ ( TColorItem & i1,
TColorItem & i2 ) [friend]
 

Inserts another color item after this one by changing the TColorItem::next pointer.

TColorGroup & operator+ ( TColorGroup & g,
TColorItem & i ) [friend]
 

Inserts color item `i' in color group `g'.

See also:
TColorGroup


Member Data Documentation

uchar TColorItem::index
 

The color index of the item.

Definition at line 79 of file colorsel.h.

const char * TColorItem::name
 

The name of the color item.

Definition at line 75 of file colorsel.h.

TColorItem * TColorItem::next
 

Link to the next color item, or 0 if there is no next item.

Definition at line 83 of file colorsel.h.


The documentation for this class was generated from the following file:
Generated at Sat Sep 22 20:19:22 2001 for TVision by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001