Rogue Wave Views 5.6 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
Generic class to specify any graphic object as a grapher link. More...
#include <ilviews/grapher/linkhand.h>
Public Member Functions | |
IlvLinkHandle (IlvDisplay *display, IlvGraphic *object, IlvGraphic *from, IlvGraphic *to, IlvDim width=0, IlBoolean owner=IlTrue, IlvPalette *palette=0) | |
Constructor. More... | |
IlvGraphic * | getObject () const |
Returns the referenced object. More... | |
IlvDim | getWidth () const |
Returns the width of the link. More... | |
IlBoolean | isOwner () const |
Indicates whether the handle owns its referenced object. More... | |
IlBoolean | isUsingLinkPalette () const |
Indicates whether the referenced object is drawn with the palette of the link. More... | |
void | setObject (IlvGraphic *object) |
Changes the referenced object. More... | |
void | setOwner (IlBoolean owner) |
Changes the ownership of the handle. More... | |
void | setWidth (IlvDim width) |
Sets the width of the link. More... | |
void | useLinkPalette (IlBoolean use) |
Changes the drawing mode of the referenced object. More... | |
virtual IlBoolean | zoomable () const |
Returns the zoomable property of the link. More... | |
Public Member Functions inherited from IlvLinkImage | |
IlvLinkImage (IlvDisplay *display, IlBoolean oriented, IlvGraphic *from, IlvGraphic *to, IlvPalette *palette=0) | |
Constructor. More... | |
virtual void | computePoints (IlvPoint &src, IlvPoint &dst, const IlvTransformer *t=0) const |
Computes the endpoints of the link when it is drawn as a straight line. More... | |
IlvGraphic * | getFrom () const |
Returns the start node. More... | |
virtual IlvPoint * | getLinkPoints (IlUInt &nPoints, const IlvTransformer *t=0) const |
Returns the points defining the shape of the link. More... | |
IlvGraphic * | getTo () const |
Returns the end node. More... | |
IlBoolean | isOriented () const |
Indicates whether the link is oriented. More... | |
void | setFrom (IlvGraphic *f) |
Sets the start node. More... | |
void | setOriented (IlBoolean oriented) |
Changes the oriented mode. More... | |
void | setTo (IlvGraphic *t) |
Sets the end node. More... | |
Generic class to specify any graphic object as a grapher link.
Library: ilvgrapher
An IlvLinkHandle
object is used to reference an IlvGraphic
object as a link. The object will be drawn as a link using:
IlvLinkHandle
palette. The IlvLinkHandle
object is called the handle object. The other object is called the referenced object. Several IlvLinkHandle
objects may reference the same IlvGraphic
object. An IlvLinkHandle
instance may be the owner of the referenced object. In this case, deleting the handle also deletes the referenced object. In the other case, the referenced object is left intact.
IlvGrapher
, IlvGrapher::makeLink
. IlvLinkHandle::IlvLinkHandle | ( | IlvDisplay * | display, |
IlvGraphic * | object, | ||
IlvGraphic * | from, | ||
IlvGraphic * | to, | ||
IlvDim | width = 0 , |
||
IlBoolean | owner = IlTrue , |
||
IlvPalette * | palette = 0 |
||
) |
Constructor.
The constructor initializes an instance of the IlvLinkHandle
class. This instantiation references the object object
so that it behaves like a link between node from
and node to
.
Setting width to a value other than 0
forces the width of the link, whereas a null value allows the link to compute its width according to the width of the faces of the nodes to which it is attached.
Set owner to IlTrue
to make the handle object the owner of the referenced object.
The palette palette will be the one used to draw the referenced object if IlvLinkHandle::isLinkPaletteUsed
returns IlTrue
.
display | The display connection that will handle the drawing of the object. |
from | The IlvGraphic object representing the start node of the link. |
to | The IlvGraphic object representing the end node of the link. |
width | The width of the link (0 if the width must be automatically computed). |
owner | A Boolean value indicating whether the handle owns its referenced object. |
palette | The palette used to draw the link. |
IlvGraphic* IlvLinkHandle::getObject | ( | ) | const |
Returns the referenced object.
IlvDim IlvLinkHandle::getWidth | ( | ) | const |
Returns the width of the link.
A null width means that it is computed dynamically according to the width of the faces of the nodes this link is attached to.
IlBoolean IlvLinkHandle::isOwner | ( | ) | const |
Indicates whether the handle owns its referenced object.
IlTrue
if the handle owns the referenced object, and IlFalse
otherwise. IlBoolean IlvLinkHandle::isUsingLinkPalette | ( | ) | const |
Indicates whether the referenced object is drawn with the palette of the link.
Indicates which palette is used to draw the referenced object. It can be one of the following:
IlvSimpleGraphic::drawPalette
IlvGraphic::draw
IlTrue
if the referenced object is drawn with the palette of the link and IlFalse
if it is drawn with its own palette. useLinkPalette
. void IlvLinkHandle::setObject | ( | IlvGraphic * | object | ) |
Changes the referenced object.
object | The new referenced object. |
void IlvLinkHandle::setOwner | ( | IlBoolean | owner | ) |
Changes the ownership of the handle.
If owner is set to IlTrue
, then the handle owns its referenced object and will delete it when it is itself destroyed.
owner | A Boolean value indicating whether the handle owns its referenced object. |
void IlvLinkHandle::setWidth | ( | IlvDim | width | ) |
Sets the width of the link.
Sets the value of the width of the link to width
. If it is null, then the width is dynamically computed according to the width of the faces of the nodes this link is attached to.
width | The current width. |
void IlvLinkHandle::useLinkPalette | ( | IlBoolean | use | ) |
Changes the drawing mode of the referenced object.
use | A Boolean value indicating whether the referenced object should be drawn with the palette of the link (IlTrue ), or with its own palette (IlFalse ). |
isUsingLinkPalette
.
|
virtual |
Returns the zoomable property of the link.
A link is considered zoomable if both its start and end nodes are zoomable.
IlTrue
if the link is zoomable and IlFalse
otherwise. Reimplemented from IlvLinkImage.
© 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.