rwlogo
Rogue Wave Views 5.5.1

Rogue Wave Views
Charts Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvSingleScaleDisplayer Class Reference

Base class for standard scales. More...

#include <ilviews/charts/scaledis.h>

Inheritance diagram for IlvSingleScaleDisplayer:
IlvAbstractScaleDisplayer IlvCircularScaleDisplayer IlvRectangularScaleDisplayer

List of all members.

Public Member Functions

virtual ~IlvSingleScaleDisplayer ()
 Destructor.
void addCursor (IlvAbstractChartCursor *cursor, IlUInt position=IlvLastPositionIndex)
 Adds a cursor to the scale.
IlBoolean areMajorTicksVisible () const
 Indicates whether the major ticks are visible.
IlBoolean areMinorTicksVisible () const
 Indicates whether the minor ticks are visible.
IlBoolean areStepLabelsVisible () const
 Indicates whether the step labels are visible.
virtual char * computeStepLabel (IlDouble value) const
 Computes and returns the label associated with a data value.
virtual IlvAbstractChartCursorcreateCursor (const IlvSingleScaleDisplayer *scaleRef=0) const =0
 Factory method to create a default cursor.
virtual IlvAbstractGridDisplayercreateGridDisplayer (const IlvSingleScaleDisplayer *scaleRef=0) const =0
 Factory method to create a default grid.
virtual void drawLabelOnCrossings (IlBoolean b)
 Indicates whether the labels should be drawn where the axes intersect.
virtual void drawOverlappingLabels (IlBoolean b)
 Sets whether overlapping labels are allowed.
IlvDim getArrowLength () const
 Returns the arrow length.
IlvDim getArrowWidth () const
 Returns the arrow width.
const char * getAxisLabel () const
 Returns the label of the axis.
IlvDim getAxisLabelOffset () const
 Returns the offset between the scale axis and its label.
IlvPalettegetAxisLabelPalette () const
 Returns the palette used to draw the axis label.
void getAxisLabelSizes (IlvDim &width, IlvDim &height, IlvDim &descent) const
 Returns the sizes of the axis label.
IlvPalettegetAxisPalette () const
 Returns the palette used to draw the axis.
IlvConstantScaleStepsUpdatergetConstantStepsUpdater () const
 Returns the constant scale steps updater (if any) used by the current scale.
virtual IlvCoordinateInfogetCoordinateInfo (IlUInt index=0) const
 Deprecated
virtual IlvCoordinateType getCoordinateType () const
 Returns the type of the coordinate represented by the current scale.
IlvAbstractChartCursorgetCursor (IlUInt index) const
 Returns the cursor at a given index.
IlvAbstractChartCursorgetCursorByName (const char *name) const
 Returns a cursor with a given name.
IlUInt getCursorsCount () const
 Returns the number of cursors connected to the scale.
IlvAbstractGridDisplayergetGridDisplayer () const
 Deprecated Returns the associated grid.
LabelLayout getLabelLayout () const
 Returns the label layout on the scale axis.
IlvDim getMajorTickSize () const
 Returns the size of the major ticks.
IlvDim getMinorTickSize () const
 Returns the size of the minor ticks.
IlvDim getOffset () const
 Returns the offset between the steps and the step labels.
const char * getStepLabel (IlUInt iStep) const
 Returns the label of a given step.
IlDouble getStepLabelAngle () const
 Returns the angle of the step labels.
void getStepLabelBBox (const IlvProjectorArea &dataArea, IlUInt iStep, IlvRect &bbox) const
 Returns the bounding box of a step label.
const char * getStepLabelFormat () const
 Returns the format used to draw the step labels.
const char *const * getStepLabels (IlUInt &labelsCount) const
 Returns the labels of the major steps.
IlUInt getStepLabelsCount () const
 Returns the number of step labels.
void getStepLabelSizes (IlUInt iStep, IlvDim &width, IlvDim &height, IlvDim &descent) const
 Returns the sizes of a given step label.
IlvPalettegetStepLabelsPalette () const
 Returns the palette used to draw the step labels.
IlUInt getStepsCount () const
 Returns the number of major steps.
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.
IlvScaleStepsUpdatergetStepsUpdater () const
 Returns the scale steps updater used by the current scale.
IlDouble getStepUnit () const
 Returns the step unit.
IlDouble getStepValue (IlUInt iStep) const
 Returns the value associated with a major step.
const IlDoublegetStepValues (IlUInt &count) const
 Returns the values associated with the major steps.
IlUInt getSubStepsCount () const
 Returns the number of minor steps between two major steps.
IlDouble getSubStepUnit () const
 Returns the substep unit.
IlDouble getSubStepValue (IlUInt iSubStep) const
 Returns the value associated with a minor step.
const IlDoublegetSubStepValues (IlUInt &count) const
 Returns the values associated with the minor steps.
TickLayout getTickLayout () const
 Returns the tick layout on the scale axis.
IlUInt getTotalSubStepsCount () const
 Returns the total number of minor steps.
IlvValueToLabelCB getValueToLabelCB () const
 Returns the conversion callback between data values and step labels.
IlAny getValueToLabelCBData () const
 Returns the information parameter associated with the conversion callback between data values and step labels.
IlBoolean hasCursor (const IlvAbstractChartCursor *cursor) const
 Checks whether a given cursor is connected to the scale.
IlBoolean isAxisOriented () const
 Indicates whether the axis is oriented.
IlBoolean isAxisVisible () const
 Indicates whether the axis is visible.
IlBoolean isDrawingLabelOnCrossings () const
 Sets whether the step labels are drawn where the axes intersect.
IlBoolean isDrawingOverlappingLabels () const
 Indicates whether overlapping labels should be drawn.
virtual IlBoolean isOnAbscissa () const
 Indicates whether the scale is connected to the abscissa coordinate system.
virtual IlBoolean isOnOrdinate () const
 Indicates whether the scale is connected to an ordinate coordinate system.
IlvAbstractChartCursorremoveCursor (IlvAbstractChartCursor *cursor)
 Removes a cursor from the scale.
void removeCursors ()
 Removes and deletes all the associated cursors.
virtual void setArrowLength (IlvDim length)
 Sets the arrow length.
virtual void setArrowWidth (IlvDim width)
 Sets the arrow width.
void setAxisLabel (const char *label)
 Sets the label of the axis.
virtual void setAxisLabelOffset (IlvDim offset)
 Sets the offset between the scale axis and its label.
virtual void setAxisLabelPalette (IlvPalette *pal)
 Sets the palette used to draw the axis label.
virtual void setAxisOriented (IlBoolean o)
 Indicates whether the scale should be oriented.
virtual void setAxisPalette (IlvPalette *pal)
 Sets the palette used to draw the axis.
void setAxisVisible (IlBoolean visible)
 Sets the visibility of the axis.
void setGridDisplayer (IlvAbstractGridDisplayer *grid)
 Deprecated Sets the associated grid.
virtual void setGridDrawOrder (IlvDrawOrder drawOrder)
 Sets the drawing order for the associated grid.
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.
void setMajorTicksVisible (IlBoolean visible)
 Sets the visibility of the major ticks.
virtual void setMinorTickSize (IlvDim val)
 Sets the size of the minor ticks.
void setMinorTicksVisible (IlBoolean visible)
 Sets the visibility of the minor ticks.
virtual void setOffset (IlvDim dim)
 Sets the offset between the ticks and the step labels.
virtual void setStepLabel (IlUInt labelIndex, const char *label)
 Sets the label for a given step by hand.
virtual void setStepLabelAngle (IlDouble angle)
 Sets the angle of the step labels.
virtual void setStepLabelFormat (const char *format, IlBoolean invalidate=IlTrue)
 Sets the format used to translate data values into step labels.
virtual void setStepLabels (IlUInt count, const char *const *labels=0)
 Sets the step labels by hand.
virtual void setStepLabelsPalette (IlvPalette *pal)
 Sets the palette used to draw the step labels.
void setStepLabelsVisible (IlBoolean visible)
 Sets the visibility of the step labels.
virtual void setTickLayout (TickLayout layout)
 Sets the tick layout on the scale axis.
virtual void setValueToLabelCB (IlvValueToLabelCB cb, IlAny cbData=0)
 Sets a conversion callback between data values and step labels.
virtual void write (IlvOutputFile &) const
 Writes the attributes of the current object in a file.

Protected Member Functions

 IlvSingleScaleDisplayer (IlvInputFile &file)
 Constructor.
 IlvSingleScaleDisplayer (const IlvSingleScaleDisplayer &src)
 Constructor.
 IlvSingleScaleDisplayer (IlvCoordinateInfo *coordInfo, IlUInt nbSteps, const char *const *stepLabels, IlUInt nbSubStepsBetween, IlvPalette *defaultPalette)
 Constructor.
 IlvSingleScaleDisplayer (IlvCoordinateInfo *coordInfo, IlvPalette *defaultPalette)
 Constructor.
IlDouble getStepDataMax () const
 Returns the data value associated with the last step of the scale.
IlDouble getStepDataMin () const
 Returns the data value associated with the first step of the scale.

Friends

class IlvAbstractChartCursor
class IlvConstantScaleStepsUpdater
class IlvScaleStepsUpdater

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:
coordInfo The coordinate information to which the scale is connected.
defaultPalette The 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:
coordInfo The coordinate information to which the scale is connected.
nbsteps The number of major steps.
stepLabels The labels of the major steps.
nbSubStepsBetween The number of minor steps between two major steps.
defaultPalette The 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:
src The 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:
file The 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:
cursor The cursor to add.
position The 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:
value The 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:
scaleRef The 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.
Warning:
[note] The reference scale is used by default only for circular cursors.

Implemented in IlvRectangularScaleDisplayer, and IlvCircularScaleDisplayer.

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:
scaleRef The 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.
Warning:
[note] The reference scale is used by default only for circular grids.

Implemented in IlvRectangularScaleDisplayer, and IlvCircularScaleDisplayer.

virtual void IlvSingleScaleDisplayer::drawLabelOnCrossings ( IlBoolean  b  )  [virtual]

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

Parameters:
b The new value of the Boolean indicating whether the labels should be drawn where the axes intersect. This Boolean is equal to IlTrue 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:
b The 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:
width Returns the width of the label.
height Returns the height of the label.
descent Returns 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:
index The 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:
name The 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:
iStep The 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:
dataArea The data area definition.
iStep The index of the step.
bbox Returns 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:
labelsCount Returns the number of labels.
Returns:
The labels of the major steps.
Warning:
[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:
iStep The index of the considered step.
width Returns the width of the label.
height Returns the height of the label.
descent Returns 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:
stepsCount Returns the number of major steps.
stepValues Returns the values associated with the major steps.
stepsLabels Returns the labels of the major steps.
subStepsCount Returns the number of minor steps.
subStepValues Returns 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.
Warning:
[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:
iStep The 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:
count Returns 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.
Warning:
[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:
iSubStep The 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:
count Returns 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:
cursor The 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:
The 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:
length The new length of the arrow.
See also:
setAxisOriented.

Implements IlvAbstractScaleDisplayer.

virtual void IlvSingleScaleDisplayer::setArrowWidth ( IlvDim  width  )  [virtual]

Sets the arrow width.

Parameters:
width The new width of the arrow.
See also:
setAxisOriented.

Implements IlvAbstractScaleDisplayer.

void IlvSingleScaleDisplayer::setAxisLabel ( const char *  label  ) 

Sets the label of the axis.

Parameters:
label The 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:
offset The 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:
pal The 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:
oriented The 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:
pal The new palette.

Implements IlvAbstractScaleDisplayer.

void IlvSingleScaleDisplayer::setAxisVisible ( IlBoolean  visible  ) 

Sets the visibility of the axis.

Parameters:
visible The 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:
grid The 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:
drawOrder The new drawing order for the associated grid.

Implements IlvAbstractScaleDisplayer.

virtual void IlvSingleScaleDisplayer::setMajorTickSize ( IlvDim  size  )  [virtual]

Sets the size of the major ticks.

Parameters:
size The new size of the major ticks.

Implements IlvAbstractScaleDisplayer.

void IlvSingleScaleDisplayer::setMajorTicksVisible ( IlBoolean  visible  ) 

Sets the visibility of the major ticks.

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

Sets the size of the minor ticks.

Parameters:
size The new size of the minor ticks.

Implements IlvAbstractScaleDisplayer.

void IlvSingleScaleDisplayer::setMinorTicksVisible ( IlBoolean  visible  ) 

Sets the visibility of the minor ticks.

Parameters:
visible The 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:
dim The 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:
labelIndex The step index. If the index is invalid, the method does nothing.
label The 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:
angle The 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:
format The new format. The format parameter is copied and follows the same convention as the string formats used by the C primitives, such as printf.
invalidate A Boolean value indicating whether the layout of the scale should be recomputed.
Warning:
[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:
count The number of labels.
labels The 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:
pal The new palette.

Implements IlvAbstractScaleDisplayer.

void IlvSingleScaleDisplayer::setStepLabelsVisible ( IlBoolean  visible  ) 

Sets the visibility of the step labels.

Parameters:
visible The 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:
layout The 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:
cb The conversion callback.
cbData An 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:
file The file where the attributes of the current object are written.

Reimplemented from IlvAbstractScaleDisplayer.


© Copyright 2012, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.