Views
Manager Package API Reference Guide
Product Documentation:
Views Documentation Home
List of all members | Public Member Functions
IlvManagerViewInteractor Class Referenceabstract

Manager interactor class. More...

#include <ilviews/manager/mgrview.h>

Inheritance diagram for IlvManagerViewInteractor:
IlvValueInterface IlvDragRectangleInteractor IlvEditPointsInteractor IlvMakeArcInteractor IlvMakeLineInteractor IlvMakeMoveInteractor IlvMakePolyPointsInteractor IlvManagerMagViewInteractor IlvManagerMakeStringInteractor IlvManagerMakeTextInteractor IlvManagerViewDragDropInteractor IlvPanZoomInteractor IlvPolySelectInteractor IlvRotateInteractor IlvSelectInteractor IlvZoomInteractor

Public Member Functions

 IlvManagerViewInteractor (IlvManager *manager, IlvView *view)
 Initializes a new IlvManagerViewInteractor. More...
 
virtual void abort ()
 Aborts the interaction. More...
 
virtual void drawGhost ()
 Visual feedback during the interaction. More...
 
virtual void ensureVisible (const IlvPoint &point)
 Ensures the visibility of a given location. More...
 
IlvDisplaygetDisplay () const
 Returns the display of the manager view. More...
 
IlvManagergetManager () const
 Returns the manager. More...
 
IlvTransformergetTransformer () const
 Returns the transformer used with the manager view. More...
 
IlvViewgetView () const
 Returns the manager view. More...
 
virtual IlBoolean handleEvent (IlvEvent &event)=0
 Handles events for the manager view. More...
 
virtual void handleExpose (IlvRegion *clip=0)
 Called when the manager view receives an expose event. More...
 
virtual void init ()
 Initialization, when the interactor is attached to a view. More...
 

Detailed Description

Manager interactor class.

Library: ilvmgr

This class handles complex sequences of user events treated by a particular view object. It is the parent class of all view interactors. Typical interactors derived from this class implement constructors of graphic objects.

See also
IlvManager::getInteractor(), IlvManager::setInteractor(), IlvManager::removeInteractor(), IlvManagerObjectInteractor, IlvViewObjectInteractor.

Constructor & Destructor Documentation

◆ IlvManagerViewInteractor()

IlvManagerViewInteractor::IlvManagerViewInteractor ( IlvManager manager,
IlvView view 
)

Initializes a new IlvManagerViewInteractor.

Every constructor of the derived classes of IlvManagerViewInteractor should call this constructor.

Parameters
managerThe manager.
viewThe view connected to the manager.

Member Function Documentation

◆ abort()

virtual void IlvManagerViewInteractor::abort ( )
virtual

Aborts the interaction.

Called by the manager when the user changes the current interactor. It resets the interactor to a state in which it appears to have never been launched. A common implementation is to erase the ghost image. Call this member function to inhibit the interactor action in particular circumstances.

Reimplemented in IlvZoomInteractor, IlvSelectInteractor, IlvRotateInteractor, IlvEditPointsInteractor, IlvPolySelectInteractor, IlvPanZoomInteractor, IlvMakePolyPointsInteractor, IlvMakeLineInteractor, IlvMakeArcInteractor, IlvManagerMagViewInteractor, IlvDragRectangleInteractor, IlvManagerViewDragDropInteractor, IlvManagerMakeTextInteractor, and IlvManagerMakeStringInteractor.

◆ drawGhost()

virtual void IlvManagerViewInteractor::drawGhost ( )
virtual

◆ ensureVisible()

virtual void IlvManagerViewInteractor::ensureVisible ( const IlvPoint point)
virtual

Ensures the visibility of a given location.

Ensures that a given location is visible on the screen. This is done by means of scrolling the view if the view is contained in a scrolling view, or by translating the objects (that is, changing the view transformer) if the view is not scrollable.

Parameters
pointSpecifies the location.

◆ getDisplay()

IlvDisplay* IlvManagerViewInteractor::getDisplay ( ) const

Returns the display of the manager view.

Returns
A pointer to the display for which the view interactor was created.

◆ getManager()

IlvManager* IlvManagerViewInteractor::getManager ( ) const

Returns the manager.

Returns
A pointer to the manager for which the view interactor was created.

◆ getTransformer()

IlvTransformer* IlvManagerViewInteractor::getTransformer ( ) const

Returns the transformer used with the manager view.

Returns
A pointer to the transformer used in the view for which the view interactor was created.

◆ getView()

IlvView* IlvManagerViewInteractor::getView ( ) const

Returns the manager view.

Returns
A pointer to the view for which the view interactor was created.

◆ handleEvent()

virtual IlBoolean IlvManagerViewInteractor::handleEvent ( IlvEvent event)
pure virtual

Handles events for the manager view.

Called by the manager for which the interactor was created with every event it receives in the interactor view.

Returns
IlTrue if the event is consumed, IlFalse otherwise.

Implemented in IlvZoomInteractor, IlvSelectInteractor, IlvRotateInteractor, IlvEditPointsInteractor, IlvPolySelectInteractor, IlvPanZoomInteractor, IlvMakePolyPointsInteractor, IlvMakeLineInteractor, IlvMakeArcInteractor, IlvManagerMagViewInteractor, IlvMakeMoveInteractor, IlvDragRectangleInteractor, IlvManagerViewDragDropInteractor, IlvManagerMakeTextInteractor, and IlvManagerMakeStringInteractor.

◆ handleExpose()

virtual void IlvManagerViewInteractor::handleExpose ( IlvRegion clip = 0)
virtual

Called when the manager view receives an expose event.

Called by the manager when an exposure request occurs in the interactor view to redraw shapes handled by the interactor, such as a ghost image. The basic implementation calls the member function IlvManagerViewInteractor::drawGhost() after the clipping region has been set to the exposed area.

Parameters
clipSpecifies the exposed area.

Reimplemented in IlvSelectInteractor, IlvEditPointsInteractor, IlvPolySelectInteractor, IlvManagerMakeTextInteractor, and IlvManagerMakeStringInteractor.

◆ init()

virtual void IlvManagerViewInteractor::init ( )
virtual

Initialization, when the interactor is attached to a view.

Resets the interactor to its initial state.

Called by the manager whenever the interactor is associated with a view. An association of this kind is established by the member function IlvManager::setInteractor().

Reimplemented in IlvSelectInteractor, IlvRotateInteractor, IlvEditPointsInteractor, IlvPolySelectInteractor, IlvPanZoomInteractor, IlvMakePolyPointsInteractor, IlvManagerMagViewInteractor, IlvDragRectangleInteractor, and IlvManagerViewDragDropInteractor.