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

TMultiCheckBoxes Class Reference

Implements a cluster of multistate check boxes. More...

#include <dialogs.h>

Inheritance diagram for TMultiCheckBoxes::

TCluster TView TObject TStreamable List of all members.

Public Methods

 TMultiCheckBoxes (TRect &bounds, TSItem *aStrings, uchar aSelRange, ushort aFlags, const char *aStates)
 ~TMultiCheckBoxes ()
virtual ushort dataSize ()
virtual void draw ()
virtual void getData (void *rec)
virtual uchar multiMark (int item)
virtual void press (int item)
virtual void setData (void *)

Static Public Methods

TStreamablebuild ()

Static Public Attributes

const char* const name

Protected Methods

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

Detailed Description

A cluster of multistate check boxes.

Definition at line 1466 of file dialogs.h.


Constructor & Destructor Documentation

TMultiCheckBoxes::TMultiCheckBoxes ( TRect & bounds,
TSItem * aStrings,
uchar aSelRange,
ushort aFlags,
const char * aStates )
 

Constructs a cluster of multistate check boxes by first calling the constructor inherited from TCluster, then setting the private data members selRange and flags to the values passed in `aSelRange' and `aFlags', respectively, and allocating a dynamic copy of `aStates' and assigning it to private data member states.

TMultiCheckBoxes::~TMultiCheckBoxes ( )
 

Disposes of the multistate check boxes object by deallocating the dynamic string states and calling the destructor inherited from TCluster.

See also:
TCluster::~TCluster

TMultiCheckBoxes::TMultiCheckBoxes ( 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 * TMultiCheckBoxes::build ( ) [static]
 

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

Reimplemented from TCluster.

ushort TMultiCheckBoxes::dataSize ( ) [virtual]
 

Returns the size of the data transferred by getData() and setData(), which is sizeof(long int).

Reimplemented from TCluster.

void TMultiCheckBoxes::draw ( ) [virtual]
 

Draws the cluster of multistate check boxes by drawing each check box in turn, using the same box as a regular check box, but using the characters in states data member to represent the state of each box instead of the standard blank and "X".

Reimplemented from TView.

void TMultiCheckBoxes::getData ( void * rec ) [virtual]
 

Typecasts `rec' into a long int and copies value into it, then calls drawView() to redraw the cluster to reflect the current state of the check boxes.

See also:
TMultiCheckBoxes::dataSize , TMultiCheckBoxes::setData

Reimplemented from TCluster.

uchar TMultiCheckBoxes::multiMark ( int item ) [virtual]
 

Returns the state of the item'th check box in the cluster.

Reimplemented from TCluster.

void TMultiCheckBoxes::press ( int item ) [virtual]
 

Changes the state of the item'th check box in the cluster. Unlike regular check boxes that simply toggle on and off, multistate check boxes cycle through all the states available to them.

Reimplemented from TCluster.

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

Reads from the input stream `is'.

Reimplemented from TCluster.

void TMultiCheckBoxes::setData ( void * rec ) [virtual]
 

Typecasts `rec' into a long int, and copies its value into value, then calls drawView() to redraw the checkboxes to reflect their new states.

See also:
TMultiCheckBoxes::dataSize , TMultiCheckBoxes::getData

Reimplemented from TCluster.

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

Writes to the output stream `os'.

Reimplemented from TCluster.


Member Data Documentation

const char *const TMultiCheckBoxes::name [static]
 

Undocumented.

Reimplemented from TCluster.

Definition at line 1575 of file dialogs.h.


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