Views
Charts Package API Reference Guide
Product Documentation:
Views Documentation Home
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions
IlvChartInteractor Class Referenceabstract

Abstract base class for chart interactors. More...

#include <ilviews/charts/chartint.h>

Inheritance diagram for IlvChartInteractor:
IlvInteractor IlvChartCrossHairInteractor IlvChartDataInteractor IlvChartInteractorDispatcher IlvChartPanInteractor IlvChartScrollInteractor IlvChartZoomInteractor IlvChartDragPointInteractor IlvChartHighlightPointInteractor IlvChartSelectInteractor IlvChartInfoViewInteractor

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 IlvChartInteractorGet (const char *name)
 Returns a shared interactor instance. More...
 

Protected Member Functions

 IlvChartInteractor ()
 Constructor. More...
 

Detailed Description

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

Constructor & Destructor Documentation

◆ IlvChartInteractor()

IlvChartInteractor::IlvChartInteractor ( )
protected

Constructor.

Initializes a new IlvChartInteractor object.

Member Function Documentation

◆ endSequence()

virtual void IlvChartInteractor::endSequence ( IlvChartGraphic chart,
const IlvEvent event,
const IlvTransformer t 
)
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.

Parameters
chartThe chart object that received the event.
eventThe received event.
tThe transformer applied to the view in which the event occurred.
See also
isShowingAbscissaCursor.

◆ Get()

static IlvChartInteractor* IlvChartInteractor::Get ( const char *  name)
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.

Parameters
nameThe name under which the shared instance was registered.
Returns
The shared instance if it was found in the registry and 0 otherwise.

◆ handleEvent()

virtual IlBoolean IlvChartInteractor::handleEvent ( IlvGraphic chart,
IlvEvent event,
const IlvTransformer t = 0 
)
pure virtual

Handles events received by the interactor.

This method is the entry point of all events dispatched to this interactor.

Parameters
chartThe chart object that received the event.
eventThe received event.
tThe transformer applied to the view in which the event occurred.
Returns
IlTrue if the event was successfully handled and IlFalse otherwise.

Implements IlvInteractor.

Implemented in IlvChartInteractorDispatcher, IlvChartScrollInteractor, IlvChartPanInteractor, IlvChartCrossHairInteractor, IlvChartSelectInteractor, IlvChartInfoViewInteractor, IlvChartHighlightPointInteractor, IlvChartDragPointInteractor, and IlvChartZoomInteractor.

◆ isShared()

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.

Returns
IlTrue if the interactor is a shared instance and IlFalse otherwise.

◆ isShowingAbscissaCursor()

virtual IlBoolean IlvChartInteractor::isShowingAbscissaCursor ( ) const
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.

Returns
IlTrue if the interactor uses an abscissa cursor and IlFalse otherwise.
See also
IlvChartInteractorManager.

Reimplemented in IlvChartCrossHairInteractor, IlvChartDragPointInteractor, and IlvChartZoomInteractor.

◆ isShowingOrdinateCursor()

virtual IlBoolean IlvChartInteractor::isShowingOrdinateCursor ( ) const
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.

Returns
IlTrue if the interactor uses an ordinate cursor and IlFalse otherwise.
See also
IlvChartInteractorManager.

Reimplemented in IlvChartCrossHairInteractor, IlvChartDragPointInteractor, and IlvChartZoomInteractor.

◆ startSequence()

virtual void IlvChartInteractor::startSequence ( IlvChartGraphic chart,
const IlvEvent event,
const IlvTransformer t 
)
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.

Parameters
chartThe chart object that received the event.
eventThe received event.
tThe transformer applied to the view in which the event occurred.
See also
isShowingAbscissaCursor.