Rogue Wave Views |
Rogue Wave Views Documentation Home |
Manager interactor class. More...
#include <ilviews/manager/ddinter.h>
Public Member Functions | |
IlvManagerViewDragDropInteractor (IlvManager *manager, IlvView *view, IlvView *target=0, IlvGraphic *ghost=0, IlUShort button=IlvLeftButton) | |
Constructor. More... | |
virtual void | abort () |
Aborts the interaction. More... | |
virtual void | checkLocation (IlvPoint &position) |
Allows you to modify the position when dragging the mouse. More... | |
virtual void | doIt (IlvView *target, IlvGraphic *ghost, const IlvPoint &position) const =0 |
Finalizes the interaction. More... | |
virtual IlBoolean | dragStarted (IlUInt count, IlvGraphic **objects) const |
Called when the drag operation starts. More... | |
virtual void | drawGhost () |
Visual feedback during the interaction. More... | |
IlUShort | getButton () const |
Returns the mouse button used by the interactor. More... | |
IlvGraphic * | getGhost () const |
Returns the ghost image. More... | |
IlUInt | getMaxSelections () const |
Returns the maximum number of objects the interactor can drag. More... | |
IlvView * | getTarget () const |
Returns the target view. More... | |
virtual void | handleEvent (IlvEvent &event) |
Handles events for the manager view. More... | |
virtual void | init () |
Initialization, when the interactor is attached to a view. More... | |
virtual IlBoolean | inTarget (const IlvPoint &position) |
Indicates whether a position is a valid drop site. More... | |
void | setButton (IlUShort button) |
Sets the mouse button involved in the drag-and-drop interaction. More... | |
void | setGhost (IlvGraphic *ghost) |
Sets the ghost image. More... | |
void | setMaxSelections (IlUInt m) |
Sets the maximum number of objects the interactor can drag. More... | |
void | setTarget (IlvView *target) |
Sets the target view. More... | |
Public Member Functions inherited from IlvManagerViewInteractor | |
IlvManagerViewInteractor (IlvManager *manager, IlvView *view) | |
Constructor. 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 void | handleExpose (IlvRegion *clip=0) |
Called when the manager view receives an expose event. More... | |
Manager interactor class.
Library: ilvmgr
Use this class to move objects to another view using a drag-and-drop operation to perform a particular action. dropped to perform a particular action. This class is abstract and designed to be subtyped so you can implement your own drop mechanism.
IlvViewDragDropInteractor
, IlvManagerDragDropInteractor
. IlvManagerViewDragDropInteractor::IlvManagerViewDragDropInteractor | ( | IlvManager * | manager, |
IlvView * | view, | ||
IlvView * | target = 0 , |
||
IlvGraphic * | ghost = 0 , |
||
IlUShort | button = IlvLeftButton |
||
) |
Constructor.
The constructor specifies the manager and the view to which you attach the interactor. You can also specify the target view where the object can be released and the ghost graphic object moved by the interactor. If the ghost graphic object is not specified, the interactor uses the object which is being clicked.
manager | The manager. |
view | The view to which the interactor is attached. |
target | The target view. |
ghost | The graphic object moved during a drag operation. |
button | Specifies the mouse button used for drag-and-drop. |
|
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 from IlvManagerViewInteractor.
|
virtual |
Allows you to modify the position when dragging the mouse.
Called when you move the pointing device by providing a new pair of coordinates in position
. You can overload this method to modify these coordinates.
position | The event coordinates. |
|
pure virtual |
Finalizes the interaction.
Called when you release the object over the target view. You need to define this function in your subtyped class.
target | The target view. |
ghost | The graphic object used as ghost. |
position | The ButtonDown event coordinates. |
|
virtual |
Called when the drag operation starts.
Called by handleEvent
in the treatment of the IlvButtonDown
event.
count | The number of graphic objects in the array. |
objects | The array of graphic objects being dragged. |
IlTrue
if the objects can be dragged, or IlFalse
otherwise.
|
virtual |
Visual feedback during the interaction.
Draws the ghost image.
Reimplemented from IlvManagerViewInteractor.
IlUShort IlvManagerViewDragDropInteractor::getButton | ( | ) | const |
Returns the mouse button used by the interactor.
IlvGraphic* IlvManagerViewDragDropInteractor::getGhost | ( | ) | const |
Returns the ghost image.
IlUInt IlvManagerViewDragDropInteractor::getMaxSelections | ( | ) | const |
Returns the maximum number of objects the interactor can drag.
IlvView* IlvManagerViewDragDropInteractor::getTarget | ( | ) | const |
Returns the target view.
|
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.
Implements IlvManagerViewInteractor.
|
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 from IlvManagerViewInteractor.
Indicates whether a position is a valid drop site.
Called by handleEvent
in the treatment of the IlvButtonDown
event.
position | The ButtonDown event coordinates. |
IlTrue
if the point is at a valid location to drop the objects, or IlFalse
otherwise. void IlvManagerViewDragDropInteractor::setButton | ( | IlUShort | button | ) |
Sets the mouse button involved in the drag-and-drop interaction.
button | Specifies the mouse button. It can have the following values: IlvLeftButton , IlvMiddleButton , or IlvRightButton (see IlvEvent ). |
void IlvManagerViewDragDropInteractor::setGhost | ( | IlvGraphic * | ghost | ) |
Sets the ghost image.
Sets the graphic object used as ghost image by the interactor.
ghost | Specifies the graphic object. |
void IlvManagerViewDragDropInteractor::setMaxSelections | ( | IlUInt | m | ) |
Sets the maximum number of objects the interactor can drag.
m | The maximum number of objects. |
void IlvManagerViewDragDropInteractor::setTarget | ( | IlvView * | target | ) |
Sets the target view.
target | The target view. |
© Copyright 2015, 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.