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

TColorItemList Class Reference

Used to view and select single color items. More...

#include <colorsel.h>

Inheritance diagram for TColorItemList::

TListViewer TView TObject TStreamable List of all members.

Public Methods

 TColorItemList (const TRect &bounds, TScrollBar *aScrollBar, TColorItem *aItems)
virtual void focusItem (short item)
virtual void getText (char *dest, short item, short maxLen)
virtual void handleEvent (TEvent &event)

Static Public Methods

TStreamablebuild ()

Static Public Attributes

const char* const name

Protected Methods

 TColorItemList (StreamableInit)

Protected Attributes

TColorItemitems

Detailed Description

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.

TColorItemList is a simpler variant of TColorGroupList for viewing and selecting single color items rather than groups of colors.

Like TColorGroupList, TColorItemList is specialized derivative of TListViewer. Color items can be selected in any of the usual ways (by mouse or keyboard).

Unlike TColorGroupList, TColorItemList overrides the TListViewer event handler.

Definition at line 717 of file colorsel.h.


Constructor & Destructor Documentation

TColorItemList::TColorItemList ( const TRect & bounds,
TScrollBar * aScrollBar,
TColorItem * aItems )
 

Calls TListViewer constructor TListViewer(bounds, 1, 0, aScrollBar) to create a single-column list viewer with a single vertical scroll bar.

Then, the constructor sets items data member to `aItems' and range to the number of items.

TColorItemList::TColorItemList ( StreamableInit ) [protected]
 

Each streamable class needs a "builder" to allocate the correct memory for its objects together with the initialized virtual table pointers. This is achieved by calling this constructor with an argument of type StreamableInit.


Member Function Documentation

TStreamable * TColorItemList::build ( ) [static]
 

Called to create an object in certain stream-reading situations.

Reimplemented from TListViewer.

void TColorItemList::focusItem ( short item ) [virtual]
 

Selects the given item by calling TListViewer::focusItem(item), then broadcasts a cmNewColorIndex event.

See also:
TListViewer::focusItem

Reimplemented from TListViewer.

void TColorItemList::getText ( char * dest,
short item,
short maxLen ) [virtual]
 

Copies the item name corresponding to `item' to the `dest' string.

Reimplemented from TListViewer.

void TColorItemList::handleEvent ( TEvent & event ) [virtual]
 

Calls TListViewer::handleEvent(). Then, if the event is cmNewColorItem, the appropriate item is focused and the viewer is redrawn.

Reimplemented from TListViewer.


Member Data Documentation

TColorItem * TColorItemList::items [protected]
 

The color item list for this viewer.

Definition at line 751 of file colorsel.h.

const char *const TColorItemList::name [static]
 

Undocumented.

Reimplemented from TListViewer.

Definition at line 767 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