Views
Gantt Package API Reference Guide
Product Documentation:
Views Documentation Home
List of all members | Public Member Functions | Protected Member Functions
IlvGanttPanZoomInteractor Class Reference

Interactor to pan and zoom the grapher views of the Gantt chart. More...

#include <ilviews/gantt/ganttint.h>

Inheritance diagram for IlvGanttPanZoomInteractor:
IlvPanZoomInteractor IlvManagerViewInteractor IlvValueInterface

Public Member Functions

 IlvGanttPanZoomInteractor (IlvGanttChart *gantt, IlvManager *grapher, IlvView *view)
 Constructor. More...
 
IlvGanttChartgetGanttChart ()
 Returns the associated Gantt chart. More...
 
void setGanttChart (IlvGanttChart *gantt)
 Specifies the Gantt chart to be associated. More...
 

Protected Member Functions

virtual void doTranslate (IlvPos dx, IlvPos dy, IlBoolean reDraw)
 Called by the handleEvent method in order to translate the view. More...
 
virtual void doZoom (const IlvPoint &center, IlFloat scalex, IlBoolean reDraw)
 Called by the handleEvent method in order to zoom the view. More...
 

Detailed Description

Interactor to pan and zoom the grapher views of the Gantt chart.

Library: ilvgantt

Install this interactor in the grapher views of the Gantt chart to pan and zoom. Use the left mouse button to vertically or horizontally pan the grapher views. Use the middle button or the mouse wheel to horizontally zoom the grapher views.

See also
IlvGanttChart, IlvPanZoomInteractor.

Constructor & Destructor Documentation

◆ IlvGanttPanZoomInteractor()

IlvGanttPanZoomInteractor::IlvGanttPanZoomInteractor ( IlvGanttChart gantt,
IlvManager grapher,
IlvView view 
)

Constructor.

The constructor initializes an instance of the IlvGanttPanZoomInteractor class.

Parameters
ganttThe Gantt chart.
grapherThe grapher of the Gantt chart.
viewSpecifies one of the grapher views of the Gantt chart.

Member Function Documentation

◆ doTranslate()

virtual void IlvGanttPanZoomInteractor::doTranslate ( IlvPos  dx,
IlvPos  dy,
IlBoolean  reDraw 
)
protectedvirtual

Called by the handleEvent method in order to translate the view.

Parameters
dxThe x translation factor.
dyThe y translation factor.
reDrawIf IlTrue, the view must be redrawn.

Reimplemented from IlvPanZoomInteractor.

◆ doZoom()

virtual void IlvGanttPanZoomInteractor::doZoom ( const IlvPoint center,
IlFloat  scalex,
IlBoolean  reDraw 
)
protectedvirtual

Called by the handleEvent method in order to zoom the view.

The default zooming factor used by the handleEvent is 1.5 for the zoom in operation and 1 / 1.5 for the zoom out. Note that the performed zoom keeps the aspect ratio (for example, scaley = scalex).

Parameters
centerThe point that is left unchanged by the zoom operation. The default point used by the handleEvent method is the center of the view.
scalexThe x zooming factor.
reDrawIf IlTrue, the view must be redrawn.

Reimplemented from IlvPanZoomInteractor.

◆ getGanttChart()

IlvGanttChart* IlvGanttPanZoomInteractor::getGanttChart ( )

Returns the associated Gantt chart.

Returns
The associated Gantt chart.

◆ setGanttChart()

void IlvGanttPanZoomInteractor::setGanttChart ( IlvGanttChart gantt)

Specifies the Gantt chart to be associated.

Parameters
ganttThe Gantt chart to be associated.