rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Manager Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

List of all members | Public Member Functions
IlvEditPointsInteractor Class Reference

Manager interactor class. More...

#include <ilviews/manager/polyint.h>

Inheritance diagram for IlvEditPointsInteractor:
IlvManagerViewInteractor

Public Member Functions

 IlvEditPointsInteractor (IlvManager *manager, IlvView *view)
 Constructor. More...
 
void abort ()
 Aborts the interaction. More...
 
virtual IlvPolyPointsSelectioncreateSelection (IlvGraphic *polypt)
 Returns a new IlvPolyPointsSelection. More...
 
void drawGhost ()
 Visual feedback during the interaction. More...
 
void 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 void insertPoint (IlvEvent &event, IlInt segment, const IlvPoint &p, IlDouble param)
 Inserts a point at the location given by segment and param. More...
 
virtual void removePoint (IlvEvent &ev, IlUInt index)
 Removes the selected point from the curve, in response to a user event. More...
 
virtual IlvPolyPointsselectObject (IlvPoint &point)
 Returns a polypoint containing a given point. More...
 
- Public Member Functions inherited from IlvManagerViewInteractor
 IlvManagerViewInteractor (IlvManager *manager, IlvView *view)
 Constructor. 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

The IlvEditPointsInteractor class lets you handle 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, and the constraints relating to the edited objects are taken into account to offer better usability.

See Also
IlvMakePolyPointsInteractor, IlvPolyPoints, IlvPolySelection, IlvSpline.

Constructor & Destructor Documentation

IlvEditPointsInteractor::IlvEditPointsInteractor ( IlvManager manager,
IlvView view 
)

Constructor.

Calls the constructor of the parent class.

Parameters
managerThe manager.
viewThe manager view.

Member Function Documentation

void IlvEditPointsInteractor::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 IlvPolyPointsSelection* IlvEditPointsInteractor::createSelection ( IlvGraphic polypt)
virtual

Returns a new IlvPolyPointsSelection.

Creates an instance of IlvPolyPointsSelection that defines the given IlvPolyPoints object. Depending on the type of polypt, a IlvPolyPointsSelection or a IlvSplineSelection is returned.

Returns
The pointer to the IlvPolyPointsSelection object.
Parameters
polyptThe polypoint.
void IlvEditPointsInteractor::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.

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

void IlvEditPointsInteractor::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 IlvEditPointsInteractor::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 void IlvEditPointsInteractor::insertPoint ( IlvEvent event,
IlInt  segment,
const IlvPoint p,
IlDouble  param 
)
virtual

Inserts a point at the location given by segment and param.

This method is called when the user presses the mouse button on the curve while holding the control key down. The effect of this method is to insert one or more points to the polypoint

Parameters
eventThe event that generated the call to this method.
segmentSpecifies the segment index in the polypoint. For Bezier splines, this segment is the number of points of the curve divided by 3, as a Bezier curve segments are defined by successions of 4 points.
pThe point at which the user clicked.
paramThe parametric coordinate of the location where to insert the point. This is a number between 0 and 1 that describes the relative location of the clicked point within its segment.
virtual void IlvEditPointsInteractor::removePoint ( IlvEvent ev,
IlUInt  index 
)
virtual

Removes the selected point from the curve, in response to a user event.

This method is called when the user presses the backspace or delete keys and a point is currently selected.

Parameters
eventThe event that generated the call to this method.
indexThe currently selected point in the polypoints.
virtual IlvPolyPoints* IlvEditPointsInteractor::selectObject ( IlvPoint point)
virtual

Returns a polypoint containing a given point.

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

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