Rogue Wave Views
Foundation Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Member Functions
IlvMoveInteractor Class Reference

Manager interactor class. More...

#include <ilviews/graphics/inter.h>

Inheritance diagram for IlvMoveInteractor:
IlvInteractor

Public Member Functions

virtual void doIt (IlvGraphic *object, const IlvPoint &deltaMove, const IlvTransformer *t=0)
 Finalizes the interaction by moving the object. More...
 
virtual void drawGhost (IlvView *view, IlvGraphic *ghost, const IlvPoint &deltaMove, const IlvTransformer *t)
 Visual feedback during the interaction. More...
 
virtual void endOperation ()
 Performs the actions needed when the interaction ends. More...
 
virtual IlBoolean handleEvent (IlvGraphic *obj, IlvEvent &event, const IlvTransformer *t)
 Handles events received by the interactor. More...
 
virtual void validate (IlvGraphic *object, IlvPoint &p, const IlvTransformer *t=0)
 Lets you modify intermediate positions during the interaction. More...
 
- Public Member Functions inherited from IlvInteractor
virtual void abort (IlvGraphic *obj)
 Aborts the interactor. More...
 
virtual IlBoolean accept (const IlvGraphic *obj) const
 Indicates whether the current interactor can be associated with a given object. More...
 
virtual void getCallbackTypes (IlUInt &count, const char *const **names, const IlSymbol *const **types) const
 Gets the number of register callback types for the interactor. More...
 
const char * getRegisteredName () const
 Returns the name of the predefined shared instance. More...
 
IlBoolean isAborted () const
 Indicates whether the current interactor is in an aborted state. More...
 
IlBoolean isInOperation () const
 Indicates whether the current interactor is in an interaction state. More...
 
void lock ()
 Locks the current instance. Increments the counter that is used to know how many objects reference the current instance. More...
 
virtual void startOperation ()
 Performs the actions needed when the interaction starts. More...
 
void unLock ()
 Unlocks the current instance. Decrements the reference counter. When the counter drops down to zero, the current instance is deleted. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from IlvInteractor
static IlvInteractorGet (const char *name, IlBoolean=IlTrue)
 Returns a predefined shared interactor instance. More...
 

Detailed Description

Manager interactor class.

Library: views

The IlvMoveInteractor class lets the user move an object by dragging it.

The registered name of this interactor is "Move".

See also
IlvReshapeInteractor, IlvMoveReshapeInteractor.

Member Function Documentation

virtual void IlvMoveInteractor::doIt ( IlvGraphic object,
const IlvPoint deltaMove,
const IlvTransformer t = 0 
)
virtual

Finalizes the interaction by moving the object.

Called to move the object to a new position. After moving the object, this method calls the object's callback corresponding to the Move symbol.

Parameters
objectThe graphic object.
deltaMoveThe difference between the new and the initial location of the object in the object coordinate system.
tThe transformer applied to the view.
See also
IlvGraphic::setCallback()
virtual void IlvMoveInteractor::drawGhost ( IlvView view,
IlvGraphic ghost,
const IlvPoint deltaMove,
const IlvTransformer t 
)
virtual

Visual feedback during the interaction.

Called to draw a preview image of the resulting user action. It is generally invoked by handleEvent() as a response to user events.

Parameters
viewThe view where the object is displayed.
ghostThe graphic object used as ghost image.
deltaMoveThe difference between the current and the initial location of the object in view coordinates.
tThe transformer applied to the view.
virtual void IlvMoveInteractor::endOperation ( )
virtual

Performs the actions needed when the interaction ends.

The default implementation resets the interactor flags and remove it from its parent, if it exists.

See also
IlvStackInteractorInterface::removeFromParent().

Reimplemented from IlvInteractor.

virtual IlBoolean IlvMoveInteractor::handleEvent ( IlvGraphic g,
IlvEvent event,
const IlvTransformer t 
)
virtual

Handles events received by the interactor.

This method is the entry point of all events dispatched to this interactor.

Parameters
gThe graphic object that receives the event.
eventThe received event.
tThe transformer applied to the view in which the event occurred.
Returns
IlTrue if the event was successfully handled and IlFalse otherwise.

Implements IlvInteractor.

virtual void IlvMoveInteractor::validate ( IlvGraphic object,
IlvPoint p,
const IlvTransformer t = 0 
)
virtual

Lets you modify intermediate positions during the interaction.

Called for each mouse movement so that the user can modify the object position. When the mouse button is released, doIt() is called.

Parameters
objectThe considered graphic object.
pThe current position, in the object coordinate system.
tThe transformer applied to the view.

© Copyright 2016, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.