rwlogo
Rogue Wave Views 5.5.1

Rogue Wave Views
Charts Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

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

List of all members.

Public Member Functions

 IlvChartInfoViewInteractor ()
 Constructor.
virtual IlBoolean handleEvent (IlvGraphic *chart, IlvEvent &ev, const IlvTransformer *t=0)
 Handles events received by the interactor.
IlBoolean isFollowingMouse ()
 Returns whether the interactor follows the mouse moves.
void setFollowingMouse (IlBoolean follow)
 Sets whether the interactor follows the mouse moves. The default value is false.

Protected Member Functions

virtual IlvPoint computePosition (IlvDim tooltipW, IlvDim tooltipH, IlvEvent &ev)
 Computes the tooltip location.
virtual void doIt (IlvChartGraphic *chart, IlvAbstractChartDisplayer *disp, IlvChartDataSet *dataSet, IlUInt pointIndex, IlBoolean highlight, IlvEvent &ev)
 Performs the point highlighting.
virtual const char * getHighlightText (IlvChartGraphic *chart, IlvAbstractChartDisplayer *disp, IlvChartDataSet *dataSet, IlUInt pointIndex)
 Returns the information to display for a given point.

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

Constructor.

Initializes a new IlvChartInfoViewInteractor object.


Member Function Documentation

virtual IlvPoint IlvChartInfoViewInteractor::computePosition ( IlvDim  tooltipW,
IlvDim  tooltipH,
IlvEvent ev 
) [protected, virtual]

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:
tooltipW The tooltip width.
tooltipH The tooltip height.
ev The mouse event.
Returns:
The tooltip location.
virtual void IlvChartInfoViewInteractor::doIt ( IlvChartGraphic chart,
IlvAbstractChartDisplayer disp,
IlvChartDataSet dataSet,
IlUInt  pointIndex,
IlBoolean  highlight,
IlvEvent ev 
) [protected, virtual]

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

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

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:
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 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:
chart The chart object that received the event.
event The received event.
t The transformer applied to the view in which the event occurred.
Returns:
IlTrue if the event was successfully handled and IlFalse otherwise.

Reimplemented from IlvChartHighlightPointInteractor.

IlBoolean IlvChartInfoViewInteractor::isFollowingMouse (  ) 

Returns whether the interactor follows the mouse moves.

See also:
isFollowingMouse

© Copyright 2012, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.