rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Gantt Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvGanttChartForm Class Reference

Gantt chart form class. More...

#include <ilviews/gantt/ganttfrm.h>

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

List of all members.

Public Member Functions

 IlvGanttChartForm (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 separsize=6, IlvPosition hasScale=IlvTop, IlvPosition hasHSB=IlvBottom, IlvPosition hasVSB=IlvRight, int numLayers=5, IlBoolean useacc=IlTrue, IlvPalette *palette=0)
 Constructor.
virtual void deleteAll (IlBoolean destroy, IlBoolean redraw=IlTrue)
 Removes all the objects stored in the chart.
IlvGraphicgetCompositeGrid () const
 Gets the composite grid currently being used.
IlvGraphicgetCompositeScale () const
 Gets the composite scale currently being used.
virtual IlvRectgetLineArea (IlvRect &area) const
 Returns the bounds of the Gantt lines.
IlvGanttResourceHeadergetResourceHeader () const
 Gets the resource header.
IlvScrollBargetResourceScrollBar () const
 Gets the resource table scroll bar.
IlvViewgetScaleView (IlUShort viewIndex) const
 Gets the scale view.
IlvSplitterGadgethorizontalSplitter (IlInt index) const
 Gets the horizontal splitter.
virtual void insertLine (IlvGanttLine *, IlUShort row, IlBoolean redraw=IlTrue, int layer=-1)
 Inserts a line before a row.
virtual void makeView (IlvPort *dst, const IlvTransformer *t)
 Creates the views.
virtual void moveSplitter (IlvDirection dir, IlUInt index, IlvPos pos)
 Moves a splitter to a given position.
IlvGraphicsetCompositeGrid (IlvGraphic *compoGrid, IlBoolean redraw=IlTrue)
 Sets the composite grid for the Gantt chart form.
IlvGraphicsetCompositeScale (IlvGraphic *compoScale, IlBoolean redraw=IlTrue, IlBoolean reshape=IlFalse)
 Sets the composite scale for the Gantt chart form.
virtual void setDoubleBuffering (IlBoolean doubleBuffer)
 Enables or disables double buffering.
virtual void updateScale (IlvScale *scale, IlBoolean redraw=IlTrue) const
 Updates the scale.
IlvSplitterGadgetverticalSplitter (IlInt index) const
 Gets the vertical splitter.

Detailed Description

Gantt chart form class.

Library: ilvgantt

IlvGanttChartForm is a subclass of IlvGanttChart. It has the following additional features:

<align="center">

ganttform.gif


An IlvGanttChartForm

The resource table has three parts:

  1. The resource header is at the top of the table. It is mainly used to show the titles of each column of the resource table. In addition, you can adjust the widths of the columns in the same way as you would resize the columns of an IlvSheet. The resource header is an object of the class IlvGanttResourceHeader, which is a subclass of IlvSheet. An IlvGanttResourceHeader is a single row IlvSheet that can be used in exactly the same way as an IlvSheet.
  2. The resources are listed in the main part of the table. Each line displays a resource and is a separate object of the class IlvGanttResourceLine. An IlvGanttResourceLine is a single row IlvScrolledMatrix.
  3. At the bottom of the table is a horizontal scroll bar.

After an IlvGanttChartForm is created, you must create an IlvGanttResourceLine and call the setLineGraphicModel() method in order to specify the IlvGanttResourceLine as the line graphic mode of the IlvGanttChartForm.

For more information on the Gantt chart form, read the <ilvhome>/samples/gantt/calendar/readme.txt file.

See also:
IlvGanttChart.

Constructor & Destructor Documentation

IlvGanttChartForm::IlvGanttChartForm ( 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  separsize = 6,
IlvPosition  hasScale = IlvTop,
IlvPosition  hasHSB = IlvBottom,
IlvPosition  hasVSB = IlvRight,
int  numLayers = 5,
IlBoolean  useacc = IlTrue,
IlvPalette palette = 0 
)

Constructor.

The constructor initializes a new IlvGanttChartForm object. The scales and scroll bars are positioned by default.

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.
scaleH 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.
vwspacing Indicates the grapher view spacing.
offset Specifies the spacing in pixels between the left, right, top, or bottom edge of Gantt chart and any scale, scroll bar, or view.
separsize 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 This parameter is ignored. The scales are always on the top.
hasHSB This parameter is ignored. The horizontal scroll bars are always at the bottom.
hasVSB This parameter is ignored. The vertical scroll bars are always on the right.
numLayers Indicates the number of layers to be handled by the grapher.
useacc 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").
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.

Member Function Documentation

virtual void IlvGanttChartForm::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 from IlvGanttChart.

IlvGraphic* IlvGanttChartForm::getCompositeGrid (  )  const

Gets the composite grid currently being used.

Returns the composite grid currently used in the Gantt chart form.

Warning:
[note] This function has been changed since Views 5.0.

This method is deprecated. Use IlvGanttChart::getRowGrid() instead.

Returns:
The composite grid currently used. It returns null if no composite grid has been set.
IlvGraphic* IlvGanttChartForm::getCompositeScale (  )  const

Gets the composite scale currently being used.

Returns the composite scale currently used in the Gantt chart form.

Warning:
[note] This function has been changed since Views 5.0.
Returns:
The composite scale currently used. It returns null if no composite scale has been set.
virtual IlvRect& IlvGanttChartForm::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 from IlvGanttChart.

IlvGanttResourceHeader* IlvGanttChartForm::getResourceHeader (  )  const

Gets the resource header.

Returns the resource header that is on the top left of the Gantt chart form.

Returns:
The resource header. It returns null if the makeView method has not been called.
IlvScrollBar* IlvGanttChartForm::getResourceScrollBar (  )  const

Gets the resource table scroll bar.

Returns the resource table scroll bar that is on the bottom left of the Gantt chart form.

Returns:
The resource table scroll bar. It returns null if the makeView method has not been called.
IlvView* IlvGanttChartForm::getScaleView ( IlUShort  viewIndex  )  const

Gets the scale view.

Returns the scale view that is on the top right of the Gantt chart form.

Parameters:
viewIndex Valid values are 0 and 1.
Returns:
The scale view. It returns null if the makeView method has not been called.
IlvSplitterGadget* IlvGanttChartForm::horizontalSplitter ( IlInt  index  )  const

Gets the horizontal splitter.

Returns the horizontal splitter of the Gantt chart form.

Parameters:
index Valid values are 0 and 1.
Returns:
The horizontal splitter of the Gantt chart form. It returns null if the makeView method has not been called.
virtual void IlvGanttChartForm::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 from IlvGanttChart.

virtual void IlvGanttChartForm::makeView ( IlvPort dst,
const IlvTransformer t 
) [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 IlvGanttChart.

virtual void IlvGanttChartForm::moveSplitter ( IlvDirection  dir,
IlUInt  index,
IlvPos  pos 
) [virtual]

Moves a splitter to a given position.

Moves the given splitter of the Gantt chart form to the position pos. It should not be called if the makeView method has not been called.

This function is used to adjust the size of a pane. It can also be used to collapse or expand a pane.

Parameters:
dir Specifies in which direction the splitter will be moved (IlvHorizontal or IlvVertical).
index Valid values are 0 and 1.
pos The new position for the splitter.
IlvGraphic* IlvGanttChartForm::setCompositeGrid ( IlvGraphic compoGrid,
IlBoolean  redraw = IlTrue 
)

Sets the composite grid for the Gantt chart form.

The composite grid is an IlvGraphic displayed in the grapher views to the right of the Gantt chart form.

The IlvGanttChart::makeView member function will add this composite grid to the grapher of the Gantt chart form.

Warning:
[note] This function has been changed since Views 5.0.

This method is deprecated. Use IlvGanttChart::setRowGrid() instead.

Parameters:
compoGrid The composite grid.
redraw IlTrue to redraw after setting the composite grid.
Returns:
The old scale.
IlvGraphic* IlvGanttChartForm::setCompositeScale ( IlvGraphic compoScale,
IlBoolean  redraw = IlTrue,
IlBoolean  reshape = IlFalse 
)

Sets the composite scale for the Gantt chart form.

The composite scale is an IlvGraphic displayed in the scale views at the top of the Gantt chart form. This function does not delete the composite scale of the IlvGanttChart.

See the <ilvhome>/samples/gantt/calendar sample for more information on the composite scale.

Warning:
[note] This function has been changed since Views 5.0.
Parameters:
compoScale The composite scale.
redraw IlTrue to redraw after setting the composite scale.
reshape Indicates whether the scale should be reshaped to fit into the total range (start, end) of the Gantt chart.
Returns:
The old scale.
virtual void IlvGanttChartForm::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 from IlvGanttChart.

virtual void IlvGanttChartForm::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 from IlvGanttChart.

IlvSplitterGadget* IlvGanttChartForm::verticalSplitter ( IlInt  index  )  const

Gets the vertical splitter.

Returns the horizontal splitter of the Gantt chart form.

Parameters:
index Valid values are 0 and 1.
Returns:
The vertical splitter of the Gantt chart form. It returns null if the makeView method has not been called.
 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.