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.
- TCheckBox ()
- TCheckBox (TLabel * label)
- TCheckBox (MBooleanControlState * state, TLabel * label =NIL)
- TCheckBox (const TCheckBox & copy)
Interface Category:
API.
Purpose:
- Default constructor.
- Creates a new TCheckBox and adopts the specified label.
- Creates a new TCheckBox and adopts the specified state and the specified label.
- Copy constructor. This function copies the state and the label from the specified object.
Calling Context:
- Called by the stream-in operators or by client or by a derived class.
- Called to adopt a label at construction time.
- Called to adopt a state and a label at construction time.
- Called to copy an object.
Parameters:
- Takes no parameters.
- TLabel * label -The main label used in the check box.
- MBooleanControlState * state -The state the control manipulates.
- const TCheckBox & copy -The object to be copied.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
~ 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:
- TStream & -The stream to which the object streams itself out.
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:
- TStream & -The stream from which the object streams itself in.
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:
- TGrafPort & -The graf port into which to draw.
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:
- TGPoint & size -The function fills in the default size for a TCheckBox graphic label. The x-component of the point is the width, and the y-component of the point is the height.
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.