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

Displays information about a data point in an information window. More...

#include <ilviews/charts/chartint.h>

Inheritance diagram for IlvChartInfoViewInteractor:
IlvChartHighlightPointInteractor IlvChartDataInteractor IlvChartInteractor IlvInteractor

Public Member Functions

 IlvChartInfoViewInteractor ()
 Constructor. More...
 
virtual IlBoolean handleEvent (IlvGraphic *chart, IlvEvent &ev, const IlvTransformer *t=0)
 Handles events received by the interactor. More...
 
IlBoolean isFollowingMouse ()
 Returns whether the interactor follows the mouse moves. More...
 
void setFollowingMouse (IlBoolean follow)
 Sets whether the interactor follows the mouse moves. The default value is false.
 
- Public Member Functions inherited from IlvChartHighlightPointInteractor
 IlvChartHighlightPointInteractor ()
 Constructor. More...
 
void setAction (Action action)
 Sets the action to be triggered when a data point is highlighted or unhighlighted. More...
 
- Public Member Functions inherited from IlvChartDataInteractor
PickingMode getPickingMode () const
 Returns the current picking mode of the interactor. More...
 
void setPickingMode (PickingMode m)
 Sets the current picking mode of the interactor. 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 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...
 

Protected Member Functions

virtual IlvPoint computePosition (IlvDim tooltipW, IlvDim tooltipH, IlvEvent &ev)
 Computes the tooltip location. More...
 
virtual void doIt (IlvChartGraphic *chart, IlvAbstractChartDisplayer *disp, IlvChartDataSet *dataSet, IlUInt pointIndex, IlBoolean highlight, IlvEvent &ev)
 Performs the point highlighting. More...
 
virtual const char * getHighlightText (IlvChartGraphic *chart, IlvAbstractChartDisplayer *disp, IlvChartDataSet *dataSet, IlUInt pointIndex)
 Returns the information to display for a given point. More...
 
- Protected Member Functions inherited from IlvChartDataInteractor
 IlvChartDataInteractor ()
 Constructor. More...
 
IlvChartDataSetgetHandledDataSet () const
 Returns the handled data set. More...
 
IlvAbstractChartDisplayergetHandledDisplayer () const
 Returns the chart displayer representing the handled data. More...
 
IlUInt getHandledPointIndex () const
 Returns the index of the handled data point. More...
 
IlBoolean isHandlingData () const
 Checks whether valid information about a data point has been stored. More...
 
virtual IlBoolean queryData (IlvChartGraphic *chart, IlvPoint &evp, const IlvTransformer *t)
 Retrieves and stores information about a data point. More...
 
- Protected Member Functions inherited from IlvChartInteractor
 IlvChartInteractor ()
 Constructor. More...
 

Additional Inherited Members

- Public Types inherited from IlvChartHighlightPointInteractor
typedef void(* Action) (IlvChartGraphic *chart, IlvAbstractChartDisplayer *disp, IlvChartDataSet *dataSet, IlUInt pointIndex, IlBoolean highlight)
 Defines the type of the action to be triggered when a data point is highlighted or unhighlighted.
 
- Public Types inherited from IlvChartDataInteractor
enum  PickingMode
 
- Static Public Member Functions inherited from IlvChartDataInteractor
static IlvDim GetPrecision ()
 Returns the precision used to find the data point corresponding to a given screen point. More...
 
static void SetPrecicion (IlvDim dim)
 Deprecated misspelling of SetPrecision()
 
static void SetPrecision (IlvDim dim)
 Sets the precision used to find the data point corresponding to a given screen point. More...
 
- Static Public Member Functions inherited from IlvChartInteractor
static IlvChartInteractorGet (const char *name)
 Returns a shared interactor instance. More...
 

Detailed Description

Displays information about a data point in an information window.

Library: ilvcharts

A subclass of IlvChartHighlightPointInteractor that displays a small window containing information about the highlighted point. The default text to display consists of the data set name and the point coordinate values. It can be specified in a subclass.

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

Constructor & Destructor Documentation

◆ IlvChartInfoViewInteractor()

IlvChartInfoViewInteractor::IlvChartInfoViewInteractor ( )

Constructor.

Initializes a new IlvChartInfoViewInteractor object.

Member Function Documentation

◆ computePosition()

virtual IlvPoint IlvChartInfoViewInteractor::computePosition ( IlvDim  tooltipW,
IlvDim  tooltipH,
IlvEvent ev 
)
protectedvirtual

Computes the tooltip location.

By default, the tooltip is centered horizontally and above the mouse cursor. You can override this method to modify the way the location is computed.

Parameters
tooltipWThe tooltip width.
tooltipHThe tooltip height.
evThe mouse event.
Returns
The tooltip location.

◆ doIt()

virtual void IlvChartInfoViewInteractor::doIt ( IlvChartGraphic chart,
IlvAbstractChartDisplayer disp,
IlvChartDataSet dataSet,
IlUInt  pointIndex,
IlBoolean  highlight,
IlvEvent ev 
)
protectedvirtual

Performs the point highlighting.

This method first calls the highlight action and then opens a small window displaying the text returned by IlvChartInfoViewInteractor::getHighlightText.

Parameters
chartThe considered chart.
dispThe curve displaying the highlighted point.
dataSetThe data set of the highlighted point.
pointIndexThe index of the highlighted point in the data set.
highlightA Boolean value indicating whether the point must be highlighted (IlTrue) or not (IlFalse).
evAn event holding the mouse cursor position.

Reimplemented from IlvChartHighlightPointInteractor.

◆ getHighlightText()

virtual const char* IlvChartInfoViewInteractor::getHighlightText ( IlvChartGraphic chart,
IlvAbstractChartDisplayer disp,
IlvChartDataSet dataSet,
IlUInt  pointIndex 
)
protectedvirtual

Returns the information to display for a given point.

This method is called by the doIt method before the information window is opened. It allows you to customize the information text.

Parameters
chartThe considered chart.
dispThe curve displaying the highlighted point.
dataSetThe data set of the highlighted point.
pointIndexThe index of the highlighted point in the data set.

◆ handleEvent()

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

Reimplemented from IlvChartHighlightPointInteractor.

◆ isFollowingMouse()

IlBoolean IlvChartInfoViewInteractor::isFollowingMouse ( )

Returns whether the interactor follows the mouse moves.

See also
isFollowingMouse