Views
Charts Package API Reference Guide
Product Documentation:
Views Documentation Home
List of all members | Public Member Functions
IlvChartCrossHairInteractor Class Reference

Displays a crosshair that tracks the pointing device. More...

#include <ilviews/charts/chartint.h>

Inheritance diagram for IlvChartCrossHairInteractor:
IlvChartInteractor IlvInteractor

Public Member Functions

 IlvChartCrossHairInteractor ()
 Constructor. More...
 
virtual IlBoolean handleEvent (IlvGraphic *chart, IlvEvent &ev, const IlvTransformer *t=0)
 Handles events received by the interactor. 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...
 
- Public Member Functions inherited from IlvChartInteractor
virtual void endSequence (IlvChartGraphic *chart, const IlvEvent &event, const IlvTransformer *t)
 Performs the actions needed when an interactor leaves an event sequence. More...
 
IlBoolean isShared () const
 Indicates whether the current object is a shared instance. More...
 
virtual void startSequence (IlvChartGraphic *chart, const IlvEvent &event, const IlvTransformer *t)
 Performs the actions needed when an interactor enters an event sequence. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from IlvChartInteractor
static IlvChartInteractorGet (const char *name)
 Returns a shared interactor instance. More...
 
- Protected Member Functions inherited from IlvChartInteractor
 IlvChartInteractor ()
 Constructor. More...
 

Detailed Description

Displays a crosshair that tracks the pointing device.

Library: ilvcharts

This class allows the user to trigger the visibility of a crosshair that will follow the movement of the mouse. The crosshair can be made of one or both of the cursors accessible from the interactors (abscissa/ordinate). These cursors are managed by the interactor manager instance that is associated with the interactive chart. The visibility of each cursor is defined both globally at the manager level (IlvChartInteractorManager::isShowingAbscissaCursor and IlvChartInteractorManager::isShowingOrdinateCursor) and locally by each interactor (IlvChartInteractor::isShowingAbscissaCursor and IlvChartInteractor::isShowingOrdinateCursor). This interactor works by turning on or off the global visibility of the cursors when the IlvKeyDown 'C' event is received.

The registered name of this interactor class is "ChartCrossHair".

Constructor & Destructor Documentation

◆ IlvChartCrossHairInteractor()

IlvChartCrossHairInteractor::IlvChartCrossHairInteractor ( )

Constructor.

Initializes a new IlvChartCrossHairInteractor object.

Member Function Documentation

◆ handleEvent()

virtual IlBoolean IlvChartCrossHairInteractor::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.

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

◆ isShowingAbscissaCursor()

virtual IlBoolean IlvChartCrossHairInteractor::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 from IlvChartInteractor.

◆ isShowingOrdinateCursor()

virtual IlBoolean IlvChartCrossHairInteractor::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 from IlvChartInteractor.