Rogue Wave Views 5.6 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
Gantt chart form class. More...
#include <ilviews/gantt/ganttfrm.h>
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. | |
IlvGraphic * | getCompositeGrid () const |
Gets the composite grid currently being used. | |
IlvGraphic * | getCompositeScale () const |
Gets the composite scale currently being used. | |
virtual IlvRect & | getLineArea (IlvRect &area) const |
Returns the bounds of the Gantt lines. | |
IlvGanttResourceHeader * | getResourceHeader () const |
Gets the resource header. | |
IlvScrollBar * | getResourceScrollBar () const |
Gets the resource table scroll bar. | |
IlvView * | getScaleView (IlUShort viewIndex) const |
Gets the scale view. | |
IlvSplitterGadget * | horizontalSplitter (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. | |
IlvGraphic * | setCompositeGrid (IlvGraphic *compoGrid, IlBoolean redraw=IlTrue) |
Sets the composite grid for the Gantt chart form. | |
IlvGraphic * | setCompositeScale (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. | |
IlvSplitterGadget * | verticalSplitter (IlInt index) const |
Gets the vertical splitter. |
Gantt chart form class.
Library: ilvgantt
IlvGanttChartForm
is a subclass of IlvGanttChart
. It has the following additional features:
<align="center">
IlvGanttChart
is not accessible by users of the Gantt. It is replaced by the splitters. The size of the panes can be adjusted by dragging the splitters. You can even collapse a pane by dragging a splitter and dropping it on another splitter. Similarly you can do the opposite to expand a collapsed pane. The resource table has three parts:
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
. IlvGanttResourceLine
. An IlvGanttResourceLine
is a single row IlvScrolledMatrix
. 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.
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.
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. |
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.
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.
This method is deprecated. Use IlvGanttChart::getRowGrid()
instead.
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.
null
if no composite scale has been set. Returns the bounds of the Gantt lines.
This function computes the bounding box of the Gantt lines.
area | The bounds of the Gantt lines. |
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.
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.
null
if the makeView
method has not been called. Gets the scale view.
Returns the scale view that is on the top right of the Gantt chart form.
viewIndex | Valid values are 0 and 1 . |
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.
index | Valid values are 0 and 1 . |
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.
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.
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.
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.
This method is deprecated. Use IlvGanttChart::setRowGrid()
instead.
compoGrid | The composite grid. | |
redraw | IlTrue to redraw after setting the composite grid. |
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.
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. |
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.
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.
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.
index | Valid values are 0 and 1 . |
null
if the makeView
method has not been called. © 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.