Rogue Wave Views
Gantt Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Member Functions
IlvGanttScaleInteractor Class Reference

Interactor to change the time interval of a Gantt scale. More...

#include <ilviews/gantt/ganttint.h>

Inheritance diagram for IlvGanttScaleInteractor:
IlvInteractor

Public Member Functions

 IlvGanttScaleInteractor ()
 Constructor. More...
 
virtual void drawGhost (IlvContainer *view, IlvGraphic *scale, const IlvRect &timeRect, const IlvTransformer *t=0)
 Draws the interval dragged by the user. More...
 
IlvGanttChartgetGanttChart (const IlvGraphic *scale) const
 Returns the Gantt chart managing a given scale. More...
 
virtual IlBoolean handleEvent (IlvGraphic *scale, IlvEvent &event, const IlvTransformer *t)
 Handles incoming events. More...
 
virtual void validate (IlvGraphic *scale, const IlvRect &timeRect, IlInt &shownStart, IlInt &shownEnd)
 Controls the scale time interval. More...
 

Detailed Description

Interactor to change the time interval of a Gantt scale.

Library: ilvgantt

Use the IlvGanttScaleInteractor class to zoom in the Gantt grapher views on the time axis. This interactor is attached by default to the Gantt scales.

The registered name of this interactor is "GanttScale".

See also
IlvGanttChart, IlvRectangularScale.

Constructor & Destructor Documentation

IlvGanttScaleInteractor::IlvGanttScaleInteractor ( )

Constructor.

The constructor initializes an instance of the IlvGanttScaleInteractor class.

Member Function Documentation

virtual void IlvGanttScaleInteractor::drawGhost ( IlvContainer view,
IlvGraphic scale,
const IlvRect timeRect,
const IlvTransformer t = 0 
)
virtual

Draws the interval dragged by the user.

Draws the rectangle specifying the time interval in XOR mode.

Parameters
viewThe view where the scale is displayed.
scaleThe considered Gantt scale.
timeRectThe rectangle specifying the time interval.
tThe transformer applied to the view view.
IlvGanttChart* IlvGanttScaleInteractor::getGanttChart ( const IlvGraphic scale) const

Returns the Gantt chart managing a given scale.

Parameters
scaleThe Gantt scale.
Returns
The Gantt chart managing the scale scale.
virtual IlBoolean IlvGanttScaleInteractor::handleEvent ( IlvGraphic scale,
IlvEvent event,
const IlvTransformer t 
)
virtual

Handles incoming events.

Computes and sets the new shown start and shown end of the pointed scale object. The interval is controlled by the IlvGanttScaleInteractor::validate method. When the button is released, the IlvGanttChart::showInterval is used.

Parameters
scaleThe considered Gantt scale.
eventThe received event.
tThe transformer applied to the view where the event occurred.
Returns
IlTrue if the event is consumed, IlFalse otherwise.

Implements IlvInteractor.

virtual void IlvGanttScaleInteractor::validate ( IlvGraphic scale,
const IlvRect timeRect,
IlInt shownStart,
IlInt shownEnd 
)
virtual

Controls the scale time interval.

Modifies the shown start time and shown end time of the Gantt chart scale scale. The provided values are computed from the timeRect rectangle drawn by the user. The default implementation does nothing.

Parameters
scaleThe considered Gantt scale.
timeRectThe rectangle specifying the time interval.
shownStartThe computed start time for the scale.
shownEndThe computed end time for the scale.

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