Rogue Wave Views
Manager Package API Reference Guide
Product Documentation:

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

Manager interactor class. More...

#include <ilviews/manager/selinter.h>

Inheritance diagram for IlvSelectInteractor:
IlvManagerViewInteractor IlvValueInterface

Public Member Functions

 IlvSelectInteractor (IlvManager *manager, IlvView *view, IlUShort button=IlvLeftButton, IlBoolean showCursor=IlFalse)
 Constructor. More...
 
void abort ()
 Aborts the interaction. More...
 
virtual void doReshape (IlvGraphic *object, const IlvRect &rect)
 Reshapes a graphic object. More...
 
virtual void doSelect ()
 Called when the selection is modified. More...
 
virtual void doTranslate (const IlvPoint &p)
 Translates the selected objects. More...
 
void drawGhost ()
 Visual feedback during the interaction. More...
 
virtual void drawGhost (IlvRect &rect, IlvRegion *clip=0)
 Visual feedback when moving or selecting several objects. More...
 
virtual void drawGhostMove (IlvGraphic *object, IlvRegion *clip=0)
 Visual feedback when moving an object. More...
 
virtual void drawGhostReshape (IlvGraphic *object, IlvRegion *clip=0)
 Visual feedback when reshaping an object. More...
 
IlUShort getButton () const
 Returns the button used for the selection. More...
 
const IlvRectgetRectangle () const
 Returns the rectangle used in the interaction. More...
 
IlBoolean handleEvent (IlvEvent &event)
 Handles events for the manager view. More...
 
virtual void handleExpose (IlvRegion *rect=0)
 Called when the manager view receives an expose event. More...
 
void init ()
 Initialization, when the interactor is attached to a view. More...
 
IlBoolean opaqueMove (IlBoolean useIt)
 Enables or disables the opaque move. More...
 
IlBoolean opaqueMove () const
 Indicates whether the opaque move is used. More...
 
IlBoolean opaqueReshape (IlBoolean useIt)
 Verbose: More...
 
IlBoolean opaqueReshape () const
 Indicates whether the opaque reshape is used. More...
 
void setButton (IlUShort b)
 Sets the button used for the selection. More...
 
void showCursor (IlBoolean useIt)
 Indicates whether the locator cursor is used. 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...
 

Detailed Description

Manager interactor class.

Library: ilvmgr

Use this class to handle all selection, translation, and object-resizing tasks within a view controlled by a manager.

See also
IlvSelector.

Constructor & Destructor Documentation

§ IlvSelectInteractor()

IlvSelectInteractor::IlvSelectInteractor ( IlvManager manager,
IlvView view,
IlUShort  button = IlvLeftButton,
IlBoolean  showCursor = IlFalse 
)

Constructor.

Initializes a new instance of the IlvSelectInteractor class that lets the user select objects in the specified view connected to a manager. You can specify which pointing device button is to be used to perform the selection.

Parameters
managerThe manager.
viewThe manager view.
buttonThe mouse button to use for the selection.
showCursorIlTrue if you want a locator cursor to appear.

Member Function Documentation

§ abort()

void IlvSelectInteractor::abort ( )
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.

§ doReshape()

virtual void IlvSelectInteractor::doReshape ( IlvGraphic object,
const IlvRect rect 
)
virtual

Reshapes a graphic object.

Called to resize a graphic object. If the interactor is not in opaque reshape mode the member function is only called once when the button is released. If the interactor is in opaque reshape mode, the member function is called each time the mouse is dragged during reshaping.

Parameters
objectThe graphic object.
rectThe new bounding box for the graphic object.

§ doSelect()

virtual void IlvSelectInteractor::doSelect ( )
virtual

Called when the selection is modified.

Called when the current selection changes. You can make a request to the manager asking to be informed on the new selection to update.

§ doTranslate()

virtual void IlvSelectInteractor::doTranslate ( const IlvPoint p)
virtual

Translates the selected objects.

Translates the current selected objects in the manager. If the interactor is not in opaque move mode, the member function is only called once on button release. If the interactor is in opaque move mode, the member function is called each time the mouse is dragged during translation.

Parameters
pThe new position of the bounding box of the objects.

§ drawGhost() [1/2]

void IlvSelectInteractor::drawGhost ( )
virtual

Visual feedback during the interaction.

Called to draw a preview image of the resulting user action (the ghost image of the interactor). This function is generally invoked by IlvManagerViewInteractor::handleEvent() as a response to user events.

Reimplemented from IlvManagerViewInteractor.

§ drawGhost() [2/2]

virtual void IlvSelectInteractor::drawGhost ( IlvRect rect,
IlvRegion clip = 0 
)
virtual

Visual feedback when moving or selecting several objects.

Ghost-draws a rectangle when translating a set of objects or selecting objects inside a region defined by a rectangle being dragged.

Parameters
rectThe rectangle to draw.
clipThe clipping region.

§ drawGhostMove()

virtual void IlvSelectInteractor::drawGhostMove ( IlvGraphic object,
IlvRegion clip = 0 
)
virtual

Visual feedback when moving an object.

Ghost-draws the object being moved. It is not called if the interactor is in opaque move mode.

Parameters
objectThe graphic object being moved.
clipThe clipping region.

§ drawGhostReshape()

virtual void IlvSelectInteractor::drawGhostReshape ( IlvGraphic object,
IlvRegion clip = 0 
)
virtual

Visual feedback when reshaping an object.

Ghost-draws the object being reshaped. It is not called if the interactor is in opaque reshape mode.

Parameters
objectThe graphic object being reshaped.
clipThe clipping region.

§ getButton()

IlUShort IlvSelectInteractor::getButton ( ) const

Returns the button used for the selection.

Returns
The button identifier used by the interactor to perform the selection.

§ getRectangle()

const IlvRect& IlvSelectInteractor::getRectangle ( ) const

Returns the rectangle used in the interaction.

Returns
The rectangle that currently defines the selection area, or the union of the bounding boxes of the selected objects.

§ handleEvent()

IlBoolean IlvSelectInteractor::handleEvent ( IlvEvent event)
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.

Returns
IlTrue if the event is consumed, IlFalse otherwise.

Implements IlvManagerViewInteractor.

§ handleExpose()

virtual void IlvSelectInteractor::handleExpose ( IlvRegion clip = 0)
virtual

Called when the manager view receives an expose event.

Called by the manager when an exposure request occurs in the interactor view to redraw shapes handled by the interactor, such as a ghost image. The basic implementation calls the member function IlvManagerViewInteractor::drawGhost() after the clipping region has been set to the exposed area.

Parameters
clipSpecifies the exposed area.

Reimplemented from IlvManagerViewInteractor.

§ init()

void IlvSelectInteractor::init ( )
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.

§ opaqueMove() [1/2]

IlBoolean IlvSelectInteractor::opaqueMove ( IlBoolean  useIt)

Enables or disables the opaque move.

Checks and specifies whether the moving operation is done in opaque mode. In this mode, the objects are physically moved, and no ghost is displayed. It is slower than using a ghost image, but smoother.

Parameters
useItIf IlTrue, the opaque move is enabled. Otherwise, it is disabled.
Returns
The value given in the parameter.

§ opaqueMove() [2/2]

IlBoolean IlvSelectInteractor::opaqueMove ( ) const

Indicates whether the opaque move is used.

Returns
IlTrue if the moving operations are done in opaque mode. Otherwise, it returns IlFalse.

§ opaqueReshape() [1/2]

IlBoolean IlvSelectInteractor::opaqueReshape ( IlBoolean  useIt)

Verbose:

Checks and specifies whether reshaping operations are done in opaque mode. In this mode, the objects are physically reshaped and immediately refreshed, and no ghost is displayed. It is slower than using a ghost image, but smoother.

Parameters
useItIf IlTrue, the opaque reshape is enabled. Otherwise, it is disabled.
Returns
The value given in the parameter.

§ opaqueReshape() [2/2]

IlBoolean IlvSelectInteractor::opaqueReshape ( ) const

Indicates whether the opaque reshape is used.

Returns
IlTrue if the reshape operations are done in opaque mode. Otherwise, it returns IlFalse.

§ setButton()

void IlvSelectInteractor::setButton ( IlUShort  b)

Sets the button used for the selection.

Parameters
bSpecifies the button used for the selection.

§ showCursor()

void IlvSelectInteractor::showCursor ( IlBoolean  useIt)

Indicates whether the locator cursor is used.

Specifies whether you want the locator cursor to appear when the interactor is set in the view.

Parameters
useItIlTrue if you want to use the locator cursor.

© Copyright 2018, 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.