Rogue Wave Views Gantt Package API Reference Guide |
Rogue Wave Views Documentation Home |
Interactor to add nodes to a Gantt chart. More...
#include <ilviews/gantt/ganttint.h>
Public Member Functions | |
IlvGanttAddNodeInteractor (IlvGanttChart *gantt, IlvView *view, IlUShort button=IlvLeftButton, IlBoolean asBreak=IlFalse) | |
Constructor. More... | |
virtual void | doIt (IlvRect &rect) |
Creates and adds the Gantt node. More... | |
virtual void | ensureVisible (const IlvPoint &p) |
Translates the working view according to the mouse position. More... | |
IlvGanttChart * | getGanttChart () const |
Returns the Gantt chart with which this interactor is associated. More... | |
IlBoolean | isBreak () const |
Indicates whether break nodes are created. More... | |
virtual IlvGanttNode * | makeNode (IlInt startMin, IlInt startMax, IlInt endMin, IlInt endMax, IlvGanttLine *line) |
Factory method to create Gantt nodes. More... | |
void | setAsBreak (IlBoolean asBreak=IlTrue) |
Indicates whether break nodes are created. More... | |
Interactor to add nodes to a Gantt chart.
Library: ilvgantt
This interactor class lets you interactively add a Gantt node to the Gantt chart. IlvGanttAddNodeInteractor
can also be used to add a break node to the Gantt chart. Such an Interactor is called an add break interactor. There are two different ways to obtain an add break interactor.
IlvGanttAddNodeInteractor
by setting the parameter asBreak
to IlTrue
in its constructor. IlvGanttAddNodeInteractor
, you can transform it to an add break interactor by calling the IlvGanttAddNodeInteractor::setAsBreak
method. IlvGanttChart
, IlvGanttSubNode
, IlvGanttNode
IlvGanttAddNodeInteractor::IlvGanttAddNodeInteractor | ( | IlvGanttChart * | gantt, |
IlvView * | view, | ||
IlUShort | button = IlvLeftButton , |
||
IlBoolean | asBreak = IlFalse |
||
) |
Constructor.
The constructor initializes a new instance of the IlvGanttAddNodeInteractor
class that adds nodes to the Gantt chart gantt in the grapher view view. Set button to the mouse button to be used for adding the node. If asBreak is set to IlTrue
, the constructor creates an add break interactor.
gantt | The gantt to which the interactor is attached. |
view | The gantt chart view to which the interactor is attached. This view must be one of the Gantt grapher view where activities (nodes) are displayed. |
button | The mouse button that is used for the interaction. |
asBreak | A Boolean value indicating whether break nodes are created. |
|
virtual |
Creates and adds the Gantt node.
Computes the start and end times of the Gantt node from the rectangle rect that the user is dragging. It also determines the Gantt line this node is associated with. Once these values have been computed, the IlvGanttAddNodeInteractor::makeNode
method is called and the created node is added to the Gantt chart.
rect | The rectangle drawn by the user, in view coordinates. |
Reimplemented from IlvDragRectangleInteractor.
|
virtual |
Translates the working view according to the mouse position.
Performs a logical view translation when the user drags the mouse outside the view.
p | The location of the mouse, in view coordinates. |
Reimplemented from IlvManagerViewInteractor.
IlvGanttChart* IlvGanttAddNodeInteractor::getGanttChart | ( | ) | const |
Returns the Gantt chart with which this interactor is associated.
IlBoolean IlvGanttAddNodeInteractor::isBreak | ( | ) | const |
Indicates whether break nodes are created.
IlTrue
if the interactor is an add break interactor, and IlFalse
otherwise.
|
virtual |
Factory method to create Gantt nodes.
The default implementation returns a Gantt node that contains one Gantt subnode initialized with the given parameters. You can overload this method to create custom nodes.
startMin | The earliest start time of the node. |
startMax | The latest start time of the node. |
endMin | The earliest end time of the node. |
endMax | The latest end time of the node. |
line | The Gantt line with which the node must be associated. |
Indicates whether break nodes are created.
If asBreak is set to IlTrue
, you transform the interactor to an add break interactor.
asBreak | A Boolean value indicating whether break nodes are created by the interactor. |
isBreak
. © Copyright 2017, 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.