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

TColorDisplay Class Reference

Viewer used to display and select colors. More...

#include <colorsel.h>

Inheritance diagram for TColorDisplay::

TView TObject TStreamable List of all members.

Public Methods

 TColorDisplay (const TRect &bounds, const char *aText)
virtual ~TColorDisplay ()
virtual void draw ()
virtual void handleEvent (TEvent &event)
virtual void setColor (uchar *aColor)

Static Public Methods

TStreamablebuild ()

Static Public Attributes

const char* const name

Protected Methods

 TColorDisplay (StreamableInit)
virtual void write (opstream &os)
virtual void* read (ipstream &is)

Protected Attributes

ucharcolor
const char* text

Detailed Description

TColorDisplay and these interrelated classes provide viewers and dialog boxes from which the user can select and change the screen attributes and color assignments from available palettes with immediate effect on the screen:

TColorItem, TColorGroup, TColorSelector, TMonoSelector, TColorGroupList, TColorItemList and TColorDialog.

TColorDisplay is a view for displaying text so that the user can select a suitable palette.

Definition at line 454 of file colorsel.h.


Constructor & Destructor Documentation

TColorDisplay::TColorDisplay ( const TRect & bounds,
const char * aText )
 

Constructor.

Creates a view of the given size with TView constructors TView(bounds), then sets text to the `aText' argument.

`bounds' is the bounding rectangle of the view. `aText' is the string printed in the view.

TColorDisplay::~TColorDisplay ( ) [virtual]
 

Destructor.

Destroys both the view and the text string.

TColorDisplay::TColorDisplay ( StreamableInit ) [protected]
 

Constructor.

Used to recover the view from a stream.


Member Function Documentation

TStreamable * TColorDisplay::build ( ) [static]
 

Creates a new TColorDisplay.

Used to recover the view from a stream. Called to create an object in certain stream-reading situations.

Reimplemented from TView.

void TColorDisplay::draw ( ) [virtual]
 

Draws the view with given text and current color.

Reimplemented from TView.

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

Calls TView::handleEvent() and redraws the view as appropriate in response to the cmColorBackgroundChanged and cmColorForegroundChanged broadcast events.

Reimplemented from TView.

void * TColorDisplay::read ( ipstream & is ) [protected, virtual]
 

Used to recover the view from a stream. Reads from the input stream `is'.

Reimplemented from TView.

void TColorDisplay::setColor ( uchar * aColor ) [virtual]
 

Change the currently displayed color. Sets color to `aColor', broadcasts the change to the owning group, then calls drawView().

void TColorDisplay::write ( opstream & os ) [protected, virtual]
 

Used to store the view in a stream. Writes to the output stream `os'.

Reimplemented from TView.


Member Data Documentation

uchar * TColorDisplay::color [protected]
 

Stores the current color for this display.

Definition at line 493 of file colorsel.h.

const char *const TColorDisplay::name [static]
 

Undocumented.

Reimplemented from TView.

Definition at line 521 of file colorsel.h.

const char * TColorDisplay::text [protected]
 

Stores a pointer to the text string to be displayed.

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