Displays information about a data point in an information window. More...
#include <ilviews/charts/chartint.h>
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... | |
IlvChartDataSet * | getHandledDataSet () const |
Returns the handled data set. More... | |
IlvAbstractChartDisplayer * | getHandledDisplayer () 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 IlvChartInteractor * | Get (const char *name) |
Returns a shared interactor instance. More... | |
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".
IlvChartInfoViewInteractor::IlvChartInfoViewInteractor | ( | ) |
Constructor.
Initializes a new IlvChartInfoViewInteractor
object.
|
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.
tooltipW | The tooltip width. |
tooltipH | The tooltip height. |
ev | The mouse event. |
|
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
.
chart | The considered chart. |
disp | The curve displaying the highlighted point. |
dataSet | The data set of the highlighted point. |
pointIndex | The index of the highlighted point in the data set. |
highlight | A Boolean value indicating whether the point must be highlighted (IlTrue ) or not (IlFalse ). |
ev | An event holding the mouse cursor position. |
Reimplemented from IlvChartHighlightPointInteractor.
|
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.
chart | The considered chart. |
disp | The curve displaying the highlighted point. |
dataSet | The data set of the highlighted point. |
pointIndex | The index of the highlighted point in the data set. |
|
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. Reimplemented from IlvChartHighlightPointInteractor.
IlBoolean IlvChartInfoViewInteractor::isFollowingMouse | ( | ) |
Returns whether the interactor follows the mouse moves.