rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Grapher Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvPinEditorInteractor Class Reference

Grapher interactor for editing connection pins. More...

#include <ilviews/grapher/pinedit.h>

Inheritance diagram for IlvPinEditorInteractor:
IlvManagerViewInteractor

List of all members.

Public Member Functions

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

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:
mgr The grapher to which the interactor is attached.
v The view to which the interactor is attached.

Member Function Documentation

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

Adds a new connection pin.

Parameters:
p The 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:
link The link to connect or disconnect.
pinIndex The 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:
pinIndex The index of the connection pin to be moved.
pinIndex The 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:
pinIndex The 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:
mksel The 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:
p The current position.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends

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