Class: TCheckBox

Declaration: BooleanControls.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TBooleanControl

Inherited By:

None.

Purpose:

TCheckBox presents a check box representation of Boolean state to the user.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

You do not normally derive from TCheckBox. You typically derive directly from TBooleanControl.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TCheckBox::TCheckBox

  1. TCheckBox ()
  2. TCheckBox (TLabel * label)
  3. TCheckBox (MBooleanControlState * state, TLabel * label =NIL)
  4. TCheckBox (const TCheckBox & copy)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Creates a new TCheckBox and adopts the specified label.
  3. Creates a new TCheckBox and adopts the specified state and the specified label.
  4. Copy constructor. This function copies the state and the label from the specified object.

Calling Context:

  1. Called by the stream-in operators or by client or by a derived class.
  2. Called to adopt a label at construction time.
  3. Called to adopt a state and a label at construction time.
  4. Called to copy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TCheckBox::~TCheckBox

~ TCheckBox ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Called to destroy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TCheckBox::operator=

TCheckBox & operator =(const TCheckBox &)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Call this function by using the operator in an assignment statement.

Parameters:

Return Value:

Returns a const reference to the left-hand side object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TCheckBox::operator>>=

virtual TStream & operator >>=(TStream &) const

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Called to stream out data.

Parameters:

Return Value:

TStream & -The stream the object streams itself out to.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TCheckBox::operator<<=

virtual TStream & operator <<= (TStream &)

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Called to stream in data.

Parameters:

Return Value:

TStream & -The stream the object streams itself in from.

Exceptions:

Throws TInvalidVersionError if it encounters an object whose version number indicates it cannot be streamed in. Passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TCheckBox::DrawContents

virtual void DrawContents (TGrafPort &) const

Interface Category:

API.

Purpose:

Draws this check box.

Calling Context:

Called by the view system when this check box needs to redraw.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TCheckBox::CreateGraphicLabel

virtual TGraphicLabel * CreateGraphicLabel () const

Interface Category:

API.

Purpose:

Returns NIL because the check box graphic cannot be represented by a single label.

Calling Context:

Called by TBooleanControl when a graphic label is first needed for layout.

Parameters:

Return Value:

NIL.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TCheckBox::GetDefaultGraphicSize

virtual void GetDefaultGraphicSize (TGPoint & size) const

Interface Category:

API.

Purpose:

Reports the size that a check box typically requires for the check box graphic. Even though check boxes have a NIL graphic label, this function ensures that space will be accounted for in the layout performed by TBooleanControl.

Calling Context:

The framework calls this function when it needs the size of graphics for TCheckBoxes.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

This function is protected and overrides TBooleanControl's pure virtual function, GetDefaultGraphicSize.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.