Class: TZoomBox

Declaration: WindowControls.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TBooleanControl

Inherited By:

None.

Purpose:

TZoomBox derives from TBooleanControl and implements a control commonly used to zoom windows in and out. This class implements the CommonPoint standard appearance and behavior of a zoom box and is used by TStandardWindow.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

Derive from this class to change the appearance of the zoom box. Override DrawContents.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TZoomBox::~TZoomBox

virtual ~ TZoomBox ()

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: TZoomBox::DrawContents

virtual void DrawContents (TGrafPort & port) const

Interface Category:

API.

Purpose:

Draws the zoom box. Classes deriving from TZoomBox should override this function to implement a zoom box with a different appearance.

Calling Context:

Friend classes or classes deriving from TZoomBox can call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

This protected function overrides the inherited TView function.

Member Function: TZoomBox::operator<<=

virtual TStream & operator <<= (TStream & fromwhere)

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Called to stream in data.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself in from.

Exceptions:

Throws a TInvalidVersionError if the version of the object on the stream is unknown to the version of the shared library installed.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TZoomBox::operator>>=

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

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Called to stream out data.

Parameters:

Return Value:

Returns a reference to 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: TZoomBox::operator=

TZoomBox & operator =(const TZoomBox &)

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: TZoomBox::GetDefaultGraphicSize

virtual void GetDefaultGraphicSize (TGPoint & size) const

Interface Category:

API.

Purpose:

Overridden function to report the default size of the control's display. This function returns a TGPoint of (0,0) since the zoom box control doesn't use a graphic label.

Calling Context:

The framework calls this function.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

This protected function overrides the inherited TBooleanControl pure virtual function.

Member Function: TZoomBox::CreateGraphicLabel

virtual TGraphicLabel * CreateGraphicLabel () const

Interface Category:

API.

Purpose:

Overridden function to create and return the graphic label that is used as part of the control's presentation. This function returns NIL, since the zoom box control doesn't use a graphic label.

Calling Context:

The framework calls this function once when the graphic is first needed.

Parameters:

Return Value:

Returns NIL, since the zoom box control doesn't use a graphic label.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

This protected function overrides the inherited TBooleanControl pure virtual function.

Member Function: TZoomBox::NeedsClipping

virtual bool NeedsClipping ()

Interface Category:

API.

Purpose:

Tells whether or not the to clip when drawing this view.

Calling Context:

Called by the View system to determine whether or not to clip when drawing this view.

Parameters:

Return Value:

Returns false; the View system should not clip.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

Overrides inherited TView function.

Member Function: TZoomBox::TZoomBox

  1. TZoomBox ()
  2. TZoomBox (MBooleanControlState * delegate)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Creates a new zoom box whose control state is the MBooleanControlState object provided.

Calling Context:

  1. Called by the stream-in operators.
  2. 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.