Manager interactor class. More...
#include <ilviews/manager/mgrview.h>
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... | |
IlvDisplay * | getDisplay () const |
Returns the display of the manager view. More... | |
IlvManager * | getManager () const |
Returns the manager. More... | |
IlvTransformer * | getTransformer () const |
Returns the transformer used with the manager view. More... | |
IlvView * | getView () 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... | |
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.
IlvManager::getInteractor()
, IlvManager::setInteractor()
, IlvManager::removeInteractor()
, IlvManagerObjectInteractor
, IlvViewObjectInteractor
. IlvManagerViewInteractor::IlvManagerViewInteractor | ( | IlvManager * | manager, |
IlvView * | view | ||
) |
Initializes a new IlvManagerViewInteractor
.
Every constructor of the derived classes of IlvManagerViewInteractor
should call this constructor.
manager | The manager. |
view | The view connected to the manager. |
|
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.
|
virtual |
Visual feedback during the interaction.
Called to draw a preview image of the resulting user action (the ghost image of the interactor). This function is generally invoked by IlvManagerViewInteractor::handleEvent()
as a response to user events.
Reimplemented in IlvMakePolyPointsInteractor, IlvZoomInteractor, IlvSelectInteractor, IlvRotateInteractor, IlvEditPointsInteractor, IlvPolySelectInteractor, IlvPanZoomInteractor, IlvMakeFilledRoundRectangleInteractor, IlvMakeRoundRectangleInteractor, IlvMakeReliefRectangleInteractor, IlvMakeFilledRectangleInteractor, IlvMakeClosedSplineInteractor, IlvMakeFilledSplineInteractor, IlvMakeSplineInteractor, IlvMakePolygonInteractor, IlvMakeArrowPolylineInteractor, IlvMakePolylineInteractor, IlvMakeArrowLineInteractor, IlvMakeLineInteractor, IlvMakeArcInteractor, IlvMakeFilledEllipseInteractor, IlvMakeEllipseInteractor, IlvMakeMoveInteractor, IlvDragRectangleInteractor, and IlvManagerViewDragDropInteractor.
|
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.
point | Specifies the location. |
IlvDisplay* IlvManagerViewInteractor::getDisplay | ( | ) | const |
Returns the display of the manager view.
IlvManager* IlvManagerViewInteractor::getManager | ( | ) | const |
Returns the manager.
IlvTransformer* IlvManagerViewInteractor::getTransformer | ( | ) | const |
Returns the transformer used with the manager view.
IlvView* IlvManagerViewInteractor::getView | ( | ) | const |
Returns the manager view.
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.
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.
|
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.
clip | Specifies the exposed area. |
Reimplemented in IlvSelectInteractor, IlvEditPointsInteractor, IlvPolySelectInteractor, IlvManagerMakeTextInteractor, and IlvManagerMakeStringInteractor.
|
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.