Class: TFrameInteractor

Declaration: FrameInteractors.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TInteractor, MMouseEventHandler

Inherited By:

TMoveFrameInteractor TResizeFrameInteractor

Purpose:

TFrameInteractor is a base class used to derive window and frame interactors. TFrameInteractor keeps track of initial and final locations for the interaction. It also keeps a pointer to an MFrameInteractionPolicy, which is available to derived classes.

Instantiation:

Do not instantiate TFrameInteractor.

Deriving Classes:

TMoveFrameInteractor and TResizeFrameInteractor are the provided derived classes. You can derive from those classes or from TFrameInteractor. You should provide an override for the member function MouseUp.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

This class may not be copied or streamed.

Member Function: TFrameInteractor::TFrameInteractor

  1. TFrameInteractor (MFrameInteractionPolicy * policyReference, const TGRect & initialBounds, TPrimitiveFrameView :: ERegion, TView * theView)
  2. TFrameInteractor ()

Interface Category:

API.

Purpose:

  1. Creates an interactor for the specified interactor policy and view. The initial bounds of the frame are supplied along with the region in which the interaction began
  2. Default constructor.

Calling Context:

  1. Called to create an interactor for the specified interactor policy and view. Normally called as a result of MouseDown on a frame.
  2. Not used.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TFrameInteractor::~TFrameInteractor

virtual ~ TFrameInteractor ()

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: TFrameInteractor::GetInteractionPolicy

virtual MFrameInteractionPolicy * GetInteractionPolicy () const

Interface Category:

API.

Purpose:

Returns a pointer to the frame interaction policy for this interactor.

Calling Context:

Called to obtain the frame interaction policy for this interactor. Call this function directly.

Parameters:

Return Value:

Returns a pointer to the frame interaction policy for this interactor.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TFrameInteractor::SetFirstLocation

virtual void SetFirstLocation (const TGPoint &)

Interface Category:

API.

Purpose:

Sets the first mouse location associated with the interaction.

Calling Context:

Called by MouseDown to set the first mouse location. This function may also be called by a parent interactor.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TFrameInteractor::SetIntermediateLocation

virtual void SetIntermediateLocation (const TGPoint &)

Interface Category:

API.

Purpose:

Sets the intermediate mouse location associated with the interaction.

Calling Context:

Called to set the intermediate mouse location when live moving or resizing is enabled. Not currently used.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TFrameInteractor::SetLastLocation

virtual void SetLastLocation (const TGPoint &)

Interface Category:

API.

Purpose:

Sets the last mouse location associated with the interaction.

Calling Context:

Called by MouseUp to set the last mouse location. This function could also be called by a parent interactor.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TFrameInteractor::GetFirstLocation

virtual TGPoint GetFirstLocation () const

Interface Category:

API.

Purpose:

Returns the first mouse location associated with the interaction.

Calling Context:

Called to obtain the first mouse location. Call this function directly.

Parameters:

Return Value:

Returns the first frame location associated with the interaction, in global coordinates.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TFrameInteractor::GetLastLocation

virtual TGPoint GetLastLocation () const

Interface Category:

API.

Purpose:

Returns the last mouse location associated with the interaction.

Calling Context:

Called to obtain the last mouse location. Call this function directly.

Parameters:

Return Value:

Returns the last mouse location associated with the interaction, in global coordinates.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TFrameInteractor::MouseDown

virtual bool MouseDown (TMouseDownEvent &)

Interface Category:

API.

Purpose:

Responds to a mouse-down event to start a frame interaction. Stores the first mouse location and starts frame interaction visual feedback. This is an overridden member function.

Calling Context:

Called by the frame's interaction policy when starting the interactor. This function is not normally called directly.

Parameters:

Return Value:

Returns true to indicate the event was handled.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

Deriving classes may choose to override this member function.

Member Function: TFrameInteractor::MouseMoved

virtual bool MouseMoved (TMouseMovedEvent & theEvent)

Interface Category:

API.

Purpose:

Responds to a mouse-moved event during a frame interaction and determines when to provide interaction feedback. This is an overridden member function.

Calling Context:

Called when the mouse is moved after a mouseDown event. This function is not normally called directly.

Parameters:

Return Value:

Returns true to indicate the event was handled.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

Deriving classes may choose to override this member function.

Member Function: TFrameInteractor::MouseUp

virtual bool MouseUp (TMouseUpEvent &)

Interface Category:

API.

Purpose:

Responds to a mouse-up event during a frame interaction. Stores the last mouse location and finishes frame interaction visual feedback. This is an overridden member function.

Calling Context:

Called when the mouse button is released. This function is not normally called directly.

Parameters:

Return Value:

Returns true to indicate the action was handled.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

Deriving classes may choose to override this member function.

Member Function: TFrameInteractor::GetMinFrameSize

virtual TGPoint GetMinFrameSize () const

Interface Category:

API.

Purpose:

Returns the minimum frame size, below which the frame may not be interactively resized.

Calling Context:

Called to obtain the minimum frame size when providing resize feedback. This function may also be called directly.

Parameters:

Return Value:

Returns the minimum frame size.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TFrameInteractor::SetMinFrameSize

virtual void SetMinFrameSize (const TGPoint & size)

Interface Category:

API.

Purpose:

Stores a minimum frame size, below which the frame may not be interactively resized.

Calling Context:

Called by the interaction policy to set the minimum frame size.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TFrameInteractor::GetRegion

virtual TPrimitiveFrameView :: ERegion GetRegion () const

Interface Category:

API.

Purpose:

Returns the region set for the interaction.

Calling Context:

Called to determine the type of move or resize that will occur. Call this function directly.

Parameters:

Return Value:

Returns the region set for the interaction.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TFrameInteractor::GetLastBounds

virtual TGRect GetLastBounds () const

Interface Category:

API.

Purpose:

Returns the final bounds to be used for resizing or moving a frame.

Calling Context:

Called to obtain the final bounds of the frame. Called at completion of a resize interaction. Call this function directly.

Parameters:

Return Value:

Returns the final bounds to be used for resizing or moving a frame, in global coordinates.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TFrameInteractor::GetFirstBounds

virtual TGRect GetFirstBounds () const

Interface Category:

API.

Purpose:

Returns the initial bounds to be used for resizing or moving a frame.

Calling Context:

Called to obtain the initial bounds of the frame. Called to establish initial interactor feedback, and at completion of a move interaction to determine the extent of a move. Call this function directly.

Parameters:

Return Value:

Returns the initial bounds to be used for resizing or moving a frame, in global coordinates.

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.