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. | |
void | addErrorSink (IliErrorSink *sink, IlBoolean forNode) |
Adds an error sink. | |
IlBoolean | areOutOfOrderEventsSupported () const |
Returns IlTrue if the out of order events are supported. | |
IlvLinkImage * | createDefaultObjectLink (IliTableBuffer *) |
Returns the default object created for a link. | |
IlvGraphic * | createDefaultObjectNode (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. | |
IlvColor * | getColor (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. | |
IliErrorReporter * | getErrorReporter () const |
Returns the error reporter that is used by the reportErrors member functions. | |
IliDataSource * | getLinkDataSource () 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. | |
IliDataSource * | getNodeDataSource () 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 IlvLinkImage * | onCreateObjectLink (IliTableBuffer *buff) |
Called to create a node. | |
virtual IlvGraphic * | onCreateObjectNode (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 IlvGraphic * | onUpdateObjectLink (IlvGraphic *g, IliTableBuffer *buff) |
Called to update a link. | |
virtual IlvGraphic * | onUpdateObjectNode (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. |
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.
IliLinkType 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 IlvSymbol* IliDbGrapher::LinkDoubleClickedSymbol | ( | ) | [static] |
Returns the callback name that will be called by the corresponding virtual member functions.
static IlvSymbol* IliDbGrapher::NodeDoubleClickedSymbol | ( | ) | [static] |
Returns the callback name that will be called by the corresponding virtual member functions.
static IlvSymbol* IliDbGrapher::NodeMovedSymbol | ( | ) | [static] |
Returns the callback name that will be called by the corresponding virtual member functions.
virtual IlvLinkImage* IliDbGrapher::onCreateObjectLink | ( | IliTableBuffer * | buff | ) | [virtual] |
Called to create a node.
buff | The parameters of the link. |
virtual IlvGraphic* IliDbGrapher::onCreateObjectNode | ( | IliTableBuffer * | buff | ) | [virtual] |
Called to create a node.
buff | The parameters of 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.
buff | The parameters of the link. | |
g | Not NULL if the link is already created in the grapher. |
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.
buff | The parameters of the node. | |
g | Not NULL if the node is already created in the grapher. |
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.
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 IlvGraphic* IliDbGrapher::onUpdateObjectNode | ( | IlvGraphic * | g, | |
IliTableBuffer * | buff | |||
) | [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 IlvSymbol* IliDbGrapher::PrepareDeleteObjectSymbol | ( | ) | [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. |
void IliDbGrapher::refreshAllLinks | ( | IlBoolean | del = IlFalse |
) |
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. |
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
.
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. |
void IliDbGrapher::setLinkType | ( | IliLinkType | typ, | |
IlBoolean | oriented = IlFalse | |||
) |
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.