rwlogo

Rogue Wave Views
Gantt Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

List of all members | Public Member Functions
IlvGanttNode Class Reference

Gantt chart node class. More...

#include <ilviews/gantt/gantt.h>

Inheritance diagram for IlvGanttNode:
IlvGanttAbstractObject

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...
 
IlvGraphicgetSubGraphicModel () const
 Returns the subnode graphic model that the user may have set. More...
 
IlvGanttSubNodegetSubNode (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...
 
IlvGraphicgetGraphic () 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...
 

Detailed Description

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.

See Also
IlvGanttChart, IlvGanttAbstractObject, IlvGanttSubNode.

Constructor & Destructor Documentation

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.

Parameters
nameThe name of the Gantt node.
copySpecifies whether the object stores a copy of name or the string name itself.
asBreakSpecifies 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.

Parameters
nameThe name of the Gantt node.
copySpecifies whether the object stores a copy of name or the string name itself.
countThe 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.

Member Function Documentation

void IlvGanttNode::addSubNode ( IlvGanttSubNode subnode)

Adds a subnode.

Adds the subnode subnode at the end of the subnode list.

Parameters
subnodeThe subnode to add.
IlUShort IlvGanttNode::getCardinal ( ) const

Returns the total number of subnodes stored in the node.

Returns
The total number of subnodes.
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.
Returns
The presentation mode for this node.
IlvGraphic* IlvGanttNode::getSubGraphicModel ( ) const

Returns the subnode graphic model that the user may have set.

Returns
The subnode graphic model.
IlvGanttSubNode* IlvGanttNode::getSubNode ( IlUShort  index) const

Gets a subnode.

Returns the index th subnode. The first subnode has an index of 0.

Parameters
indexThe position of the subnode.
Returns
The index th 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.

Parameters
countSet to the number of subnodes in the array.
Returns
An array of pointers to the subnodes stored in the node.
IlBoolean IlvGanttNode::isBreak ( ) const

Indicates whether the node is a break node.

Returns
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.

Parameters
indexThe 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.
Parameters
modeThe 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.

Parameters
graphicThe IlvGraphic that will become the subnode graphic model.
destroyOldIndicates whether the old graphic model is destroyed.

© Copyright 2014, 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.