Rogue Wave Views 5.6 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
A zoom interactor. More...
#include <ilviews/manager/zoomint.h>
Public Member Functions | |
IlvZoomInteractor (IlvManager *manager, IlvView *view, IlUShort button=IlvLeftButton, IlUShort mbutton=IlvMiddleButton|IlvRightButton, IlvCursor *defaultCursor=0) | |
Constructor. | |
virtual void | abort () |
Called when the interactor is removed. | |
virtual void | abortOperation () |
Aborts the operation. | |
virtual void | decorate () |
Adds additional decorations around the ghost rectangle. | |
virtual void | doZoom () |
Performs the zoom operation. | |
virtual void | drawGhost () |
Draws the ghost rectangle. | |
IlBoolean | getImmediateMode () |
Verifies whether the interactor is in immediate mode. | |
void | getParams (IlvTransfoParam &cx, IlvTransfoParam &cy, IlvTransfoParam &sx, IlvTransfoParam &sy, IlvTransfoParam &tx, IlvTransfoParam &ty) const |
Retrieves the parameters of the zoom operation. | |
void | getRectangle (IlvRect &rect) |
Returns the zoom rectangle. | |
IlBoolean | giveTransformer (IlvTransformer &transformer, IlBoolean compute=IlTrue) |
Retrieves the resulting IlvTransformer . | |
virtual void | handleEvent (IlvEvent &event) |
Dispatches the IlvEvent event. | |
IlBoolean | isKeepingAspectRatio () |
Verifies whether the interactor works in keeping aspect ratio mode. | |
void | setImmediateMode (IlBoolean set) |
Sets the working mode. | |
void | setZoomCursor (IlvCursor *newCursor) |
Sets a new zoom cursor. |
A zoom interactor.
The zoom interactor draws a rectangle in an IlvView
that represents the area that will become visible after the zoom operation is complete.
The interactor has two working modes, an immediate mode and a deferred mode.
With the immediate mode, the zoom operation is immediately carried out when the user has drawn the zoom rectangle. With the deferred mode, the user must confirm the zoom operation by clicking in the zoom rectangle. In addition to these modes, the user can move the zoom rectangle during the operation by dragging the mouse with the modifier button pressed. Library: ilvmgr
IlvZoomInteractor::IlvZoomInteractor | ( | IlvManager * | manager, | |
IlvView * | view, | |||
IlUShort | button = IlvLeftButton , |
|||
IlUShort | mbutton = IlvMiddleButton|IlvRightButton , |
|||
IlvCursor * | defaultCursor = 0 | |||
) |
Constructor.
Initializes a new IlvZoomInteractor
instance.
manager | The manager. | |
view | The view. | |
button | The active button used to draw the zoom rectangle. | |
mbutton | The modifier button used to move the zoom rectangle. |
virtual void IlvZoomInteractor::abortOperation | ( | ) | [virtual] |
Aborts the operation.
The method is called when the user presses the Escape
key.
virtual void IlvZoomInteractor::decorate | ( | ) | [virtual] |
Adds additional decorations around the ghost rectangle.
The default implementation does nothing.
virtual void IlvZoomInteractor::doZoom | ( | ) | [virtual] |
Performs the zoom operation.
The default implementation of the virtual method applies the transformer to the manager associated with the transformer.
IlBoolean IlvZoomInteractor::getImmediateMode | ( | ) |
Verifies whether the interactor is in immediate mode.
IlTrue
if the interactor is in immediate mode, IlFalse
otherwise. void IlvZoomInteractor::getParams | ( | IlvTransfoParam & | cx, | |
IlvTransfoParam & | cy, | |||
IlvTransfoParam & | sx, | |||
IlvTransfoParam & | sy, | |||
IlvTransfoParam & | tx, | |||
IlvTransfoParam & | ty | |||
) | const |
Retrieves the parameters of the zoom operation.
cx | The x center of the operation. | |
cy | The y center of the operation. | |
sx | The x scale factor of the operation. | |
sy | The y scale factor of the operation. | |
tx | The x translation of the operation. | |
ty | The y translation of the operation. |
void IlvZoomInteractor::getRectangle | ( | IlvRect & | rect | ) |
Returns the zoom rectangle.
rect | The zoom rectangle. |
IlBoolean IlvZoomInteractor::giveTransformer | ( | IlvTransformer & | transformer, | |
IlBoolean | compute = IlTrue | |||
) |
Retrieves the resulting IlvTransformer
.
transformer | The resulting transformer. |
IlTrue
if the transformer is valid, IlFalse
otherwise. virtual void IlvZoomInteractor::handleEvent | ( | IlvEvent & | event | ) | [virtual] |
Dispatches the IlvEvent
event.
event | The event to dispatch. |
Implements IlvManagerViewInteractor.
IlBoolean IlvZoomInteractor::isKeepingAspectRatio | ( | ) |
Verifies whether the interactor works in keeping aspect ratio mode.
In keeping aspect ratio mode, the zoom rectangle is constrained to have the same proportions as the view. This mode is automatically set when the associated manager is in keep aspect ratio mode.
IlTrue
if the interactor is in keep aspect ratio mode, IlFalse
otherwise. void IlvZoomInteractor::setImmediateMode | ( | IlBoolean | set | ) |
Sets the working mode.
set | If set to IlTrue , the interactor works in immediate mode. If set to IlFalse the interactor works in deferred mode. |
void IlvZoomInteractor::setZoomCursor | ( | IlvCursor * | newCursor | ) |
Sets a new zoom cursor.
The zoom cursor is used in deferred mode when the mouse enters the zoom rectangle.
newCursor | The new zoom cursor. |
© Copyright 2012, 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.