rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Gantt Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

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

List of all members.

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

Static Public Member Functions

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

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">

ganttchart.gif


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:
display The display.
rect The size of the Gantt chart.
start The start time in the interval managed by the Gantt chart, given as an integer.
end The end time in the interval managed by the Gantt chart, given as an integer.
shownStart The shown start time, given as an integer.
shownEnd The shown end time, given as an integer.
step The graduation step on all the Gantt chart views.
rowSize The initial width of the manager views.
lineInfoSize The width of user-defined regions.
unitSize Specifies the line-unit height and subnode height.
scaleHeight Indicates the scale height.
sbsize Specifies the height of the horizontal scroll bars and the width of the vertical scroll bars.
spacing Indicates the spacing between Gantt lines and the left, top, right, and bottom sides of the manager views.
viewSpacing Indicates the grapher view spacing.
margin Specifies the spacing in pixels between the left, right, top, or bottom edge of Gantt chart and any scale, scroll bar, or view.
handleSize Specifies 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.
hasScale Specifies 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.
hasHorzScrollBar Specifies 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.
hasVertScrollBar Specifies 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.
layers Indicates the number of layers to be handled by the grapher.
useAccelerators An 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.
palette Specifies 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:
line The line to add.
redraw Indicates whether you want the manager and the grapher to redraw the invalidated area of the display.
layer Specifies, 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:
link The link to add.
redraw Indicates whether the grapher redraws the future location of the graphic object before it is drawn at insert time.
layer Specifies 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:
node The node to add.
redraw Indicates whether you want the grapher to redraw the future location of the graphic object before it is drawn at insert time.
layer Specifies, 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:
node The node to add the subnode to.
subNode The subnode.
redraw Indicates whether you want the grapher to redraw the future location of the graphic object before it is drawn at insert time.
layer Specifies, 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:
subnode The 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:
flag Set 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:
row The row.
redraw If 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:
index The 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:
grapher The grapher.
view The 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:
display The display.
origin The point where to create the scale.
size The scale size.
start The starting limit of the shown time.
end The ending limit of the shown time.
step The graduation step on the Gantt chart view.
p The position of the scale.
virtual IlvGanttScrollViewHook* IlvGanttChart::createScrollHook ( IlvGrapher grapher,
IlvView view 
) [virtual]

Creates the scroll hook connected to the view.

Parameters:
grapher The grapher.
view The 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:
destroy Specifies whether objects are destroyed after they are removed.
redraw Specifies 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:
destroy Indicates whether objects are destroyed after being removed.
redraw IlTrue 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:
dst The port.
index Indicates the grapher view for which the grid points are computed.
skipCompute Indicates whether this function calls the computeGridPoints member function.
clip The clipping region.
trans The transformer of the grapher view.
direction Indicates 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:
manager The manager of the view to translate.
view The view of the Gantt chart.
point The mouse position.
redraw Set to IlTrue to refresh the view contents.
IlUShort IlvGanttChart::firstVisibleRow ( IlUShort  index  )  const

Gets the first visible row of the manager view.

Parameters:
index The 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:
index The index of the view.
dir The direction on which the fit-to-contents is applied.
redraw Specifies 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:
index The 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:
index The 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:
index The 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:
row The 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:
area The 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:
row The row where the line is located.
time The 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:
line The 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:
count Set 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:
count Set to the number of subnodes in the array.
row The 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:
index The 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:
count Set 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 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:
name The name of the Gantt object.
Returns:
The Gantt object with the given name. If there is none, it returns 0.
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:
graphic The graphic object.
Returns:
The Gantt object associated with the given graphic object in the Gantt chart. If there is none, it returns 0.
const char* IlvGanttChart::getObjectName ( const IlvGanttAbstractObject obj  )  const

Gets the name of the Gantt object.

Parameters:
obj The 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:
index The 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:
index The 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:
index 0 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:
index 0 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:
index 0 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:
graphic The 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:
node The node.
index The position of the subnode.
start The start position.
end The 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:
index The 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:
area The work area.
Returns:
The reference to area.
void IlvGanttChart::grapherViewsBBox ( IlvRect bbox  )  const

Gets the bounding box of the four grapher views.

Parameters:
bbox The 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:
handlePosition The 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:
newsize The 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:
line The line to insert.
row The row to insert the line into.
redraw Indicates whether you want the manager and the grapher to redraw the invalidated area of the display.
layer Specifies, 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:
object The 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:
index The 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:
row The row where the line is located.
bbox The 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:
file The 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:
dst The port.
t The 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:
position The 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:
line The line to move.
row The row to move the line to.
redraw Set 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:
row The row.
prettyBox The new size of the row.
redraw If 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:
node The node.
index The position of the requested subnode.
bbox The bounding box.
redraw Set 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:
filename The name of the text file to dump into.
xmargin Specifies the offset of the printed object from the left and the right sides of the output paper.
ymargin Specifies the offset of the printed object from the top and the bottom sides of the output paper.
rotate IlFalse 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:
redraw Specifies 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:
row The row where the line and the subnodes are located.
redraw Indicates whether you want the manager and the grapher to redraw the invalidated area of the display.
destroy IlTrue 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:
link The link to remove.
redraw Specifies whether you want the grapher to redraw the invalidated area of the display.
destroy IlTrue 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:
node The node to remove.
redraw Indicates whether the grapher is to redraw the invalidated area of the display.
destroy IlTrue 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:
node The Gantt chart node.
indexArray The index of subnodes.
num The number of elements stored in indexArray.
redraw IlTrue if you want the grapher to redraw the invalidated area of the display.
destroy IlTrue 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:
index The index of the view.
redraw Specifies 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:
row The row where the line is located.
bbox The 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:
row Indicates which row has been resized.
dh Indicates 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:
file The output file.
void IlvGanttChart::setBreakGraphicModel ( IlvGraphic model,
IlBoolean  destroyOld = IlTrue 
)

Sets the break graphic model.

Parameters:
model The break graphic model.
destroyOld If 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:
doubleBuffer Indicates 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:
palette The 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:
bgPal The 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:
hilite The 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:
model The graphic model.
deleteOld Indicates 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:
compoGrid The line grid.
redraw IlTrue to redraw after setting the grid.
layer The 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:
model The graphic model.
deleteOld Indicates whether the previous model is to be deleted.
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:
mode The presentation mode.
redraw Specifies whether the Gantt chart is refreshed.
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:
node The node.
mode The presentation mode.
redraw Specifies 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:
name The 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:
object The Gantt object to rename. This name must be unique in the scope of the Gantt chart.
name The new name of the object.
redraw Indicates 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:
compoGrid The row grid.
redraw IlTrue to redraw after setting the grid.
layer The 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:
flag Set to IlTrue to show the borders.
redraw Set 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:
index 0 for the left grapher views, and 1 for the right.
step The time graduation step.
redraw Indicates 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:
model The graphic model.
deleteOld Indicates 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:
hook The subnode hook to install.
void IlvGanttChart::setSubNodeMinimumSize ( IlInt  size  ) 

Sets the minimum size of subnodes.

Parameters:
size The 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:
node The node.
index The position of the subnode.
startMin The minimum start time.
startMax The maximum start time.
endMin The minimum end time.
endMax The maximum end time.
line The line associated with the subnode.
capacity The capacity of the the subnode.
redraw Set 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:
flag The display flag.
redraw Specifies 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:
flag Set to IlTrue to set the grid display.
redraw Set 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:
index 0 for the left grapher views, and 1 for the right.
redraw Indicates whether the view contents are refreshed.
shownStart The shown start time.
shownEnd The 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:
node The node
index The position of the requested subnode.
bbox The 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:
line1 The first Gantt line to swap.
line2 The second Gantt line to swap.
redraw Set 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:
index The index of the view.
deltaCol Number of columns to translate by.
deltaRow Number of rows to translate by.
redraw Specifies 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:
scale The scale to update.
redraw IlTrue 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:
y The 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:
y The location to search for a row.
row The 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:
index The index of the view.
dir The direction on which the zooming will be applied.
fromCol The first visible column.
toCol The last visible column.
fromRow The first visible row.
toRow The last visible row.
redraw Specifies whether the view contents are refreshed.
Returns:
IlTrue on success, and IlFalse on error (the zooming cannot be done).
 All Classes Files Functions Variables Typedefs Enumerations Friends

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