rwlogo

Rogue Wave Views
Charts Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
List of all members | Public Member Functions | Protected Member Functions
IlvChartDragPointInteractor Class Reference

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

#include <ilviews/charts/chartint.h>

Inheritance diagram for IlvChartDragPointInteractor:
IlvChartDataInteractor IlvChartInteractor IlvInteractor

Public Member Functions

 IlvChartDragPointInteractor (IlUShort whichButton=IlvLeftButton)
 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 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 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 void doIt (IlvChartGraphic *chart, const IlvPoint &p, const IlvTransformer *t)
 Action method that modifies the data point. More...
 
virtual void drawGhost (IlvChartGraphic *chart, const IlvPoint &point)
 Draws the new position of the projected data point. More...
 
virtual void validate (IlvChartGraphic *chart, IlvDoublePoint &dataPoint)
 Validation method to constrain the editing of the data 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 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...
 

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
whichButtonThe mouse button that should be used for the interaction.

Member Function Documentation

virtual void IlvChartDragPointInteractor::doIt ( IlvChartGraphic chart,
const IlvPoint p,
const IlvTransformer t 
)
protectedvirtual

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
chartThe chart object that received the event.
pThe coordinates of the event in view coordinates.
tThe transformer applied to the view in which the event occurred.
virtual void IlvChartDragPointInteractor::drawGhost ( IlvChartGraphic chart,
const IlvPoint point 
)
protectedvirtual

Draws the new position of the projected data point.

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

Parameters
chartThe considered chart.
pointThe 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
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.

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

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
chartThe considered chart.
dataPointThe new value of the data point.

© Copyright 2015, 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.