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
IlvGenericPin Class Reference

Predefined IlvGrapherPin subclass. More...

#include <ilviews/grapher/pin.h>

Inheritance diagram for IlvGenericPin:
IlvGrapherPin IlvNamedProperty

Public Member Functions

 IlvGenericPin ()
 Constructor. More...
 
IlUInt addPin (const IlvGraphic *node, const IlvPoint &p, const IlvTransformer *t)
 Adds a new connection pin. More...
 
virtual IlUInt getCardinal (const IlvGraphic *, const IlvTransformer *) const
 Returns the number of connection pins handled by the instance. More...
 
virtual IlBoolean getClosest (const IlvGraphic *, const IlvPoint &, const IlvTransformer *t, IlvPoint &, IlUInt &) const
 Returns the closest connection pin from a given point. More...
 
virtual IlBoolean getLocation (IlUInt, const IlvGraphic *, const IlvTransformer *t, IlvPoint &) const
 Returns the coordinates of a connection pin. More...
 
IlBoolean movePin (IlUInt pinIndex, const IlvGraphic *node, const IlvPoint &p, const IlvTransformer *t)
 Changes the location of an existing connection pin. More...
 
void removePin (IlUInt pinIndex)
 Removes a connection pin. More...
 
- Public Member Functions inherited from IlvGrapherPin
 IlvGrapherPin ()
 Constructor. More...
 
virtual ~IlvGrapherPin ()
 Destructor. More...
 
virtual void drawGhost (IlvPort *dst, IlvPalette *palette, const IlvGraphic *node, const IlvTransformer *t) const
 Displays a ghost image of the connection pins. More...
 
virtual IlBoolean getLinkLocation (const IlvGraphic *node, const IlvGraphic *link, const IlvTransformer *t, IlvPoint &returnPoint) const
 Returns the connection point of a given link. More...
 
IlvGraphic *const * getLinks (const IlvGraphic *node, IlUInt pinIndex, IlBoolean from, IlUInt &count) const
 Returns all the links attached to a given connection pin. More...
 
virtual IlUInt getPinIndex (const IlvGraphic *link, IlBoolean from)
 Returns the index of the connection pin for a given link. More...
 
void removeLink (const IlvGraphic *node, const IlvGraphic *link, IlBoolean from)
 Removes a link connected to a pin. More...
 
IlvGrapherPinset (IlvGraphic *node)
 Associates the instance with a graphic node. More...
 
virtual void setPinIndex (const IlvGraphic *link, IlUInt pinIndex, IlBoolean from)
 Sets the connection pin for a given link. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from IlvGrapherPin
static IlvGrapherPinGet (const IlvGraphic *node)
 Returns the IlvGrapherPin instance associated with a given node. More...
 
static IlvGrapherPinRemove (IlvGraphic *node)
 Removes the IlvGrapherPin instance associated with a given node. More...
 

Detailed Description

Predefined IlvGrapherPin subclass.

Library: ilvgrapher

IlvGenericPin is a predefined IlvGrapherPin subclass that handles a collection of connection pins that can be dynamically associated/removed from a node. The pin locations are specified with a point in the same coordinate system as their associated node.

See Also
IlvPinEditorInteractor.

Constructor & Destructor Documentation

IlvGenericPin::IlvGenericPin ( )

Constructor.

Initializes a new empty instance of IlvGenericPin.

Member Function Documentation

IlUInt IlvGenericPin::addPin ( const IlvGraphic node,
const IlvPoint p,
const IlvTransformer t 
)

Adds a new connection pin.

The location of the new pin is specified by its desired location p on the node node when it is displayed by the transformer t. The node parameter must be the node with which the current object is attached.

Parameters
nodeThe node with which the pin is associated.
pThe location of the new pin.
tThe transformer applied to the node.
Returns
The index of the new connection pin or IlvBadIndex if none could be attached to this position.
virtual IlUInt IlvGenericPin::getCardinal ( const IlvGraphic node,
const IlvTransformer t 
) const
virtual

Returns the number of connection pins handled by the instance.

Returns the number of connection pins available for the node node, when displayed with the transformer t. This method has to be defined in subclasses.

Parameters
nodeThe node this instance is associated with.
tThe transformer applied to the node.
Returns
The number of connection pins handled by the instance.

Reimplemented from IlvGrapherPin.

virtual IlBoolean IlvGenericPin::getClosest ( const IlvGraphic node,
const IlvPoint p,
const IlvTransformer t,
IlvPoint returnPoint,
IlUInt pinIndex 
) const
virtual

Returns the closest connection pin from a given point.

Returns, in the parameter returnPoint, the coordinates of the connection pin closest to the point p when node is displayed after transformer t is applied. The corresponding pin index is stored in pinIndex. The default implementation uses the IlvGrapherPin::getLocation method for all connection pins and returns the closest point found.

Parameters
nodeThe node this instance is associated with.
pThe reference point.
tThe transformer applied to the node.
returnPointThe coordinate of the closest connection pin.
pinIndexThe index of the closest connection pin.
Returns
IlTrue if a connection pin was found, IlFalse otherwise.

Reimplemented from IlvGrapherPin.

virtual IlBoolean IlvGenericPin::getLocation ( IlUInt  pinIndex,
const IlvGraphic node,
const IlvTransformer t,
IlvPoint returnPoint 
) const
virtual

Returns the coordinates of a connection pin.

Returns, in the parameter returnPoint, the coordinates of the connection pin that has the index pinIndex on the node node, when displayed after transformer t is applied. This method has to be defined in subclasses.

Parameters
pinIndexThe index of the considered pin.
nodeThe node this instance is associated with.
tThe transformer applied to the node.
returnPointThe coordinates of the connection point.
Returns
IlTrue if there is a connecting pin at the index pinIndex for the node node, and IlFalse otherwise.

Reimplemented from IlvGrapherPin.

IlBoolean IlvGenericPin::movePin ( IlUInt  pinIndex,
const IlvGraphic node,
const IlvPoint p,
const IlvTransformer t 
)

Changes the location of an existing connection pin.

Allows you to modify the location of the connection pin at index pinIndex. The node parameter must be The node with which the current object is attached.

Parameters
idxThe index of the considered pin.
nodeThe node with which the pin is associated.
pThe new location of the pin.
tThe transformer applied to the node.
Returns
A Boolean value indicating whether the new location has been successfully set.
void IlvGenericPin::removePin ( IlUInt  pinIndex)

Removes a connection pin.

Disconnects all links attached to the pin at index pinIndex. Also, all other link-pin connections can be re-indexed by this method.

Parameters
pinIndexThe index of the considered pin.

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