Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
MCanvasGraphic
Inherited By:
TSRTBoxFeedbacker
TSRTHandleFeedbacker
Purpose:
A standard selection feedback graphic that supports direct manipulation, scaling, rotating, and translating of the graphic it represents. Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
To be used as a base class. Do not directly instantiate from this class. Derived classes determine the feedbacker visual appearance and determine which areas result in producing which interactors. |The class TSRTBoxFeedbacker provides an example of a useful derived class.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
- TSRTFeedbacker (const MCanvasGraphic & forThis)
- TSRTFeedbacker (const TSRTFeedbacker &)
- TSRTFeedbacker ()
Interface Category:
API.
Purpose:
- Constructs from a const reference to the canvas graphic that the SRT feedbacker will represent.
- Copy constructor.
- Default constructor.
Calling Context:
- Called to create a new SRT feedbacker.
- Called to copy an object.
- Called by the stream-in operators.
Parameters:
- const MCanvasGraphic & forThis -The canvas graphic that the SRT feedbacker represents.
- const TSRTFeedbacker & -Another SRT feedbacker to copy.
- Takes no parameters.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual ~ TSRTFeedbacker ()
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.
TSRTFeedbacker & operator =(const TSRTFeedbacker & source)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
Called when an object is assigned to another compatible object.
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: TSRTFeedbacker::operator>>=
virtual TStream & operator >>=(TStream & toWhere) const
Interface Category:
API.
Purpose:
Stream-out operator.
Calling Context:
Called to stream out data.
Parameters:
- TStream & toWhere -The stream the object is streamed out to.
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: TSRTFeedbacker::operator<<=
virtual TStream & operator <<= (TStream & fromWhere)
Interface Category:
API.
Purpose:
Stream-in operator.
Calling Context:
Called to stream in data.
Parameters:
- TStream & fromWhere -The stream the object is streamed in from.
Return Value:
Returns a reference to the stream the object streams itself in from.
Exceptions:
Throws TStandardException (kStreamBadVersion,0) if streaming in a version other than kOriginalVersion.
Passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSRTFeedbacker::HandleGetBounds
virtual TGRect HandleGetBounds () const
Interface Category:
API.
Purpose:
Returns the bounding rectangle of the untransformed geometry.
Calling Context:
Called by MCanvasGraphic::GetGeometricBounds and MCanvasGraphic::GetLooseFitBounds, which apply the graphic's transform to the returned bounds and expand it as required by the graphic's bundle.
Parameters:
Return Value:
TGRect -The graphic's untransformed geometric bounds.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSRTFeedbacker::HandleDraw
virtual void HandleDraw (TGrafPort & port) const
Interface Category:
API.
Purpose:
Draws the feedbacker's untransformed geometry.
Calling Context:
Called by MCanvasGraphic::Draw, which links the graphic's transform and bundle to the port before calling HandleDraw.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual bool HandleHit (const TGPoint &) const
Interface Category:
API.
Purpose:
Detects the intersection of the point with the graphic's untransformed geometry.
Calling Context:
Called by the MCanvasGraphic::Hit, which provides a point that has been untransformed by the graphic's transform.
Parameters:
- const TGPoint & -The point to detect a hit against.
Return Value:
Returns true if the point intersects ( hits ) the graphic's untransformed geometry.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSRTFeedbacker::CreateScalingInteractor
virtual TCanvasInteractor * CreateScalingInteractor (MCanvasSelection * adoptTarget, MToolHandler *, const TGPoint & center) const
Interface Category:
API.
Purpose:
Creates a new canvas interactor for the scaling of graphics in the target selection.
Calling Context:
Called by HandleCreateInteractor member functions of the derived classes.
Parameters:
- MCanvasSelection * adoptTarget -The target selection for the interactor.
- MToolHandler * -The application's tool handler for the interactor.
- const TGPoint & center -The untransformed center of scaling, relative to the SRT feedbacker.
Return Value:
TCanvasInteractor * -A new TCanvasGraphicScalingInteractor.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Override to create and return a different type of scaling interactor.
Member Function: TSRTFeedbacker::CreateRotatingInteractor
virtual TCanvasInteractor * CreateRotatingInteractor (MCanvasSelection * adoptTarget, MToolHandler *, const TGPoint & center) const
Interface Category:
API.
Purpose:
Creates a new canvas interactor for the rotation of graphics in the target selection.
Calling Context:
Called by the HandleCreateInteractor routines of the derived classes.
Parameters:
- MCanvasSelection * adoptTarget -The target selection for the interactor.
- MToolHandler * -The application's tool handler for the interactor.
- const TGPoint & center -The untransformed center of rotation relative to the SRT feedbacker.
Return Value:
TCanvasInteractor * -A new TCanvasGraphicRotatingInteractor.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Override to create and return a different type of rotating interactor.
Member Function: TSRTFeedbacker::CreateTranslatingInteractor
virtual TCanvasInteractor * CreateTranslatingInteractor (MCanvasSelection * adoptTarget, MToolHandler *) const
Interface Category:
API.
Purpose:
Creates a new canvas interactor for the translation of graphics in the target selection.
Calling Context:
Called by the HandleCreateInteractor member function of the derived classes.
Parameters:
Return Value:
TCanvasInteractor * -A new TCanvasGraphicTranslatingInteractor.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Override to create and return a different type of translating interactor.
Member Function: TSRTFeedbacker::HandleSetBounds
virtual void HandleSetBounds (const TGRect & size)
Interface Category:
API.
Purpose:
Sets the boundary for this feedbacker's handle.
Calling Context:
Call this function directly.
Parameters:
- const TGRect & size -The bounding rectangle for the handle.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSRTFeedbacker::SetGraphic
virtual void SetGraphic (const MCanvasGraphic * forThis)
Interface Category:
API.
Purpose:
Associates this feedbacker with a given graphic. This is necessary in order for a particular instance of a feedbacker to be reused with different graphics (of different sizes).
Calling Context:
Call this function directly. Typically called by a filter.
Parameters:
- const MCanvasGraphic * forThis -The graphic for the feedbacker to become associated with.
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.