Rogue Wave Views Grapher Package API Reference Guide |
Rogue Wave Views Documentation Home |
Grapher interactor for editing connection pins. More...
#include <ilviews/grapher/pinedit.h>
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... | |
IlvGraphNodeSelection * | getNodeSelection () 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... | |
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:
IlvPinEditorInteractor::doAddPin()
). IlvPinEditorInteractor::doRemovePin()
). IlvPinEditorInteractor::doMovePin()
). By keeping the Ctrl
key pressed during the interaction, the new location of the pin will snap to the contour of the node. IlvPinEditorInteractor::doConnectPin()
). IlvGenericPin
or one of its subclasses.IlvPinEditorInteractor::IlvPinEditorInteractor | ( | IlvManager * | mgr, |
IlvView * | view | ||
) |
Constructor.
The constructor initializes a new instance of the IlvPinEditorInteractor
class for the view view and the grapher mgr.
mgr | The grapher to which the interactor is attached. |
view | The view to which the interactor is attached. |
Adds a new connection pin.
p | The position of the new connection pin. |
getNodeSelection
.
|
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.
link | The link to connect or disconnect. |
pinIndex | The index of the current connection pin, or IlvBadIndex if link should be disconnected. |
getNodeSelection
. 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.
pinIndex | The index of the connection pin to be moved. |
p | The new position of the connection pin. |
getNodeSelection
.
|
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.
pinIndex | The index of the connection pin to remove. |
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.
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.
IlvGraphNodeSelection
class.mksel | The new factory function. |
|
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.
p | The current position. |
© 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.