Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TBooleanControl
Inherited By:
None.
Purpose:
TRadioButton provides the concrete implementation of a radio button. Use this class with TBooleanControlGroup.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
You do not normally derive from TRadioButton. You would typically derive directly from TBooleanControl.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
- TRadioButton ()
- TRadioButton (TLabel * label)
- TRadioButton (MBooleanControlState * state, TLabel * label =NIL)
- TRadioButton (const TRadioButton & copy)
Interface Category:
API.
Purpose:
- Default constructor.
- Creates and new radio button and adopts the specified label.
- Creates and new radio button and adopts the specified state and the specified label.
- Copy constructor.
Calling Context:
- Called by the stream-in operators and by clients or derived classes.
- 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 label to present as part of the radio button.
- MBooleanControlState * state -The state to manipulate.
- const TRadioButton & copy -The object to be copied.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TRadioButton::operator=
TRadioButton & operator =(const TRadioButton &)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
Call this function by using the operator in an assignment statement.
Parameters:
Return Value:
A non-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: TRadioButton::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: TRadioButton::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: TRadioButton::CreateInteractor
virtual TInteractor * CreateInteractor (const TGPoint & pt)
Interface Category:
API.
Purpose:
Creates and returns the interactor to be used to interact on the control. The interactor returned from this function will not allow the user to set the control state to false, since this is not a valid operation on a radio button.
Calling Context:
Called when TBooleanControl receives a mouse-down event.
Parameters:
- const TGPoint & pt -The location at which the mouse was pressed.
Return Value:
Returns a TInteractor.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TRadioButton::DrawContents
virtual void DrawContents (TGrafPort &) const
Interface Category:
API.
Purpose:
Draws this radio button.
Calling Context:
Called by the view system when this radio button needs redrawing.
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: TRadioButton::CreateGraphicLabel
virtual TGraphicLabel * CreateGraphicLabel () const
Interface Category:
API.
Purpose:
Creates and returns the graphic label to be used in the radio button if a standard presentation is defined for the class.
Calling Context:
Called by TBooleanControl when a graphic label is first needed for layout.
Parameters:
Return Value:
Returns NIL or a TGraphicLabel.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual ~ TRadioButton ()
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: TRadioButton::GetDefaultGraphicSize
virtual void GetDefaultGraphicSize (TGPoint & size) const
Interface Category:
API.
Purpose:
Reports the size that radio buttons desire for their graphic labels. This function ensures that space will be accounted for in the layout performed by TBooleanControl.
Calling Context:
Called by TBooleanControl during layout. You can also call this function directly.
Parameters:
- TGPoint & size -This function fills in this value with the default size. 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:
None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.