#include <colorsel.h>
Inheritance diagram for TColorDialog::
Public Methods | |
TColorDialog (TPalette *aPalette, TColorGroup *aGroups) | |
~TColorDialog () | |
virtual ushort | dataSize () |
virtual void | getData (void *rec) |
virtual void | handleEvent (TEvent &event) |
virtual void | setData (void *rec) |
void | getIndexes (TColorIndex *&) |
void | setIndexes (TColorIndex *&) |
Static Public Methods | |
TStreamable* | build () |
Public Attributes | |
TPalette* | pal |
Static Public Attributes | |
const char* const | name |
Protected Methods | |
TColorDialog (StreamableInit) | |
virtual void | write (opstream &os) |
virtual void* | read (ipstream &is) |
Protected Attributes | |
TColorDisplay* | display |
TColorGroupList* | groups |
TLabel* | forLabel |
TColorSelector* | forSel |
TLabel* | bakLabel |
TColorSelector* | bakSel |
TLabel* | monoLabel |
TMonoSelector* | monoSel |
uchar | groupIndex |
TColorDisplay, TColorGroup, TColorGroupList, TColorItem, TColorItemList, TColorSelector, TMonoSelector and TColorDialog.
TColorDialog is a specialized scrollable dialog box called "Colors" from which the user can examine various palette selections before making a selection.
Definition at line 825 of file colorsel.h.
|
Constructor. Calls the TDialog and TScrollBar constructors to create a fixed size, framed window titled "Colors" with two scroll bars. The pal data member is set to `aPalette'. The given `aGroups' argument creates and inserts a TColorGroup object with an associated label: "~G~roup". The items in `aGroups' initialize a TColorItemList object, which is also inserted in the dialog, labeled as "~I~tem". `aPalette' is a pointer to the initial palette to be modified. This class creates a local copy of the initial palette, so the initial palette is never modified. You may safely leave this field to 0 and set the palette with a subsequent call to setData(). `aGroups' is a pointer to a cluster of objects which specifies all the items in the palette. See file `demo/tvdemo2.cc' for an example. |
|
Destructor. Deletes the local copy of the palette. |
|
Constructor. Used to recover the dialog from a stream. Foreground and background color selectors are created and inserted, labeled as "~F~oreground" and "~B~ackground". The string "Text " is displayed in the current text color. A TMonoSelector object is created, inserted, and labeled "~C~olor". All the items are displayed in their correct colors and attributes. Finally, "O~K~" and "Cancel" buttons are inserted. |
|
Called to create an object in certain stream-reading situations. Reimplemented from TDialog. |
|
By default, dataSize() returns the size of the current palette, expressed in bytes. Reimplemented from TGroup. |
|
Reads the data record of this dialog. Copies dataSize() bytes from pal to `rec'. `rec' should point to a TPalette object. Its contents will be overwritten by the contents of this object.
Reimplemented from TGroup. |
|
Undocumented. |
|
Calls TDialog::handleEvent() and redisplays if the broadcast event generated is cmNewColorIndex. Reimplemented from TDialog. |
|
Used to recover the dialog from a stream. Reads from the input stream `is'. Reimplemented from TWindow. |
|
Writes the data record of this view. The reverse of getData(): copies from `rec' to pal, restoring the saved color selections. `rec' should point to a TPalette object. Reimplemented from TGroup. |
|
Undocumented. |
|
Used to store the dialog in a stream. Writes to the output stream `os'. Reimplemented from TWindow. |
|
The background color label. Definition at line 906 of file colorsel.h. |
|
The background color selector. Definition at line 910 of file colorsel.h. |
|
The color display object for this dialog box. Definition at line 890 of file colorsel.h. |
|
The foreground color label. Definition at line 898 of file colorsel.h. |
|
The foreground color selector. Definition at line 902 of file colorsel.h. |
|
Undocumented. Definition at line 922 of file colorsel.h. |
|
The color group for this dialog box. Definition at line 894 of file colorsel.h. |
|
The monochrome label. Definition at line 914 of file colorsel.h. |
|
The selector for monochrome attributes. Definition at line 918 of file colorsel.h. |
|
Undocumented. Reimplemented from TDialog. Definition at line 970 of file colorsel.h. |
|
Is a pointer to the current palette selection. Definition at line 885 of file colorsel.h. |