Abstract base class for chart interactors. More...
#include <ilviews/charts/chartint.h>
Public Member Functions | |
virtual void | endSequence (IlvChartGraphic *chart, const IlvEvent &event, const IlvTransformer *t) |
Performs the actions needed when an interactor leaves an event sequence. More... | |
virtual IlBoolean | handleEvent (IlvGraphic *chart, IlvEvent &event, const IlvTransformer *t=0)=0 |
Handles events received by the interactor. More... | |
IlBoolean | isShared () const |
Indicates whether the current object is a shared instance. More... | |
virtual IlBoolean | isShowingAbscissaCursor () const |
Indicates whether the interactor uses a cursor on the abscissa. More... | |
virtual IlBoolean | isShowingOrdinateCursor () const |
Indicates whether the interactor uses a cursor on the ordinate. More... | |
virtual void | startSequence (IlvChartGraphic *chart, const IlvEvent &event, const IlvTransformer *t) |
Performs the actions needed when an interactor enters an event sequence. More... | |
Static Public Member Functions | |
static IlvChartInteractor * | Get (const char *name) |
Returns a shared interactor instance. More... | |
Protected Member Functions | |
IlvChartInteractor () | |
Constructor. More... | |
Abstract base class for chart interactors.
Library: ilvcharts
This class lets you define a behavior for an IlvChartGraphic
object. Each subclass will typically implement the interactions needed for a given type of operation (zooming, scrolling, editing, highlighting data points, and so on).
|
protected |
Constructor.
Initializes a new IlvChartInteractor
object.
|
virtual |
Performs the actions needed when an interactor leaves an event sequence.
This method must be called explicitly in the IlvChartInteractor::handleEvent
method of the interactor subclasses. This method lets you associate an action when the interactor leaves an "event sequence" (an event sequence ends when an IlvButtonUp
event is received). The default implementation restores the visibility state of the cursors.
chart | The chart object that received the event. |
event | The received event. |
t | The transformer applied to the view in which the event occurred. |
isShowingAbscissaCursor
.
|
static |
Returns a shared interactor instance.
This method lets you retrieve the shared instance corresponding to a given interactor class. Each concrete interactor subclass typically registers one shared instance through a call to the IlvRegisterChartInteractor
macro.
name | The name under which the shared instance was registered. |
0
otherwise.
|
pure 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 IlvInteractor.
Implemented in IlvChartInteractorDispatcher, IlvChartScrollInteractor, IlvChartPanInteractor, IlvChartCrossHairInteractor, IlvChartSelectInteractor, IlvChartInfoViewInteractor, IlvChartHighlightPointInteractor, IlvChartDragPointInteractor, and IlvChartZoomInteractor.
IlBoolean IlvChartInteractor::isShared | ( | ) | const |
Indicates whether the current object is a shared instance.
A shared instance is stored in a registry and can be accessed by its registered name. The registered name must match the string returned by the IlvChartInteractor::className
method. A shared instance should never be deleted.
IlTrue
if the interactor is a shared instance and IlFalse
otherwise.
|
virtual |
Indicates whether the interactor uses a cursor on the abscissa.
Interactor instances will use the API of IlvChartInteractorManager
to display and move the corresponding cursor. If this method returns IlTrue
and IlvChartInteractorManager::isShowingAbscissaCursor
also returns IlTrue
, the cursor will be displayed during the event sequence handled by this interactor. The default implementation returns IlFalse
.
IlTrue
if the interactor uses an abscissa cursor and IlFalse
otherwise. IlvChartInteractorManager
. Reimplemented in IlvChartCrossHairInteractor, IlvChartDragPointInteractor, and IlvChartZoomInteractor.
|
virtual |
Indicates whether the interactor uses a cursor on the ordinate.
Interactor instances will use the API of IlvChartInteractorManager
to display and move the corresponding cursor. If this method returns IlTrue
and IlvChartInteractorManager::isShowingAbscissaCursor
also returns IlTrue
, the cursor will be displayed during the event sequence handled by this interactor.
IlTrue
if the interactor uses an ordinate cursor and IlFalse
otherwise. IlvChartInteractorManager
. Reimplemented in IlvChartCrossHairInteractor, IlvChartDragPointInteractor, and IlvChartZoomInteractor.
|
virtual |
Performs the actions needed when an interactor enters an event sequence.
This method must be called explicitly in the IlvChartInteractor::handleEvent
method of the interactor subclasses. This method lets you associate an action when the interactor enters an "event sequence" (an event sequence starts when an IlvButtonDown
event is received). The default implementation saves the visibility state of the current cursors and displays the cursors depending on the returned value of isShowingAbscissaCursor
and isShowingOrdinateCursor
.
chart | The chart object that received the event. |
event | The received event. |
t | The transformer applied to the view in which the event occurred. |
isShowingAbscissaCursor
.