Rogue Wave Views |
Rogue Wave Views Documentation Home |
Manager interactor class. More...
#include <ilviews/manager/dragrin.h>
Public Member Functions | |
IlvDragRectangleInteractor (IlvManager *manager, IlvView *view, IlUShort button=IlvLeftButton, IlBoolean snap=IlTrue) | |
Constructor. More... | |
virtual void | abort () |
Abort the interaction. More... | |
virtual void | doIt (IlvRect &rect) |
Finalizes the interaction. More... | |
virtual void | doPoint (const IlvPoint &p) |
Called when the selected rectangle is reduced to a point. More... | |
virtual void | drawGhost () |
Visual feedback during the interaction. More... | |
IlvRect & | getRectangle () |
Returns the selected rectangle. More... | |
virtual void | handleEvent (IlvEvent &event) |
Handles keyboard and mouse events. More... | |
virtual void | init () |
Initialization, when the interactor is attached to a 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 drag rectangles in a view connected to a manager. The IlvDragRectangleInteractor
class is never directly instantiated within a manager. Use it as a base class for the creation of derived interactors that drag rectangles in a view. To do this, redefine the member functions drawGhost
and doIt
.
IlvDragRectangleInteractor::IlvDragRectangleInteractor | ( | IlvManager * | manager, |
IlvView * | view, | ||
IlUShort | button = IlvLeftButton , |
||
IlBoolean | snap = IlTrue |
||
) |
Constructor.
Initializes a new instance of the IlvDragRectangleInteractor
class, which lets the user drag rectangles in a manager view.
manager | The manager. |
view | The view (it must be connected to the manager). |
button | Specifies the pointing device button used for dragging the rectangle. |
snap | If set to IlTrue , the rectangle snaps to the manager grid points. Otherwise it does not. |
|
virtual |
Abort the interaction.
This virtual member function implementation does nothing; it is meant to be redefined in a subclass.
Reimplemented from IlvManagerViewInteractor.
|
virtual |
Finalizes the interaction.
Performs the action. This virtual member function implementation does nothing; it is meant to be redefined in a subclasses. When implemented, the member function carries out the work of the interactor.
rect | Specifies the rectangle that the user has been dragging. |
Reimplemented in IlvMakeReliefDiamondInteractor, IlvMakeObjectInteractor, IlvMakeFilledRoundRectangleInteractor, IlvMakeUnZoomInteractor, IlvMakeFilledEllipseInteractor, IlvMakeFilledRectangleInteractor, IlvMakeReliefRectangleInteractor, IlvMakeRoundRectangleInteractor, IlvMakeEllipseInteractor, IlvMakeBitmapInteractor, IlvMakeZoomInteractor, and IlvMakeRectangleInteractor.
|
virtual |
Called when the selected rectangle is reduced to a point.
Called when the user releases the pointing device button when no rectangle has been created. This can occur when the pointing device is not moved between the button down and button up events. This virtual member function implementation does nothing; it is meant to be redefined in a subclasses.
p | Indicates the coordinates of the pointing device when the button is released. |
|
virtual |
Visual feedback during the interaction.
Draws a rectangle using a special palette of the IlvManager
object that draws in XOR
mode.
Reimplemented from IlvManagerViewInteractor.
Reimplemented in IlvMakeFilledRoundRectangleInteractor, IlvMakeFilledEllipseInteractor, IlvMakeFilledRectangleInteractor, IlvMakeReliefRectangleInteractor, IlvMakeRoundRectangleInteractor, and IlvMakeEllipseInteractor.
IlvRect& IlvDragRectangleInteractor::getRectangle | ( | ) |
Returns the selected rectangle.
|
virtual |
Handles keyboard and mouse events.
Handles keyboard and mouse events. It examines the state of the mouse button (the default is the left button; see constructor parameters) to see if a rectangle is to be dragged. It also checks the Shift key state: if pressed, the dragged shape is constrained to be a square.
event | The event. |
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.
© 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.