Rogue Wave Views 5.6 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
Gantt chart node class. More...
#include <ilviews/gantt/gantt.h>
Public Member Functions | |
IlvGanttNode (const char *name, IlBoolean copy=IlTrue, IlBoolean asBreak=IlFalse) | |
Constructor. More... | |
IlvGanttNode (const char *name, IlBoolean copy, IlUInt...) | |
Constructor. More... | |
virtual | ~IlvGanttNode () |
Destructor. More... | |
void | addSubNode (IlvGanttSubNode *subnode) |
Adds a subnode. More... | |
IlUShort | getCardinal () const |
Returns the total number of subnodes stored in the node. More... | |
IlvGanttNodeDrawMode | getDrawMode () const |
Gets the presentation mode. More... | |
IlvGraphic * | getSubGraphicModel () const |
Returns the subnode graphic model that the user may have set. More... | |
IlvGanttSubNode * | getSubNode (IlUShort index) const |
Gets a subnode. More... | |
IlvGanttSubNode *const * | getSubNodes (IlUShort &count) const |
Gets the subnodes stored in the node. More... | |
IlBoolean | isBreak () const |
Indicates whether the node is a break node. More... | |
void | removeSubNode (IlUShort index) |
Removes a subnode. More... | |
void | setDrawMode (IlvGanttNodeDrawMode mode) |
Sets the presentation mode. More... | |
void | setSubGraphicModel (IlvGraphic *graphic, IlBoolean destroyOld=IlTrue) |
Sets the subnode graphic model for this Gantt node to graphic. More... | |
Public Member Functions inherited from IlvGanttAbstractObject | |
IlvGanttAbstractObject (const char *name=0, IlBoolean copy=IlTrue, IlvGraphic *graphic=0) | |
Constructor. More... | |
virtual | ~IlvGanttAbstractObject () |
Destructor. More... | |
IlAny | getClientData () const |
Gets the client data if any has been set. More... | |
IlvGraphic * | getGraphic () const |
Gets the graphic object stored in the Gantt object. More... | |
const char * | getName () const |
Gets the name stored in the Gantt object. More... | |
void | setClientData (IlAny data) |
Sets the new client data in this Gantt object. More... | |
virtual void | setGraphic (IlvGraphic *graphic, IlBoolean destroyOld=IlTrue, IlBoolean redraw=IlTrue) |
Sets the graphic object displayed by this Gantt object to graphic. More... | |
void | setName (const char *name, IlBoolean copy=IlTrue) |
Sets the name of the Gantt object. More... | |
Gantt chart node class.
Library: ilvgantt
An IlvGanttNode
object describes a Gantt activity. It handles a set of IlvGanttSubNode
objects. An IlvGanttNode
is used to handle subnode activities. It can also be used to handle breaks. A node that handles breaks is called a break node. Subnodes handled by a break node are called break subnodes.
To create a break node, call the IlvGanttNode
constructor, setting the asBreak parameter to IlTrue
.
Subnodes added to a break node should be break subnodes.
IlvGanttNode::IlvGanttNode | ( | const char * | name, |
IlBoolean | copy = IlTrue , |
||
IlBoolean | asBreak = IlFalse |
||
) |
Constructor.
This constructor initializes an empty IlvGanttNode
object, which is a skeleton. You can call member functions such as addSubNode
to add IlvGanttSubNode
objects to the IlvGanttNode
object.
name | The name of the Gantt node. |
copy | Specifies whether the object stores a copy of name or the string name itself. |
asBreak | Specifies whether the new node is a break node. |
IlvGanttNode::IlvGanttNode | ( | const char * | name, |
IlBoolean | copy, | ||
IlUInt... | |||
) |
Constructor.
This constructor initializes an IlvGanttNode
object on the basis of the count parameter. IlvGanttSubNode
objects are provided as parameters.
name | The name of the Gantt node. |
copy | Specifies whether the object stores a copy of name or the string name itself. |
count | The number of subnodes in the node. |
|
virtual |
Destructor.
The destructor deletes the subnode graphic model that the user may have set, and the string name stored in this Gantt node. It also calls the destructor of the subnodes stored in the Gantt node.
void IlvGanttNode::addSubNode | ( | IlvGanttSubNode * | subnode | ) |
Adds a subnode.
Adds the subnode subnode at the end of the subnode list.
subnode | The subnode to add. |
IlUShort IlvGanttNode::getCardinal | ( | ) | const |
Returns the total number of subnodes stored in the node.
IlvGanttNodeDrawMode IlvGanttNode::getDrawMode | ( | ) | const |
Gets the presentation mode.
Returns the presentation mode for this node, which can be one of the following values indicating the left and right positions of the graphic object representing the node:
IlvGanttNodeDrawMin
- Draws the node between startMin and endMin. IlvGanttNodeDrawMax
- Draws the node between startMax and endMax. IlvGanttNodeDrawComplete
- Draws the node between startMin and endMax. IlvGanttNodeDrawDefault
- Draws the node using the mode set with the setDrawMode
member function. IlvGraphic* IlvGanttNode::getSubGraphicModel | ( | ) | const |
Returns the subnode graphic model that the user may have set.
IlvGanttSubNode* IlvGanttNode::getSubNode | ( | IlUShort | index | ) | const |
Gets a subnode.
Returns the index th subnode. The first subnode has an index of 0
.
index | The position of the subnode. |
IlvGanttSubNode* const* IlvGanttNode::getSubNodes | ( | IlUShort & | count | ) | const |
Gets the subnodes stored in the node.
The returned array must not be deleted by the programmer, as it is internally maintained.
count | Set to the number of subnodes in the array. |
IlBoolean IlvGanttNode::isBreak | ( | ) | const |
Indicates whether the node is a break node.
IlTrue
if the node is a break node. void IlvGanttNode::removeSubNode | ( | IlUShort | index | ) |
Removes a subnode.
Removes the index th subnode from the subnode list.
index | The position of the subnode to remove. |
void IlvGanttNode::setDrawMode | ( | IlvGanttNodeDrawMode | mode | ) |
Sets the presentation mode.
Sets the presentation mode for this node to the value given by the mode parameter. The mode parameter can be set to one of four values indicating the left and right positions of the graphic object representing the node:
IlvGanttNodeDrawMin
- Draws the node between startMin and endMin. IlvGanttNodeDrawMax
- Draws the node between startMax and endMax. IlvGanttNodeDrawComplete
- Draws the node between startMin and endMax. IlvGanttNodeDrawDefault
- Draws the node using the mode set with the setDrawMode
member function. mode | The presentation mode. |
void IlvGanttNode::setSubGraphicModel | ( | IlvGraphic * | graphic, |
IlBoolean | destroyOld = IlTrue |
||
) |
Sets the subnode graphic model for this Gantt node to graphic.
This model is used to draw the subnodes of this node. You can specify IlFalse
as the value of the destroyOld parameter to not call delete
for the old graphic model.
graphic | The IlvGraphic that will become the subnode graphic model. |
destroyOld | Indicates whether the old graphic model is destroyed. |
© 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.