Rogue Wave Views Manager Package API Reference Guide |
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. 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 IlvRect & | getRectangle () 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... | |
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... | |
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. |
|
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 |
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 |
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 |
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. |
|
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.
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. |
|
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 |
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.
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.
IlTrue
if the event is consumed, IlFalse
otherwise. Implements IlvManagerViewInteractor.
|
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.
|
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.
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::opaqueMove | ( | ) | const |
Indicates whether the opaque move is used.
IlTrue
if the moving 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. |
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
. 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 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.