Class: TRadioButton

Declaration: BooleanControls.h

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.

Member Function: TRadioButton::TRadioButton

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

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Creates and new radio button and adopts the specified label.
  3. Creates and new radio button and adopts the specified state and the specified label.
  4. Copy constructor.

Calling Context:

  1. Called by the stream-in operators and by clients or derived classes.
  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: 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:

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:

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:

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:

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.

Member Function: TRadioButton::~TRadioButton

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:

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.