rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Grapher Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvLinkHandle Class Reference

Generic class to specify any graphic object as a grapher link. More...

#include <ilviews/grapher/linkhand.h>

Inheritance diagram for IlvLinkHandle:
IlvLinkImage IlvSimpleGraphic IlvGraphic

List of all members.

Public Member Functions

 IlvLinkHandle (IlvDisplay *display, IlvGraphic *object, IlvGraphic *from, IlvGraphic *to, IlvDim width=0, IlBoolean owner=IlTrue, IlvPalette *palette=0)
 Constructor.
IlvGraphicgetObject () const
 Returns the referenced object.
IlvDim getWidth () const
 Returns the width of the link.
IlBoolean isOwner () const
 Indicates whether the handle owns its referenced object.
IlBoolean isUsingLinkPalette () const
 Indicates whether the referenced object is drawn with the palette of the link.
void setObject (IlvGraphic *object)
 Changes the referenced object.
void setOwner (IlBoolean owner)
 Changes the ownership of the handle.
void setWidth (IlvDim width)
 Sets the width of the link.
void useLinkPalette (IlBoolean use)
 Changes the drawing mode of the referenced object.
virtual IlBoolean zoomable () const
 Returns the zoomable property of the link.

Detailed Description

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:

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.

See also:
IlvGrapher, IlvGrapher::makeLink.

Constructor & Destructor Documentation

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.

Parameters:
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.

Member Function Documentation

IlvGraphic* IlvLinkHandle::getObject (  )  const

Returns the referenced object.

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.

Returns:
The width of the link.
IlBoolean IlvLinkHandle::isOwner (  )  const

Indicates whether the handle owns its referenced object.

Returns:
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:

  • The palette of the link, in which case the referenced object is drawn using the method IlvSimpleGraphic::drawPalette
  • The palette of the referenced object itself, in which case it is drawn using the method IlvGraphic::draw
Returns:
IlTrue if the referenced object is drawn with the palette of the link and IlFalse if it is drawn with its own palette.
See also:
useLinkPalette.
void IlvLinkHandle::setObject ( IlvGraphic object  ) 

Changes the referenced object.

Warning:
[note] You can share a referenced object as long as it is not owned by any of its handles.
Parameters:
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.

Parameters:
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.

Parameters:
width The current width.
void IlvLinkHandle::useLinkPalette ( IlBoolean  use  ) 

Changes the drawing mode of the referenced object.

Parameters:
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).
See also:
isUsingLinkPalette.
virtual IlBoolean IlvLinkHandle::zoomable (  )  const [virtual]

Returns the zoomable property of the link.

A link is considered zoomable if both its start and end nodes are zoomable.

Returns:
IlTrue if the link is zoomable and IlFalse otherwise.

Reimplemented from IlvLinkImage.

 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.