rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Data Access Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IliDbGrapher Class Reference

Gadget. More...

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

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

List of all members.

Public Member Functions

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

Static Public Member Functions

static IlvSymbol * LinkDoubleClickedSymbol ()
 Returns the callback name that will be called by the corresponding virtual member functions.
static IlvSymbol * NodeDoubleClickedSymbol ()
 Returns the callback name that will be called by the corresponding virtual member functions.
static IlvSymbol * NodeMovedSymbol ()
 Returns the callback name that will be called by the corresponding virtual member functions.
static IlvSymbol * PrepareDeleteObjectSymbol ()
 Returns the callback name that will be called by the corresponding virtual member functions.

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:
display The display.
rect The location.
palette The 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:
sink The error sink.
forNode If 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  ) 

Returns the default object created for a link.

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

Returns the default object created for a node.

Parameters:
buff The 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:
tag The color tag.
Returns:
The color.
IlInt IliDbGrapher::getColumnIndex ( IliGrapherColumn  tag  )  const

Returns the column index for a grapher column.

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

Returns the column name for a grapher column.

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

Returns the callback to create an object.

Parameters:
forNode If 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:
forNode If 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:
forNode If 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:
forNode If 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.
IliLinkType 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:
forNode If 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:
forNode If 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:
buff The parameters of the link.
virtual IlvGraphic* IliDbGrapher::onCreateObjectNode ( IliTableBuffer buff  )  [virtual]

Called to create a node.

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

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

Parameters:
buff The parameters of the link.
g Not 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:
buff The parameters of the node.
g Not 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:
g The link that must updated.
buff The 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:
g The node that must be updated.
buff The 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:
propagate If IlTrue, the deletion events are propagated.
void IliDbGrapher::propagateNodeRename ( IlBoolean  propagate  ) 

Enables or disables the option to propagate node rename events.

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

Refreshes the display of all links.

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

Removes an error sink from this grapher.

Parameters:
sink The error sink.
forNode If 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:
list The 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:
name The picture file name.
reload If 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:
name The bitmap name.
void IliDbGrapher::setColor ( IliGrapherColor  tag,
IlvColor color 
)

Sets a grapher color.

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

Sets the column name for a grapher column.

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

Sets a callback to create a node or a link.

Parameters:
cb The callback.
arg The user data.
forNode If 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:
cb The callback.
arg The user data.
forNode If 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:
flag If 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:
reporter The error reporter.
void IliDbGrapher::setLinkDataSource ( IliDataSource ds  ) 

Sets the data source for links.

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

Sets the data source name for links.

Parameters:
name The data source name.
void IliDbGrapher::setLinkType ( IliLinkType  typ,
IlBoolean  oriented = IlFalse 
)

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

Parameters:
typ The link type.
oriented If IlTrue, the link is oriented.
void IliDbGrapher::setNodeDataSource ( IliDataSource ds  ) 

Sets the data source for nodes.

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

Sets the data source name for nodes.

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

Sets a callback to update a node or link.

Parameters:
cb The callback.
arg The user data.
forNode If 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:
support If IlTrue, the out of order events are supported.
 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.