Rogue Wave Views Manager Package API Reference Guide |
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. More... | |
virtual void | abort () |
Called when the interactor is removed. | |
virtual void | abortOperation () |
Aborts the operation. More... | |
virtual void | decorate () |
Adds additional decorations around the ghost rectangle. More... | |
virtual void | doZoom () |
Performs the zoom operation. More... | |
virtual void | drawGhost () |
Draws the ghost rectangle. | |
IlBoolean | getImmediateMode () |
Verifies whether the interactor is in immediate mode. More... | |
void | getParams (IlvTransfoParam &cx, IlvTransfoParam &cy, IlvTransfoParam &sx, IlvTransfoParam &sy, IlvTransfoParam &tx, IlvTransfoParam &ty) const |
Retrieves the parameters of the zoom operation. More... | |
void | getRectangle (IlvRect &rect) |
Returns the zoom rectangle. More... | |
IlBoolean | giveTransformer (IlvTransformer &transformer, IlBoolean compute=IlTrue) |
Retrieves the resulting IlvTransformer . More... | |
virtual IlBoolean | handleEvent (IlvEvent &event) |
Dispatches the IlvEvent event. More... | |
IlBoolean | isKeepingAspectRatio () |
Verifies whether the interactor works in keeping aspect ratio mode. More... | |
void | setImmediateMode (IlBoolean set) |
Sets the working mode. More... | |
void | setZoomCursor (IlvCursor *newCursor) |
Sets a new zoom cursor. More... | |
Public Member Functions inherited from IlvManagerViewInteractor | |
IlvManagerViewInteractor (IlvManager *manager, IlvView *view) | |
Initializes a new IlvManagerViewInteractor . 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... | |
virtual void | init () |
Initialization, when the interactor is attached to a view. More... | |
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. |
defaultCursor | Undocumented parameter. |
|
virtual |
Aborts the operation.
The method is called when the user presses the Escape
key.
|
virtual |
Adds additional decorations around the ghost rectangle.
The default implementation does nothing.
|
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. |
compute | Undocumented parameter. |
IlTrue
if the transformer is valid, IlFalse
otherwise. Dispatches the IlvEvent
event.
event | The event to dispatch. |
IlTrue
if the event is consumed, IlFalse
otherwise. 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 2017, 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.