Rogue Wave Views
Manager Package API Reference Guide
Product Documentation:

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

A zoom interactor. More...

#include <ilviews/manager/zoomint.h>

Inheritance diagram for IlvZoomInteractor:
IlvManagerViewInteractor IlvValueInterface

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...
 
IlvDisplaygetDisplay () const
 Returns the display of the manager view. More...
 
IlvManagergetManager () const
 Returns the manager. More...
 
IlvTransformergetTransformer () const
 Returns the transformer used with the manager view. More...
 
IlvViewgetView () 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...
 

Detailed Description

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

Constructor & Destructor Documentation

IlvZoomInteractor::IlvZoomInteractor ( IlvManager manager,
IlvView view,
IlUShort  button = IlvLeftButton,
IlUShort  mbutton = IlvMiddleButton|IlvRightButton,
IlvCursor defaultCursor = 0 
)

Constructor.

Initializes a new IlvZoomInteractor instance.

Parameters
managerThe manager.
viewThe view.
buttonThe active button used to draw the zoom rectangle.
mbuttonThe modifier button used to move the zoom rectangle.
defaultCursorUndocumented parameter.

Member Function Documentation

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.

Returns
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.

Parameters
cxThe x center of the operation.
cyThe y center of the operation.
sxThe x scale factor of the operation.
syThe y scale factor of the operation.
txThe x translation of the operation.
tyThe y translation of the operation.
void IlvZoomInteractor::getRectangle ( IlvRect rect)

Returns the zoom rectangle.

Parameters
rectThe zoom rectangle.
IlBoolean IlvZoomInteractor::giveTransformer ( IlvTransformer transformer,
IlBoolean  compute = IlTrue 
)

Retrieves the resulting IlvTransformer.

Parameters
transformerThe resulting transformer.
computeUndocumented parameter.
Returns
IlTrue if the transformer is valid, IlFalse otherwise.
virtual IlBoolean IlvZoomInteractor::handleEvent ( IlvEvent event)
virtual

Dispatches the IlvEvent event.

Parameters
eventThe event to dispatch.
Returns
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.

Returns
IlTrue if the interactor is in keep aspect ratio mode, IlFalse otherwise.
void IlvZoomInteractor::setImmediateMode ( IlBoolean  set)

Sets the working mode.

Parameters
setIf 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.

Parameters
newCursorThe new zoom cursor.

© 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.