rwlogo

Rogue Wave Views
Data Access Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

 All Classes Files Functions Variables Typedefs Enumerations Enumerator
List of all members | Public Member Functions | Static Public Member Functions
IliDbGrapher Class Reference

Gadget. More...

#include <ilviews/dataccess/gadgets/dbgraphe.h>

Inheritance diagram for IliDbGrapher:
IlvSCGrapherRectangle IlvSCManagerRectangle IlvManagerRectangle IlvViewRectangle IlvFilledRectangle IlvRectangle IlvSimpleGraphic IlvGraphic

Public Member Functions

 IliDbGrapher (IlvDisplay *display, const IlvRect &rect, IlvPalette *palette=0)
 Initializes an IliDbGrapher object. More...
 
void addErrorSink (IliErrorSink *sink, IlBoolean forNode)
 Adds an error sink. More...
 
IlBoolean areOutOfOrderEventsSupported () const
 Returns IlTrue if the out of order events are supported. More...
 
IlvLinkImagecreateDefaultObjectLink (IliTableBuffer *buff)
 Returns the default object created for a link. More...
 
IlvGraphiccreateDefaultObjectNode (IliTableBuffer *buff)
 Returns the default object created for a node. More...
 
void dontDeleteObject ()
 Call this member function from the onPrepareDeleteObject virtual member function or from the corresponding callback to cancel the object deletion.
 
const char * getBackgroundPictureName () const
 Returns the background picture name. More...
 
const char * getBitmapName ()
 Returns the default bitmap name for nodes. More...
 
IlvColorgetColor (IliGrapherColor tag) const
 Returns a grapher color. More...
 
IlInt getColumnIndex (IliGrapherColumn tag) const
 Returns the column index for a grapher column. More...
 
const char * getColumnName (IliGrapherColumn tag) const
 Returns the column name for a grapher column. More...
 
IliCreateObjectCallback getCreateObjectCallback (IlBoolean forNode=IlTrue) const
 Returns the callback to create an object. More...
 
IlAny getCreateObjectData (IlBoolean forNode=IlTrue) const
 Returns the user data to create an object. More...
 
IliDefineObjectCallback getDefineObjectCallback (IlBoolean forNode=IlTrue) const
 Returns the callback to define the object parameter just before appending into the data source. More...
 
IlAny getDefineObjectData (IlBoolean forNode=IlTrue) const
 Returns the user data to define an object. More...
 
IliErrorReportergetErrorReporter () const
 Returns the error reporter that is used by the reportErrors member functions. More...
 
IliDataSourcegetLinkDataSource () const
 Returns the data source for links. More...
 
const char * getLinkDataSourceName () const
 Returns the data source name for links. More...
 
IliGrapherLinkType getLinkType () const
 Returns the link type. More...
 
IliDataSourcegetNodeDataSource () const
 Returns the data source for nodes. More...
 
const char * getNodeDataSourceName () const
 Returns the data source name for nodes. More...
 
const char * getObjectNameDoubleClicked () const
 Returns the object name that has been double-clicked. More...
 
const char * getObjectNameMoved () const
 Returns the object name that has been moved. More...
 
const char * getObjectNamePrepareDeleted () const
 Returns the object name that will be deleted. More...
 
IliUpdateObjectCallback getUpdateObjectCallback (IlBoolean forNode=IlTrue) const
 Returns the callback to update an object. More...
 
IlAny getUpdateObjectData (IlBoolean forNode=IlTrue) const
 Returns the user data to update an object. More...
 
IlBoolean isLinkOriented () const
 Returns IlTrue if the links are oriented. More...
 
IlBoolean isNameDisplayed () const
 Returns IlTrue if the name display of nodes is on. More...
 
IlBoolean isNodeDeletetionPropagated () const
 Returns IlTrue if the node deletion events are propagated. More...
 
IlBoolean isNodeRenamePropagated () const
 Returns IlTrue if the node rename events are propagated. More...
 
virtual IlvLinkImageonCreateObjectLink (IliTableBuffer *buff)
 Called to create a node. More...
 
virtual IlvGraphiconCreateObjectNode (IliTableBuffer *buff)
 Called to create a node. More...
 
virtual IlBoolean onDefineLink (IliTableBuffer *buff, IlvGraphic *g=0)
 Called to define the parameter of the link just before appending into the data source. More...
 
virtual IlBoolean onDefineNode (IliTableBuffer *buff, IlvGraphic *g=0)
 Called to define the parameter of the node just before appending into the data source. More...
 
virtual void onLinkDoubleClicked ()
 Called just after a link has been double-clicked. More...
 
virtual void onNodeDoubleClicked ()
 Called just after a node has been double-clicked. More...
 
virtual void onNodeMoved ()
 Called just after a node has been moved. More...
 
virtual void onPrepareDeleteObject ()
 Called just before the deletion of an object. More...
 
virtual IlvGraphiconUpdateObjectLink (IlvGraphic *g, IliTableBuffer *buff)
 Called to update a link. More...
 
virtual IlvGraphiconUpdateObjectNode (IlvGraphic *g, IliTableBuffer *buff)
 Called to update a node. More...
 
void propagateNodeDeletion (IlBoolean propagate)
 Enables or disables the option to propagate node deletion events. More...
 
void propagateNodeRename (IlBoolean propagate)
 Enables or disables the option to propagate node rename events. More...
 
void refreshAll ()
 Refreshes the display of all nodes and all links.
 
void refreshAllLinks (IlBoolean del=IlFalse)
 Refreshes the display of all links. More...
 
void refreshAllNodes ()
 Refreshes the display of all nodes.
 
void removeErrorSink (IliErrorSink *sink, IlBoolean forNode)
 Removes an error sink from this grapher. More...
 
void reportErrors (const IliErrorList &list) const
 Reports the errors that are contained in a list error. More...
 
void setBackgroundPictureName (const char *name, IlBoolean reload=IlFalse)
 Sets the background picture name. More...
 
void setBitmapName (const char *name)
 Sets the default bitmap name for nodes. More...
 
void setColor (IliGrapherColor tag, IlvColor *color)
 Sets a grapher color. More...
 
void setColumnName (IliGrapherColumn tag, const char *col)
 Sets the column name for a grapher column. More...
 
void setCreateObjectCallback (IliCreateObjectCallback cb, IlAny arg, IlBoolean forNode=IlTrue)
 Sets a callback to create a node or a link. More...
 
void setDefineObjectCallback (IliDefineObjectCallback cb, IlAny arg, IlBoolean forNode=IlTrue)
 Sets a callback to define the node (or link) parameter just before appending into the data source. More...
 
void setDisplayName (IlBoolean flag)
 Enables or disables the name display of nodes. More...
 
void setErrorReporter (IliErrorReporter *reporter)
 Sets the error reporter. More...
 
void setLinkDataSource (IliDataSource *ds)
 Sets the data source for links. More...
 
void setLinkDataSourceName (const char *name)
 Sets the data source name for links. More...
 
void setLinkType (IliGrapherLinkType type, IlBoolean oriented=IlFalse)
 Sets the link type and indicates if the links are oriented or not. More...
 
void setNodeDataSource (IliDataSource *ds)
 Sets the data source for nodes. More...
 
void setNodeDataSourceName (const char *name)
 Sets the data source name for nodes. More...
 
void setUpdateObjectCallback (IliUpdateObjectCallback cb, IlAny arg, IlBoolean forNode=IlTrue)
 Sets a callback to update a node or link. More...
 
void supportsOutOfOrderEvents (IlBoolean support)
 Enables or disables the option to support out of order events (creating a link before a node). More...
 

Static Public Member Functions

static IlvSymbolLinkDoubleClickedSymbol ()
 Returns the callback name that will be called by the corresponding virtual member functions. More...
 
static IlvSymbolNodeDoubleClickedSymbol ()
 Returns the callback name that will be called by the corresponding virtual member functions. More...
 
static IlvSymbolNodeMovedSymbol ()
 Returns the callback name that will be called by the corresponding virtual member functions. More...
 
static IlvSymbolPrepareDeleteObjectSymbol ()
 Returns the callback name that will be called by the corresponding virtual member functions. More...
 

Detailed Description

Gadget.

Library: dbgraphe

The IliDbGrapher class defines a grapher gadget connected to two data sources (one for nodes and one for links). The following function keys are predefined:

See Also
IliGrapher

Constructor & Destructor Documentation

IliDbGrapher::IliDbGrapher ( IlvDisplay display,
const IlvRect rect,
IlvPalette palette = 0 
)

Initializes an IliDbGrapher object.

Parameters
displayThe display.
rectThe location.
paletteThe palette.

Member Function Documentation

void IliDbGrapher::addErrorSink ( IliErrorSink sink,
IlBoolean  forNode 
)

Adds an error sink.

All errors that occur on the grapher will be forwarded to this error sink. Note that the grapher will not delete the error sink at destruction time, so the same error sink can be safely shared by many graphers.

Parameters
sinkThe error sink.
forNodeIf IlTrue, the error sink is for nodes, otherwise it is for links.
IlBoolean IliDbGrapher::areOutOfOrderEventsSupported ( ) const

Returns IlTrue if the out of order events are supported.

The default value is IlTrue.

Returns
IlTrue if the out of order events are supported.
IlvLinkImage* IliDbGrapher::createDefaultObjectLink ( IliTableBuffer buff)

Returns the default object created for a link.

Parameters
buffThe link parameters.
Returns
The object.
IlvGraphic* IliDbGrapher::createDefaultObjectNode ( IliTableBuffer buff)

Returns the default object created for a node.

Parameters
buffThe node parameters.
Returns
The object.
const char* IliDbGrapher::getBackgroundPictureName ( ) const

Returns the background picture name.

Returns
The picture name.
const char* IliDbGrapher::getBitmapName ( )

Returns the default bitmap name for nodes.

Returns
The bitmap name.
IlvColor* IliDbGrapher::getColor ( IliGrapherColor  tag) const

Returns a grapher color.

Parameters
tagThe color tag.
Returns
The color.
IlInt IliDbGrapher::getColumnIndex ( IliGrapherColumn  tag) const

Returns the column index for a grapher column.

Parameters
tagThe column tag.
Returns
The column index.
const char* IliDbGrapher::getColumnName ( IliGrapherColumn  tag) const

Returns the column name for a grapher column.

Parameters
tagThe column tag.
Returns
The column name.
IliCreateObjectCallback IliDbGrapher::getCreateObjectCallback ( IlBoolean  forNode = IlTrue) const

Returns the callback to create an object.

Parameters
forNodeIf IlTrue, the callback is used for a node, otherwise for a link.
Returns
The callback.
IlAny IliDbGrapher::getCreateObjectData ( IlBoolean  forNode = IlTrue) const

Returns the user data to create an object.

Parameters
forNodeIf IlTrue, the user data are used for a node, otherwise for a link.
Returns
The user data.
IliDefineObjectCallback IliDbGrapher::getDefineObjectCallback ( IlBoolean  forNode = IlTrue) const

Returns the callback to define the object parameter just before appending into the data source.

Parameters
forNodeIf IlTrue, the callback is used for a node, otherwise for a link.
Returns
The callback.
IlAny IliDbGrapher::getDefineObjectData ( IlBoolean  forNode = IlTrue) const

Returns the user data to define an object.

Parameters
forNodeIf IlTrue, the user data are used for a node, otherwise for a link.
Returns
The user data.
IliErrorReporter* IliDbGrapher::getErrorReporter ( ) const

Returns the error reporter that is used by the reportErrors member functions.

When this property is NULL, a default error reporter is used. Initially, this property is NULL.

Returns
The error reporter.
IliDataSource* IliDbGrapher::getLinkDataSource ( ) const

Returns the data source for links.

Returns
The data source.
const char* IliDbGrapher::getLinkDataSourceName ( ) const

Returns the data source name for links.

Returns
The data source name.
IliGrapherLinkType IliDbGrapher::getLinkType ( ) const

Returns the link type.

Returns
The link type.
IliDataSource* IliDbGrapher::getNodeDataSource ( ) const

Returns the data source for nodes.

Returns
The data source.
const char* IliDbGrapher::getNodeDataSourceName ( ) const

Returns the data source name for nodes.

Returns
The data source name.
const char* IliDbGrapher::getObjectNameDoubleClicked ( ) const

Returns the object name that has been double-clicked.

Returns
The name.
const char* IliDbGrapher::getObjectNameMoved ( ) const

Returns the object name that has been moved.

Returns
The name.
const char* IliDbGrapher::getObjectNamePrepareDeleted ( ) const

Returns the object name that will be deleted.

Returns
The name.
IliUpdateObjectCallback IliDbGrapher::getUpdateObjectCallback ( IlBoolean  forNode = IlTrue) const

Returns the callback to update an object.

Parameters
forNodeIf IlTrue, the callback is used for a node, otherwise for a link.
Returns
The callback.
IlAny IliDbGrapher::getUpdateObjectData ( IlBoolean  forNode = IlTrue) const

Returns the user data to update an object.

Parameters
forNodeIf IlTrue, the user data are used for a node, otherwise for a link.
Returns
The user data.
IlBoolean IliDbGrapher::isLinkOriented ( ) const

Returns IlTrue if the links are oriented.

Returns
IlTrue if the links are oriented.
IlBoolean IliDbGrapher::isNameDisplayed ( ) const

Returns IlTrue if the name display of nodes is on.

The default value is IlTrue.

Returns
IlTrue if the name display of nodes is on.
IlBoolean IliDbGrapher::isNodeDeletetionPropagated ( ) const

Returns IlTrue if the node deletion events are propagated.

The default value is IlTrue.

Returns
IlTrue if the node deletion events are propagated.
IlBoolean IliDbGrapher::isNodeRenamePropagated ( ) const

Returns IlTrue if the node rename events are propagated.

The default value is IlTrue.

Returns
IlTrue if the node rename events are propagated.
static IlvSymbol* IliDbGrapher::LinkDoubleClickedSymbol ( )
static

Returns the callback name that will be called by the corresponding virtual member functions.

Returns
The callback name.
static IlvSymbol* IliDbGrapher::NodeDoubleClickedSymbol ( )
static

Returns the callback name that will be called by the corresponding virtual member functions.

Returns
The callback name.
static IlvSymbol* IliDbGrapher::NodeMovedSymbol ( )
static

Returns the callback name that will be called by the corresponding virtual member functions.

Returns
The callback name.
virtual IlvLinkImage* IliDbGrapher::onCreateObjectLink ( IliTableBuffer buff)
virtual

Called to create a node.

Parameters
buffThe parameters of the link.
virtual IlvGraphic* IliDbGrapher::onCreateObjectNode ( IliTableBuffer buff)
virtual

Called to create a node.

Parameters
buffThe parameters of the node.
Returns
The node.
virtual IlBoolean IliDbGrapher::onDefineLink ( IliTableBuffer buff,
IlvGraphic g = 0 
)
virtual

Called to define the parameter of the link just before appending into the data source.

Parameters
buffThe parameters of the link.
gNot NULL if the link is already created in the grapher.
Returns
IlTrue if successful.
virtual IlBoolean IliDbGrapher::onDefineNode ( IliTableBuffer buff,
IlvGraphic g = 0 
)
virtual

Called to define the parameter of the node just before appending into the data source.

Parameters
buffThe parameters of the node.
gNot NULL if the node is already created in the grapher.
Returns
IlTrue if successful.
virtual void IliDbGrapher::onLinkDoubleClicked ( )
virtual

Called just after a link has been double-clicked.

The name of the link can be retrieved with the getObjectNameDoubleClicked member function.

virtual void IliDbGrapher::onNodeDoubleClicked ( )
virtual

Called just after a node has been double-clicked.

The name of the node can be retrieved with the getObjectNameDoubleClicked member function.

virtual void IliDbGrapher::onNodeMoved ( )
virtual

Called just after a node has been moved.

The name of the moved node can be retrieved with the getObjectNameMoved member function.

virtual void IliDbGrapher::onPrepareDeleteObject ( )
virtual

Called just before the deletion of an object.

The getObjectNamePrepareDeleted can be used to get the object name.

virtual IlvGraphic* IliDbGrapher::onUpdateObjectLink ( IlvGraphic g,
IliTableBuffer buff 
)
virtual

Called to update a link.

Parameters
gThe link that must updated.
buffThe new definition of the link.
Returns
The result of the call of the defined callback with the setUpdateObjectCallback function if the callback exists. Otherwise, returns a new link object to replace the previous object that will be deleted.
virtual IlvGraphic* IliDbGrapher::onUpdateObjectNode ( IlvGraphic g,
IliTableBuffer buff 
)
virtual

Called to update a node.

Parameters
gThe node that must be updated.
buffThe new definition of the node.
Returns
The result of the call of the defined callback with the setUpdateObjectCallback function if the callback exists. Otherwise, returns a new node object to replace the previous object that will be deleted.
static IlvSymbol* IliDbGrapher::PrepareDeleteObjectSymbol ( )
static

Returns the callback name that will be called by the corresponding virtual member functions.

Returns
The callback name.
void IliDbGrapher::propagateNodeDeletion ( IlBoolean  propagate)

Enables or disables the option to propagate node deletion events.

Parameters
propagateIf IlTrue, the deletion events are propagated.
void IliDbGrapher::propagateNodeRename ( IlBoolean  propagate)

Enables or disables the option to propagate node rename events.

Parameters
propagateIf IlTrue, the rename events are propagated.
void IliDbGrapher::refreshAllLinks ( IlBoolean  del = IlFalse)

Refreshes the display of all links.

Parameters
delIf IlTrue, all links of the grapher are deleted.
void IliDbGrapher::removeErrorSink ( IliErrorSink sink,
IlBoolean  forNode 
)

Removes an error sink from this grapher.

Parameters
sinkThe error sink.
forNodeIf IlTrue, the error sink is for nodes, otherwise it is for links.
void IliDbGrapher::reportErrors ( const IliErrorList list) const

Reports the errors that are contained in a list error.

This member function makes use of the error reporter returned by getErrorReporter, if any. Otherwise, it uses a default error reporter.

Parameters
listThe error list.
void IliDbGrapher::setBackgroundPictureName ( const char *  name,
IlBoolean  reload = IlFalse 
)

Sets the background picture name.

The file must be an ILV file. The picture is loaded if the previous file name is different or if the parameter reload is IlTrue.

Parameters
nameThe picture file name.
reloadIf IlTrue the picture is loaded even if it is the same picture file name.
void IliDbGrapher::setBitmapName ( const char *  name)

Sets the default bitmap name for nodes.

Parameters
nameThe bitmap name.
void IliDbGrapher::setColor ( IliGrapherColor  tag,
IlvColor color 
)

Sets a grapher color.

Parameters
tagThe color tag.
colorThe color.
void IliDbGrapher::setColumnName ( IliGrapherColumn  tag,
const char *  col 
)

Sets the column name for a grapher column.

Parameters
tagThe column tag.
colThe column name.
void IliDbGrapher::setCreateObjectCallback ( IliCreateObjectCallback  cb,
IlAny  arg,
IlBoolean  forNode = IlTrue 
)

Sets a callback to create a node or a link.

Parameters
cbThe callback.
argThe user data.
forNodeIf IlTrue, the callback is used for a node, otherwise for a link.
void IliDbGrapher::setDefineObjectCallback ( IliDefineObjectCallback  cb,
IlAny  arg,
IlBoolean  forNode = IlTrue 
)

Sets a callback to define the node (or link) parameter just before appending into the data source.

Parameters
cbThe callback.
argThe user data.
forNodeIf IlTrue, the callback is used for a node, otherwise for a link.
void IliDbGrapher::setDisplayName ( IlBoolean  flag)

Enables or disables the name display of nodes.

Parameters
flagIf IlTrue, the names are displayed.
void IliDbGrapher::setErrorReporter ( IliErrorReporter reporter)

Sets the error reporter.

Note that the grapher will not delete the error reporter at destruction time, so the same error reporter can be safely shared by many graphers.

Parameters
reporterThe error reporter.
void IliDbGrapher::setLinkDataSource ( IliDataSource ds)

Sets the data source for links.

Parameters
dsThe data source.
void IliDbGrapher::setLinkDataSourceName ( const char *  name)

Sets the data source name for links.

Parameters
nameThe data source name.
void IliDbGrapher::setLinkType ( IliGrapherLinkType  type,
IlBoolean  oriented = IlFalse 
)

Sets the link type and indicates if the links are oriented or not.

Parameters
typeThe link type.
orientedIf IlTrue, the link is oriented.
void IliDbGrapher::setNodeDataSource ( IliDataSource ds)

Sets the data source for nodes.

Parameters
dsThe data source.
void IliDbGrapher::setNodeDataSourceName ( const char *  name)

Sets the data source name for nodes.

Parameters
nameThe data source name.
void IliDbGrapher::setUpdateObjectCallback ( IliUpdateObjectCallback  cb,
IlAny  arg,
IlBoolean  forNode = IlTrue 
)

Sets a callback to update a node or link.

Parameters
cbThe callback.
argThe user data.
forNodeIf IlTrue, the callback is used for a node, otherwise for a link.
void IliDbGrapher::supportsOutOfOrderEvents ( IlBoolean  support)

Enables or disables the option to support out of order events (creating a link before a node).

Parameters
supportIf IlTrue, the out of order events are supported.

© Copyright 2015, 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.