rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Grapher Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

List of all members | Public Member Functions
IlvPinEditorInteractor Class Reference

Grapher interactor for editing connection pins. More...

#include <ilviews/grapher/pinedit.h>

Inheritance diagram for IlvPinEditorInteractor:
IlvManagerViewInteractor

Public Member Functions

 IlvPinEditorInteractor (IlvManager *mgr, IlvView *view)
 Constructor. More...
 
virtual IlUInt doAddPin (const IlvPoint &p)
 Adds a new connection pin. More...
 
virtual void doConnectPin (IlvGraphic *link, IlUInt pinIndex)
 Connects a pin to a link. More...
 
virtual void doMovePin (IlUInt pinIndex, const IlvPoint &p)
 Changes the position of a connection pin. More...
 
virtual void doRemovePin (IlUInt pinIndex)
 Removes a connection pin. More...
 
IlvGraphNodeSelectiongetNodeSelection () const
 Returns the selection object used to represent and edit connection pins. More...
 
IlvMakeSelection setMakeNodeSelection (IlvMakeSelection mksel)
 Changes the way nodes are highlighted. More...
 
virtual void validate (IlvPoint &p)
 Validates a mouse position. More...
 

Detailed Description

Grapher interactor for editing connection pins.

Library: ilvgrapher

This class lets the user edit the connection pins that can be associated to a grapher node. The interactor can carry out several actions. Each action is implemented by a method that can optionally be overloaded:

Warning
[note] Connection pins can be edited only if they are managed by an instance of IlvGenericPin or one of its subclasses.
See Also
IlvGrapherPin, IlvGenericPin, IlvGraphNodeSelection, IlvManagerViewInteractor.

Constructor & Destructor Documentation

IlvPinEditorInteractor::IlvPinEditorInteractor ( IlvManager mgr,
IlvView view 
)

Constructor.

The constructor initializes a new instance of the IlvPinEditorInteractor class for the view v and the grapher mgr.

Parameters
mgrThe grapher to which the interactor is attached.
vThe view to which the interactor is attached.

Member Function Documentation

virtual IlUInt IlvPinEditorInteractor::doAddPin ( const IlvPoint p)
virtual

Adds a new connection pin.

Parameters
pThe position of the new connection pin.
Returns
The index of the new connection pin.
See Also
getNodeSelection.
virtual void IlvPinEditorInteractor::doConnectPin ( IlvGraphic link,
IlUInt  pinIndex 
)
virtual

Connects a pin to a link.

Called to connect or disconnect link to and from the selected connection pin. If pinIndex is equal to IlvBadIndex, then link should be disconnected. Otherwise, it should be connected to the pin of index pinIdex.

Parameters
linkThe link to connect or disconnect.
pinIndexThe index of the current connection pin, or IlvBadIndex if link should be disconnected.
See Also
getNodeSelection.
virtual void IlvPinEditorInteractor::doMovePin ( IlUInt  pinIndex,
const IlvPoint p 
)
virtual

Changes the position of a connection pin.

Called when the user releases the mouse button after dragging the connection pin of index pinIndex to the new location p.

Parameters
pinIndexThe index of the connection pin to be moved.
pinIndexThe new position of the connection pin.
See Also
getNodeSelection.
virtual void IlvPinEditorInteractor::doRemovePin ( IlUInt  pinIndex)
virtual

Removes a connection pin.

Called when the user presses the delete key to remove the selected connection pin. If this pin is the last one, the IlvGrapherPin instance is removed from the current node and deleted.

Parameters
pinIndexThe index of the connection pin to remove.
See Also
getNodeSelection.
IlvGraphNodeSelection* IlvPinEditorInteractor::getNodeSelection ( ) const

Returns the selection object used to represent and edit connection pins.

An IlvGraphNodeSelection instance is associated with the grapher node currently being edited. The selection object lets you retrieve the selected connection pin with the IlvGraphNodeSelection::getActivePinIdx method.

Returns
The selection object used to represent and edit the connection pins.
IlvMakeSelection IlvPinEditorInteractor::setMakeNodeSelection ( IlvMakeSelection  mksel)

Changes the way nodes are highlighted.

Sets the factory that creates the selection objects used to highlight nodes during the interaction. If no factory is specified, an instance of IlvGraphNodeSelection is used.

Warning
The mksel factory must create objects that are subtype of the IlvGraphNodeSelection class.
Parameters
mkselThe new factory function.
Returns
The old factory function.
virtual void IlvPinEditorInteractor::validate ( IlvPoint p)
virtual

Validates a mouse position.

Called whenever the mouse is dragged. It lets you control the position taken by the point p, which will be used to edit the connection pins.

Parameters
pThe current position.

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