rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Manager Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvSelectInteractor Class Reference

Manager interactor class. More...

#include <ilviews/manager/selinter.h>

Inheritance diagram for IlvSelectInteractor:
IlvManagerViewInteractor

List of all members.

Public Member Functions

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

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 ( 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:
manager The manager.
view The manager view.
button The mouse button to use for the selection.
showCursor IlTrue if you want a locator cursor to appear.

Member Function Documentation

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.

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:
object The graphic object.
rect The new bounding box for the graphic object.
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.

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:
p The new position of the bounding box of the objects.
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:
rect The rectangle to draw.
clip The clipping region.
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.

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:
object The graphic object being moved.
clip The clipping region.
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:
object The graphic object being reshaped.
clip The clipping region.
IlUShort IlvSelectInteractor::getButton (  )  const

Returns the button used for the selection.

Returns:
The button identifier used by the interactor to perform the selection.
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.
void 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.

Implements IlvManagerViewInteractor.

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:
clip Specifies the exposed area.

Reimplemented from IlvManagerViewInteractor.

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.

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.
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:
useIt If IlTrue, the opaque move is enabled. Otherwise, it is disabled.
Returns:
The value given in the parameter.
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.
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:
useIt If IlTrue, the opaque reshape is enabled. Otherwise, it is disabled.
Returns:
The value given in the parameter.
void IlvSelectInteractor::setButton ( IlUShort  b  ) 

Sets the button used for the selection.

Parameters:
b Specifies the button used for the selection.
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:
useIt IlTrue if you want to use the locator cursor.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

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