Rogue Wave Views Gantt Package API Reference Guide |
Rogue Wave Views Documentation Home |
Interactor to drag and drop nodes and subnode. More...
#include <ilviews/gantt/ganttint.h>
Public Member Functions | |
IlvGanttDragDropInteractor (IlvView *target=0, IlvGraphic *ghost=0) | |
Constructor. More... | |
virtual void | doIt (IlvView *target, IlvGraphic *ghost, const IlvPoint &p) |
Performs the drop action. More... | |
virtual void | dropNode (const IlvGanttNode *source, IlInt *startMinArray, IlInt *startMaxArray, IlInt *endMinArray, IlInt *endMaxArray, IlvGanttLine **lines, IlUShort *capacities) |
Action method called when the user drops the dragged object. More... | |
virtual void | dropSubNode (IlvGanttNode *dst, IlUShort idx, IlInt startMin, IlInt startMax, IlInt endMin, IlInt endMax, IlvGanttLine *line, IlUShort capacity) |
Action method called when the user drops the dragged object. More... | |
IlvGanttChart * | getGanttChart (const IlvGraphic *obj) const |
Returns the Gantt chart managing a given object. More... | |
IlvGanttChart * | getTargetGanttChart (const IlvView *targetView) const |
Returns the Gantt chart associated to a target view. More... | |
virtual IlvGanttNode * | makeNode (const IlvGanttNode *source, IlInt *startMinArray, IlInt *startMaxArray, IlInt *endMinArray, IlInt *endMaxArray, IlvGanttLine **lines, IlUShort *capacities) |
Factory method to create Gantt nodes. More... | |
virtual IlvGanttSubNode * | makeSubNode (IlvGanttNode *dst, IlInt startMin, IlInt startMax, IlInt endMin, IlInt endMax, IlvGanttLine *line, IlUShort capacity) |
Factory method to create Gantt subnodes. More... | |
Interactor to drag and drop nodes and subnode.
Library: ilvgantt
Use the IlvGanttDragDropInteractor
class to give a Gantt subnode or node the possibility of being dragged to another view, then dropped and duplicated. This interactor is attached by default to all subnodes stored in the Gantt grapher. The drag is performed on the graphic representation the Gantt subnode. You can specify that the whole node must be duplicated by keeping the CTRL
key pressed when clicking on the subnode.
The registered name of this interactor is "GanttDragDrop".
IlvGanttChart
, IlvGanttSubNode
, IlvGanttNode
. IlvGanttDragDropInteractor::IlvGanttDragDropInteractor | ( | IlvView * | target = 0 , |
IlvGraphic * | ghost = 0 |
||
) |
Constructor.
The constructor specifies the target view where the object can be dropped. If a graphic object is specified for the ghost parameter, this object is used by the interactor as a ghost image during the interaction. Otherwise, the object to be drawn is the one being dragged.
target | The target view. |
ghost | The graphic object used as ghost image. |
|
virtual |
Performs the drop action.
If the Ctrl
key is pressed, the IlvGanttDragDropInteractor::dropNode
is called, otherwise the IlvGanttDragDropInteractor::dropSubNode
is called.
target | The target view where the mouse button is released. |
ghost | The graphic object being dropped. |
p | The coordinates of drop location in screen coordinates. |
Reimplemented from IlvDragDropInteractor.
|
virtual |
Action method called when the user drops the dragged object.
Makes a copy of the source Gantt node using the IlvGanttDragDropInteractor::makeNode
method. The IlvGanttDragDropInteractor::makeSubNode
method is also used to add a copy of each subnode of source into the new Gantt node. This new node is then added to the Gantt chart.
source | The Gantt node associated with the dragged object. |
startMinArray | The new earliest start times for the subnodes copy of source. |
startMaxArray | The new latest start times for the subnodes copy of source. |
endMinArray | The new earliest end times for the subnodes copy of source. |
endMaxArray | The new latest end times for the subnodes copy of source. |
lines | The new Gantt lines for the subnodes copy of source. |
capacities | The capacities of the subnodes of source. |
|
virtual |
Action method called when the user drops the dragged object.
Makes a copy of the subnode of index idx in the node dst using the IlvGanttDragDropInteractor::makeSubNode
method. The subnode copy is then stored in the dst node.
dst | The Gantt node associated with the dragged object. |
idx | The index of the considered subnode in node. |
startMin | The earliest start time of the subnode copy. |
startMax | The latest start time of the subnode copy. |
endMin | The earliest end time of the subnode copy. |
endMax | The latest end time of the subnode copy. |
line | The Gantt line with which the subnode copy must be associated. |
capacity | The capacity of the subnode copy. |
IlvGanttChart* IlvGanttDragDropInteractor::getGanttChart | ( | const IlvGraphic * | obj | ) | const |
Returns the Gantt chart managing a given object.
obj | The considered graphic object. |
IlvGanttChart* IlvGanttDragDropInteractor::getTargetGanttChart | ( | const IlvView * | targetView | ) | const |
Returns the Gantt chart associated to a target view.
targetView | The target view. |
|
virtual |
Factory method to create Gantt nodes.
Is designed to be overloaded when linking the Gantt with a scheduling program. The default implementation returns an empty Gantt node.
source | The Gantt node associated with the dragged object. |
startMinArray | The new earliest start times for the subnodes copy of source. |
startMaxArray | The new latest start times for the subnodes copy of source. |
endMinArray | The new earliest end times for the subnodes copy of source. |
endMaxArray | The new latest end times for the subnodes copy of source. |
lines | The new Gantt lines for the subnodes copy of source. |
capacities | The capacities of the subnodes of source. |
|
virtual |
Factory method to create Gantt subnodes.
Is designed to be overloaded when linking the Gantt with a scheduling program. The default implementation returns a Gantt subnode initialized with the given parameters.
dst | The Gantt node to which the created subnode will be added. |
startMin | The earliest start time for the created subnode. |
startMax | The latest start time for the created subnode. |
endMin | The earliest end time for the created subnode. |
endMax | The latest end time for the created subnode. |
line | The Gantt line for the created subnode.. |
capacity | The capacity for the created subnode. |
© Copyright 2018, 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.