rwlogo
Rogue Wave Views 5.5.1

Rogue Wave Views
Manager Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvMakeFilledSplineInteractor Class Reference

Manager interactor class. More...

#include <ilviews/manager/mkpolyin.h>

Inheritance diagram for IlvMakeFilledSplineInteractor:
IlvMakeSplineInteractor IlvMakePolyPointsInteractor IlvManagerViewInteractor IlvMakeClosedSplineInteractor

List of all members.

Public Member Functions

 IlvMakeFilledSplineInteractor (IlvManager *manager, IlvView *view)
 Constructor.
void commit (IlBoolean removeExtraPoints)
virtual void doIt (IlUInt count, IlvPoint *points)
 Finalizes the interaction by creating an IlvFilledSpline object.
virtual void drawGhost ()
 Visual feedback during interaction.
void react (IlvPoint &p, IlUShort modifier=0)
 Ensures the Bezier spline stays continuously derivable as new points are entered.

Detailed Description

Manager interactor class.

Library: ilvmgr

Use this class to create IlvFilledSpline objects in a view controlled by a manager. The virtual member function handleEvent monitors mouse events. To draw a filled spline, the user:

  1. Clicks and drag the left mouse button to add a point and set its tangents and tension.
  2. Presses the return or space key, or double clicks to finish.

If the user presses the Control modifier while dragging the left mouse button, the left and right tangents at the current point are dissociated, letting the user create cusps on the Bezier spline.

See also:
IlvFilledSpline, IlvPolySelectInteractor, IlvMakeClosedSplineInteractor.

Constructor & Destructor Documentation

IlvMakeFilledSplineInteractor::IlvMakeFilledSplineInteractor ( IlvManager manager,
IlvView view 
)

Constructor.

Initializes a new instance of the IlvMakeFilledSplineInteractor class.

Parameters:
manager The manager.
view The manager view.

Member Function Documentation

void IlvMakeFilledSplineInteractor::commit ( IlBoolean  removeExtraPoints  )  [virtual]

Called by handleEvent when the polypoint is terminated. This method should call doIt() and post an undoable command if need be.

Parameters:
removeExtraPoints When the curve entry is terminated by a double click, it may be desirable to remove the extra points that have been added in succession by the double click. This flag is set to tell the method that it should get rid of the extraneous points before calling doIt().

Reimplemented from IlvMakeSplineInteractor.

virtual void IlvMakeFilledSplineInteractor::doIt ( IlUInt  count,
IlvPoint points 
) [virtual]

Finalizes the interaction by creating an IlvFilledSpline object.

Creates an IlvFilledSpline in the manager from the array of points provided during the interaction.

Parameters:
count The number of points in the array.
points The array of points, in the object coordinate system.

Reimplemented from IlvMakeSplineInteractor.

Reimplemented in IlvMakeClosedSplineInteractor.

virtual void IlvMakeFilledSplineInteractor::drawGhost (  )  [virtual]

Visual feedback during interaction.

Draws a filled spline in XOR mode.

Reimplemented from IlvMakeSplineInteractor.

Reimplemented in IlvMakeClosedSplineInteractor.

void IlvMakeFilledSplineInteractor::react ( IlvPoint p,
IlUShort  modifier = 0 
) [virtual]

Ensures the Bezier spline stays continuously derivable as new points are entered.

When a new control point is added, the default implementation realigns the previous control points if needed, to ensure that the Bezier remains continuous at each control point, including the start and end points.

Reimplemented from IlvMakeSplineInteractor.


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