rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Charts Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvChartDragPointInteractor Class Reference

Implements direct data point editing with the mouse. More...

#include <ilviews/charts/chartint.h>

Inheritance diagram for IlvChartDragPointInteractor:
IlvChartDataInteractor IlvChartInteractor IlvInteractor

List of all members.

Public Member Functions

 IlvChartDragPointInteractor (IlUShort whichButton=IlvLeftButton)
 Constructor.
virtual IlBoolean handleEvent (IlvGraphic *chart, IlvEvent &ev, const IlvTransformer *t=0)
 Handles events received by the interactor.
virtual IlBoolean isShowingAbscissaCursor () const
 Indicates whether the interactor uses a cursor on the abscissa.
virtual IlBoolean isShowingOrdinateCursor () const
 Indicates whether the interactor uses a cursor on the ordinate.

Protected Member Functions

virtual void doIt (IlvChartGraphic *chart, const IlvPoint &p, const IlvTransformer *t)
 Action method that modifies the data point.
virtual void drawGhost (IlvChartGraphic *chart, const IlvPoint &point)
 Draws the new position of the projected data point.
virtual void validate (IlvChartGraphic *chart, IlvDoublePoint &dataPoint)
 Validation method to constrain the editing of the data point.

Detailed Description

Implements direct data point editing with the mouse.

Library: ilvcharts

This class lets the user modify a data point by dragging its graphic representation within the data display area. The button used to perform this operation can be defined. This class also allows you to define constraints on the value taken by the edited data point.

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


Constructor & Destructor Documentation

IlvChartDragPointInteractor::IlvChartDragPointInteractor ( IlUShort  whichButton = IlvLeftButton  ) 

Constructor.

Initializes a new IlvChartDragPointInteractor object.

Parameters:
whichButton The mouse button that should be used for the interaction.

Member Function Documentation

virtual void IlvChartDragPointInteractor::doIt ( IlvChartGraphic chart,
const IlvPoint p,
const IlvTransformer t 
) [protected, virtual]

Action method that modifies the data point.

Depending on the drag mode, this method is called whenever the mouse is dragged (opaque mode) or only when the button is released (ghost mode).

Parameters:
chart The chart object that received the event.
p The coordinates of the event in view coordinates.
t The transformer applied to the view in which the event occurred.
virtual void IlvChartDragPointInteractor::drawGhost ( IlvChartGraphic chart,
const IlvPoint point 
) [protected, virtual]

Draws the new position of the projected data point.

This method is only called when the drag mode is not opaque.

Parameters:
chart The considered chart.
point The new position of the projected data point in view coordinates.
virtual IlBoolean IlvChartDragPointInteractor::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.

Implements IlvChartInteractor.

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

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

virtual void IlvChartDragPointInteractor::validate ( IlvChartGraphic chart,
IlvDoublePoint dataPoint 
) [protected, virtual]

Validation method to constrain the editing of the data point.

This method is called each time the mouse is dragged and enables the user to constrain the new value of the data point within some specified rules.

Parameters:
chart The considered chart.
dataPoint The new value of the data point.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

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