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 | Friends
IlvSingleScaleDisplayer Class Referenceabstract

Base class for standard scales. More...

#include <ilviews/charts/scaledis.h>

Inheritance diagram for IlvSingleScaleDisplayer:
IlvAbstractScaleDisplayer IlvCircularScaleDisplayer IlvRectangularScaleDisplayer

Public Member Functions

virtual ~IlvSingleScaleDisplayer ()
 Destructor. More...
 
void addCursor (IlvAbstractChartCursor *cursor, IlUInt position=IlvLastPositionIndex)
 Adds a cursor to the scale. More...
 
IlBoolean areMajorTicksVisible () const
 Indicates whether the major ticks are visible. More...
 
IlBoolean areMinorTicksVisible () const
 Indicates whether the minor ticks are visible. More...
 
IlBoolean areStepLabelsVisible () const
 Indicates whether the step labels are visible. More...
 
virtual char * computeStepLabel (IlDouble value) const
 Computes and returns the label associated with a data value. More...
 
virtual IlvAbstractChartCursorcreateCursor (const IlvSingleScaleDisplayer *scaleRef=0) const =0
 Factory method to create a default cursor. More...
 
virtual IlvAbstractGridDisplayercreateGridDisplayer (const IlvSingleScaleDisplayer *scaleRef=0) const =0
 Factory method to create a default grid. More...
 
virtual void drawLabelOnCrossings (IlBoolean b)
 Indicates whether the labels should be drawn where the axes intersect. More...
 
virtual void drawOverlappingLabels (IlBoolean b)
 Sets whether overlapping labels are allowed. More...
 
IlvDim getArrowLength () const
 Returns the arrow length. More...
 
IlvDim getArrowWidth () const
 Returns the arrow width. More...
 
const char * getAxisLabel () const
 Returns the label of the axis. More...
 
IlvDim getAxisLabelOffset () const
 Returns the offset between the scale axis and its label. More...
 
IlvPalettegetAxisLabelPalette () const
 Returns the palette used to draw the axis label. More...
 
void getAxisLabelSizes (IlvDim &width, IlvDim &height, IlvDim &descent) const
 Returns the sizes of the axis label. More...
 
IlvPalettegetAxisPalette () const
 Returns the palette used to draw the axis. More...
 
IlvConstantScaleStepsUpdatergetConstantStepsUpdater () const
 Returns the constant scale steps updater (if any) used by the current scale. More...
 
virtual IlvCoordinateInfogetCoordinateInfo (IlUInt index=0) const
 Deprecated More...
 
virtual IlvCoordinateType getCoordinateType () const
 Returns the type of the coordinate represented by the current scale. More...
 
IlvAbstractChartCursorgetCursor (IlUInt index) const
 Returns the cursor at a given index. More...
 
IlvAbstractChartCursorgetCursorByName (const char *name) const
 Returns a cursor with a given name. More...
 
IlUInt getCursorsCount () const
 Returns the number of cursors connected to the scale. More...
 
IlvAbstractGridDisplayergetGridDisplayer () const
 Deprecated Returns the associated grid. More...
 
LabelLayout getLabelLayout () const
 Returns the label layout on the scale axis. More...
 
IlvDim getMajorTickSize () const
 Returns the size of the major ticks. More...
 
IlvDim getMinorTickSize () const
 Returns the size of the minor ticks. More...
 
IlvDim getOffset () const
 Returns the offset between the steps and the step labels. More...
 
const char * getStepLabel (IlUInt iStep) const
 Returns the label of a given step. More...
 
IlDouble getStepLabelAngle () const
 Returns the angle of the step labels. More...
 
void getStepLabelBBox (const IlvProjectorArea &dataArea, IlUInt iStep, IlvRect &bbox) const
 Returns the bounding box of a step label. More...
 
const char * getStepLabelFormat () const
 Returns the format used to draw the step labels. More...
 
const char *const * getStepLabels (IlUInt &labelsCount) const
 Returns the labels of the major steps. More...
 
IlUInt getStepLabelsCount () const
 Returns the number of step labels. More...
 
void getStepLabelSizes (IlUInt iStep, IlvDim &width, IlvDim &height, IlvDim &descent) const
 Returns the sizes of a given step label. More...
 
IlvPalettegetStepLabelsPalette () const
 Returns the palette used to draw the step labels. More...
 
IlUInt getStepsCount () const
 Returns the number of major steps. More...
 
void getStepSubStepValues (IlUInt &stepsCount, const IlDouble *&stepValues, const char *const *&stepLabels, IlUInt &subStepsCount, const IlDouble *&subStepValues) const
 Returns the values and labels associated with the scale steps. More...
 
IlvScaleStepsUpdatergetStepsUpdater () const
 Returns the scale steps updater used by the current scale. More...
 
IlDouble getStepUnit () const
 Returns the step unit. More...
 
IlDouble getStepValue (IlUInt iStep) const
 Returns the value associated with a major step. More...
 
const IlDoublegetStepValues (IlUInt &count) const
 Returns the values associated with the major steps. More...
 
IlUInt getSubStepsCount () const
 Returns the number of minor steps between two major steps. More...
 
IlDouble getSubStepUnit () const
 Returns the substep unit. More...
 
IlDouble getSubStepValue (IlUInt iSubStep) const
 Returns the value associated with a minor step. More...
 
const IlDoublegetSubStepValues (IlUInt &count) const
 Returns the values associated with the minor steps. More...
 
TickLayout getTickLayout () const
 Returns the tick layout on the scale axis. More...
 
IlUInt getTotalSubStepsCount () const
 Returns the total number of minor steps. More...
 
IlvValueToLabelCB getValueToLabelCB () const
 Returns the conversion callback between data values and step labels. More...
 
IlAny getValueToLabelCBData () const
 Returns the information parameter associated with the conversion callback between data values and step labels. More...
 
IlBoolean hasCursor (const IlvAbstractChartCursor *cursor) const
 Checks whether a given cursor is connected to the scale. More...
 
IlBoolean isAxisOriented () const
 Indicates whether the axis is oriented. More...
 
IlBoolean isAxisVisible () const
 Indicates whether the axis is visible. More...
 
IlBoolean isDrawingLabelOnCrossings () const
 Sets whether the step labels are drawn where the axes intersect. More...
 
IlBoolean isDrawingOverlappingLabels () const
 Indicates whether overlapping labels should be drawn. More...
 
virtual IlBoolean isOnAbscissa () const
 Indicates whether the scale is connected to the abscissa coordinate system. More...
 
virtual IlBoolean isOnOrdinate () const
 Indicates whether the scale is connected to an ordinate coordinate system. More...
 
IlvAbstractChartCursorremoveCursor (IlvAbstractChartCursor *cursor)
 Removes a cursor from the scale. More...
 
void removeCursors ()
 Removes and deletes all the associated cursors.
 
virtual void setArrowLength (IlvDim length)
 Sets the arrow length. More...
 
virtual void setArrowWidth (IlvDim width)
 Sets the arrow width. More...
 
void setAxisLabel (const char *label)
 Sets the label of the axis. More...
 
virtual void setAxisLabelOffset (IlvDim offset)
 Sets the offset between the scale axis and its label. More...
 
virtual void setAxisLabelPalette (IlvPalette *pal)
 Sets the palette used to draw the axis label. More...
 
virtual void setAxisOriented (IlBoolean o)
 Indicates whether the scale should be oriented. More...
 
virtual void setAxisPalette (IlvPalette *pal)
 Sets the palette used to draw the axis. More...
 
void setAxisVisible (IlBoolean visible)
 Sets the visibility of the axis. More...
 
void setGridDisplayer (IlvAbstractGridDisplayer *grid)
 Deprecated Sets the associated grid. More...
 
virtual void setGridDrawOrder (IlvDrawOrder drawOrder)
 Sets the drawing order for the associated grid. More...
 
virtual void setLabelZoomFactor (IlDouble scale)
 Set the scaling (zooming) factor to be applied on labels.
 
virtual void setMajorTickSize (IlvDim val)
 Sets the size of the major ticks. More...
 
void setMajorTicksVisible (IlBoolean visible)
 Sets the visibility of the major ticks. More...
 
virtual void setMinorTickSize (IlvDim val)
 Sets the size of the minor ticks. More...
 
void setMinorTicksVisible (IlBoolean visible)
 Sets the visibility of the minor ticks. More...
 
virtual void setOffset (IlvDim dim)
 Sets the offset between the ticks and the step labels. More...
 
virtual void setStepLabel (IlUInt labelIndex, const char *label)
 Sets the label for a given step by hand. More...
 
virtual void setStepLabelAngle (IlDouble angle)
 Sets the angle of the step labels. More...
 
virtual void setStepLabelFormat (const char *format, IlBoolean invalidate=IlTrue)
 Sets the format used to translate data values into step labels. More...
 
virtual void setStepLabels (IlUInt count, const char *const *labels=0)
 Sets the step labels by hand. More...
 
virtual void setStepLabelsPalette (IlvPalette *pal)
 Sets the palette used to draw the step labels. More...
 
void setStepLabelsVisible (IlBoolean visible)
 Sets the visibility of the step labels. More...
 
virtual void setTickLayout (TickLayout layout)
 Sets the tick layout on the scale axis. More...
 
virtual void setValueToLabelCB (IlvValueToLabelCB cb, IlAny cbData=0)
 Sets a conversion callback between data values and step labels. More...
 
virtual void write (IlvOutputFile &) const
 Writes the attributes of the current object in a file. More...
 
- Public Member Functions inherited from IlvAbstractScaleDisplayer
virtual ~IlvAbstractScaleDisplayer ()
 Destructor. More...
 
virtual IlvAbstractScaleDisplayercopy () const =0
 Virtual copy constructor. More...
 
IlBoolean getCrossingValue (IlDouble &dataValue) const
 Returns the data value to which the scale is actually fixed. More...
 
IlvDrawOrder getDrawOrder () const
 Returns the drawing order for the current scale. More...
 
IlvCoordinateInfogetInfoForCrossingValue () const
 Returns the coordinate information used to position the scale. More...
 
const char * getName () const
 Returns the name of the scale. More...
 
IlBoolean getRelativePosition (IlvAxisPosition &relPos, IlvPos &offset) const
 Returns the relative position to which the scale is fixed. More...
 
IlDouble getStoredCrossingValue () const
 Returns the stored value to which the scale is fixed. More...
 
IlBoolean isAlwaysVisible () const
 Indicates whether the current scale must always appear on the screen. More...
 
IlBoolean isFixedToPosition () const
 Indicates whether the scale is fixed to a position. More...
 
IlBoolean isInVisibleDataArea () const
 Indicates whether the scale is in the visible data area. More...
 
IlBoolean isVisible () const
 Indicates whether the scale is visible. More...
 
IlvOutputFilesave (IlvOutputFile &file) const
 Writes a complete description of the current object in a file. More...
 
virtual void setAlwaysVisible (IlBoolean b)
 Specifies whether the current scale must always appear on the screen. More...
 
virtual IlBoolean setCrossingValue (IlDouble dataValue, const IlvSingleScaleDisplayer *ref)
 Sets the data value to which this scale is fixed. More...
 
virtual void setDrawOrder (IlvDrawOrder drawOrder)
 Sets the drawing order for the current scale. More...
 
virtual void setLabelLayout (LabelLayout layout)=0
 Sets the label layout on the scale axis. More...
 
void setName (const char *name)
 Sets the name of the scale. More...
 
virtual void setRelativePosition (IlvAxisPosition relPos, IlvPos offset=0)
 Sets the position to which this scale is fixed. More...
 
void setVisible (IlBoolean visible)
 Sets the visibility of the scale. More...
 

Protected Member Functions

 IlvSingleScaleDisplayer (IlvCoordinateInfo *coordInfo, IlvPalette *defaultPalette)
 Constructor. More...
 
 IlvSingleScaleDisplayer (IlvCoordinateInfo *coordInfo, IlUInt nbSteps, const char *const *stepLabels, IlUInt nbSubStepsBetween, IlvPalette *defaultPalette)
 Constructor. More...
 
 IlvSingleScaleDisplayer (const IlvSingleScaleDisplayer &src)
 Constructor. More...
 
 IlvSingleScaleDisplayer (IlvInputFile &file)
 Constructor. More...
 
IlDouble getStepDataMax () const
 Returns the data value associated with the last step of the scale. More...
 
IlDouble getStepDataMin () const
 Returns the data value associated with the first step of the scale. More...
 
- Protected Member Functions inherited from IlvAbstractScaleDisplayer
 IlvAbstractScaleDisplayer ()
 Constructor. More...
 
 IlvAbstractScaleDisplayer (const IlvAbstractScaleDisplayer &scaleDisplayer)
 Constructor. More...
 
 IlvAbstractScaleDisplayer (IlvInputFile &file)
 Constructor. More...
 

Friends

class IlvAbstractChartCursor
 
class IlvConstantScaleStepsUpdater
 
class IlvScaleStepsUpdater
 

Additional Inherited Members

- Public Types inherited from IlvAbstractScaleDisplayer
enum  LabelLayout { LabelInside, LabelOutside }
 This enumeration type defines the label layout on the scale axis. More...
 
enum  TickLayout { TickInside, TickOutside, TickCross }
 This enumeration type defines the tick layout on the scale axis. More...
 
- Static Public Member Functions inherited from IlvAbstractScaleDisplayer
static IlvAbstractScaleDisplayerLoad (IlvInputFile &file)
 Reads a scale object from a file. More...
 

Detailed Description

Base class for standard scales.

Library: ilvcharts

This class is the base class for single scales, that is, scales connected to a single coordinate system.

The computation of the steps and the substeps is performed by a dedicated object that is an instance of a subclass of the IlvScaleStepsUpdater class.

See Also
IlvAbstractScaleDisplayer, IlvRectangularScaleDisplayer, IlvCircularScaleDisplayer, IlvScaleStepsUpdater.

Constructor & Destructor Documentation

virtual IlvSingleScaleDisplayer::~IlvSingleScaleDisplayer ( )
virtual

Destructor.

The destructor performs the following steps:

  • It unlocks the associated coordinate information.
  • It deletes the step labels.
  • It unlocks the used palettes.
  • It deletes the associated grid if there is one.
  • It deletes the associated cursors.
IlvSingleScaleDisplayer::IlvSingleScaleDisplayer ( IlvCoordinateInfo coordInfo,
IlvPalette defaultPalette 
)
protected

Constructor.

Initializes a new IlvSingleScaleDisplayer object. An instance of the IlvAutoScaleStepsUpdater class is set on the created scale. Thus the steps, the substeps, and the step labels will be automatically computed.

Parameters
coordInfoThe coordinate information to which the scale is connected.
defaultPaletteThe default palette used to draw the various parts of the scale (axis, step labels, axis label). Each individual part can be assigned a different palette afterwards.
IlvSingleScaleDisplayer::IlvSingleScaleDisplayer ( IlvCoordinateInfo coordInfo,
IlUInt  nbSteps,
const char *const *  stepLabels,
IlUInt  nbSubStepsBetween,
IlvPalette defaultPalette 
)
protected

Constructor.

Initializes a new IlvSingleScaleDisplayer object. This constructor allows you to set by hand the step labels to be displayed. An instance of the IlvConstantScaleStepsUpdater class is set on the created scale.

Parameters
coordInfoThe coordinate information to which the scale is connected.
nbStepsThe number of major steps.
stepLabelsThe labels of the major steps.
nbSubStepsBetweenThe number of minor steps between two major steps.
defaultPaletteThe default palette used to draw the various parts of the scale (axis, step labels, axis label). Each individual part can be assigned a different palette afterwards.
See Also
setStepLabels().
IlvSingleScaleDisplayer::IlvSingleScaleDisplayer ( const IlvSingleScaleDisplayer src)
protected

Constructor.

Initializes a new IlvSingleScaleDisplayer object as a copy of src.

Parameters
srcThe object used to initialize the current one.
IlvSingleScaleDisplayer::IlvSingleScaleDisplayer ( IlvInputFile file)
protected

Constructor.

Initializes a new IlvSingleScaleDisplayer object from the description read in the input file named file.

Parameters
fileThe file used to initialize the current scale displayer.

Member Function Documentation

void IlvSingleScaleDisplayer::addCursor ( IlvAbstractChartCursor cursor,
IlUInt  position = IlvLastPositionIndex 
)

Adds a cursor to the scale.

Parameters
cursorThe cursor to add.
positionThe insertion rank of the cursor in the cursor list.
IlBoolean IlvSingleScaleDisplayer::areMajorTicksVisible ( ) const

Indicates whether the major ticks are visible.

Returns
IlTrue if the major ticks are visible and IlFalse otherwise.
IlBoolean IlvSingleScaleDisplayer::areMinorTicksVisible ( ) const

Indicates whether the minor ticks are visible.

Returns
IlTrue if the minor ticks are visible and IlFalse otherwise.
IlBoolean IlvSingleScaleDisplayer::areStepLabelsVisible ( ) const

Indicates whether the step labels are visible.

Returns
IlTrue if the step labels are visible and IlFalse otherwise.
virtual char* IlvSingleScaleDisplayer::computeStepLabel ( IlDouble  value) const
virtual

Computes and returns the label associated with a data value.

This method is called to create the label corresponding to a coordinate value. If a scale steps updater is defined, this method simply calls the IlvScaleStepsUpdater::computeStepLabel() on the defined scale steps updater. Otherwise, it checks whether a conversion callback is defined. If such a function does not exist, the step label format is used to compute the label.

Parameters
valueThe data value for which the associated label is to be computed.
Returns
The associated label. This label must be a valid C string allocated on the heap with the new operator.
See Also
setValueToLabelCB(), setStepLabelFormat().
virtual IlvAbstractChartCursor* IlvSingleScaleDisplayer::createCursor ( const IlvSingleScaleDisplayer scaleRef = 0) const
pure virtual

Factory method to create a default cursor.

This method must return a cursor that can be connected to the current scale.

For example, the cursors that can be connected to a rectangular scale (instance of IlvRectangularScaleDisplayer) are instances of the IlvRectangularChartCursor class or of the IlvCircularChartCursor class. Similarly, the cursors that can be connected to a circular scale (instance of IlvCircularScaleDisplayer) are only instances of the IlvRadialChartCursor class.

Parameters
scaleRefThe scale that can be used as a reference for the created cursor to know where the cursor line must stop.
Returns
The default cursor instance.
Note
The reference scale is used by default only for circular cursors.

Implemented in IlvCircularScaleDisplayer, and IlvRectangularScaleDisplayer.

virtual IlvAbstractGridDisplayer* IlvSingleScaleDisplayer::createGridDisplayer ( const IlvSingleScaleDisplayer scaleRef = 0) const
pure virtual

Factory method to create a default grid.

This method must return a grid that can be associated with the current scale.

For example, the grids that can be associated with a rectangular scale (instance of IlvRectangularScaleDisplayer) are instances of the IlvRectangularGridDisplayer class or of the IlvCircularGridDisplayer class. Similarly, the grids that can be associated with a circular scale (instance of IlvCircularScaleDisplayer) are only instances of the IlvRadialGridDisplayer class.

Parameters
scaleRefThe scale that can be used as a reference for the created grid to indicate where the grid lines must stop.
Returns
The default grid instance.
Note
The reference scale is used by default only for circular grids.

Implemented in IlvCircularScaleDisplayer, and IlvRectangularScaleDisplayer.

virtual void IlvSingleScaleDisplayer::drawLabelOnCrossings ( IlBoolean  b)
virtual

Indicates whether the labels should be drawn where the axes intersect.

Parameters
bThe new value of the Boolean indicating whether the labels should be drawn where the axes intersect. This Boolean is equal<code/code> if the labels should be drawn where the axes intersect and IlFalse otherwise.

Implements IlvAbstractScaleDisplayer.

virtual void IlvSingleScaleDisplayer::drawOverlappingLabels ( IlBoolean  b)
virtual

Sets whether overlapping labels are allowed.

If labels are not allowed to overlap (b is equal to IlFalse), the IlvSingleScaleDisplayer::getNumberOfSkippedSteps() method will be called to compute the number of steps to skip when drawing the labels.

Parameters
bThe new value of the Boolean indicating whether the labels can be overlapped. This Boolean is equal to IlTrue if overlapping labels are allowed and IlFalse otherwise.

Implements IlvAbstractScaleDisplayer.

IlvDim IlvSingleScaleDisplayer::getArrowLength ( ) const

Returns the arrow length.

Returns
The arrow length.
See Also
IlvAbstractScaleDisplayer::setArrowLength().
IlvDim IlvSingleScaleDisplayer::getArrowWidth ( ) const

Returns the arrow width.

Returns
The arrow width.
See Also
IlvAbstractScaleDisplayer::setArrowWidth().
const char* IlvSingleScaleDisplayer::getAxisLabel ( ) const

Returns the label of the axis.

Returns
The label of the axis.
IlvDim IlvSingleScaleDisplayer::getAxisLabelOffset ( ) const

Returns the offset between the scale axis and its label.

Returns
The offset between the scale axis and its label.
See Also
IlvAbstractScaleDisplayer::setAxisLabelOffset().
IlvPalette* IlvSingleScaleDisplayer::getAxisLabelPalette ( ) const

Returns the palette used to draw the axis label.

Returns
A pointer to the palette used to draw the axis label.
See Also
IlvAbstractScaleDisplayer::setAxisLabelPalette().
void IlvSingleScaleDisplayer::getAxisLabelSizes ( IlvDim width,
IlvDim height,
IlvDim descent 
) const

Returns the sizes of the axis label.

Parameters
widthReturns the width of the label.
heightReturns the height of the label.
descentReturns the descent of the label.
IlvPalette* IlvSingleScaleDisplayer::getAxisPalette ( ) const

Returns the palette used to draw the axis.

Returns
A pointer to the palette used to draw the axis.
See Also
IlvAbstractScaleDisplayer::setAxisPalette().
IlvConstantScaleStepsUpdater* IlvSingleScaleDisplayer::getConstantStepsUpdater ( ) const

Returns the constant scale steps updater (if any) used by the current scale.

Returns
A pointer to the constant scale steps updater used by the current scale to compute the steps and the substeps if the current scale uses a constant scale steps updater. Returns 0 otherwise.
virtual IlvCoordinateInfo* IlvSingleScaleDisplayer::getCoordinateInfo ( IlUInt  index = 0) const
virtual
virtual IlvCoordinateType IlvSingleScaleDisplayer::getCoordinateType ( ) const
virtual

Returns the type of the coordinate represented by the current scale.

Returns
IlvAbscissaCoordinate if the coordinate represented by the current scale is the abscissa coordinate and IlvOrdinateCoordinate if the coordinate represented by the current scale is an ordinate coordinate.

Implements IlvAbstractScaleDisplayer.

IlvAbstractChartCursor* IlvSingleScaleDisplayer::getCursor ( IlUInt  index) const

Returns the cursor at a given index.

Parameters
indexThe index of the cursor.
Returns
The corresponding cursor or 0 if the index is invalid.
IlvAbstractChartCursor* IlvSingleScaleDisplayer::getCursorByName ( const char *  name) const

Returns a cursor with a given name.

Returns the cursor handled by this scale whose name matches the name parameter.

Parameters
nameThe name of the cursor.
Returns
The corresponding cursor or 0 if none was found.
IlUInt IlvSingleScaleDisplayer::getCursorsCount ( ) const

Returns the number of cursors connected to the scale.

Returns
The number of cursors connected to the scale.
IlvAbstractGridDisplayer* IlvSingleScaleDisplayer::getGridDisplayer ( ) const

Deprecated Returns the associated grid.

Returns
A pointer to the associated grid if it exists and 0 otherwise.
See Also
IlvChartGraphic::getAbscissaGrid()
IlvChartGraphic::getOrdinateGrid()
LabelLayout IlvSingleScaleDisplayer::getLabelLayout ( ) const

Returns the label layout on the scale axis.

Returns
The label layout on the scale axis.
See Also
IlvAbstractScaleDisplayer::setLabelLayout().
IlvDim IlvSingleScaleDisplayer::getMajorTickSize ( ) const

Returns the size of the major ticks.

Returns
The size of the major ticks.
See Also
IlvAbstractScaleDisplayer::setMajorTickSize().
IlvDim IlvSingleScaleDisplayer::getMinorTickSize ( ) const

Returns the size of the minor ticks.

Returns
The size of the minor ticks.
See Also
IlvAbstractScaleDisplayer::setMinorTickSize().
IlvDim IlvSingleScaleDisplayer::getOffset ( ) const

Returns the offset between the steps and the step labels.

Returns
The offset between the steps and the step labels.
See Also
IlvAbstractScaleDisplayer::setOffset().
IlDouble IlvSingleScaleDisplayer::getStepDataMax ( ) const
protected

Returns the data value associated with the last step of the scale.

Returns
The data value associated with the last step of the scale.
IlDouble IlvSingleScaleDisplayer::getStepDataMin ( ) const
protected

Returns the data value associated with the first step of the scale.

Returns
The data value associated with the first step of the scale.
const char* IlvSingleScaleDisplayer::getStepLabel ( IlUInt  iStep) const

Returns the label of a given step.

Parameters
iStepThe index of the considered step.
Returns
The label of the step.
IlDouble IlvSingleScaleDisplayer::getStepLabelAngle ( ) const

Returns the angle of the step labels.

Returns
The angle of the step labels.
See Also
IlvAbstractScaleDisplayer::setStepLabelAngle().
void IlvSingleScaleDisplayer::getStepLabelBBox ( const IlvProjectorArea &  dataArea,
IlUInt  iStep,
IlvRect bbox 
) const

Returns the bounding box of a step label.

This method computes the bounding box of a step label from a given data area definition. This data area definition can be retrieved with the IlvChartGraphic::getProjectorArea() method.

Parameters
dataAreaThe data area definition.
iStepThe index of the step.
bboxReturns the computed bounding box.
const char* IlvSingleScaleDisplayer::getStepLabelFormat ( ) const

Returns the format used to draw the step labels.

Returns
The format used to draw the step labels.
See Also
IlvAbstractScaleDisplayer::setStepLabelFormat().
const char* const* IlvSingleScaleDisplayer::getStepLabels ( IlUInt labelsCount) const

Returns the labels of the major steps.

Parameters
labelsCountReturns the number of labels.
Returns
The labels of the major steps.
Note
The returned array must not be modified or deleted since it is internally maintained.
IlUInt IlvSingleScaleDisplayer::getStepLabelsCount ( ) const

Returns the number of step labels.

Returns
The number of step labels.
void IlvSingleScaleDisplayer::getStepLabelSizes ( IlUInt  iStep,
IlvDim width,
IlvDim height,
IlvDim descent 
) const

Returns the sizes of a given step label.

Parameters
iStepThe index of the considered step.
widthReturns the width of the label.
heightReturns the height of the label.
descentReturns the descent of the label.
IlvPalette* IlvSingleScaleDisplayer::getStepLabelsPalette ( ) const

Returns the palette used to draw the step labels.

Returns
A pointer to the palette used to draw the step labels.
See Also
IlvAbstractScaleDisplayer::setStepLabelsPalette().
IlUInt IlvSingleScaleDisplayer::getStepsCount ( ) const

Returns the number of major steps.

Returns
The number of major steps.
void IlvSingleScaleDisplayer::getStepSubStepValues ( IlUInt stepsCount,
const IlDouble *&  stepValues,
const char *const *&  stepLabels,
IlUInt subStepsCount,
const IlDouble *&  subStepValues 
) const

Returns the values and labels associated with the scale steps.

Parameters
stepsCountReturns the number of major steps.
stepValuesReturns the values associated with the major steps.
stepLabelsReturns the labels of the major steps.
subStepsCountReturns the number of minor steps.
subStepValuesReturns the values associated with the minor steps.
Warning
The returned arrays must not be modified or deleted since they are internally maintained.
IlvScaleStepsUpdater* IlvSingleScaleDisplayer::getStepsUpdater ( ) const

Returns the scale steps updater used by the current scale.

Returns
A pointer to the scale steps updater used by the current scale to compute the steps and substeps.
IlDouble IlvSingleScaleDisplayer::getStepUnit ( ) const

Returns the step unit.

Returns
The step unit.
Note
This value is meaningless if the associated coordinate uses a nonlinear transformer (for example, a logarithmic transformer).
IlDouble IlvSingleScaleDisplayer::getStepValue ( IlUInt  iStep) const

Returns the value associated with a major step.

Parameters
iStepThe index of the considered major step.
Returns
The associated value.
const IlDouble* IlvSingleScaleDisplayer::getStepValues ( IlUInt count) const

Returns the values associated with the major steps.

Parameters
countReturns the number of major steps.
Returns
The values associated with the major steps.
Warning
The returned array must not be modified or deleted.
IlUInt IlvSingleScaleDisplayer::getSubStepsCount ( ) const

Returns the number of minor steps between two major steps.

Returns
The number of minor steps between two major steps.
IlDouble IlvSingleScaleDisplayer::getSubStepUnit ( ) const

Returns the substep unit.

Returns
The substep unit.
Note
This value is meaningless if the associated coordinate uses a nonlinear transformer (for example, a logarithmic transformer).
IlDouble IlvSingleScaleDisplayer::getSubStepValue ( IlUInt  iSubStep) const

Returns the value associated with a minor step.

Parameters
iSubStepThe index of the considered minor step.
Returns
The associated value.
const IlDouble* IlvSingleScaleDisplayer::getSubStepValues ( IlUInt count) const

Returns the values associated with the minor steps.

Parameters
countReturns the number of minor steps.
Returns
The values associated with the minor steps.
Warning
The returned array must not be modified or deleted.
TickLayout IlvSingleScaleDisplayer::getTickLayout ( ) const

Returns the tick layout on the scale axis.

Returns
The tick layout on the scale axis.
See Also
IlvAbstractScaleDisplayer::setTickLayout().
IlUInt IlvSingleScaleDisplayer::getTotalSubStepsCount ( ) const

Returns the total number of minor steps.

Returns
The total number of minor steps.
IlvValueToLabelCB IlvSingleScaleDisplayer::getValueToLabelCB ( ) const

Returns the conversion callback between data values and step labels.

Returns
The conversion callback between data values and step labels.
See Also
IlvAbstractScaleDisplayer::setValueToLabelCB().
IlAny IlvSingleScaleDisplayer::getValueToLabelCBData ( ) const

Returns the information parameter associated with the conversion callback between data values and step labels.

Returns
The information parameter.
See Also
IlvAbstractScaleDisplayer::setValueToLabelCB().
IlBoolean IlvSingleScaleDisplayer::hasCursor ( const IlvAbstractChartCursor cursor) const

Checks whether a given cursor is connected to the scale.

Parameters
cursorThe considered cursor.
Returns
IlTrue if the cursor cursor is connected to the scale and IlFalse otherwise.
IlBoolean IlvSingleScaleDisplayer::isAxisOriented ( ) const

Indicates whether the axis is oriented.

Returns
IlTrue if the scale axis is oriented and IlFalse otherwise.
See Also
IlvAbstractScaleDisplayer::setAxisOriented().
IlBoolean IlvSingleScaleDisplayer::isAxisVisible ( ) const

Indicates whether the axis is visible.

Returns
IlTrue if the axis is visible and IlFalse otherwise.
IlBoolean IlvSingleScaleDisplayer::isDrawingLabelOnCrossings ( ) const

Sets whether the step labels are drawn where the axes intersect.

Returns
IlTrue if the labels are drawn where the axes intersect and IlFalse otherwise.
See Also
IlvAbstractScaleDisplayer::drawLabelOnCrossings().
IlBoolean IlvSingleScaleDisplayer::isDrawingOverlappingLabels ( ) const

Indicates whether overlapping labels should be drawn.

Returns
IlTrue if overlapping labels are drawn and IlFalse otherwise.
See Also
IlvAbstractScaleDisplayer::drawOverlappingLabels().
virtual IlBoolean IlvSingleScaleDisplayer::isOnAbscissa ( ) const
virtual

Indicates whether the scale is connected to the abscissa coordinate system.

Returns
IlTrue if the scale represents the abscissa coordinate and IlFalse if it represents an ordinate coordinate.

Implements IlvAbstractScaleDisplayer.

virtual IlBoolean IlvSingleScaleDisplayer::isOnOrdinate ( ) const
virtual

Indicates whether the scale is connected to an ordinate coordinate system.

Returns
IlTrue if the scale represents an ordinate coordinate and IlFalse if it represents the abscissa coordinate.

Implements IlvAbstractScaleDisplayer.

IlvAbstractChartCursor* IlvSingleScaleDisplayer::removeCursor ( IlvAbstractChartCursor cursor)

Removes a cursor from the scale.

The cursor is not deleted. Rather, the removed instance is returned and can be kept for future use.

Parameters
cursorThe cursor to remove.
Returns
The removed cursor if this cursor was found and 0 otherwise.
virtual void IlvSingleScaleDisplayer::setArrowLength ( IlvDim  length)
virtual

Sets the arrow length.

Parameters
lengthThe new length of the arrow.
See Also
setAxisOriented().

Implements IlvAbstractScaleDisplayer.

virtual void IlvSingleScaleDisplayer::setArrowWidth ( IlvDim  width)
virtual

Sets the arrow width.

Parameters
widthThe new width of the arrow.
See Also
setAxisOriented().

Implements IlvAbstractScaleDisplayer.

void IlvSingleScaleDisplayer::setAxisLabel ( const char *  label)

Sets the label of the axis.

Parameters
labelThe new label. The new string is copied and the previous one is freed.
virtual void IlvSingleScaleDisplayer::setAxisLabelOffset ( IlvDim  offset)
virtual

Sets the offset between the scale axis and its label.

Parameters
offsetThe new offset between the scale axis and its label.

Implements IlvAbstractScaleDisplayer.

virtual void IlvSingleScaleDisplayer::setAxisLabelPalette ( IlvPalette pal)
virtual

Sets the palette used to draw the axis label.

This method locks the new palette and unlocks the previous one.

Parameters
palThe new palette.

Implements IlvAbstractScaleDisplayer.

virtual void IlvSingleScaleDisplayer::setAxisOriented ( IlBoolean  oriented)
virtual

Indicates whether the scale should be oriented.

An oriented scale is drawn with an arrow at the end.

Parameters
orientedThe new value of the Boolean indicating whether the scale should be oriented.
See Also
setArrowWidth(), setArrowLength().

Implements IlvAbstractScaleDisplayer.

virtual void IlvSingleScaleDisplayer::setAxisPalette ( IlvPalette pal)
virtual

Sets the palette used to draw the axis.

This method locks the new palette and unlocks the previous one.

Parameters
palThe new palette.

Implements IlvAbstractScaleDisplayer.

void IlvSingleScaleDisplayer::setAxisVisible ( IlBoolean  visible)

Sets the visibility of the axis.

Parameters
visibleThe new value of the Boolean indicating whether the axis should be visible (IlTrue) or hidden (IlFalse).
void IlvSingleScaleDisplayer::setGridDisplayer ( IlvAbstractGridDisplayer grid)

Deprecated Sets the associated grid.

This method deletes the previous grid if it exists.

Parameters
gridThe new grid.
See Also
IlvChartGraphic::setAbscissaGrid()
IlvChartGraphic::setOrdinateGrid()
virtual void IlvSingleScaleDisplayer::setGridDrawOrder ( IlvDrawOrder  drawOrder)
virtual

Sets the drawing order for the associated grid.

The drawing order enables the grid to be drawn either above (IlvDrawAbove) or below (IlvDrawBelow) other graphical representations. The grid and the scale can have different drawing orders. If no associated grid is defined, this method has no effect.

Parameters
drawOrderThe new drawing order for the associated grid.

Implements IlvAbstractScaleDisplayer.

virtual void IlvSingleScaleDisplayer::setMajorTickSize ( IlvDim  size)
virtual

Sets the size of the major ticks.

Parameters
sizeThe new size of the major ticks.

Implements IlvAbstractScaleDisplayer.

void IlvSingleScaleDisplayer::setMajorTicksVisible ( IlBoolean  visible)

Sets the visibility of the major ticks.

Parameters
visibleThe new value of the Boolean indicating whether major ticks should be visible (IlTrue) or hidden (IlFalse).
virtual void IlvSingleScaleDisplayer::setMinorTickSize ( IlvDim  size)
virtual

Sets the size of the minor ticks.

Parameters
sizeThe new size of the minor ticks.

Implements IlvAbstractScaleDisplayer.

void IlvSingleScaleDisplayer::setMinorTicksVisible ( IlBoolean  visible)

Sets the visibility of the minor ticks.

Parameters
visibleThe new value of the Boolean indicating whether minor ticks should be visible (IlTrue) or hidden (IlFalse).
virtual void IlvSingleScaleDisplayer::setOffset ( IlvDim  dim)
virtual

Sets the offset between the ticks and the step labels.

Parameters
dimThe new offset between the ticks and the step labels.

Implements IlvAbstractScaleDisplayer.

virtual void IlvSingleScaleDisplayer::setStepLabel ( IlUInt  labelIndex,
const char *  label 
)
virtual

Sets the label for a given step by hand.

Parameters
labelIndexThe step index. If the index is invalid, the method does nothing.
labelThe new label for the step. This label is copied before being set and the old one is freed.

Implements IlvAbstractScaleDisplayer.

virtual void IlvSingleScaleDisplayer::setStepLabelAngle ( IlDouble  angle)
virtual

Sets the angle of the step labels.

Parameters
angleThe new angle of the step labels.

Implements IlvAbstractScaleDisplayer.

virtual void IlvSingleScaleDisplayer::setStepLabelFormat ( const char *  format,
IlBoolean  invalidate = IlTrue 
)
virtual

Sets the format used to translate data values into step labels.

Parameters
formatThe new format. The format parameter is copied and follows the same convention as the string formats used by the C primitives, such as printf().
invalidateIndicates whether the layout of the scale should be recomputed.
Note
The format is used in the IlvSingleScaleDisplayer::computeStepLabel() method.

Implements IlvAbstractScaleDisplayer.

virtual void IlvSingleScaleDisplayer::setStepLabels ( IlUInt  count,
const char *const *  labels = 0 
)
virtual

Sets the step labels by hand.

The step labels can either be computed from their associated data values or manually specified by this method. The number of steps drawn by the scale is modified to match the count parameter.

Parameters
countThe number of labels.
labelsThe new labels. Each label of this array is copied before being set. Each label previously defined is freed.
See Also
computeStepLabel().

Implements IlvAbstractScaleDisplayer.

virtual void IlvSingleScaleDisplayer::setStepLabelsPalette ( IlvPalette pal)
virtual

Sets the palette used to draw the step labels.

This method locks the new palette and unlocks the previous one.

Parameters
palThe new palette.

Implements IlvAbstractScaleDisplayer.

void IlvSingleScaleDisplayer::setStepLabelsVisible ( IlBoolean  visible)

Sets the visibility of the step labels.

Parameters
visibleThe new value of the Boolean indicating whether step labels should be visible (IlTrue) or hidden (IlFalse).
virtual void IlvSingleScaleDisplayer::setTickLayout ( TickLayout  layout)
virtual

Sets the tick layout on the scale axis.

This layout applies to both major and minor ticks. The actual result on the screen depends on the projector used and on the position of the axis.

Parameters
layoutThe new layout of the ticks.

Implements IlvAbstractScaleDisplayer.

virtual void IlvSingleScaleDisplayer::setValueToLabelCB ( IlvValueToLabelCB  cb,
IlAny  cbData = 0 
)
virtual

Sets a conversion callback between data values and step labels.

This method lets you specify a function that gives for a data value associated with a step the actual label that will be displayed for this step. The conversion callback is used by the IlvSingleScaleDisplayer::computeStepLabel() method.

Parameters
cbThe conversion callback.
cbDataAn optional parameter used to pass additional information to the callback.

Implements IlvAbstractScaleDisplayer.

virtual void IlvSingleScaleDisplayer::write ( IlvOutputFile file) const
virtual

Writes the attributes of the current object in a file.

Called by the IlvAbstractScaleDisplayer::save() method. This method can be overloaded in subclasses that define new attributes. The information written by the write() method is read by the IO constructor, which takes an IlvInputFile as its only argument. Both this method and the IO constructor can be automatically declared by using the DeclareScaleDisplayerTypeInfo macro within the class declaration.

Parameters
fileThe file where the attributes of the current object are written.

Reimplemented from IlvAbstractScaleDisplayer.


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