#include <dialogs.h>
Inheritance diagram for TCheckBoxes::
Public Methods | |
TCheckBoxes (const TRect &bounds, TSItem *aStrings) | |
virtual void | draw () |
virtual Boolean | mark (int item) |
virtual void | press (int item) |
Static Public Methods | |
TStreamable* | build () |
Static Public Attributes | |
const char* const | name |
Protected Methods | |
TCheckBoxes (StreamableInit) |
TCheckBoxes is a specialized cluster of one to 32 controls. Unlike radio buttons, any number of check boxes can be marked independently, so the cluster may have one or more boxes checked by default.
The user can mark check boxes with mouse clicks, cursor movements, and Alt-letter shortcuts. Each check box can be highlighted and toggled on/off (with the Spacebar). An "X" appears in the box when it is selected.
Other parts of your application typically examine the state of the check boxes to determine which options have been chosen by the user.
Check box clusters often have associated TLabel objects to give the user an overview of the clustered options.
Definition at line 1335 of file dialogs.h.
|
Constructor. `bounds' is the bounding rectangle of the view. `aStrings' points to a linked list of TSItem objects, one for each check box, and is assigned to strings data member. Every TSItem object stores the caption of the related check box. TCheckBoxes handles a maximum of 32 check boxes. The sel and value data members are set to zero; options is set to (ofSelectable | ofFirstClick | ofPreProcess | ofPostProcess). |
|
Constructor. Used to recover the view from a stream. 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. |
|
Creates a new TCheckBoxes view. Called to create an object in certain stream-reading situations. Reimplemented from TCluster. |
|
Draws the TCheckBoxes object by calling the inherited TCluster::drawBox() member function. The default check box is " [ ] " when unselected and " [X] " when selected. Note that if the boundaries of the view are sufficiently wide, check boxes can be displayed in multiple columns. Reimplemented from TView. |
|
Returns True if the item'th bit of the value data member is set; that is, if the item'th check box is marked. These bits have no instrinsic meaning. You are free to override mark(), press(), and other check box member functions to give the value data member your own interpretation. By default, the items are numbered 0 through 31 and each bit of value data member represents the state (on or off) of a check box. Reimplemented from TCluster. |
|
Called to toggle the state of a check box: toggles the item'th bit of value data member. These bits have no instrinsic meaning. You are free to override mark(), press(), and other check box member functions to give the value data member your own interpretation. Reimplemented from TCluster. |
|
Undocumented. Reimplemented from TCluster. |