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, IlUInt...) | |
Constructor. | |
IlvGanttNode (const char *name, IlBoolean copy=IlTrue, IlBoolean asBreak=IlFalse) | |
Constructor. | |
virtual | ~IlvGanttNode () |
Destructor. | |
void | addSubNode (IlvGanttSubNode *subnode) |
Adds a subnode. | |
IlUShort | getCardinal () const |
Returns the total number of subnodes stored in the node. | |
IlvGanttNodeDrawMode | getDrawMode () const |
Gets the presentation mode. | |
IlvGraphic * | getSubGraphicModel () const |
Returns the subnode graphic model that the user may have set. | |
IlvGanttSubNode * | getSubNode (IlUShort index) const |
Gets a subnode. | |
IlvGanttSubNode *const * | getSubNodes (IlUShort &count) const |
Gets the subnodes stored in the node. | |
IlBoolean | isBreak () const |
Indicates whether the node is a break node. | |
void | removeSubNode (IlUShort index) |
Removes a subnode. | |
void | setDrawMode (IlvGanttNodeDrawMode mode) |
Sets the presentation mode. | |
void | setSubGraphicModel (IlvGraphic *graphic, IlBoolean destroyOld=IlTrue) |
Sets the subnode graphic model for this Gantt node to graphic. |
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 IlvGanttNode::~IlvGanttNode | ( | ) | [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.