Rogue Wave Views
Manager Package API Reference Guide
Product Documentation:

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

Manager interactor class. More...

#include <ilviews/manager/polyint.h>

Inheritance diagram for IlvPolySelectInteractor:
IlvManagerViewInteractor IlvValueInterface

Public Member Functions

 IlvPolySelectInteractor (IlvManager *manager, IlvView *view)
 Constructor. More...
 
void abort ()
 Aborts the interaction. More...
 
virtual IlBoolean acceptPoint (IlvPolyPoints *polypt, IlUInt index)
 Indicates whether a given point in the polypoint can move. More...
 
virtual IlBoolean acceptRotate (IlvPolyPoints *polypt)
 Indicates whether the polypoint may rotate. More...
 
virtual IlvPolySelectioncreatePolySelection (IlvPolyPoints *polypt)
 Returns a new IlvPolySelection. More...
 
virtual void doChangePoint (IlvPolyPoints *polypt, IlUInt index, IlvPoint &value)
 Finalizes the interaction by moving a given point. More...
 
virtual void doRotate (IlvPolyPoints *polypt, IlFloat angle)
 Finalizes the interaction by rotating the polypoint. More...
 
void drawGhost ()
 Visual feedback during the interaction. More...
 
IlvPolySelectiongetPolySelection () const
 Returns the IlvPolySelection. More...
 
IlBoolean handleEvent (IlvEvent &event)
 Handles events for the manager view. More...
 
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...
 
virtual IlvPolyPointsselectPolyPoints (IlvPoint &point)
 Returns a polypoint containing a given point. 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

Note: this class is kept for compatibility purposes only. New developments should use the IlvEditPointsInteractor instead.

The IlvPolySelectInteractor class handles the editing of IlvPolyPoints objects such as splines and polylines in a view controlled by a manager. Once you click the IlvPolyPoints object, each point can be moved independently.

See also
IlvPolySelectInteractor, IlvMakePolyPointsInteractor, IlvPolyPoints, IlvPolySelection.

Constructor & Destructor Documentation

IlvPolySelectInteractor::IlvPolySelectInteractor ( IlvManager manager,
IlvView view 
)

Constructor.

Calls the constructor of the parent class.

Parameters
managerThe manager.
viewThe manager view.

Member Function Documentation

void IlvPolySelectInteractor::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 IlBoolean IlvPolySelectInteractor::acceptPoint ( IlvPolyPoints polypt,
IlUInt  index 
)
virtual

Indicates whether a given point in the polypoint can move.

Returns
IlTrue if changing the value of the point is allowed.
Parameters
polyptThe polypoint.
indexSpecifies the point index in the polypoint.
virtual IlBoolean IlvPolySelectInteractor::acceptRotate ( IlvPolyPoints polypt)
virtual

Indicates whether the polypoint may rotate.

Returns
IlTrue if the user is allowed to rotate the polypoint.
Parameters
polyptThe polypoint.
virtual IlvPolySelection* IlvPolySelectInteractor::createPolySelection ( IlvPolyPoints polypt)
virtual

Returns a new IlvPolySelection.

Creates an instance of IlvPolySelection that defines the given IlvPolyPoints object.

Returns
The pointer to the IlvPolySelection object.
Parameters
polyptThe polypoint.
virtual void IlvPolySelectInteractor::doChangePoint ( IlvPolyPoints polypt,
IlUInt  index,
IlvPoint value 
)
virtual

Finalizes the interaction by moving a given point.

Is called when the user releases the mouse button after dragging a given point of the polypoint.

Parameters
polyptThe polypoint.
indexSpecifies the point index in the polypoint.
valueThe new coordinates of the point.
virtual void IlvPolySelectInteractor::doRotate ( IlvPolyPoints polypt,
IlFloat  angle 
)
virtual

Finalizes the interaction by rotating the polypoint.

Applies a rotation to the specified polypoint object.

Parameters
polyptThe polypoint.
angleSpecifies the rotation angle in degrees.
void IlvPolySelectInteractor::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.

IlvPolySelection* IlvPolySelectInteractor::getPolySelection ( ) const

Returns the IlvPolySelection.

Returns
The IlvPolySelection that defines the selected IlvPolyPoints object.
IlBoolean IlvPolySelectInteractor::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.

void IlvPolySelectInteractor::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.

void IlvPolySelectInteractor::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.

virtual IlvPolyPoints* IlvPolySelectInteractor::selectPolyPoints ( IlvPoint point)
virtual

Returns a polypoint containing a given point.

Returns
A subtype of IlvPolyPoints that contains the point point.
Parameters
pointThe point.

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