rwlogo
Rogue Wave Views 5.5.1

Rogue Wave Views
Gantt Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvGanttSelectInteractor Class Reference

Interactor to select and manipulate gantt nodes. More...

#include <ilviews/gantt/ganttint.h>

Inheritance diagram for IlvGanttSelectInteractor:
IlvGraphSelectInteractor IlvSelectInteractor IlvManagerViewInteractor

List of all members.

Public Member Functions

 IlvGanttSelectInteractor (IlvGanttChart *gantt, IlvView *view)
 Constructor.
virtual void doReshape (IlvGraphic *graphic, const IlvRect &)
 Changes the schedule of Gantt subnodes.
virtual void doTranslate (const IlvPoint &p)
 Moves Gantt subnodes.
virtual void drawGhostMove (IlvGraphic *graphic, IlvRegion *clip=0)
 Draws the image of the moved subnode.
virtual void drawGhostReshape (IlvGraphic *, IlvRegion *clip=0)
 Draws the image of the reshaped subnode.
virtual void ensureVisible (const IlvPoint &p)
 Translates the working view according to the mouse position.
IlvGanttChartgetGanttChart () const
 Returns the Gantt chart with which this interactor is associated.
virtual void handleEvent (IlvEvent &event)
 Handles all incoming events.
virtual void moveNode (IlvGanttNode *node, IlInt *startMinArray, IlInt *startMaxArray, IlInt *endMinArray, IlInt *endMaxArray, IlvGanttLine **lines)
 Moves all subnodes of a Gantt node.
virtual void moveSubNode (IlvGanttNode *node, IlUShort idx, IlInt startMin, IlInt startMax, IlInt endMin, IlInt endMax, IlvGanttLine *line)
 Moves a subnode of a Gantt node.
virtual void reshapeNode (IlvGanttNode *node, IlInt *startMinArray, IlInt *startMaxArray, IlInt *endMinArray, IlInt *endMaxArray)
 Changes the schedule of all subnodes of a Gantt node.
virtual void reshapeSubNode (IlvGanttNode *node, IlUShort idx, IlInt startMin, IlInt startMax, IlInt endMin, IlInt endMax)
 Changes the schedule of a subnode.

Detailed Description

Interactor to select and manipulate gantt nodes.

Library: ilvgantt

The IlvGanttSelectInteractor instances handle all selection, translation, and object-resizing tasks.

See also:
IlvGanttChart, IlvGanttSubNode, IlvGanttNode.

Constructor & Destructor Documentation

IlvGanttSelectInteractor::IlvGanttSelectInteractor ( IlvGanttChart gantt,
IlvView view 
)

Constructor.

The constructor initializes a new instance of the IlvGanttSelectInteractor class that will let the user select Gantt subnodes, Gantt nodes, or groups of Gantt subnodes in the view view connected to the grapher of the Gantt chart gantt.

Parameters:
gantt The gantt to which the interactor is attached.
view The view to which the interactor is attached. This view must be one of the Gantt grapher view where activities (nodes) are displayed.

Member Function Documentation

virtual void IlvGanttSelectInteractor::doReshape ( IlvGraphic graphic,
const IlvRect  
) [virtual]

Changes the schedule of Gantt subnodes.

Computes the new start and end times of the Gantt subnode represented by the graphic object graphic. Once these values are computed, two cases are considered:

Parameters:
graphic The considered graphic object.
rect The new bounding box for the graphic object.

Reimplemented from IlvSelectInteractor.

virtual void IlvGanttSelectInteractor::doTranslate ( const IlvPoint p  )  [virtual]

Moves Gantt subnodes.

Computes the new start and end times of the current selected Gantt chart subnodes and determines the new lines they are attached to. Once these values are computed, two cases are considered:

Parameters:
p The new position of the bounding box of the objects.

Reimplemented from IlvSelectInteractor.

virtual void IlvGanttSelectInteractor::drawGhostMove ( IlvGraphic graphic,
IlvRegion clip = 0 
) [virtual]

Draws the image of the moved subnode.

Snaps the position of graphic with respect to the Gantt lines.

Parameters:
graphic The graphic object representing the Gantt subnode.
clip The clip used for the drawing.

Reimplemented from IlvSelectInteractor.

virtual void IlvGanttSelectInteractor::drawGhostReshape ( IlvGraphic ,
IlvRegion clip = 0 
) [virtual]

Draws the image of the reshaped subnode.

Prevents the user from modifying the height of graphic.

Parameters:
graphic The graphic object representing the Gantt subnode.
clip The clip used for the drawing.

Reimplemented from IlvSelectInteractor.

virtual void IlvGanttSelectInteractor::ensureVisible ( const IlvPoint p  )  [virtual]

Translates the working view according to the mouse position.

Performs a logical view translation when the user drags the mouse outside the view.

Parameters:
p The location of the mouse, in view coordinates.

Reimplemented from IlvManagerViewInteractor.

IlvGanttChart* IlvGanttSelectInteractor::getGanttChart (  )  const

Returns the Gantt chart with which this interactor is associated.

Returns:
The Gantt chart with which this interactor is associated.
virtual void IlvGanttSelectInteractor::handleEvent ( IlvEvent event  )  [virtual]

Handles all incoming events.

Lets the user select, translate, and reshape Gantt chart subnodes as well as a Gantt chart node. Gantt nodes can be selected using the mouse button with the Ctrl key pressed.

Parameters:
event The received event.

Reimplemented from IlvSelectInteractor.

virtual void IlvGanttSelectInteractor::moveNode ( IlvGanttNode node,
IlInt startMinArray,
IlInt startMaxArray,
IlInt endMinArray,
IlInt endMaxArray,
IlvGanttLine **  lines 
) [virtual]

Moves all subnodes of a Gantt node.

Is designed to be overloaded when linking the Gantt chart with a scheduling program. The default implementation modifies the start and end times of each Gantt subnode of node to the corresponding values in the given arrays, and associates the subnode to the corresponding Gantt line in lines.

Parameters:
node The considered Gantt node.
startMinArray The new earliest start times for the subnodes of node.
startMaxArray The new latest start times for the subnodes of node.
endMinArray The new earliest end times for the subnodes of node.
endMaxArray The new latest end times for the subnodes of node.
lines The new Gantt lines for the subnodes of node.
virtual void IlvGanttSelectInteractor::moveSubNode ( IlvGanttNode node,
IlUShort  idx,
IlInt  startMin,
IlInt  startMax,
IlInt  endMin,
IlInt  endMax,
IlvGanttLine line 
) [virtual]

Moves a subnode of a Gantt node.

Is designed to be overloaded when linking the Gantt chart with a scheduling program. The default implementation modifies the start and end times of the subnode of index idx in the node node, as well as its associated Gantt line.

Parameters:
node The considered Gantt node.
idx The index of the considered subnode in node.
startMin The new earliest start time for the subnode.
startMax The new latest start time for the subnode
endMin The new earliest end time for the subnode.
endMax The new latest end time for the subnode.
line The new Gantt line for the subnode.
virtual void IlvGanttSelectInteractor::reshapeNode ( IlvGanttNode node,
IlInt startMinArray,
IlInt startMaxArray,
IlInt endMinArray,
IlInt endMaxArray 
) [virtual]

Changes the schedule of all subnodes of a Gantt node.

Is designed to be overloaded when linking the Gantt chart with a scheduling program. The default implementation modifies the start and end times of each Gantt subnode of node to the corresponding values in the given arrays.

Parameters:
node The considered Gantt node.
startMinArray The new earliest start times for the subnodes of node.
startMaxArray The new latest start times for the subnodes of node.
endMinArray The new earliest end times for the subnodes of node.
endMaxArray The new latest end times for the subnodes of node.
virtual void IlvGanttSelectInteractor::reshapeSubNode ( IlvGanttNode node,
IlUShort  idx,
IlInt  startMin,
IlInt  startMax,
IlInt  endMin,
IlInt  endMax 
) [virtual]

Changes the schedule of a subnode.

Is designed to be overloaded when linking the Gantt chart with a scheduling program. The default implementation modifies the start and end times of the subnode of index idx in the node node.

Parameters:
node The considered Gantt node.
idx The index of the considered subnode in node.
startMin The new earliest start time for the subnode.
startMax The new latest start time for the subnode
endMin The new earliest end time for the subnode.
endMax The new latest end time for the subnode.

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