Rogue Wave Views Gantt Package API Reference Guide |
Rogue Wave Views Documentation Home |
Rogue Wave Views Gantt chart user interface class. More...
#include <ilviews/gantt/gantt.h>
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 margin=0, IlvDim handleSize=8, IlvPosition hasScale=IlvTop, IlvPosition hasHSB=IlvBottom, IlvPosition hasVSB=IlvRight, int numLayers=5, IlBoolean useAcc=IlTrue, IlvPalette *palette=0) | |
Constructor. More... | |
virtual | ~IlvGanttChart () |
Destructor. More... | |
void | addLine (IlvGanttLine *line, IlBoolean redraw=IlTrue, int layer=1) |
Appends a line to the Gantt chart. More... | |
virtual void | addLink (IlvGanttLink *link, IlBoolean redraw=IlTrue, int layer=2) |
Adds a link to the Gantt chart. More... | |
virtual void | addNode (IlvGanttNode *node, IlBoolean redraw=IlTrue, int layer=3) |
Adds a node to the Gantt chart. More... | |
virtual IlBoolean | addSubNode (IlvGanttNode *node, IlvGanttSubNode *subNode, IlBoolean redraw=IlTrue, int layer=3) |
Adds a subnode to the Gantt chart node. More... | |
void | addSubNodeToHiliteList (IlvGanttSubNode *subnode) |
Adds a subnode to the highlight list. More... | |
void | allowDragDrop (IlBoolean flag) |
Specifies whether drag-and-drop operations are allowed. More... | |
virtual IlvPos | compactRow (IlUShort row, IlBoolean redraw=IlTrue) |
Compresses the height of a given row. More... | |
void | computeGridPoints (IlUShort index) |
Computes the grid points. More... | |
virtual IlvGanttGridViewHook * | createGridHook (IlvGrapher *grapher, IlvView *view) |
Creates the grid hook connected to the view of the grapher. More... | |
virtual IlvScale * | createScale (IlvDisplay *display, const IlvPoint &origin, IlvDim size, IlInt start, IlInt end, IlUShort step, IlvPosition p=IlvTop) const |
Creates a scale object. More... | |
virtual IlvGanttScrollViewHook * | createScrollHook (IlvGrapher *grapher, IlvView *view) |
Creates the scroll hook connected to the view. More... | |
virtual void | deleteAll (IlBoolean destroy, IlBoolean redraw=IlTrue) |
Removes all the objects stored in the chart. More... | |
virtual void | deleteNodes (IlBoolean destroy, IlBoolean redraw=IlTrue) |
Deletes the Gantt nodes and links stored in the Gantt chart. More... | |
virtual void | drawGrid (IlvPort *dst, IlUShort index, IlBoolean skipCompute=IlFalse, const IlvRegion *clip=0, IlvTransformer *trans=0, IlvDirection direction=(IlvDirection)(IlvHorizontal|IlvVertical)) |
Draws the grid in the given port. More... | |
void | emptyHiliteList () |
Resets the highlight list to empty. More... | |
virtual void | ensureVisible (IlvManager *manager, IlvView *view, const IlvPoint &point, IlBoolean redraw=IlTrue) |
Translates the working view according to the mouse position. More... | |
IlUShort | firstVisibleRow (IlUShort index) const |
Gets the first visible row of the manager view. More... | |
virtual void | fitViewsTransformerToContents (IlUShort index, IlvDirection dir, IlBoolean redraw=IlTrue) |
Computes the transformer so it shows every object stored in all the visible layers. More... | |
IlvGraphic * | getBreakGraphicModel () const |
Gets the break graphic model currently used. More... | |
IlInt | getEnd () const |
Gets the end time managed by the chart. More... | |
IlvGrapher * | getGrapher () const |
Gets the grapher stored in the chart. More... | |
IlvView * | getGrapherView (IlUShort index) const |
Returns the grapher view indicated by index. More... | |
IlvGanttGridViewHook * | getGridHook (IlUShort index) const |
Returns the grid hook connected to the view indicated by index. More... | |
IlvPalette * | getGridPalette () const |
Returns the palette used to draw the grid. More... | |
IlvFilledRectangle * | getHandle () const |
Gets the handle box that controls the size of the views. More... | |
IlvPalette * | getHiliteBackGroundPalette () const |
Gets the highlight background palette. More... | |
IlBoolean | getHiliteState () const |
Gets the highlight state. More... | |
IlvScrollBar * | getHorizontalScrollBar (IlUShort index) const |
Gets the horizontal scroll bar. More... | |
IlvGanttLine * | getLine (IlUShort row) const |
Gets a Gantt line. More... | |
virtual IlvRect & | getLineArea (IlvRect &area) const |
Returns the bounds of the Gantt lines. More... | |
IlvGraphic * | getLineGraphicModel () const |
Gets the line graphic model of the Gantt chart. More... | |
IlvGraphic * | getLineGrid () const |
Gets the line grid currently being used. More... | |
IlInt | getLineLoad (IlUShort row, IlInt time) const |
Gets the difference between the capacity of a line and the sum of the capacities of all subnodes intersecting with a vertical axis. More... | |
IlUShort | getLineRow (const IlvGanttLine *line) const |
Gets the row where the given Gantt line is located. More... | |
IlvGanttLine ** | getLines (IlUShort &count) const |
Gets lines managed by the Gantt chart. More... | |
IlvGanttSubNode ** | getLineSubNodes (IlUInt &count, IlUShort row) const |
Gets the subnodes associated with the Gantt line. More... | |
IlvGraphic * | getLinkGraphicModel () const |
Gets the graphic model of the links. More... | |
IlvManager * | getManager () const |
Gets the manager stored in the chart. More... | |
IlvView * | getManagerView (IlUShort index) const |
Returns the manager view indicated by index. More... | |
IlvGanttNodeDrawMode | getNodeDrawMode () const |
Gets the node presentation mode. More... | |
IlvGanttNode ** | getNodes (IlUInt &count) const |
Gets the nodes managed by the chart. More... | |
IlvGanttAbstractObject * | getObject (const IlvGraphic *graphic) const |
Gets the Gantt object. More... | |
IlvGanttAbstractObject * | getObject (const char *name) const |
Gets the Gantt object with the given name. More... | |
const char * | getObjectName (const IlvGanttAbstractObject *obj) const |
Gets the name of the Gantt object. More... | |
IlvGraphic * | getRowGrid () const |
Gets the row grid currently being used. More... | |
IlvScale * | getScale (IlUShort index) const |
Gets a scale object. More... | |
IlvGanttScrollViewHook * | getScrollHook (IlUShort index) const |
Gets the scroll hook connected to the view. More... | |
IlInt | getShownEnd (IlUShort index) const |
Gets the current shown end time for the grapher views. More... | |
IlInt | getShownStart (IlUShort index) const |
Gets the current shown start time for the grapher views. More... | |
IlInt | getStart () const |
Gets the start time managed by the chart. More... | |
IlUShort | getStep (IlUShort index) const |
Gets the graduation step in the grapher views of the Gantt chart. More... | |
IlvGanttSubNode * | getSubNode (const IlvGraphic *graphic) const |
Returns the Gantt subnode associated with the graphic object graphic in the Gantt chart. More... | |
void | getSubNodeDrawnStartEnd (const IlvGanttNode *node, IlUShort index, IlInt &start, IlInt &end) const |
Gets the positions of the given subnode. More... | |
IlvGraphic * | getSubNodeGraphicModel () const |
Gets the graphic model of the subnodes. More... | |
IlvGanttSubNodeHook * | getSubNodeHook () |
Gets the subnode hook installed in a Gantt chart. More... | |
IlInt | getSubNodeMinimumSize () const |
Gets the minimum size of subnodes. More... | |
IlvScrollBar * | getVerticalScrollBar (IlUShort index) const |
Gets the vertical scroll bar. More... | |
IlvRect & | getWorkArea (IlvRect &area) const |
Returns the work area. More... | |
void | grapherViewsBBox (IlvRect &bbox) const |
Gets the bounding box of the four grapher views. More... | |
virtual void | handleReshape (const IlvPoint &handlePosition) |
Handles the resizing of views. More... | |
virtual void | handleResize (const IlvRect &newsize) |
Handles the resizing of Gantt chart components. More... | |
virtual void | insertLine (IlvGanttLine *line, IlUShort row, IlBoolean redraw=IlTrue, int layer=1) |
Inserts a line before a row. More... | |
virtual void | installAccelerators () |
Adds default accelerators to the manager and the grapher event handlers. More... | |
IlBoolean | isDoubleBuffering () const |
Returns whether double buffering is enabled. | |
IlBoolean | isManaged (const IlvGanttAbstractObject *object) const |
Indicates whether the given object is managed by the Gantt chart. More... | |
IlBoolean | isShowingFreeNodes () const |
Indicates whether the chart shows free nodes. More... | |
IlBoolean | isShowingGrapherViewBorders () const |
Indicates whether the borders of the grapher views are drawn. More... | |
IlBoolean | isShowingGrid () const |
Indicates whether a grid is drawn in the grapher views. More... | |
IlUShort | lastVisibleRow (IlUShort index) const |
Gets the last visible row of the manager view. More... | |
virtual void | lineBBox (IlUShort row, IlvRect &bbox) const |
Gets the bounding box of a graphic object associated with a Gantt line. More... | |
virtual void | loadObjects (IlvInputFile &file) |
Loads a set of objects from the input file. More... | |
virtual void | makeView (IlvPort *dst, const IlvTransformer *t=0) |
Creates the views. More... | |
void | moveHandle (const IlvPoint &position) |
Moves the handle box to a new position. More... | |
virtual IlBoolean | moveLine (IlvGanttLine *line, IlUShort row, IlBoolean redraw=IlTrue) |
Moves the line to the given row. More... | |
virtual IlBoolean | prettyRowBBox (IlUShort &row, IlvRect &prettyBox, IlBoolean redraw=IlTrue) |
Compresses the height of a given row. More... | |
virtual void | prettySubNodeBBox (IlvGanttNode *node, IlUShort index, IlvRect &bbox, IlBoolean redraw=IlTrue) |
Gets the prettied bounding box of a subnode. More... | |
virtual void | psDump (const char *filename, IlUInt xmargin=20, IlUInt ymargin=20, IlBoolean rotate=IlTrue) const |
Creates a dump file for PostScript printing. More... | |
void | readObjectFile (IlBoolean redraw=IlTrue) |
Reads a set of IlvGraphic , IlvGanttLine , IlvGanttNode , and IlvGanttLink objects from the file associated with the Gantt chart. More... | |
virtual void | removeHooks () |
Removes the hooks from the grapher. More... | |
virtual IlBoolean | removeLine (IlUShort row, IlBoolean redraw=IlTrue, IlBoolean destroy=IlTrue) |
Removes a line located at a row from the Gantt chart object set. More... | |
virtual IlBoolean | removeLink (IlvGanttLink *link, IlBoolean redraw=IlTrue, IlBoolean destroy=IlTrue) |
Removes a link from the Gantt chart object set. More... | |
virtual IlBoolean | removeNode (IlvGanttNode *node, IlBoolean redraw=IlTrue, IlBoolean destroy=IlTrue) |
Removes a node from the Gantt chart object set. More... | |
virtual IlBoolean | removeSubNodes (IlvGanttNode *node, IlUShort *indexArray, IlUShort num, IlBoolean redraw=IlTrue, IlBoolean destroy=IlTrue) |
Removes subnodes from the Gantt chart node. More... | |
virtual void | resetViewsTransformer (IlUShort index, IlBoolean redraw=IlTrue) |
Resets the transformer so that the initial transformer can be applied. More... | |
void | rowBBox (IlUShort row, IlvRect &bbox) const |
Gets the bounding box of a region that contains the graphic object associated with a Gantt line. More... | |
virtual void | rowResized (IlUShort row, IlvPos dh) const |
Used to indicate that a Gantt row has been resized. More... | |
IlUShort | rows () const |
Gets the number of rows in the Gantt chart. More... | |
virtual void | saveObjects (IlvOutputFile &file) const |
Writes the descriptions of the objects stored in the manager to the output file. More... | |
void | setBreakGraphicModel (IlvGraphic *model, IlBoolean destroyOld=IlTrue) |
Sets the break graphic model. More... | |
virtual void | setDoubleBuffering (IlBoolean doubleBuffer) |
Enables or disables double buffering. More... | |
void | setGridPalette (IlvPalette *palette) |
Sets the palette used to draw the grid. More... | |
void | setHiliteBackGroundPalette (IlvPalette *bgPal) |
Sets the highlight background palette. More... | |
void | setHiliteState (IlBoolean hilite=IlTrue) |
Sets the highlight state. More... | |
IlvGraphic * | setLineGraphicModel (IlvGraphic *model, IlBoolean deleteOld=IlTrue) |
Sets the line graphic model for the Gantt chart. More... | |
IlvGraphic * | setLineGrid (IlvGraphic *compoGrid, IlBoolean redraw=IlTrue, IlInt layer=0) |
Sets the grid for the Gantt lines. More... | |
void | setLinkGraphicModel (IlvGraphic *model, IlBoolean deleteOld=IlTrue) |
Sets the graphic model for links. More... | |
virtual void | setNodeDrawMode (IlvGanttNode *node, IlvGanttNodeDrawMode mode, IlBoolean redraw=IlTrue) |
Sets the node presentation mode. More... | |
void | setNodeDrawMode (IlvGanttNodeDrawMode mode, IlBoolean redraw=IlTrue) |
Sets the node presentation mode. More... | |
void | setObjectFileName (const char *name) |
Sets the name of the file associated with the chart. More... | |
IlBoolean | setObjectName (IlvGanttAbstractObject *object, const char *name, IlBoolean redraw=IlTrue) |
Sets the name of the Gantt object. More... | |
IlvGraphic * | setRowGrid (IlvGraphic *compoGrid, IlBoolean redraw=IlTrue, IlInt layer=0) |
Sets the grid for the Gantt rows. More... | |
void | setShowingGrapherViewBorders (IlBoolean flag, IlBoolean redraw=IlTrue) |
Sets the visibility of the borders of the grapher views. More... | |
IlBoolean | setStep (IlUShort index, IlUShort step, IlBoolean redraw=IlTrue) |
Sets the graduation step. More... | |
IlvGraphic * | setSubNodeGraphicModel (IlvGraphic *model, IlBoolean deleteOld=IlTrue) |
Sets the graphic model for subnodes. More... | |
IlvGanttSubNodeHook * | setSubNodeHook (IlvGanttSubNodeHook *hook) |
Installs a subnode hook. More... | |
void | setSubNodeMinimumSize (IlInt size) |
Sets the minimum size of subnodes. More... | |
virtual void | setSubNodeValues (IlvGanttNode *node, IlUShort index, IlInt startMin, IlInt startMax, IlInt endMin, IlInt endMax, IlvGanttLine *line, IlUShort capacity, IlBoolean redraw=IlTrue) |
Sets the values of the subnodes. More... | |
void | showFreeNodes (IlBoolean flag, IlBoolean redraw=IlTrue) |
Sets the display flag of the free nodes. More... | |
void | showGrid (IlBoolean flag, IlBoolean redraw=IlTrue) |
Sets the grid display. More... | |
void | showInterval (IlUShort index, IlInt shownStart, IlInt shownEnd, IlBoolean redraw=IlTrue) |
Modifies the shown start and end times in the grapher views. More... | |
virtual void | subNodeBBox (const IlvGanttNode *node, IlUShort index, IlvRect &bbox) const |
Gets the bounding box of a subnode. More... | |
virtual IlBoolean | swapLines (IlvGanttLine *line1, IlvGanttLine *line2, IlBoolean redraw=IlTrue) |
Swaps two Gantt lines. More... | |
virtual void | translateViews (IlUShort index, IlvPos deltaCol, IlvPos deltaRow, IlBoolean redraw=IlTrue) |
Translates the given view. More... | |
virtual void | updateScale (IlvScale *scale, IlBoolean redraw=IlTrue) const |
Updates the scale. More... | |
IlUShort | yToClosestRow (IlvPos y) const |
Gets the closest row to a given location. More... | |
IlBoolean | yToRow (IlvPos y, IlUShort &row) const |
Gets the row located at a given location. More... | |
virtual IlBoolean | zoomViews (IlUShort index, IlvDirection dir, IlUShort fromCol, IlUShort toCol, IlUShort fromRow, IlUShort toRow, IlBoolean redraw=IlTrue) |
Zooms in or out of the given view. More... | |
Static Public Member Functions | |
static IlSymbol * | WorkAreaCallbackType () |
Returns the callback type for the "Work Area" callback. More... | |
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:
1
is called a unary resource. Resources are described in the Gantt chart through IlvGanttChart
class objects. IlvGanttNode
and IlvGanttSubNode
class objects. IlvGanttLink
. A Gantt link has a starting activity, an ending activity, and a delay. This delay is the time that elapses between the two activities. Objects of type IlvGanttLine
, IlvGanttNode
, IlvGanttSubNode
, and IlvGanttLink
represent resources, activities, subactivities, and precedence constraints. All these objects inherit from the abstract class IlvGanttAbstractObject
. They encapsulate graphic objects of any subclass of IlvGraphic
.
These graphic objects can be created automatically when a line, a node, a subnode, or a link is added to the Gantt chart, or specified by the user through graphic models. A graphic model is an instance of any subclass of IlvGraphic
that defines a copy
member function that the Gantt chart uses to make a copy of the model. The bounding boxes of the copied graphic objects are computed by the Gantt chart.
The Gantt chart can display and edit this data consistently through the Gantt chart grapher and manager views. These views are created inside the Gantt chart object and attached to a grapher (four views for Gantt nodes and links) and a manager (two views for Gantt lines). The user can scroll these views using the keyboard or mouse. Scrolling can be done step-by-step or page-by-page.
In a Gantt chart, some subnodes can be displayed in highlight mode. To do this, the nodes to be highlighted should be put in a list called a highlight list. All subnodes in this list will be displayed with their normal palettes. The rest of the subnodes will be drawn with a haze as defined in the palette highlight background palette. The subnodes in the list are then clearly displayed.
<align="center">
Gantt chart
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 | margin = 0 , |
||
IlvDim | handleSize = 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.
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. |
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. |
hasHSB | 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. |
hasVSB | 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. |
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" 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 |
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.
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.
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 |
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.
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 |
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.
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 |
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.
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.
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.
flag | Set to IlTrue to allow drag-and-drop operations. |
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.
row | The row. |
redraw | If IlTrue this function redraws the views of the IlvGanttChart . |
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
.
index | The index of the grapher view (0 - 1 ) |
|
virtual |
Creates the grid hook connected to the view of the grapher.
grapher | The grapher. |
view | The view. |
|
virtual |
Creates a scale object.
Creates and returns the scale graphic object at the origin point.
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 |
Creates the scroll hook connected to the view.
grapher | The grapher. |
view | The view. |
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 in IlvGanttChartForm.
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.
destroy | Indicates whether objects are destroyed after being removed. |
redraw | IlTrue if you want the manager and the grapher to redraw their views. |
|
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.
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 |
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.
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. |
Gets the first visible row of the manager view.
index | The index of the manager view; 0 for the top manager views and 1 for the bottom. |
|
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.
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.
IlInt IlvGanttChart::getEnd | ( | ) | const |
Gets the end time managed by the chart.
IlvGrapher* IlvGanttChart::getGrapher | ( | ) | const |
Gets the grapher stored in the chart.
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.
index | The index number of the 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 index | The index of the 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.
IlvPalette* IlvGanttChart::getHiliteBackGroundPalette | ( | ) | const |
Gets the highlight background palette.
IlBoolean IlvGanttChart::getHiliteState | ( | ) | const |
Gets the highlight state.
Indicates whether the Gantt chart is in highlight mode.
IlTrue
if the Gantt chart is in highlight mode. IlvScrollBar* IlvGanttChart::getHorizontalScrollBar | ( | IlUShort | index | ) | const |
Gets the horizontal scroll bar.
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. |
IlvGanttLine* IlvGanttChart::getLine | ( | IlUShort | row | ) | const |
Gets a Gantt line.
row | The row where the line is located. |
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 in IlvGanttChartForm.
IlvGraphic* IlvGanttChart::getLineGraphicModel | ( | ) | const |
Gets the line graphic model of the Gantt chart.
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.
null
if no line grid has been set. Gets the difference between the capacity of a line and the sum of the capacities of all subnodes intersecting with a vertical axis.
row | The row where the line is located. |
time | The position of the vertical axis. |
IlUShort IlvGanttChart::getLineRow | ( | const IlvGanttLine * | line | ) | const |
Gets the row where the given Gantt line is located.
line | The Gantt line. |
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.
count | Set to the number of lines in the array. |
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.
count | Set to the number of subnodes in the array. |
row | The row where the line is located. |
IlvGraphic* IlvGanttChart::getLinkGraphicModel | ( | ) | const |
Gets the graphic model of the links.
0
if they have not been given a graphic model. IlvManager* IlvGanttChart::getManager | ( | ) | const |
Gets the manager stored in the chart.
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.
index | The index number of the 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. 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.
count | Set to the number of nodes in the array. |
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.
graphic | The graphic object. |
0
. IlvGanttAbstractObject* IlvGanttChart::getObject | ( | const char * | name | ) | const |
Gets the Gantt object with the given name.
Returns the Gantt object (line, node, or link) with the name indicated by name.
name | The name of the Gantt object. |
0
. const char* IlvGanttChart::getObjectName | ( | const IlvGanttAbstractObject * | obj | ) | const |
Gets the name of the Gantt object.
obj | The Gantt object. |
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.
null
if no row grid has been set. 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.
index | The index number of the 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 index | The index of the view. |
Gets the current shown end time for the grapher views.
index | 0 for the left grapher views, and 1 for the right. |
Gets the current shown start time for the grapher views.
index | 0 for the left grapher views, and 1 for the right. |
IlInt IlvGanttChart::getStart | ( | ) | const |
Gets the start time managed by the chart.
Gets the graduation step in the grapher views of the Gantt chart.
index | 0 for the left grapher views, and 1 for the right. |
IlvGanttSubNode* IlvGanttChart::getSubNode | ( | const IlvGraphic * | graphic | ) | const |
Returns the Gantt subnode associated with the graphic object graphic in the Gantt chart.
graphic | The graphic object. |
0
. void IlvGanttChart::getSubNodeDrawnStartEnd | ( | const IlvGanttNode * | node, |
IlUShort | index, | ||
IlInt & | start, | ||
IlInt & | end | ||
) | const |
Gets the positions of the given subnode.
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.
0
if they do not have a graphic model. IlvGanttSubNodeHook* IlvGanttChart::getSubNodeHook | ( | ) |
Gets the subnode hook installed in a Gantt chart.
IlInt IlvGanttChart::getSubNodeMinimumSize | ( | ) | const |
Gets the minimum size of subnodes.
You cannot create a subnode with a size smaller than this size using IlvGanttSelectInteractor
.
IlvScrollBar* IlvGanttChart::getVerticalScrollBar | ( | IlUShort | index | ) | const |
Gets the vertical scroll bar.
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 work area.
This function computes the whole work area of the Gantt chart. The work area is the bounding box of the Gantt rows.
area | The work area. |
void IlvGanttChart::grapherViewsBBox | ( | IlvRect & | bbox | ) | const |
Gets the bounding box of the four grapher views.
bbox | The bounding box. |
|
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.
handlePosition | The new position of the handle box. |
|
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.
newsize | The new size of the object. |
|
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 in IlvGanttChartForm.
|
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:
IlBoolean IlvGanttChart::isManaged | ( | const IlvGanttAbstractObject * | object | ) | const |
Indicates whether the given object is managed by the Gantt chart.
object | The object. |
IlBoolean
value indicating whether the given object is managed by the Gantt chart. IlBoolean IlvGanttChart::isShowingFreeNodes | ( | ) | const |
Indicates whether the chart shows free nodes.
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.
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.
IlTrue
if the Gantt chart draws a grid in the grapher views, and IlFalse
if it does not. Gets the last visible row of the manager view.
index | The index of the manager view; 0 for the top manager views and 1 for the bottom. |
Gets the bounding box of a graphic object associated with a Gantt line.
row | The row where the line is located. |
bbox | The bounding box. |
|
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.
file | The input file. |
|
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 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.
position | The new position of the handle box. |
|
virtual |
Moves the line to the given row.
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. |
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 |
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.
row | The row. |
prettyBox | The new size of the row. |
redraw | If IlTrue this function redraws the compacted row. |
IlTrue
if row has been compressed.
|
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.
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 |
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.
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. |
Reads a set of IlvGraphic
, IlvGanttLine
, IlvGanttNode
, and IlvGanttLink
objects from the file associated with the Gantt chart.
redraw | Specifies whether the Gantt chart is refreshed. |
|
virtual |
Removes the hooks from the grapher.
Disconnects the grid and scroll hooks from the Gantt grapher.
|
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.
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. |
IlFalse
on error (the line cannot be removed), and IlTrue
on success.
|
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.
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. |
IlFalse
on error (the link cannot be removed) and IlTrue
on success.
|
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.
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. |
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 |
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
.
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. |
IlFalse
on error (the subnode cannot be removed) and IlTrue
on success.
|
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.
index | The index of the view. |
redraw | Specifies whether the view contents is refreshed. |
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.
row | The row where the line is located. |
bbox | The bounding box. |
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.
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.
|
virtual |
Writes the descriptions of the objects stored in the manager to the output file.
Writes in the output file file:
IlvGraphic
objects stored in the manager. IlvGanttLine
objects. IlvGraphic
objects stored in the grapher. IlvGanttNode
and IlvGanttLink
objects. file | The output file. |
void IlvGanttChart::setBreakGraphicModel | ( | IlvGraphic * | model, |
IlBoolean | destroyOld = IlTrue |
||
) |
Sets the break graphic model.
model | The break graphic model. |
destroyOld | If IlTrue , the old break graphic model will be deleted. |
|
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 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
.
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.
bgPal | The highlight background palette. |
Sets the highlight state.
Switches the Gantt chart to highlight mode if hilite is IlTrue
. Otherwise it switches the highlight mode off.
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.
model | The graphic model. |
deleteOld | Indicates whether the previous model is to be deleted. |
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).
compoGrid | The line grid. |
redraw | IlTrue to redraw after setting the grid. |
layer | The layer the grid is added to. |
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.
model | The graphic model. |
deleteOld | Indicates whether the previous model is to be deleted. |
|
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
. node | The node. |
mode | The presentation mode. |
redraw | Specifies whether the Gantt chart is refreshed. |
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
.
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.
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.
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
.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. |
IlTrue
on success, or IlFalse
on failure. 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).
compoGrid | The row grid. |
redraw | IlTrue to redraw after setting the grid. |
layer | The layer the grid is added to. |
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.
flag | Set to IlTrue to show the borders. |
redraw | Set to IlTrue to refresh the view contents. |
Sets the graduation step.
You can set the parameter redraw to IlFalse
if you do not want to refresh the view contents.
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.
model | The graphic model. |
deleteOld | Indicates whether the previous model is to be deleted. |
IlvGanttSubNodeHook* IlvGanttChart::setSubNodeHook | ( | IlvGanttSubNodeHook * | hook | ) |
Installs a subnode hook.
When you use IlvGanttSelectorInteractor
to reshape or move a subnode, this hook will be called.
hook | The subnode hook to install. |
void IlvGanttChart::setSubNodeMinimumSize | ( | IlInt | size | ) |
Sets the minimum size of subnodes.
size | The minimum size of the subnodes. |
|
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.
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. |
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.
flag | The display flag. |
redraw | Specifies whether the Gantt chart is refreshed. |
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.
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.
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 |
Gets the bounding box of a subnode.
Returns the bounding box of the index th subnode of node in bbox.
node | The node |
index | The position of the requested subnode. |
bbox | The bounding box |
|
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
.
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 |
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.
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 |
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 in IlvGanttChartForm.
|
static |
Returns the callback type for the "Work Area" callback.
The "Work Area callback" is called when:
start
or the end
is changed; IlvGraphic::setCallback
Gets the closest row to a given location.
y | The given location. |
Gets the row located at a given location.
y | The location to search for a row. |
row | The returned row. |
IlTrue
if there is a row located at y, or IlFalse
if there is none.
|
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.
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. |
IlTrue
on success, and IlFalse
on error (the zooming cannot be done). © Copyright 2016, 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.