Rogue Wave Views 5.6 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
Gadget. More...
#include <ilviews/dataccess/gadgets/dbgraphe.h>
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... | |
IlvLinkImage * | createDefaultObjectLink (IliTableBuffer *) |
Returns the default object created for a link. More... | |
IlvGraphic * | createDefaultObjectNode (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... | |
IlvColor * | getColor (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... | |
IliErrorReporter * | getErrorReporter () const |
Returns the error reporter that is used by the reportErrors member functions. More... | |
IliDataSource * | getLinkDataSource () 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... | |
IliDataSource * | getNodeDataSource () 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 IlvLinkImage * | onCreateObjectLink (IliTableBuffer *buff) |
Called to create a node. More... | |
virtual IlvGraphic * | onCreateObjectNode (IliTableBuffer *buff) |
Called to create a node. More... | |
virtual IlBoolean | onDefineLink (IliTableBuffer *, IlvGraphic *=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 IlvGraphic * | onUpdateObjectLink (IlvGraphic *g, IliTableBuffer *buff) |
Called to update a link. More... | |
virtual IlvGraphic * | onUpdateObjectNode (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 typ, 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 IlvSymbol * | LinkDoubleClickedSymbol () |
Returns the callback name that will be called by the corresponding virtual member functions. More... | |
static IlvSymbol * | NodeDoubleClickedSymbol () |
Returns the callback name that will be called by the corresponding virtual member functions. More... | |
static IlvSymbol * | NodeMovedSymbol () |
Returns the callback name that will be called by the corresponding virtual member functions. More... | |
static IlvSymbol * | PrepareDeleteObjectSymbol () |
Returns the callback name that will be called by the corresponding virtual member functions. More... | |
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:
IliDbGrapher::IliDbGrapher | ( | IlvDisplay * | display, |
const IlvRect & | rect, | ||
IlvPalette * | palette = 0 |
||
) |
Initializes an IliDbGrapher
object.
display | The display. |
rect | The location. |
palette | The palette. |
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.
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
.
IlTrue
if the out of order events are supported. IlvLinkImage* IliDbGrapher::createDefaultObjectLink | ( | IliTableBuffer * | ) |
Returns the default object created for a link.
buff | The link parameters. |
IlvGraphic* IliDbGrapher::createDefaultObjectNode | ( | IliTableBuffer * | buff | ) |
Returns the default object created for a node.
buff | The node parameters. |
const char * IliDbGrapher::getBackgroundPictureName | ( | ) | const |
Returns the background picture name.
const char * IliDbGrapher::getBitmapName | ( | ) |
Returns the default bitmap name for nodes.
IlvColor * IliDbGrapher::getColor | ( | IliGrapherColor | tag | ) | const |
Returns a grapher color.
tag | The color tag. |
IlInt IliDbGrapher::getColumnIndex | ( | IliGrapherColumn | tag | ) | const |
Returns the column index for a grapher column.
tag | The column tag. |
const char * IliDbGrapher::getColumnName | ( | IliGrapherColumn | tag | ) | const |
Returns the column name for a grapher column.
tag | The column tag. |
IliCreateObjectCallback IliDbGrapher::getCreateObjectCallback | ( | IlBoolean | forNode = IlTrue | ) | const |
Returns the callback to create an object.
forNode | If IlTrue , the callback is used for a node, otherwise for a link. |
Returns the user data to create an object.
forNode | If IlTrue , the user data are used for a node, otherwise for a link. |
IliDefineObjectCallback IliDbGrapher::getDefineObjectCallback | ( | IlBoolean | forNode = IlTrue | ) | const |
Returns the callback to define the object parameter just before appending into the data source.
forNode | If IlTrue , the callback is used for a node, otherwise for a link. |
Returns the user data to define an object.
forNode | If IlTrue , the user data are used for a node, otherwise for a link. |
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
.
IliDataSource* IliDbGrapher::getLinkDataSource | ( | ) | const |
Returns the data source for links.
const char* IliDbGrapher::getLinkDataSourceName | ( | ) | const |
Returns the data source name for links.
IliGrapherLinkType IliDbGrapher::getLinkType | ( | ) | const |
Returns the link type.
IliDataSource* IliDbGrapher::getNodeDataSource | ( | ) | const |
Returns the data source for nodes.
const char* IliDbGrapher::getNodeDataSourceName | ( | ) | const |
Returns the data source name for nodes.
const char * IliDbGrapher::getObjectNameDoubleClicked | ( | ) | const |
Returns the object name that has been double-clicked.
const char * IliDbGrapher::getObjectNameMoved | ( | ) | const |
Returns the object name that has been moved.
const char * IliDbGrapher::getObjectNamePrepareDeleted | ( | ) | const |
Returns the object name that will be deleted.
IliUpdateObjectCallback IliDbGrapher::getUpdateObjectCallback | ( | IlBoolean | forNode = IlTrue | ) | const |
Returns the callback to update an object.
forNode | If IlTrue , the callback is used for a node, otherwise for a link. |
Returns the user data to update an object.
forNode | If IlTrue , the user data are used for a node, otherwise for a link. |
IlBoolean IliDbGrapher::isLinkOriented | ( | ) | const |
Returns IlTrue
if the links are oriented.
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
.
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
.
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
.
IlTrue
if the node rename events are propagated.
|
static |
Returns the callback name that will be called by the corresponding virtual member functions.
|
static |
Returns the callback name that will be called by the corresponding virtual member functions.
|
static |
Returns the callback name that will be called by the corresponding virtual member functions.
|
virtual |
Called to create a node.
buff | The parameters of the link. |
|
virtual |
Called to create a node.
buff | The parameters of the node. |
|
virtual |
Called to define the parameter of the link just before appending into the data source.
buff | The parameters of the link. |
g | Not NULL if the link is already created in the grapher. |
IlTrue
if successful.
|
virtual |
Called to define the parameter of the node just before appending into the data source.
buff | The parameters of the node. |
g | Not NULL if the node is already created in the grapher. |
IlTrue
if successful.
|
virtual |
Called just after a link has been double-clicked.
The name of the link can be retrieved with the getObjectNameDoubleClicked
member function.
|
virtual |
Called just after a node has been double-clicked.
The name of the node can be retrieved with the getObjectNameDoubleClicked
member function.
|
virtual |
Called just after a node has been moved.
The name of the moved node can be retrieved with the getObjectNameMoved
member function.
|
virtual |
Called just before the deletion of an object.
The getObjectNamePrepareDeleted
can be used to get the object name.
|
virtual |
Called to update a link.
g | The link that must updated. |
buff | The new definition of the link. |
setUpdateObjectCallback
function if the callback exists. Otherwise, returns a new link object to replace the previous object that will be deleted.
|
virtual |
Called to update a node.
g | The node that must be updated. |
buff | The new definition of the node. |
setUpdateObjectCallback
function if the callback exists. Otherwise, returns a new node object to replace the previous object that will be deleted.
|
static |
Returns the callback name that will be called by the corresponding virtual member functions.
void IliDbGrapher::propagateNodeDeletion | ( | IlBoolean | propagate | ) |
Enables or disables the option to propagate node deletion events.
propagate | If IlTrue , the deletion events are propagated. |
void IliDbGrapher::propagateNodeRename | ( | IlBoolean | propagate | ) |
Enables or disables the option to propagate node rename events.
propagate | If IlTrue , the rename events are propagated. |
Refreshes the display of all links.
del | If IlTrue , all links of the grapher are deleted. |
void IliDbGrapher::removeErrorSink | ( | IliErrorSink * | sink, |
IlBoolean | forNode | ||
) |
Removes an error sink from this grapher.
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.
list | The error list. |
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
.
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.
name | The bitmap name. |
void IliDbGrapher::setColor | ( | IliGrapherColor | tag, |
IlvColor * | color | ||
) |
Sets a grapher color.
tag | The color tag. |
color | The color. |
void IliDbGrapher::setColumnName | ( | IliGrapherColumn | tag, |
const char * | col | ||
) |
Sets the column name for a grapher column.
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.
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.
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.
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.
reporter | The error reporter. |
void IliDbGrapher::setLinkDataSource | ( | IliDataSource * | ds | ) |
Sets the data source for links.
ds | The data source. |
void IliDbGrapher::setLinkDataSourceName | ( | const char * | name | ) |
Sets the data source name for links.
name | The data source name. |
Sets the link type and indicates if the links are oriented or not.
typ | The link type. |
oriented | If IlTrue , the link is oriented. |
void IliDbGrapher::setNodeDataSource | ( | IliDataSource * | ds | ) |
Sets the data source for nodes.
ds | The data source. |
void IliDbGrapher::setNodeDataSourceName | ( | const char * | name | ) |
Sets the data source name for nodes.
name | The data source name. |
void IliDbGrapher::setUpdateObjectCallback | ( | IliUpdateObjectCallback | cb, |
IlAny | arg, | ||
IlBoolean | forNode = IlTrue |
||
) |
Sets a callback to update a node or link.
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).
support | If IlTrue , the out of order events are supported. |
© 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.