rwlogo

Rogue Wave Views
Charts Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

List of all members | Public Member Functions
IlvConstantScaleStepsUpdater Class Reference

Class for computing the graduations of a scale. More...

#include <ilviews/charts/scaledis.h>

Inheritance diagram for IlvConstantScaleStepsUpdater:
IlvScaleStepsUpdater IlvNamedProperty IlvAutoScaleStepsUpdater

Public Member Functions

 IlvConstantScaleStepsUpdater (IlvSingleScaleDisplayer *scale)
 Constructor. More...
 
 IlvConstantScaleStepsUpdater (IlvSingleScaleDisplayer *scale, IlUInt stepsCount, IlUInt subStepsCount=0)
 Constructor. More...
 
 IlvConstantScaleStepsUpdater (IlvSingleScaleDisplayer *scale, IlDouble stepUnit, IlDouble subStepUnit=0.)
 Constructor. More...
 
virtual IlBoolean checkRange (IlvCoordInterval &range) const
 Checks whether an interval is valid with respect to the step definition. More...
 
void fixStepsCount (IlUInt stepsCount, IlUInt subStepsCount)
 Sets the number of steps and the number of substeps between two steps. More...
 
void fixStepUnit (IlDouble stepUnit, IlDouble subStepUnit)
 Sets the step unit and the substep unit. More...
 
IlDouble getFirstStepData () const
 Returns the data value associated with the first major step. More...
 
IlDouble getLastStepData () const
 Returns the data value associated with the last major step. More...
 
IlUInt getStepsCount () const
 Returns the number of major steps. More...
 
virtual void getStepSubStepValues (const IlvProjectorArea &area, IlUInt &stepsCount, IlDouble *&stepValues, IlUInt &subStepsCount, IlDouble *&subStepValues) const
 Computes and returns the step and substep values for the associated scale. More...
 
IlDouble getStepUnit () const
 Returns the step unit. More...
 
IlUInt getSubStepsCount () const
 Returns the number of minor steps between two major steps. More...
 
IlDouble getSubStepUnit () const
 Returns the substep unit. More...
 
IlBoolean isFirstStepDataDefined () const
 Indicates whether a data value is associated with the first major step. More...
 
IlBoolean isLastStepDataDefined () const
 Indicates whether a data value is associated with the last major step. More...
 
void setFirstStepData (IlDouble value)
 Sets the data value associated with the first major step. More...
 
void setLastStepData (IlDouble value)
 Sets the data value associated with the last major step. More...
 
- Public Member Functions inherited from IlvScaleStepsUpdater
virtual char * computeStepLabel (IlDouble value) const
 Computes and returns the label displayed for a given data value. More...
 
IlvCoordinateInfogetCoordinateInfo () const
 Deprecated More...
 
IlvSingleScaleDisplayergetScale () const
 Returns the scale associated with the current scale steps updater. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from IlvScaleStepsUpdater
static IlvScaleStepsUpdaterGet (const IlvSingleScaleDisplayer *scale)
 Returns the scale steps updater set on a given scale. More...
 
static IlvScaleStepsUpdaterRemove (IlvSingleScaleDisplayer *scale)
 Removes the scale steps updater set on a given scale. More...
 
static IlvScaleStepsUpdaterSet (IlvSingleScaleDisplayer *scale, IlvScaleStepsUpdater *updater)
 Sets a scale steps updater on a given scale. More...
 
- Protected Member Functions inherited from IlvScaleStepsUpdater
 IlvScaleStepsUpdater (IlvSingleScaleDisplayer *scale)
 Constructor. More...
 

Detailed Description

Class for computing the graduations of a scale.

Library: ilvcharts

IlvConstantScaleStepsUpdater is a subclass of IlvScaleStepsUpdater that allows you to compute steps and substeps having a fixed spacing.

See Also
IlvScaleStepsUpdater, IlvSingleScaleDisplayer.

Constructor & Destructor Documentation

IlvConstantScaleStepsUpdater::IlvConstantScaleStepsUpdater ( IlvSingleScaleDisplayer scale)

Constructor.

Initializes a new IlvConstantScaleStepsUpdater object.

Parameters
scaleThe scale associated with the current scale steps updater.
IlvConstantScaleStepsUpdater::IlvConstantScaleStepsUpdater ( IlvSingleScaleDisplayer scale,
IlUInt  stepsCount,
IlUInt  subStepsCount = 0 
)

Constructor.

Initializes a new IlvConstantScaleStepsUpdater object with a fixed number of steps and substeps.

Parameters
scaleThe scale associated with the current scale steps updater.
stepsCountThe number of steps defined for the scale scale .
subStepsCountThe number of substeps defined for the scale scale.
IlvConstantScaleStepsUpdater::IlvConstantScaleStepsUpdater ( IlvSingleScaleDisplayer scale,
IlDouble  stepUnit,
IlDouble  subStepUnit = 0. 
)

Constructor.

Initializes a new IlvConstantScaleStepsUpdater object with fixed step and substep units.

Parameters
scaleThe scale associated with the current scale steps updater.
stepUnitThe step unit defined for the scale scale.
subStepUnitThe substep unit defined for the scale scale.

Member Function Documentation

virtual IlBoolean IlvConstantScaleStepsUpdater::checkRange ( IlvCoordInterval range) const
virtual

Checks whether an interval is valid with respect to the step definition.

Called whenever the range of the coordinate associated with the current scale is modified. With this method, you can modify the interval range so that it becomes consistent with the steps definition. The default implementation simply returns IlTrue.

Parameters
rangeThe range to check.
Returns
IlFalse if the range was not correct and had to be modified, and IlTrue otherwise.

Reimplemented from IlvScaleStepsUpdater.

void IlvConstantScaleStepsUpdater::fixStepsCount ( IlUInt  stepsCount,
IlUInt  subStepsCount 
)

Sets the number of steps and the number of substeps between two steps.

Allows you to define the step and substep values by specifying the exact number of steps and substeps. The resulting step unit will depend on the coordinate range shown by the associated scale.

Parameters
stepsCountThe fixed number of steps. This number must be at least equal to 1.
subStepsCountThe fixed number of substeps between two steps.
See Also
fixStepUnit.
void IlvConstantScaleStepsUpdater::fixStepUnit ( IlDouble  stepUnit,
IlDouble  subStepUnit 
)

Sets the step unit and the substep unit.

Allows you to define the steps and substeps values by specifying the step and the substep unit. The number of resulting steps and substeps will depend on the coordinate range shown by the associated scale.

Parameters
stepUnitThe step unit. This value must be positive.
subStepUnitThe substep unit. This value must be positive and less than stepUnit. A value equal to 0 means that there are no substeps.
See Also
fixStepsCount.
IlDouble IlvConstantScaleStepsUpdater::getFirstStepData ( ) const

Returns the data value associated with the first major step.

Returns
The value associated with the first major step.
See Also
IlvConstantScaleStepsUpdater::setFirstStepData.
IlDouble IlvConstantScaleStepsUpdater::getLastStepData ( ) const

Returns the data value associated with the last major step.

Returns
The value associated with the last major step.
See Also
IlvConstantScaleStepsUpdater::setLastStepData.
IlUInt IlvConstantScaleStepsUpdater::getStepsCount ( ) const

Returns the number of major steps.

Returns
The number of major steps.
See Also
IlvConstantScaleStepsUpdater::fixStepsCount.
virtual void IlvConstantScaleStepsUpdater::getStepSubStepValues ( const IlvProjectorArea &  area,
IlUInt stepsCount,
IlDouble *&  stepValues,
IlUInt subStepsCount,
IlDouble *&  subStepValues 
) const
virtual

Computes and returns the step and substep values for the associated scale.

Parameters
areaThe data area definition. This data area definition can be retrieved with the IlvChartGraphic::getProjectorArea method.
stepsCountReturns the number of major steps.
stepValuesReturns the values associated with the major steps.
subStepsCountReturns the number of minor steps.
subStepValuesReturns the values associated with the minor steps.

Implements IlvScaleStepsUpdater.

Reimplemented in IlvAutoScaleStepsUpdater.

IlDouble IlvConstantScaleStepsUpdater::getStepUnit ( ) const

Returns the step unit.

Returns
The step unit.
See Also
IlvConstantScaleStepsUpdater::fixStepUnit.
IlUInt IlvConstantScaleStepsUpdater::getSubStepsCount ( ) const

Returns the number of minor steps between two major steps.

Returns
The number of minor steps between two major steps.
See Also
IlvConstantScaleStepsUpdater::fixStepsCount.
IlDouble IlvConstantScaleStepsUpdater::getSubStepUnit ( ) const

Returns the substep unit.

Returns
The substep unit.
See Also
IlvConstantScaleStepsUpdater::fixStepUnit.
IlBoolean IlvConstantScaleStepsUpdater::isFirstStepDataDefined ( ) const

Indicates whether a data value is associated with the first major step.

Returns
IlTrue if an associated value exists and IlFalse otherwise.
See Also
IlvConstantScaleStepsUpdater::setFirstStepData.
IlBoolean IlvConstantScaleStepsUpdater::isLastStepDataDefined ( ) const

Indicates whether a data value is associated with the last major step.

Returns
IlTrue if an associated value exists and IlFalse otherwise.
See Also
IlvConstantScaleStepsUpdater::setLastStepData.
void IlvConstantScaleStepsUpdater::setFirstStepData ( IlDouble  value)

Sets the data value associated with the first major step.

This method lets you define which value should be associated with the first major step of the scale. If this data is not defined, the first step will be drawn for the minimum value of the coordinate range represented by the associated scale.

Parameters
valueThe value for the first major step.
void IlvConstantScaleStepsUpdater::setLastStepData ( IlDouble  value)

Sets the data value associated with the last major step.

This method lets you define which value should be associated with the last major step of the scale. If this data is not defined, the last step will be drawn for the maximum value of the coordinate range represented by the associated scale.

Parameters
valueThe value for the last major step.

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