rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Gantt Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

List of all members | Public Member Functions | Static Public Member Functions
IlvGanttChart Class Reference

Rogue Wave Views Gantt chart user interface class. More...

#include <ilviews/gantt/gantt.h>

Inheritance diagram for IlvGanttChart:
IlvGadgetContainerRectangle IlvContainerRectangle IlvViewRectangle IlvFilledRectangle IlvRectangle IlvSimpleGraphic IlvGraphic IlvGanttChartForm

Public Member Functions

 IlvGanttChart (IlvDisplay *display, const IlvRect &rect, IlInt start, IlInt end, IlInt shownStart, IlInt shownEnd, IlUShort step, IlvDim rowsize, IlvDim lineInfoSize=0, IlvDim unitsize=20, IlvDim scaleH=32, IlvDim sbsize=16, IlUShort spacing=4, IlUShort vwspacing=20, IlUShort offset=0, IlvDim handsize=8, IlvPosition hasScale=IlvTop, IlvPosition hasHSB=IlvBottom, IlvPosition hasVSB=IlvRight, int numLayers=5, IlBoolean useacc=IlTrue, IlvPalette *palette=0)
 Constructor. More...
 
virtual ~IlvGanttChart ()
 Destructor. More...
 
void addLine (IlvGanttLine *line, IlBoolean redraw=IlTrue, int layer=1)
 Appends a line to the Gantt chart. More...
 
virtual void addLink (IlvGanttLink *link, IlBoolean redraw=IlTrue, int layer=2)
 Adds a link to the Gantt chart. More...
 
virtual void addNode (IlvGanttNode *node, IlBoolean redraw=IlTrue, int layer=3)
 Adds a node to the Gantt chart. More...
 
virtual IlBoolean addSubNode (IlvGanttNode *node, IlvGanttSubNode *subnode, IlBoolean redraw=IlTrue, int layer=3)
 Adds a subnode to the Gantt chart node. More...
 
void addSubNodeToHiliteList (IlvGanttSubNode *subnode)
 Adds a subnode to the highlight list. More...
 
void allowDragDrop (IlBoolean flag)
 Specifies whether drag-and-drop operations are allowed. More...
 
virtual IlvPos compactRow (IlUShort row, IlBoolean redraw=IlTrue)
 Compresses the height of a given row. More...
 
void computeGridPoints (IlUShort index)
 Computes the grid points. More...
 
virtual IlvGanttGridViewHookcreateGridHook (IlvGrapher *grapher, IlvView *view)
 Creates the grid hook connected to the view of the grapher. More...
 
virtual IlvScalecreateScale (IlvDisplay *display, const IlvPoint &origin, IlvDim size, IlInt start, IlInt end, IlUShort step, IlvPosition p=IlvTop) const
 Creates a scale object. More...
 
virtual IlvGanttScrollViewHookcreateScrollHook (IlvGrapher *grapher, IlvView *view)
 Creates the scroll hook connected to the view. More...
 
virtual void deleteAll (IlBoolean destroy, IlBoolean redraw=IlTrue)
 Removes all the objects stored in the chart. More...
 
virtual void deleteNodes (IlBoolean destroy, IlBoolean redraw=IlTrue)
 Deletes the Gantt nodes and links stored in the Gantt chart. More...
 
virtual void drawGrid (IlvPort *dst, IlUShort index, IlBoolean skipCompute=IlFalse, const IlvRegion *clip=0, IlvTransformer *trans=0, IlvDirection direction=(IlvDirection)(IlvHorizontal|IlvVertical))
 Draws the grid in the given port. More...
 
void emptyHiliteList ()
 Resets the highlight list to empty. More...
 
virtual void ensureVisible (IlvManager *manager, IlvView *view, const IlvPoint &point, IlBoolean redraw=IlTrue)
 Translates the working view according to the mouse position. More...
 
IlUShort firstVisibleRow (IlUShort index) const
 Gets the first visible row of the manager view. More...
 
virtual void fitViewsTransformerToContents (IlUShort index, IlvDirection dir, IlBoolean redraw=IlTrue)
 Computes the transformer so it shows every object stored in all the visible layers. More...
 
IlvGraphicgetBreakGraphicModel () const
 Gets the break graphic model currently used. More...
 
IlInt getEnd () const
 Gets the end time managed by the chart. More...
 
IlvGraphergetGrapher () const
 Gets the grapher stored in the chart. More...
 
IlvViewgetGrapherView (IlUShort index) const
 Returns the grapher view indicated by index. More...
 
IlvGanttGridViewHookgetGridHook (IlUShort index) const
 Returns the grid hook connected to the view indicated by index. More...
 
IlvPalettegetGridPalette () const
 Returns the palette used to draw the grid. More...
 
IlvFilledRectanglegetHandle () const
 Gets the handle box that controls the size of the views. More...
 
IlvPalettegetHiliteBackGroundPalette () const
 Gets the highlight background palette. More...
 
IlBoolean getHiliteState () const
 Gets the highlight state. More...
 
IlvScrollBargetHorizontalScrollBar (IlUShort index) const
 Gets the horizontal scroll bar. More...
 
IlvGanttLinegetLine (IlUShort row) const
 Gets a Gantt line. More...
 
virtual IlvRectgetLineArea (IlvRect &area) const
 Returns the bounds of the Gantt lines. More...
 
IlvGraphicgetLineGraphicModel () const
 Gets the line graphic model of the Gantt chart. More...
 
IlvGraphicgetLineGrid () const
 Gets the line grid currently being used. More...
 
IlInt getLineLoad (IlUShort row, IlInt time) const
 Gets the difference between the capacity of a line and the sum of the capacities of all subnodes intersecting with a vertical axis. More...
 
IlUShort getLineRow (const IlvGanttLine *line) const
 Gets the row where the given Gantt line is located. More...
 
IlvGanttLine ** getLines (IlUShort &count) const
 Gets lines managed by the Gantt chart. More...
 
IlvGanttSubNode ** getLineSubNodes (IlUInt &count, IlUShort row) const
 Gets the subnodes associated with the Gantt line. More...
 
IlvGraphicgetLinkGraphicModel () const
 Gets the graphic model of the links. More...
 
IlvManagergetManager () const
 Gets the manager stored in the chart. More...
 
IlvViewgetManagerView (IlUShort index) const
 Returns the manager view indicated by index. More...
 
IlvGanttNodeDrawMode getNodeDrawMode () const
 Gets the node presentation mode. More...
 
IlvGanttNode ** getNodes (IlUInt &count) const
 Gets the nodes managed by the chart. More...
 
IlvGanttAbstractObjectgetObject (const IlvGraphic *graphic) const
 Gets the Gantt object. More...
 
IlvGanttAbstractObjectgetObject (const char *name) const
 Gets the Gantt object with the given name. More...
 
const char * getObjectName (const IlvGanttAbstractObject *obj) const
 Gets the name of the Gantt object. More...
 
IlvGraphicgetRowGrid () const
 Gets the row grid currently being used. More...
 
IlvScalegetScale (IlUShort index) const
 Gets a scale object. More...
 
IlvGanttScrollViewHookgetScrollHook (IlUShort index) const
 Gets the scroll hook connected to the view. More...
 
IlInt getShownEnd (IlUShort index) const
 Gets the current shown end time for the grapher views. More...
 
IlInt getShownStart (IlUShort index) const
 Gets the current shown start time for the grapher views. More...
 
IlInt getStart () const
 Gets the start time managed by the chart. More...
 
IlUShort getStep (IlUShort index) const
 Gets the graduation step in the grapher views of the Gantt chart. More...
 
IlvGanttSubNodegetSubNode (const IlvGraphic *graphic) const
 Returns the Gantt subnode associated with the graphic object graphic in the Gantt chart. More...
 
void getSubNodeDrawnStartEnd (const IlvGanttNode *node, IlUShort index, IlInt &start, IlInt &end) const
 Gets the positions of the given subnode. More...
 
IlvGraphicgetSubNodeGraphicModel () const
 Gets the graphic model of the subnodes. More...
 
IlvGanttSubNodeHookgetSubNodeHook ()
 Gets the subnode hook installed in a Gantt chart. More...
 
IlInt getSubNodeMinimumSize () const
 Gets the minimum size of subnodes. More...
 
IlvScrollBargetVerticalScrollBar (IlUShort index) const
 Gets the vertical scroll bar. More...
 
IlvRectgetWorkArea (IlvRect &area) const
 Returns the work area. More...
 
void grapherViewsBBox (IlvRect &bbox) const
 Gets the bounding box of the four grapher views. More...
 
virtual void handleReshape (const IlvPoint &handlePosition)
 Handles the resizing of views. More...
 
virtual void handleResize (const IlvRect &newsize)
 Handles the resizing of Gantt chart components. More...
 
virtual void insertLine (IlvGanttLine *line, IlUShort row, IlBoolean redraw=IlTrue, int layer=1)
 Inserts a line before a row. More...
 
virtual void installAccelerators ()
 Adds default accelerators to the manager and the grapher event handlers. More...
 
IlBoolean isDoubleBuffering () const
 Returns whether double buffering is enabled.
 
IlBoolean isManaged (const IlvGanttAbstractObject *object) const
 Indicates whether the given object is managed by the Gantt chart. More...
 
IlBoolean isShowingFreeNodes () const
 Indicates whether the chart shows free nodes. More...
 
IlBoolean isShowingGrapherViewBorders () const
 Indicates whether the borders of the grapher views are drawn. More...
 
IlBoolean isShowingGrid () const
 Indicates whether a grid is drawn in the grapher views. More...
 
IlUShort lastVisibleRow (IlUShort index) const
 Gets the last visible row of the manager view. More...
 
virtual void lineBBox (IlUShort row, IlvRect &bbox) const
 Gets the bounding box of a graphic object associated with a Gantt line. More...
 
virtual void loadObjects (IlvInputFile &file)
 Loads a set of objects from the input file. More...
 
virtual void makeView (IlvPort *dst, const IlvTransformer *t=0)
 Creates the views. More...
 
void moveHandle (const IlvPoint &position)
 Moves the handle box to a new position. More...
 
virtual IlBoolean moveLine (IlvGanttLine *line, IlUShort row, IlBoolean redraw=IlTrue)
 Moves the line to the given row. More...
 
virtual IlBoolean prettyRowBBox (IlUShort &row, IlvRect &prettyBox, IlBoolean redraw=IlTrue)
 Compresses the height of a given row. More...
 
virtual void prettySubNodeBBox (IlvGanttNode *node, IlUShort index, IlvRect &bbox, IlBoolean redraw=IlTrue)
 Gets the prettied bounding box of a subnode. More...
 
virtual void psDump (const char *filename, IlUInt xmargin=20, IlUInt ymargin=20, IlBoolean rotate=IlTrue) const
 Creates a dump file for PostScript printing. More...
 
void readObjectFile (IlBoolean redraw=IlTrue)
 Reads a set of IlvGraphic, IlvGanttLine, IlvGanttNode, and IlvGanttLink objects from the file associated with the Gantt chart. More...
 
virtual void removeHooks ()
 Removes the hooks from the grapher. More...
 
virtual IlBoolean removeLine (IlUShort row, IlBoolean redraw=IlTrue, IlBoolean destroy=IlTrue)
 Removes a line located at a row from the Gantt chart object set. More...
 
virtual IlBoolean removeLink (IlvGanttLink *link, IlBoolean redraw=IlTrue, IlBoolean destroy=IlTrue)
 Removes a link from the Gantt chart object set. More...
 
virtual IlBoolean removeNode (IlvGanttNode *node, IlBoolean redraw=IlTrue, IlBoolean destroy=IlTrue)
 Removes a node from the Gantt chart object set. More...
 
virtual IlBoolean removeSubNodes (IlvGanttNode *node, IlUShort *indexArray, IlUShort num, IlBoolean redraw=IlTrue, IlBoolean destroy=IlTrue)
 Removes subnodes from the Gantt chart node. More...
 
virtual void resetViewsTransformer (IlUShort index, IlBoolean redraw=IlTrue)
 Resets the transformer so that the initial transformer can be applied. More...
 
void rowBBox (IlUShort row, IlvRect &bbox) const
 Gets the bounding box of a region that contains the graphic object associated with a Gantt line. More...
 
virtual void rowResized (IlUShort row, IlvPos dh) const
 Used to indicate that a Gantt row has been resized. More...
 
IlUShort rows () const
 Gets the number of rows in the Gantt chart. More...
 
virtual void saveObjects (IlvOutputFile &file) const
 Writes the descriptions of the objects stored in the manager to the output file. More...
 
void setBreakGraphicModel (IlvGraphic *model, IlBoolean destroyOld=IlTrue)
 Sets the break graphic model. More...
 
virtual void setDoubleBuffering (IlBoolean doubleBuffer)
 Enables or disables double buffering. More...
 
void setGridPalette (IlvPalette *palette)
 Sets the palette used to draw the grid. More...
 
void setHiliteBackGroundPalette (IlvPalette *bgPal)
 Sets the highlight background palette. More...
 
void setHiliteState (IlBoolean hilite=IlTrue)
 Sets the highlight state. More...
 
IlvGraphicsetLineGraphicModel (IlvGraphic *model, IlBoolean deleteOld=IlTrue)
 Sets the line graphic model for the Gantt chart. More...
 
IlvGraphicsetLineGrid (IlvGraphic *compoGrid, IlBoolean redraw=IlTrue, IlInt layer=0)
 Sets the grid for the Gantt lines. More...
 
void setLinkGraphicModel (IlvGraphic *model, IlBoolean deleteOld=IlTrue)
 Sets the graphic model for links. More...
 
virtual void setNodeDrawMode (IlvGanttNode *node, IlvGanttNodeDrawMode mode, IlBoolean redraw=IlTrue)
 Sets the node presentation mode. More...
 
void setNodeDrawMode (IlvGanttNodeDrawMode mode, IlBoolean redraw=IlTrue)
 Sets the node presentation mode. More...
 
void setObjectFileName (const char *name)
 Sets the name of the file associated with the chart. More...
 
IlBoolean setObjectName (IlvGanttAbstractObject *object, const char *name, IlBoolean redraw=IlTrue)
 Sets the name of the Gantt object. More...
 
IlvGraphicsetRowGrid (IlvGraphic *compoGrid, IlBoolean redraw=IlTrue, IlInt layer=0)
 Sets the grid for the Gantt rows. More...
 
void setShowingGrapherViewBorders (IlBoolean flag, IlBoolean redraw=IlTrue)
 Sets the visibility of the borders of the grapher views. More...
 
IlBoolean setStep (IlUShort index, IlUShort step, IlBoolean redraw=IlTrue)
 Sets the graduation step. More...
 
IlvGraphicsetSubNodeGraphicModel (IlvGraphic *model, IlBoolean deleteOld=IlTrue)
 Sets the graphic model for subnodes. More...
 
IlvGanttSubNodeHooksetSubNodeHook (IlvGanttSubNodeHook *hook)
 Installs a subnode hook. More...
 
void setSubNodeMinimumSize (IlInt size)
 Sets the minimum size of subnodes. More...
 
virtual void setSubNodeValues (IlvGanttNode *node, IlUShort index, IlInt startMin, IlInt startMax, IlInt endMin, IlInt endMax, IlvGanttLine *line, IlUShort capacity, IlBoolean redraw=IlTrue)
 Sets the values of the subnodes. More...
 
void showFreeNodes (IlBoolean flag, IlBoolean redraw=IlTrue)
 Sets the display flag of the free nodes. More...
 
void showGrid (IlBoolean flag, IlBoolean redraw=IlTrue)
 Sets the grid display. More...
 
void showInterval (IlUShort index, IlInt shownStart, IlInt shownEnd, IlBoolean redraw=IlTrue)
 Modifies the shown start and end times in the grapher views. More...
 
virtual void subNodeBBox (const IlvGanttNode *node, IlUShort index, IlvRect &bbox) const
 Gets the bounding box of a subnode. More...
 
virtual IlBoolean swapLines (IlvGanttLine *line1, IlvGanttLine *line2, IlBoolean redraw=IlTrue)
 Swaps two Gantt lines. More...
 
virtual void translateViews (IlUShort index, IlvPos deltaCol, IlvPos deltaRow, IlBoolean redraw=IlTrue)
 Translates the given view. More...
 
virtual void updateScale (IlvScale *scale, IlBoolean redraw=IlTrue) const
 Updates the scale. More...
 
IlUShort yToClosestRow (IlvPos y) const
 Gets the closest row to a given location. More...
 
IlBoolean yToRow (IlvPos y, IlUShort &row) const
 Gets the row located at a given location. More...
 
virtual IlBoolean zoomViews (IlUShort index, IlvDirection dir, IlUShort fromCol, IlUShort toCol, IlUShort fromRow, IlUShort toRow, IlBoolean redraw=IlTrue)
 Zooms in or out of the given view. More...
 

Static Public Member Functions

static IlSymbolWorkAreaCallbackType ()
 Returns the callback type for the "Work Area" callback. More...
 

Detailed Description

Rogue Wave Views Gantt chart user interface class.

Library: ilvgantt

An IlvGanttChart object displays and edits scheduling problem data. Scheduling is the process of assigning resources to activities in time. The general inputs of a scheduling problem are as follows:

Objects of type IlvGanttLine, IlvGanttNode, IlvGanttSubNode, and IlvGanttLink represent resources, activities, subactivities, and precedence constraints. All these objects inherit from the abstract class IlvGanttAbstractObject. They encapsulate graphic objects of any subclass of IlvGraphic.

These graphic objects can be created automatically when a line, a node, a subnode, or a link is added to the Gantt chart, or specified by the user through graphic models. A graphic model is an instance of any subclass of IlvGraphic that defines a copy member function that the Gantt chart uses to make a copy of the model. The bounding boxes of the copied graphic objects are computed by the Gantt chart.

The Gantt chart can display and edit this data consistently through the Gantt chart grapher and manager views. These views are created inside the Gantt chart object and attached to a grapher (four views for Gantt nodes and links) and a manager (two views for Gantt lines). The user can scroll these views using the keyboard or mouse. Scrolling can be done step-by-step or page-by-page.

In a Gantt chart, some subnodes can be displayed in highlight mode. To do this, the nodes to be highlighted should be put in a list called a highlight list. All subnodes in this list will be displayed with their normal palettes. The rest of the subnodes will be drawn with a haze as defined in the palette highlight background palette. The subnodes in the list are then clearly displayed.

<align="center">


Gantt chart

See Also
IlvGanttAbstractObject, IlvGanttLine, IlvGanttSubNode, IlvGanttNode, IlvGanttLink.

Constructor & Destructor Documentation

IlvGanttChart::IlvGanttChart ( IlvDisplay display,
const IlvRect rect,
IlInt  start,
IlInt  end,
IlInt  shownStart,
IlInt  shownEnd,
IlUShort  step,
IlvDim  rowsize,
IlvDim  lineInfoSize = 0,
IlvDim  unitsize = 20,
IlvDim  scaleH = 32,
IlvDim  sbsize = 16,
IlUShort  spacing = 4,
IlUShort  vwspacing = 20,
IlUShort  offset = 0,
IlvDim  handsize = 8,
IlvPosition  hasScale = IlvTop,
IlvPosition  hasHSB = IlvBottom,
IlvPosition  hasVSB = IlvRight,
int  numLayers = 5,
IlBoolean  useacc = IlTrue,
IlvPalette palette = 0 
)

Constructor.

The constructor initializes a new Gantt chart for the display display.

It creates a gadget container inside a rectangle of the same height and width as the rectangle indicated by the rect parameter. It computes the bounding boxes of views, scales, scroll bars, and handle boxes. It also creates scroll bars (if any) and the handle box.

Parameters
displayThe display.
rectThe size of the Gantt chart.
startThe start time in the interval managed by the Gantt chart, given as an integer.
endThe end time in the interval managed by the Gantt chart, given as an integer.
shownStartThe shown start time, given as an integer.
shownEndThe shown end time, given as an integer.
stepThe graduation step on all the Gantt chart views.
rowSizeThe initial width of the manager views.
lineInfoSizeThe width of user-defined regions.
unitSizeSpecifies the line-unit height and subnode height.
scaleHeightIndicates the scale height.
sbsizeSpecifies the height of the horizontal scroll bars and the width of the vertical scroll bars.
spacingIndicates the spacing between Gantt lines and the left, top, right, and bottom sides of the manager views.
viewSpacingIndicates the grapher view spacing.
marginSpecifies the spacing in pixels between the left, right, top, or bottom edge of Gantt chart and any scale, scroll bar, or view.
handleSizeSpecifies the width or height in pixels of a square box positioned on the middle of the grapher views. This box allows users to adjust the size of the manager and the grapher views by using the mouse.
hasScaleSpecifies where the scale is drawn. This can be set to any of two directions (IlvTop, IlvBottom), indicating the position of the scale, or specified as IlvBadPosition, which means that there is no scale.
hasHorzScrollBarSpecifies where the horizontal scroll bar is drawn. This can be set to one of two directions (IlvTop, IlvBottom), indicating the position of the scroll bar, or specified as IlvBadPosition, indicating that there is no horizontal scroll bar.
hasVertScrollBarSpecifies where the vertical scroll bar is drawn. This can be set to one of two directions (IlvLeft, IlvRight), indicating the position of the scroll bar; or specified as IlvBadPosition, indicating that there is no vertical scroll bar.
layersIndicates the number of layers to be handled by the grapher.
useAcceleratorsAn IlBoolean indicating whether the default accelerators are to be set (for a list of the default accelerators, see Table "Default manager and grapher accelerators" below.
paletteSpecifies the graphic resources of different Gantt chart components (views, scales, scroll bars, handle box). An inverted palette is computed from the given palette and used to draw the lines and nodes added to the Gantt chart.
virtual IlvGanttChart::~IlvGanttChart ( )
virtual

Destructor.

The destructor deletes all the objects (lines, nodes, and links) added to the Gantt chart. It then deletes the grid and scroll hooks connected to the grapher views, the manager, the grapher, and any graphic model set by the user for drawing lines, nodes, or links.

Member Function Documentation

void IlvGanttChart::addLine ( IlvGanttLine line,
IlBoolean  redraw = IlTrue,
int  layer = 1 
)

Appends a line to the Gantt chart.

Calls the member function insertLine with its row parameter set to the current number of lines managed by the Gantt chart.

Parameters
lineThe line to add.
redrawIndicates whether you want the manager and the grapher to redraw the invalidated area of the display.
layerSpecifies, if necessary, the layer where this object is to be inserted.
virtual void IlvGanttChart::addLink ( IlvGanttLink link,
IlBoolean  redraw = IlTrue,
int  layer = 2 
)
virtual

Adds a link to the Gantt chart.

If this link already encapsulates a graphic object, this object is added to the Gantt grapher. Otherwise, the Gantt chart creates a default graphic object. It does this either by copying a graphic model provided by the user (if any), or by using the IlvLinkLabel constructor, and then adds it to the grapher.

Parameters
linkThe link to add.
redrawIndicates whether the grapher redraws the future location of the graphic object before it is drawn at insert time.
layerSpecifies the layer where this object is to be inserted.
virtual void IlvGanttChart::addNode ( IlvGanttNode node,
IlBoolean  redraw = IlTrue,
int  layer = 3 
)
virtual

Adds a node to the Gantt chart.

If any of its subnodes already encapsulates a graphic object, this object is added to the Gantt grapher. Otherwise, the Gantt chart creates a default graphic object. It does this either by copying a graphic model provided by the user (if any), or by using the IlvMessageLabel constructor, and then adds it to the grapher.

Parameters
nodeThe node to add.
redrawIndicates whether you want the grapher to redraw the future location of the graphic object before it is drawn at insert time.
layerSpecifies, if necessary, the layer where the object is to be inserted.
virtual IlBoolean IlvGanttChart::addSubNode ( IlvGanttNode node,
IlvGanttSubNode subnode,
IlBoolean  redraw = IlTrue,
int  layer = 3 
)
virtual

Adds a subnode to the Gantt chart node.

If this subnode already encapsulates a graphic object, this object is added to the Gantt grapher. Otherwise, the Gantt chart creates a default graphic object. It does this either by copying a graphic model provided by the user (if any), or by using the IlvMessageLabel constructor, and then adds it to the grapher.

Parameters
nodeThe node to add the subnode to.
subNodeThe subnode.
redrawIndicates whether you want the grapher to redraw the future location of the graphic object before it is drawn at insert time.
layerSpecifies, if necessary, the layer where the object is to be inserted.
void IlvGanttChart::addSubNodeToHiliteList ( IlvGanttSubNode subnode)

Adds a subnode to the highlight list.

The subnode will be highlighted if highlight mode is enabled.

Parameters
subnodeThe subnode to add.
void IlvGanttChart::allowDragDrop ( IlBoolean  flag)

Specifies whether drag-and-drop operations are allowed.

Sets the drag-and-drop flag to flag. It allows or prohibits drag- and-drop operations on nodes and subnodes.

Parameters
flagSet to IlTrue to allow drag-and-drop operations.
virtual IlvPos IlvGanttChart::compactRow ( IlUShort  row,
IlBoolean  redraw = IlTrue 
)
virtual

Compresses the height of a given row.

Compresses row row to its minimum height needed to display all its nodes. Automatically called to adjust the height of the related rows when a subnode is added, deleted, moved, or reshaped.

Parameters
rowThe row.
redrawIf IlTrue this function redraws the views of the IlvGanttChart.
Returns
The difference between the new and the old heights. If it returns null, the height of row has not changed.
void IlvGanttChart::computeGridPoints ( IlUShort  index)

Computes the grid points.

Computes the grid points and stores them in the internal data members _gridXPoints and _gridYPoints.

Parameters
indexThe index of the grapher view (0 - 1)
virtual IlvGanttGridViewHook* IlvGanttChart::createGridHook ( IlvGrapher grapher,
IlvView view 
)
virtual

Creates the grid hook connected to the view of the grapher.

Parameters
grapherThe grapher.
viewThe view.
Returns
The grid hook connected to the view of the grapher.
virtual IlvScale* IlvGanttChart::createScale ( IlvDisplay display,
const IlvPoint origin,
IlvDim  size,
IlInt  start,
IlInt  end,
IlUShort  step,
IlvPosition  p = IlvTop 
) const
virtual

Creates a scale object.

Creates and returns the scale graphic object at the origin point.

Parameters
displayThe display.
originThe point where to create the scale.
sizeThe scale size.
startThe starting limit of the shown time.
endThe ending limit of the shown time.
stepThe graduation step on the Gantt chart view.
pThe position of the scale.
virtual IlvGanttScrollViewHook* IlvGanttChart::createScrollHook ( IlvGrapher grapher,
IlvView view 
)
virtual

Creates the scroll hook connected to the view.

Parameters
grapherThe grapher.
viewThe view.
Returns
The scroll hook connected to the view of the grapher.
virtual void IlvGanttChart::deleteAll ( IlBoolean  destroy,
IlBoolean  redraw = IlTrue 
)
virtual

Removes all the objects stored in the chart.

If the destroy parameter is set to IlTrue, the objects are destroyed. If this parameter is set to IlFalse, the objects are removed but not destroyed. In both cases, graphic objects are destroyed.

Parameters
destroySpecifies whether objects are destroyed after they are removed.
redrawSpecifies whether you want the manager and the grapher to redraw their views.

Reimplemented in IlvGanttChartForm.

virtual void IlvGanttChart::deleteNodes ( IlBoolean  destroy,
IlBoolean  redraw = IlTrue 
)
virtual

Deletes the Gantt nodes and links stored in the Gantt chart.

If the destroy parameter is set to IlTrue, the objects are removed and destroyed. If this parameter is set to IlFalse, the objects are removed, but not destroyed. In both cases, graphic objects are destroyed.

Parameters
destroyIndicates whether objects are destroyed after being removed.
redrawIlTrue if you want the manager and the grapher to redraw their views.
virtual void IlvGanttChart::drawGrid ( IlvPort dst,
IlUShort  index,
IlBoolean  skipCompute = IlFalse,
const IlvRegion clip = 0,
IlvTransformer trans = 0,
IlvDirection  direction = (IlvDirection)(IlvHorizontal|IlvVertical) 
)
virtual

Draws the grid in the given port.

This method takes an optional trans and an optional direction parameter. If the trans parameter equals 0, this function will use the associated views transformer.

Parameters
dstThe port.
indexIndicates the grapher view for which the grid points are computed.
skipComputeIndicates whether this function calls the computeGridPoints member function.
clipThe clipping region.
transThe transformer of the grapher view.
directionIndicates whether the horizontal and/or the vertical grid lines should be drawn.
void IlvGanttChart::emptyHiliteList ( )

Resets the highlight list to empty.

This means that no subnodes are highlighted.

virtual void IlvGanttChart::ensureVisible ( IlvManager manager,
IlvView view,
const IlvPoint point,
IlBoolean  redraw = IlTrue 
)
virtual

Translates the working view according to the mouse position.

Modifies the view transformer so that point remains visible in view and any other view that is concerned by this operation. You can set the parameter redraw to IlFalse if you do not want to refresh the view contents.

Parameters
managerThe manager of the view to translate.
viewThe view of the Gantt chart.
pointThe mouse position.
redrawSet to IlTrue to refresh the view contents.
IlUShort IlvGanttChart::firstVisibleRow ( IlUShort  index) const

Gets the first visible row of the manager view.

Parameters
indexThe index of the manager view; 0 for the top manager views and 1 for the bottom.
Returns
The first visible row of the manager view.
virtual void IlvGanttChart::fitViewsTransformerToContents ( IlUShort  index,
IlvDirection  dir,
IlBoolean  redraw = IlTrue 
)
virtual

Computes the transformer so it shows every object stored in all the visible layers.

Computes the transformer of the view indicated by index and all other manager and grapher views that have the same column and row as this view, so it shows every object stored in all the visible layers. The dir parameter can be set to one of three values (IlvHorizontal, IlvVertical, IlvHorizontal|IlvVertical), indicating the direction on which the fit-to-contents is applied. Set the parameter redraw to IlFalse to not refresh the view contents.

Parameters
indexThe index of the view.
dirThe direction on which the fit-to-contents is applied.
redrawSpecifies whether the view contents are refreshed.
IlvGraphic* IlvGanttChart::getBreakGraphicModel ( ) const

Gets the break graphic model currently used.

Returns
The break graphic model currently used.
IlInt IlvGanttChart::getEnd ( ) const

Gets the end time managed by the chart.

Returns
The final time managed by the Gantt chart.
IlvGrapher* IlvGanttChart::getGrapher ( ) const

Gets the grapher stored in the chart.

Returns
The grapher stored in the Gantt chart.
IlvView* IlvGanttChart::getGrapherView ( IlUShort  index) const

Returns the grapher view indicated by index.

The index parameter can be set to any of the four values (0, 1, 2, 3), indicating the top-left, top-right, bottom-left, or bottom-right view.

Parameters
indexThe index number of the grapher view.
Returns
The indicated grapher view.
IlvGanttGridViewHook* IlvGanttChart::getGridHook ( IlUShort  index) const

Returns the grid hook connected to the view indicated by index.

The index can have one of four values, which indicates the grapher view:

  • 0 = top-left
  • 1 = top-right
  • 2 = bottom-left
  • 3 = bottom-right
Parameters
indexThe index of the view.
Returns
The grid hook connected to the specified view.
IlvPalette* IlvGanttChart::getGridPalette ( ) const

Returns the palette used to draw the grid.

Returns the palette used to draw the grid in the drawGrid() function.

IlvFilledRectangle* IlvGanttChart::getHandle ( ) const

Gets the handle box that controls the size of the views.

Returns
The handle box that controls the size of the manager and grapher views.
IlvPalette* IlvGanttChart::getHiliteBackGroundPalette ( ) const

Gets the highlight background palette.

Returns
The highlight background palette.
IlBoolean IlvGanttChart::getHiliteState ( ) const

Gets the highlight state.

Indicates whether the Gantt chart is in highlight mode.

Returns
IlTrue if the Gantt chart is in highlight mode.
IlvScrollBar* IlvGanttChart::getHorizontalScrollBar ( IlUShort  index) const

Gets the horizontal scroll bar.

Parameters
indexThe index number of the horizontal scroll bar. It can be set to any of the two values (0, 1), requiring the left or the right scroll bar.
Returns
The indicated horizontal scroll bar.
IlvGanttLine* IlvGanttChart::getLine ( IlUShort  row) const

Gets a Gantt line.

Parameters
rowThe row where the line is located.
Returns
The Gantt line located at row in the Gantt chart.
virtual IlvRect& IlvGanttChart::getLineArea ( IlvRect area) const
virtual

Returns the bounds of the Gantt lines.

This function computes the bounding box of the Gantt lines.

Parameters
areaThe bounds of the Gantt lines.
Returns
The reference to area.

Reimplemented in IlvGanttChartForm.

IlvGraphic* IlvGanttChart::getLineGraphicModel ( ) const

Gets the line graphic model of the Gantt chart.

Returns
The line graphic model of the Gantt chart, or 0 if they have not been given a line graphic model.
IlvGraphic* IlvGanttChart::getLineGrid ( ) const

Gets the line grid currently being used.

Returns the line grid currently used in the Gantt chart.

Returns
The line grid currently used. It returns null if no line grid has been set.
IlInt IlvGanttChart::getLineLoad ( IlUShort  row,
IlInt  time 
) const

Gets the difference between the capacity of a line and the sum of the capacities of all subnodes intersecting with a vertical axis.

Parameters
rowThe row where the line is located.
timeThe position of the vertical axis.
Returns
The difference between the capacity of the line and the sum of the capacities of all subnodes and intersecting with a vertical axis.
IlUShort IlvGanttChart::getLineRow ( const IlvGanttLine line) const

Gets the row where the given Gantt line is located.

Parameters
lineThe Gantt line.
Returns
The row where the given Gantt line is located.
IlvGanttLine** IlvGanttChart::getLines ( IlUShort count) const

Gets lines managed by the Gantt chart.

You must delete the returned array when you no longer need it.

Parameters
countSet to the number of lines in the array.
Returns
An array of pointers to the Gantt lines managed by the Gantt chart.
IlvGanttSubNode** IlvGanttChart::getLineSubNodes ( IlUInt count,
IlUShort  row 
) const

Gets the subnodes associated with the Gantt line.

You must delete the array when you no longer use it.

Parameters
countSet to the number of subnodes in the array.
rowThe row where the line is located.
Returns
An array of pointers to the Gantt subnodes associated with the Gantt line located at row.
IlvGraphic* IlvGanttChart::getLinkGraphicModel ( ) const

Gets the graphic model of the links.

Returns
The graphic model of the Gantt chart links, or 0 if they have not been given a graphic model.
IlvManager* IlvGanttChart::getManager ( ) const

Gets the manager stored in the chart.

Returns
The manager stored in the Gantt chart.
IlvView* IlvGanttChart::getManagerView ( IlUShort  index) const

Returns the manager view indicated by index.

The index parameter can be set to any of the two values (0, 1), indicating the top or bottom view.

Parameters
indexThe index number of the manager view.
Returns
The indicated manager view.
IlvGanttNodeDrawMode IlvGanttChart::getNodeDrawMode ( ) const

Gets the node presentation mode.

This presentation mode 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 IlvGanttNode::setDrawMode member function.
Returns
The node presentation mode of the Gantt chart.
IlvGanttNode** IlvGanttChart::getNodes ( IlUInt count) const

Gets the nodes managed by the chart.

You must delete the returned array when you no longer need it.

Parameters
countSet to the number of nodes in the array.
Returns
An array of pointers to the Gantt nodes managed by the Gantt chart.
IlvGanttAbstractObject* IlvGanttChart::getObject ( const IlvGraphic graphic) const

Gets the Gantt object.

Returns the Gantt object (line, node, or link) associated with the graphic object graphic in the Gantt chart.

Parameters
graphicThe graphic object.
Returns
The Gantt object associated with the given graphic object in the Gantt chart. If there is none, it returns 0.
IlvGanttAbstractObject* IlvGanttChart::getObject ( const char *  name) const

Gets the Gantt object with the given name.

Returns the Gantt object (line, node, or link) with the name indicated by name.

Parameters
nameThe name of the Gantt object.
Returns
The Gantt object with the given name. If there is none, it returns 0.
const char* IlvGanttChart::getObjectName ( const IlvGanttAbstractObject obj) const

Gets the name of the Gantt object.

Parameters
objThe Gantt object.
Returns
The name of the given Gantt object, or 0 if it has not been given a name.
IlvGraphic* IlvGanttChart::getRowGrid ( ) const

Gets the row grid currently being used.

Returns the row grid currently used in the Gantt chart.

Returns
The row grid currently used. It returns null if no row grid has been set.
IlvScale* IlvGanttChart::getScale ( IlUShort  index) const

Gets a scale object.

Returns the scale object (if any) indicated by index. The index parameter can be set to any of two values (0, 1), indicating the left or right scale.

Parameters
indexThe index number of the scale object.
Returns
The indicated scale object.
IlvGanttScrollViewHook* IlvGanttChart::getScrollHook ( IlUShort  index) const

Gets the scroll hook connected to the view.

The index can have one of four values, which indicates the grapher view:

  • 0 = top-left
  • 1 = top-right
  • 2 = bottom-left
  • 3 = bottom-right
Parameters
indexThe index of the view.
Returns
The scroll hook connected to the view.
IlInt IlvGanttChart::getShownEnd ( IlUShort  index) const

Gets the current shown end time for the grapher views.

Parameters
index0 for the left grapher views, and 1 for the right.
Returns
The current shown end time in the grapher views.
IlInt IlvGanttChart::getShownStart ( IlUShort  index) const

Gets the current shown start time for the grapher views.

Parameters
index0 for the left grapher views, and 1 for the right.
Returns
The current shown start time in the grapher views.
IlInt IlvGanttChart::getStart ( ) const

Gets the start time managed by the chart.

Returns
The initial time managed by the Gantt chart.
IlUShort IlvGanttChart::getStep ( IlUShort  index) const

Gets the graduation step in the grapher views of the Gantt chart.

Parameters
index0 for the left grapher views, and 1 for the right.
Returns
The time graduation step in the grapher views of the Gantt chart.
IlvGanttSubNode* IlvGanttChart::getSubNode ( const IlvGraphic graphic) const

Returns the Gantt subnode associated with the graphic object graphic in the Gantt chart.

Parameters
graphicThe graphic object.
Returns
The Gantt subnode associated with the given graphic object in the Gantt chart. If there is none, it returns 0.
void IlvGanttChart::getSubNodeDrawnStartEnd ( const IlvGanttNode node,
IlUShort  index,
IlInt start,
IlInt end 
) const

Gets the positions of the given subnode.

Parameters
nodeThe node.
indexThe position of the subnode.
startThe start position.
endThe end position.
IlvGraphic* IlvGanttChart::getSubNodeGraphicModel ( ) const

Gets the graphic model of the subnodes.

Returns
The graphic model of the Gantt chart subnodes, or 0 if they do not have a graphic model.
IlvGanttSubNodeHook* IlvGanttChart::getSubNodeHook ( )

Gets the subnode hook installed in a Gantt chart.

Returns
The installed subnode hook.
IlInt IlvGanttChart::getSubNodeMinimumSize ( ) const

Gets the minimum size of subnodes.

You cannot create a subnode with a size smaller than this size using IlvGanttSelectInteractor.

Returns
The minimum size of subnodes.
IlvScrollBar* IlvGanttChart::getVerticalScrollBar ( IlUShort  index) const

Gets the vertical scroll bar.

Parameters
indexThe index number of the vertical scroll bar. It can be set to any of the two values (0, 1), requiring the top or the bottom scroll bar.
Returns
The indicated vertical scroll bar.
IlvRect& IlvGanttChart::getWorkArea ( IlvRect area) const

Returns the work area.

This function computes the whole work area of the Gantt chart. The work area is the bounding box of the Gantt rows.

Parameters
areaThe work area.
Returns
The reference to area.
void IlvGanttChart::grapherViewsBBox ( IlvRect bbox) const

Gets the bounding box of the four grapher views.

Parameters
bboxThe bounding box.
Returns
The bounding box containing the four grapher views.
virtual void IlvGanttChart::handleReshape ( const IlvPoint handlePosition)
virtual

Handles the resizing of views.

Called when the manager and grapher views are adjusted using the handle box. The new position of this box is given by handlePosition. This function takes care of any necessary resizing of views inside the Gantt chart.

Parameters
handlePositionThe new position of the handle box.
virtual void IlvGanttChart::handleResize ( const IlvRect newsize)
virtual

Handles the resizing of Gantt chart components.

Called when the Gantt chart is resized. newsize is set to the new size of the object. This function takes care of any necessary resizing of scales, scroll bars, and views inside the Gantt chart.

Parameters
newsizeThe new size of the object.
virtual void IlvGanttChart::insertLine ( IlvGanttLine line,
IlUShort  row,
IlBoolean  redraw = IlTrue,
int  layer = 1 
)
virtual

Inserts a line before a row.

If this line already encapsulates a graphic object, this object is added to the Gantt manager. Otherwise, the Gantt chart creates a default graphic object, either by copying a graphic model provided by the user (if any), or by using the IlvMessageLabel constructor, and then adds it to the manager.

If row is greater than the actual number of lines in the chart, the line is added after the last row if the chart does not have a hidden line containing free nodes (see showFreeNodes), or before the last row if there is such a line.

Parameters
lineThe line to insert.
rowThe row to insert the line into.
redrawIndicates whether you want the manager and the grapher to redraw the invalidated area of the display.
layerSpecifies, if necessary, the layer where this object is to be inserted.

Reimplemented in IlvGanttChartForm.

virtual void IlvGanttChart::installAccelerators ( )
virtual

Adds default accelerators to the manager and the grapher event handlers.

You can set your own accelerators by overloading this function. Following are the default accelerators for the manager and grapher:

Default manager and grapher accelerators

Event Type

Key or Button

Action

IlvKeyDown [Right] Translates grapher views to the right.
IlvKeyDown [Left] Translates grapher views to the left.
IlvKeyDown [Down] Translates grapher and manager views to the bottom.
IlvKeyDown [Up] Translates grapher and manager views to the top.
IlvKeyDown Z Zooms in into grapher views on the time axis.
IlvKeyDown U Zooms out into grapher views on the time axis.
IlvKeyDown z Zooms in into grapher and manager views on the vertical axis.
IlvKeyDown u Zooms out into grapher and manager views on the vertical axis.
IlvKeyDown F Fits to contents on the time axis.
IlvKeyDown f Fits to contents on the vertical axis.
IlvKeyDown I Returns to the initial state.
IlvKeyDown N Shows grapher nodes in minimum mode.
IlvKeyDown X Shows grapher nodes in maximum mode.
IlvKeyDown B Toggles double-buffering mode between manager and grapher views.
IlBoolean IlvGanttChart::isManaged ( const IlvGanttAbstractObject object) const

Indicates whether the given object is managed by the Gantt chart.

Parameters
objectThe object.
Returns
An IlBoolean value indicating whether the given object is managed by the Gantt chart.
IlBoolean IlvGanttChart::isShowingFreeNodes ( ) const

Indicates whether the chart shows free nodes.

Returns
IlTrue if the Gantt chart shows free nodes, and IlFalse if it does not.
IlBoolean IlvGanttChart::isShowingGrapherViewBorders ( ) const

Indicates whether the borders of the grapher views are drawn.

Returns
IlTrue if the Gantt chart draws the borders of the grapher views, and IlFalse if it does not.
IlBoolean IlvGanttChart::isShowingGrid ( ) const

Indicates whether a grid is drawn in the grapher views.

Returns
IlTrue if the Gantt chart draws a grid in the grapher views, and IlFalse if it does not.
IlUShort IlvGanttChart::lastVisibleRow ( IlUShort  index) const

Gets the last visible row of the manager view.

Parameters
indexThe index of the manager view; 0 for the top manager views and 1 for the bottom.
Returns
The last visible row of the manager view.
virtual void IlvGanttChart::lineBBox ( IlUShort  row,
IlvRect bbox 
) const
virtual

Gets the bounding box of a graphic object associated with a Gantt line.

Parameters
rowThe row where the line is located.
bboxThe bounding box.
Returns
The bounding box of the graphic object associated with the Gantt line.
virtual void IlvGanttChart::loadObjects ( IlvInputFile file)
virtual

Loads a set of objects from the input file.

Reads a set of IlvGraphic, IlvGanttLine, IlvGanttNode, and IlvGanttLink objects from the input file file.

Parameters
fileThe input file.
virtual void IlvGanttChart::makeView ( IlvPort dst,
const IlvTransformer t = 0 
)
virtual

Creates the views.

Creates the gadget container, the manager and the grapher, the two manager views, the four grapher views, and the scale objects.

Parameters
dstThe port.
tThe transformer.

Reimplemented from IlvContainerRectangle.

Reimplemented in IlvGanttChartForm.

void IlvGanttChart::moveHandle ( const IlvPoint position)

Moves the handle box to a new position.

Moves the handle box to position and resizes the manager and grapher views accordingly.

Parameters
positionThe new position of the handle box.
virtual IlBoolean IlvGanttChart::moveLine ( IlvGanttLine line,
IlUShort  row,
IlBoolean  redraw = IlTrue 
)
virtual

Moves the line to the given row.

Parameters
lineThe line to move.
rowThe row to move the line to.
redrawSet to IlFalse if you do not want an immediate refresh of the display to take place.
Returns
IlTrue if the line is not one of the internal hidden lines created to hold free nodes and is not already located at row. Otherwise, this function returns IlFalse.
virtual IlBoolean IlvGanttChart::prettyRowBBox ( IlUShort row,
IlvRect prettyBox,
IlBoolean  redraw = IlTrue 
)
virtual

Compresses the height of a given row.

Compresses row row to its minimum height needed to display all its nodes. The new size of the row is return in prettyBox.

This function is called in the compactRow member function.

Parameters
rowThe row.
prettyBoxThe new size of the row.
redrawIf IlTrue this function redraws the compacted row.
Returns
IlTrue if row has been compressed.
virtual void IlvGanttChart::prettySubNodeBBox ( IlvGanttNode node,
IlUShort  index,
IlvRect bbox,
IlBoolean  redraw = IlTrue 
)
virtual

Gets the prettied bounding box of a subnode.

The default implementation of this function calls subNodeBBox, adjusts the y position of the returned bounding box so that this subnode does not overlap with any other subnode in the Gantt chart, and resizes the subnode row height as needed.

Parameters
nodeThe node.
indexThe position of the requested subnode.
bboxThe bounding box.
redrawSet to IlFalse to not refresh the view contents.
virtual void IlvGanttChart::psDump ( const char *  filename,
IlUInt  xmargin = 20,
IlUInt  ymargin = 20,
IlBoolean  rotate = IlTrue 
) const
virtual

Creates a dump file for PostScript printing.

Creates a dump file of the Gantt chart object into the text file filename that can be immediately printed on a PostScript(R) printer.

Parameters
filenameThe name of the text file to dump into.
xmarginSpecifies the offset of the printed object from the left and the right sides of the output paper.
ymarginSpecifies the offset of the printed object from the top and the bottom sides of the output paper.
rotateIlFalse if you do not want to apply a rotation of 90 degrees to the printed object.
void IlvGanttChart::readObjectFile ( IlBoolean  redraw = IlTrue)

Reads a set of IlvGraphic, IlvGanttLine, IlvGanttNode, and IlvGanttLink objects from the file associated with the Gantt chart.

Parameters
redrawSpecifies whether the Gantt chart is refreshed.
virtual void IlvGanttChart::removeHooks ( )
virtual

Removes the hooks from the grapher.

Disconnects the grid and scroll hooks from the Gantt grapher.

virtual IlBoolean IlvGanttChart::removeLine ( IlUShort  row,
IlBoolean  redraw = IlTrue,
IlBoolean  destroy = IlTrue 
)
virtual

Removes a line located at a row from the Gantt chart object set.

You can specify IlFalse as the value of the destroy parameter in order not to call delete for this line and these subnodes (and their encapsulated graphic object) when they are removed from the Gantt chart. This can be useful if you plan to use them once they are no longer managed.

A node which has all its subnodes removed by this function is removed in the same way. A line cannot be removed if the row parameter is greater than or equal to the total number of rows in the chart.

Parameters
rowThe row where the line and the subnodes are located.
redrawIndicates whether you want the manager and the grapher to redraw the invalidated area of the display.
destroyIlTrue to call delete for this line and these subnodes when they are removed.
Returns
IlFalse on error (the line cannot be removed), and IlTrue on success.
virtual IlBoolean IlvGanttChart::removeLink ( IlvGanttLink link,
IlBoolean  redraw = IlTrue,
IlBoolean  destroy = IlTrue 
)
virtual

Removes a link from the Gantt chart object set.

You can specify IlFalse as the value of the destroy parameter in order not to call delete for this link (and its encapsulated graphic object) when it is removed from the Gantt chart. This can be useful if you plan to use the link once it is no longer managed.

A link cannot be removed if link is not already added to (managed by) the Gantt chart.

Parameters
linkThe link to remove.
redrawSpecifies whether you want the grapher to redraw the invalidated area of the display.
destroyIlTrue to call delete for this node when it is removed.
Returns
IlFalse on error (the link cannot be removed) and IlTrue on success.
virtual IlBoolean IlvGanttChart::removeNode ( IlvGanttNode node,
IlBoolean  redraw = IlTrue,
IlBoolean  destroy = IlTrue 
)
virtual

Removes a node from the Gantt chart object set.

Specify IlFalse as the value for destroy to not delete its subnodes (and the graphic objects that represent these subnodes) when it is removed from the Gantt chart. This is useful when using this node once it is no longer managed.

Parameters
nodeThe node to remove.
redrawIndicates whether the grapher is to redraw the invalidated area of the display.
destroyIlTrue to call delete for this node when it is removed.
Returns
IlFalse on error (the node cannot be removed) and IlTrue on success. A node cannot be removed if node is not already added to (managed by) the Gantt chart.
virtual IlBoolean IlvGanttChart::removeSubNodes ( IlvGanttNode node,
IlUShort indexArray,
IlUShort  num,
IlBoolean  redraw = IlTrue,
IlBoolean  destroy = IlTrue 
)
virtual

Removes subnodes from the Gantt chart node.

Specify IlFalse as the value for destroy to not delete the subnodes (and the graphic objects that represent these subnodes) when they are removed from the Gantt chart. A subnode cannot be removed if num is 0.

Parameters
nodeThe Gantt chart node.
indexArrayThe index of subnodes.
numThe number of elements stored in indexArray.
redrawIlTrue if you want the grapher to redraw the invalidated area of the display.
destroyIlTrue to call delete for this node when it is removed.
Returns
IlFalse on error (the subnode cannot be removed) and IlTrue on success.
virtual void IlvGanttChart::resetViewsTransformer ( IlUShort  index,
IlBoolean  redraw = IlTrue 
)
virtual

Resets the transformer so that the initial transformer can be applied.

Resets the transformer of the view indicated by index and all other manager and grapher views having the same column and row as this view, so the initial transformer is applied to them. Set the parameter redraw to IlFalse to not refresh the view contents.

Parameters
indexThe index of the view.
redrawSpecifies whether the view contents is refreshed.
void IlvGanttChart::rowBBox ( IlUShort  row,
IlvRect bbox 
) const

Gets the bounding box of a region that contains the graphic object associated with a Gantt line.

The returned bounding box includes the spacing between the manager views and the Gantt lines, and any information attached to this line.

Parameters
rowThe row where the line is located.
bboxThe bounding box.
Returns
The bounding box of the region that contains the graphic object associated with the Gantt line.
virtual void IlvGanttChart::rowResized ( IlUShort  row,
IlvPos  dh 
) const
virtual

Used to indicate that a Gantt row has been resized.

Called after the Gantt chart modifies the height of the row indicated by the first parameter to fit in all its subnodes. The default implementation calls the "Work Area" callback.

Parameters
rowIndicates which row has been resized.
dhIndicates the distance between the current row height and the previous row height.
IlUShort IlvGanttChart::rows ( ) const

Gets the number of rows in the Gantt chart.

Returns
The number of rows.
virtual void IlvGanttChart::saveObjects ( IlvOutputFile file) const
virtual

Writes the descriptions of the objects stored in the manager to the output file.

Writes in the output file file:

  • The full description of the IlvGraphic objects stored in the manager.
  • A complete description of the associated IlvGanttLine objects.
  • The full description of the IlvGraphic objects stored in the grapher.
  • A complete description of the associated IlvGanttNode and IlvGanttLink objects.
Parameters
fileThe output file.
void IlvGanttChart::setBreakGraphicModel ( IlvGraphic model,
IlBoolean  destroyOld = IlTrue 
)

Sets the break graphic model.

Parameters
modelThe break graphic model.
destroyOldIf IlTrue, the old break graphic model will be deleted.
virtual void IlvGanttChart::setDoubleBuffering ( IlBoolean  doubleBuffer)
virtual

Enables or disables double buffering.

When double buffering is enabled, the manager views and the grapher views of the Gantt chart use double buffering to refresh themselves.

Parameters
doubleBufferIndicates whether double buffering should be enabled.

Reimplemented in IlvGanttChartForm.

void IlvGanttChart::setGridPalette ( IlvPalette palette)

Sets the palette used to draw the grid.

Sets the palette used to draw the grid in the drawGrid() function. This function expects a shared IlvPalette.

Parameters
paletteThe new grid palette, which must be a shared palette.
void IlvGanttChart::setHiliteBackGroundPalette ( IlvPalette bgPal)

Sets the highlight background palette.

When the highlight mode of a Gantt chart is enabled, this palette is used to haze out the non-highlighted subnodes.

Parameters
bgPalThe highlight background palette.
void IlvGanttChart::setHiliteState ( IlBoolean  hilite = IlTrue)

Sets the highlight state.

Switches the Gantt chart to highlight mode if hilite is IlTrue. Otherwise it switches the highlight mode off.

Parameters
hiliteThe status of the highlight mode.
IlvGraphic* IlvGanttChart::setLineGraphicModel ( IlvGraphic model,
IlBoolean  deleteOld = IlTrue 
)

Sets the line graphic model for the Gantt chart.

This model is copied each time a line that does not yet encapsulate a graphic object is added to the Gantt chart. This Gantt chart computes the appropriate bounding box of the line and reshapes the copied graphic object accordingly.

Parameters
modelThe graphic model.
deleteOldIndicates whether the previous model is to be deleted.
Returns
The old subnode graphic model.
IlvGraphic* IlvGanttChart::setLineGrid ( IlvGraphic compoGrid,
IlBoolean  redraw = IlTrue,
IlInt  layer = 0 
)

Sets the grid for the Gantt lines.

The line grid is an IlvGraphic displayed in the manager views to show the grid between the Gantt lines. The line grid object is automatically resized by the IlvGanttChart each time the line area of the Gantt is changed (for example, when a a new line is added, a line is deleted, or a line is resized).

Parameters
compoGridThe line grid.
redrawIlTrue to redraw after setting the grid.
layerThe layer the grid is added to.
Returns
The old line grid.
void IlvGanttChart::setLinkGraphicModel ( IlvGraphic model,
IlBoolean  deleteOld = IlTrue 
)

Sets the graphic model for links.

This model is copied each time a link that does not yet encapsulate a graphic object is added to the Gantt chart. This Gantt chart sets the appropriate start node and end node graphic objects to the copied link graphic object before drawing it. You can specify IlFalse as the value of the destroyOld parameter in order not to call delete for the old graphic model.

Parameters
modelThe graphic model.
deleteOldIndicates whether the previous model is to be deleted.
virtual void IlvGanttChart::setNodeDrawMode ( IlvGanttNode node,
IlvGanttNodeDrawMode  mode,
IlBoolean  redraw = IlTrue 
)
virtual

Sets the node presentation mode.

Sets the presentation mode of node to the value given by the mode parameter. The mode parameter can be set to any 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 IlvGanttNode::setDrawMode.
Parameters
nodeThe node.
modeThe presentation mode.
redrawSpecifies whether the Gantt chart is refreshed.
void IlvGanttChart::setNodeDrawMode ( IlvGanttNodeDrawMode  mode,
IlBoolean  redraw = IlTrue 
)

Sets the node presentation mode.

Sets the presentation mode to mode for all nodes managed by this Gantt chart whose presentation mode is currently set to IlvGanttNodeDrawDefault.

Parameters
modeThe presentation mode.
redrawSpecifies whether the Gantt chart is refreshed.
void IlvGanttChart::setObjectFileName ( const char *  name)

Sets the name of the file associated with the chart.

This file is read by the Gantt chart when the manager and the grapher views are created.

Parameters
nameThe name of the file.
IlBoolean IlvGanttChart::setObjectName ( IlvGanttAbstractObject object,
const char *  name,
IlBoolean  redraw = IlTrue 
)

Sets the name of the Gantt object.

Object names must be unique in the scope of a given Gantt chart. Trying to give the same name to two different objects results in an error and the function returns IlFalse. You can rename an object by calling setObjectName with the new name parameter. You can delete an object name by setting the name parameter to 0 when calling this function. An attempt to erase the name of an unnamed object is an error.

Warning
[note] You can specify your own IlvGanttSetGraphicName function for a given subtype of IlvGraphic. This function is automatically called (by setObjectName) for all the Gantt objects represented by graphic objects that belong to the given graphic class or any subclass that does not have an associated function. The arg parameter is set to the subnode index if the object parameter is a Gantt node. The Gantt chart library specifies functions for the IlvMessageLabel and IlvLinkLabel classes. You can override the predefined functions or specify your own function for other classes by calling: TheGraphicClass::AddProperty(gantt->nameProperty(), yourFunction); where TheGraphicClass is to be replaced by the name of the given type of IlvGraphic.
Parameters
objectThe Gantt object to rename. This name must be unique in the scope of the Gantt chart.
nameThe new name of the object.
redrawIndicates whether you want the views to be redrawn.
Returns
IlTrue on success, or IlFalse on failure.
See Also
IlvGanttSetGraphicName
IlvGraphic* IlvGanttChart::setRowGrid ( IlvGraphic compoGrid,
IlBoolean  redraw = IlTrue,
IlInt  layer = 0 
)

Sets the grid for the Gantt rows.

The row grid is an IlvGraphic displayed in the grapher views to show the grid between the Gantt rows. The row grid object is automatically resized by the IlvGanttChart each time the work area of the Gantt is changed (for example, when a a new line is added, a line is deleted, or a line is resized).

Parameters
compoGridThe row grid.
redrawIlTrue to redraw after setting the grid.
layerThe layer the grid is added to.
Returns
The old row grid.
void IlvGanttChart::setShowingGrapherViewBorders ( IlBoolean  flag,
IlBoolean  redraw = IlTrue 
)

Sets the visibility of the borders of the grapher views.

Sets the border display flag to flag and redraws the grapher views if needed. You can set the parameter redraw to IlFalse if you do not want to refresh the view contents.

Parameters
flagSet to IlTrue to show the borders.
redrawSet to IlTrue to refresh the view contents.
IlBoolean IlvGanttChart::setStep ( IlUShort  index,
IlUShort  step,
IlBoolean  redraw = IlTrue 
)

Sets the graduation step.

You can set the parameter redraw to IlFalse if you do not want to refresh the view contents.

Parameters
index0 for the left grapher views, and 1 for the right.
stepThe time graduation step.
redrawIndicates whether the view contents is refreshed.
IlvGraphic* IlvGanttChart::setSubNodeGraphicModel ( IlvGraphic model,
IlBoolean  deleteOld = IlTrue 
)

Sets the graphic model for subnodes.

This model is copied each time a subnode that does not yet encapsulate a graphic object and whose node does not have a subnode graphic model is added to the Gantt chart. This Gantt chart computes the prettied bounding box of the subnode and reshapes the copied graphic object accordingly. You can specify IlFalse as the value of the destroyOld parameter in order not to call delete for the old graphic model.

Parameters
modelThe graphic model.
deleteOldIndicates whether the previous model is to be deleted.
Returns
The old subnode graphic model.
IlvGanttSubNodeHook* IlvGanttChart::setSubNodeHook ( IlvGanttSubNodeHook hook)

Installs a subnode hook.

When you use IlvGanttSelectorInteractor to reshape or move a subnode, this hook will be called.

Parameters
hookThe subnode hook to install.
void IlvGanttChart::setSubNodeMinimumSize ( IlInt  size)

Sets the minimum size of subnodes.

Parameters
sizeThe minimum size of the subnodes.
virtual void IlvGanttChart::setSubNodeValues ( IlvGanttNode node,
IlUShort  index,
IlInt  startMin,
IlInt  startMax,
IlInt  endMin,
IlInt  endMax,
IlvGanttLine line,
IlUShort  capacity,
IlBoolean  redraw = IlTrue 
)
virtual

Sets the values of the subnodes.

Sets the minimum and maximum start times, the minimum and maximum end times, the associated line, and the capacity of the index th subnode of node.

Parameters
nodeThe node.
indexThe position of the subnode.
startMinThe minimum start time.
startMaxThe maximum start time.
endMinThe minimum end time.
endMaxThe maximum end time.
lineThe line associated with the subnode.
capacityThe capacity of the the subnode.
redrawSet to IlFalse to not have the grapher redraw the invalidated area of the display.
void IlvGanttChart::showFreeNodes ( IlBoolean  flag,
IlBoolean  redraw = IlTrue 
)

Sets the display flag of the free nodes.

A free node is a node that has no subnodes attached to any user created line. If flag is set to IlTrue, a user can add free nodes to the Gantt chart. This Gantt chart creates an internal hidden line and places it at the final row. If flag is set to IlFalse, this Gantt chart removes all its free nodes from its object set, and ignores any future free nodes added by the user.

Parameters
flagThe display flag.
redrawSpecifies whether the Gantt chart is refreshed.
void IlvGanttChart::showGrid ( IlBoolean  flag,
IlBoolean  redraw = IlTrue 
)

Sets the grid display.

Sets the grid display flag to flag and redraws the grapher views if needed. You can set the parameter redraw to IlFalse if you do not want to refresh the view contents.

Parameters
flagSet to IlTrue to set the grid display.
redrawSet to IlTrue to refresh the view contents.
void IlvGanttChart::showInterval ( IlUShort  index,
IlInt  shownStart,
IlInt  shownEnd,
IlBoolean  redraw = IlTrue 
)

Modifies the shown start and end times in the grapher views.

You can set the parameter redraw to IlFalse to not refresh the view contents.

Parameters
index0 for the left grapher views, and 1 for the right.
redrawIndicates whether the view contents are refreshed.
shownStartThe shown start time.
shownEndThe shown end time.
virtual void IlvGanttChart::subNodeBBox ( const IlvGanttNode node,
IlUShort  index,
IlvRect bbox 
) const
virtual

Gets the bounding box of a subnode.

Returns the bounding box of the index th subnode of node in bbox.

Parameters
nodeThe node
indexThe position of the requested subnode.
bboxThe bounding box
Returns
The bounding box of the index th subnode of node.
virtual IlBoolean IlvGanttChart::swapLines ( IlvGanttLine line1,
IlvGanttLine line2,
IlBoolean  redraw = IlTrue 
)
virtual

Swaps two Gantt lines.

Swaps the Gantt lines line1 and line2 and returns IlTrue if both lines are managed by the Gantt chart and are different from each other and from any internal hidden line created to hold free nodes. Otherwise, this function returns IlFalse.

Parameters
line1The first Gantt line to swap.
line2The second Gantt line to swap.
redrawSet to IlFalse if you do not want an immediate refresh of the display to take place.
virtual void IlvGanttChart::translateViews ( IlUShort  index,
IlvPos  deltaCol,
IlvPos  deltaRow,
IlBoolean  redraw = IlTrue 
)
virtual

Translates the given view.

Translates the view indicated by index and all other manager and grapher views that have the same column and row as this view by deltaCol columns and deltaRow rows. You can set the parameter redraw to IlFalse to not refresh the view contents.

Parameters
indexThe index of the view.
deltaColNumber of columns to translate by.
deltaRowNumber of rows to translate by.
redrawSpecifies whether the view contents are refreshed.
virtual void IlvGanttChart::updateScale ( IlvScale scale,
IlBoolean  redraw = IlTrue 
) const
virtual

Updates the scale.

This function is called when a new transformation is applied to the corresponding grapher views. You can set the parameter redraw to IlFalse if you do not want to refresh the view contents.

Parameters
scaleThe scale to update.
redrawIlTrue to refresh the view contents.

Reimplemented in IlvGanttChartForm.

static IlSymbol* IlvGanttChart::WorkAreaCallbackType ( )
static

Returns the callback type for the "Work Area" callback.

The "Work Area callback" is called when:

  • The start or the end is changed;
  • Gantt rows are added or deleted;
  • Gantt row heights are changed.
See Also
IlvGraphic::setCallback
IlUShort IlvGanttChart::yToClosestRow ( IlvPos  y) const

Gets the closest row to a given location.

Parameters
yThe given location.
Returns
The closest row to y.
IlBoolean IlvGanttChart::yToRow ( IlvPos  y,
IlUShort row 
) const

Gets the row located at a given location.

Parameters
yThe location to search for a row.
rowThe returned row.
Returns
IlTrue if there is a row located at y, or IlFalse if there is none.
virtual IlBoolean IlvGanttChart::zoomViews ( IlUShort  index,
IlvDirection  dir,
IlUShort  fromCol,
IlUShort  toCol,
IlUShort  fromRow,
IlUShort  toRow,
IlBoolean  redraw = IlTrue 
)
virtual

Zooms in or out of the given view.

Zooms in or out of the view indicated by index and for all other manager and grapher views having the same column and row as this view. The dir parameter can be set to one of three values (IlvHorizontal, IlvVertical, IlvHorizontal|IlvVertical), indicating the direction on which the zooming will be applied.

The parameters fromCol and toCol are ignored if dir is set to IlvVertical. Likewise, fromRow and toRow are ignored when dir is set to IlvHorizontal. These parameters indicate the lines and the time intervals that are visible on the screen.

Zooming cannot be done when only one row or one column (step) is visible. Unzooming cannot be done when all rows or all columns (steps) are visible.

Set the parameter redraw to IlFalse to not refresh the view contents.

Parameters
indexThe index of the view.
dirThe direction on which the zooming will be applied.
fromColThe first visible column.
toColThe last visible column.
fromRowThe first visible row.
toRowThe last visible row.
redrawSpecifies whether the view contents are refreshed.
Returns
IlTrue on success, and IlFalse on error (the zooming cannot be done).

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