Rogue Wave Views 5.6 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
Enables scrolling with arrow keys. More...
#include <ilviews/charts/chartint.h>
Public Member Functions | |
IlvChartScrollInteractor () | |
Constructor. | |
virtual IlBoolean | handleEvent (IlvGraphic *chart, IlvEvent &ev, const IlvTransformer *t=0) |
Handles events received by the interactor. | |
Protected Member Functions | |
virtual void | doIt (IlvChartGraphic *chart, IlvCoordinateInfo *coordInfo, IlDouble delta) |
Action method to perform the scrolling. | |
virtual IlDouble | getDeltaCoordinate (const IlvChartGraphic *chart, const IlvCoordinateInfo *coordInfo, IlBoolean positive) const |
Returns the translation to apply to a given coordinate. |
Enables scrolling with arrow keys.
Library: ilvcharts
This class scrolls the displayed data when the user press the arrow keys.
The registered name of this interactor class is "ChartScroll".
IlvChartScrollInteractor::IlvChartScrollInteractor | ( | ) |
Constructor.
Initializes a new IlvChartScrollInteractor
object.
virtual void IlvChartScrollInteractor::doIt | ( | IlvChartGraphic * | chart, | |
IlvCoordinateInfo * | coordInfo, | |||
IlDouble | delta | |||
) | [protected, virtual] |
Action method to perform the scrolling.
This method is called whenever an arrow key is pressed to apply the corresponding translation.
chart | The considered chart. | |
coordInfo | The coordinate that must be translated. | |
delta | The translation to apply. |
virtual IlDouble IlvChartScrollInteractor::getDeltaCoordinate | ( | const IlvChartGraphic * | chart, | |
const IlvCoordinateInfo * | coordInfo, | |||
IlBoolean | positive | |||
) | const [protected, virtual] |
Returns the translation to apply to a given coordinate.
This method is called whenever an arrow key is pressed. It is used to compute the translation to apply to the considered coordinate. (The corresponding coordinate depends on the key that was pressed and on the projector used.) The default implementation returns one tenth of the visible data range.
chart | The considered chart. | |
coordInfo | The coordinate that must be translated. | |
positive | A Boolean value indicating whether the translation is toward the positive value (IlTrue ) or the negative value (IlFalse ). |
virtual IlBoolean IlvChartScrollInteractor::handleEvent | ( | IlvGraphic * | chart, | |
IlvEvent & | event, | |||
const IlvTransformer * | t = 0 | |||
) | [virtual] |
Handles events received by the interactor.
This method is the entry point of all events dispatched to this interactor.
chart | The chart object that received the event. | |
event | The received event. | |
t | The transformer applied to the view in which the event occurred. |
IlTrue
if the event was successfully handled and IlFalse
otherwise. Implements IlvChartInteractor.
© 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.