Views
Charts Package API Reference Guide
Product Documentation:
Views Documentation Home
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 IlvValueInterface 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 (const IlvSingleScaleDisplayer &src)
 Constructor. More...
 
 IlvSingleScaleDisplayer (IlvCoordinateInfo *coordInfo, IlUInt nbSteps, const char *const *stepLabels, IlUInt nbSubStepsBetween, IlvPalette *defaultPalette)
 Constructor. More...
 
 IlvSingleScaleDisplayer (IlvCoordinateInfo *coordInfo, IlvPalette *defaultPalette)
 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

◆ ~IlvSingleScaleDisplayer()

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() [1/4]

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() [2/4]

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() [3/4]

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() [4/4]

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

◆ addCursor()

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.

◆ areMajorTicksVisible()

IlBoolean IlvSingleScaleDisplayer::areMajorTicksVisible ( ) const

Indicates whether the major ticks are visible.

Returns
IlTrue if the major ticks are visible and IlFalse otherwise.

◆ areMinorTicksVisible()

IlBoolean IlvSingleScaleDisplayer::areMinorTicksVisible ( ) const

Indicates whether the minor ticks are visible.

Returns
IlTrue if the minor ticks are visible and IlFalse otherwise.

◆ areStepLabelsVisible()

IlBoolean IlvSingleScaleDisplayer::areStepLabelsVisible ( ) const

Indicates whether the step labels are visible.

Returns
IlTrue if the step labels are visible and IlFalse otherwise.

◆ computeStepLabel()

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

◆ createCursor()

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.

◆ createGridDisplayer()

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.

◆ drawLabelOnCrossings()

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.

◆ drawOverlappingLabels()

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.

◆ getArrowLength()

IlvDim IlvSingleScaleDisplayer::getArrowLength ( ) const

Returns the arrow length.

Returns
The arrow length.
See also
IlvAbstractScaleDisplayer::setArrowLength().

◆ getArrowWidth()

IlvDim IlvSingleScaleDisplayer::getArrowWidth ( ) const

Returns the arrow width.

Returns
The arrow width.
See also
IlvAbstractScaleDisplayer::setArrowWidth().

◆ getAxisLabel()

const char* IlvSingleScaleDisplayer::getAxisLabel ( ) const

Returns the label of the axis.

Returns
The label of the axis.

◆ getAxisLabelOffset()

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

◆ getAxisLabelPalette()

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

◆ getAxisLabelSizes()

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.

◆ getAxisPalette()

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

◆ getConstantStepsUpdater()

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.

◆ getCoordinateInfo()

virtual IlvCoordinateInfo* IlvSingleScaleDisplayer::getCoordinateInfo ( IlUInt  index = 0) const
virtual

◆ getCoordinateType()

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.

◆ getCursor()

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.

◆ getCursorByName()

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.

◆ getCursorsCount()

IlUInt IlvSingleScaleDisplayer::getCursorsCount ( ) const

Returns the number of cursors connected to the scale.

Returns
The number of cursors connected to the scale.

◆ getGridDisplayer()

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

◆ getLabelLayout()

LabelLayout IlvSingleScaleDisplayer::getLabelLayout ( ) const

Returns the label layout on the scale axis.

Returns
The label layout on the scale axis.
See also
IlvAbstractScaleDisplayer::setLabelLayout().

◆ getMajorTickSize()

IlvDim IlvSingleScaleDisplayer::getMajorTickSize ( ) const

Returns the size of the major ticks.

Returns
The size of the major ticks.
See also
IlvAbstractScaleDisplayer::setMajorTickSize().

◆ getMinorTickSize()

IlvDim IlvSingleScaleDisplayer::getMinorTickSize ( ) const

Returns the size of the minor ticks.

Returns
The size of the minor ticks.
See also
IlvAbstractScaleDisplayer::setMinorTickSize().

◆ getOffset()

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

◆ getStepDataMax()

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.

◆ getStepDataMin()

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.

◆ getStepLabel()

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.

◆ getStepLabelAngle()

IlDouble IlvSingleScaleDisplayer::getStepLabelAngle ( ) const

Returns the angle of the step labels.

Returns
The angle of the step labels.
See also
IlvAbstractScaleDisplayer::setStepLabelAngle().

◆ getStepLabelBBox()

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.

◆ getStepLabelFormat()

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

◆ getStepLabels()

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.

◆ getStepLabelsCount()

IlUInt IlvSingleScaleDisplayer::getStepLabelsCount ( ) const

Returns the number of step labels.

Returns
The number of step labels.

◆ getStepLabelSizes()

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.

◆ getStepLabelsPalette()

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

◆ getStepsCount()

IlUInt IlvSingleScaleDisplayer::getStepsCount ( ) const

Returns the number of major steps.

Returns
The number of major steps.

◆ getStepSubStepValues()

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.

◆ getStepsUpdater()

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.

◆ getStepUnit()

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

◆ getStepValue()

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.

◆ getStepValues()

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.

◆ getSubStepsCount()

IlUInt IlvSingleScaleDisplayer::getSubStepsCount ( ) const

Returns the number of minor steps between two major steps.

Returns
The number of minor steps between two major steps.

◆ getSubStepUnit()

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

◆ getSubStepValue()

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.

◆ getSubStepValues()

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.

◆ getTickLayout()

TickLayout IlvSingleScaleDisplayer::getTickLayout ( ) const

Returns the tick layout on the scale axis.

Returns
The tick layout on the scale axis.
See also
IlvAbstractScaleDisplayer::setTickLayout().

◆ getTotalSubStepsCount()

IlUInt IlvSingleScaleDisplayer::getTotalSubStepsCount ( ) const

Returns the total number of minor steps.

Returns
The total number of minor steps.

◆ getValueToLabelCB()

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

◆ getValueToLabelCBData()

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

◆ hasCursor()

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.

◆ isAxisOriented()

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

◆ isAxisVisible()

IlBoolean IlvSingleScaleDisplayer::isAxisVisible ( ) const

Indicates whether the axis is visible.

Returns
IlTrue if the axis is visible and IlFalse otherwise.

◆ isDrawingLabelOnCrossings()

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

◆ isDrawingOverlappingLabels()

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

◆ isOnAbscissa()

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.

◆ isOnOrdinate()

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.

◆ removeCursor()

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.

◆ setArrowLength()

virtual void IlvSingleScaleDisplayer::setArrowLength ( IlvDim  length)
virtual

Sets the arrow length.

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

Implements IlvAbstractScaleDisplayer.

◆ setArrowWidth()

virtual void IlvSingleScaleDisplayer::setArrowWidth ( IlvDim  width)
virtual

Sets the arrow width.

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

Implements IlvAbstractScaleDisplayer.

◆ setAxisLabel()

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.

◆ setAxisLabelOffset()

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.

◆ setAxisLabelPalette()

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.

◆ setAxisOriented()

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.

◆ setAxisPalette()

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.

◆ setAxisVisible()

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

◆ setGridDisplayer()

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

◆ setGridDrawOrder()

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.

◆ setMajorTickSize()

virtual void IlvSingleScaleDisplayer::setMajorTickSize ( IlvDim  size)
virtual

Sets the size of the major ticks.

Parameters
sizeThe new size of the major ticks.

Implements IlvAbstractScaleDisplayer.

◆ setMajorTicksVisible()

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

◆ setMinorTickSize()

virtual void IlvSingleScaleDisplayer::setMinorTickSize ( IlvDim  size)
virtual

Sets the size of the minor ticks.

Parameters
sizeThe new size of the minor ticks.

Implements IlvAbstractScaleDisplayer.

◆ setMinorTicksVisible()

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

◆ setOffset()

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.

◆ setStepLabel()

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.

◆ setStepLabelAngle()

virtual void IlvSingleScaleDisplayer::setStepLabelAngle ( IlDouble  angle)
virtual

Sets the angle of the step labels.

Parameters
angleThe new angle of the step labels.

Implements IlvAbstractScaleDisplayer.

◆ setStepLabelFormat()

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.

◆ setStepLabels()

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.

◆ setStepLabelsPalette()

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.

◆ setStepLabelsVisible()

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

◆ setTickLayout()

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.

◆ setValueToLabelCB()

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.

◆ write()

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.