Rogue Wave Views 5.6 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
Manager interactor class. More...
#include <ilviews/manager/selinter.h>
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 IlvRect & | getRectangle () 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. |
Manager interactor class.
Library: ilvmgr
Use this class to handle all selection, translation, and object-resizing tasks within a view controlled by a manager.
IlvSelector
. 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.
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. |
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.
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.
p | The new position of the bounding box of the objects. |
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.
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.
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.
object | The graphic object being reshaped. | |
clip | The clipping region. |
IlUShort IlvSelectInteractor::getButton | ( | ) | const |
Returns the button used for the selection.
const IlvRect& IlvSelectInteractor::getRectangle | ( | ) | const |
Returns the rectangle used in the interaction.
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.
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.
IlTrue
if the moving operations are done in opaque mode. Otherwise, it returns IlFalse
. 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.
useIt | If IlTrue , the opaque move is enabled. Otherwise, it is disabled. |
IlBoolean IlvSelectInteractor::opaqueReshape | ( | ) | const |
Indicates whether the opaque reshape is used.
IlTrue
if the reshape operations are done in opaque mode. Otherwise, it returns IlFalse
. 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.
useIt | If IlTrue , the opaque reshape is enabled. Otherwise, it is disabled. |
void IlvSelectInteractor::setButton | ( | IlUShort | b | ) |
Sets the button used for the selection.
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.
useIt | IlTrue if you want to use the locator 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.