Rogue Wave Views Charts Package API Reference Guide |
Rogue Wave Views Documentation Home |
Abstract base class for chart cursors. More...
#include <ilviews/charts/cursor.h>
Public Member Functions | |
virtual | ~IlvAbstractChartCursor () |
Destructor. More... | |
virtual void | axisMarkBBox (const IlvSingleScaleDisplayer *scale, const IlvPoint &cursorPoint, IlDouble cursorAngle, IlvRect &bbox) const |
Returns the bounding box of the axis mark. More... | |
virtual void | boundingBox (const IlvSingleScaleDisplayer *scale, const IlvPoint &cursorPoint, IlDouble cursorAngle, const IlvRect &scaleDataDisplayArea, IlvRect &bbox) const |
Returns the bounding box of the cursor. More... | |
virtual void | delimiterBBox (const IlvSingleScaleDisplayer *scale, const IlvPoint &cursorPoint, IlDouble cursorAngle, const IlvRect &scaleDataDisplayArea, IlvRect &bbox) const =0 |
Returns the bounding box of the delimiter. More... | |
virtual void | draw (const IlvSingleScaleDisplayer *scale, const IlvPoint &cursorPoint, IlDouble cursorAngle, const IlvRect &scaleDataDisplayArea, IlvPort *dst, const IlvRegion *clip) const |
Draws the cursor. More... | |
void | drawAxisMark (IlBoolean draw) |
Specifies whether the cursor draws an axis mark. More... | |
virtual void | drawAxisMark (const IlvSingleScaleDisplayer *scale, const IlvPoint &cursorPoint, IlDouble cursorAngle, IlvPort *dst, const IlvRegion *clip) const |
Draws the axis mark. More... | |
void | drawDelimiter (IlBoolean draw) |
Specifies whether the cursor draws a delimiter. More... | |
virtual void | drawDelimiter (const IlvSingleScaleDisplayer *scale, const IlvPoint &cursorPoint, IlDouble cursorAngle, const IlvRect &scaleDataDisplayArea, IlvPort *dst, const IlvRegion *clip) const =0 |
Draws the cursor delimiter. More... | |
void | drawGhost (IlBoolean ghost) |
Specifies whether the delimiter is drawn is XOR mode. More... | |
IlvDrawOrder | getDrawOrder () const |
Returns the drawing order of the cursor. More... | |
const char * | getLabel () const |
Returns the label associated with the cursor. More... | |
const char * | getName () const |
Returns the name of the cursor. More... | |
IlvPalette * | getPalette () const |
Returns the palette used to draw the cursor. More... | |
IlDouble | getValue () const |
Returns the value associated with the cursor. More... | |
IlBoolean | isDrawingAxisMark () const |
Indicates whether the cursor draws an axis mark. More... | |
IlBoolean | isDrawingDelimiter () const |
Indicates whether the cursor draws a delimiter. More... | |
IlBoolean | isDrawingGhost () const |
Indicates whether the delimiter is drawn in XOR mode. More... | |
IlBoolean | isVisible () const |
Returns the visibility state of the cursor. More... | |
void | setDrawOrder (IlvDrawOrder drawOrder) |
Sets the drawing order of the cursor. More... | |
void | setLabel (const char *label) |
Sets the label of the cursor. More... | |
void | setName (const char *name) |
Sets the name of the cursor. More... | |
void | setPalette (IlvPalette *palette) |
Sets the palette used to draw the cursor. More... | |
void | setValue (IlDouble value) |
Sets the value of the cursor. More... | |
void | setVisible (IlBoolean visible) |
Sets the visibility state of the cursor. More... | |
Protected Member Functions | |
IlvAbstractChartCursor (IlDouble value, IlvPalette *palette=0) | |
Constructor. More... | |
IlvAbstractChartCursor (const IlvAbstractChartCursor &cursor) | |
Constructor. More... | |
IlvAbstractChartCursor (IlvInputFile &file) | |
Constructor. More... | |
Abstract base class for chart cursors.
Library: ilvcharts
A chart cursor is a graphical indicator of a data value. The chart cursor is associated with a given scale and indicates the value of a data item on this scale. It is composed of two distinct items:
The axis mark indicates the data value on the scale. The axis mark displays the defined cursor label if it exists (see the IlvAbstractChartCursor::setLabel
method) or the data value.
In order to speed up the drawing process when the cursor is used as a dynamic mark (for example, a crosshair), you can specify that the delimiter is to be drawn in XOR mode by using the IlvAbstractChartCursor::drawGhost
method.
|
virtual |
Destructor.
The destructor unlocks the drawing palette if it was defined.
|
protected |
Constructor.
Initializes a new IlvAbstractChartCursor
object.
value | The cursor value. |
palette | The palette used to draw the cursor. |
|
protected |
Constructor.
Initializes a new IlvAbstractChartCursor
object as a copy of cursor.
cursor | The object used to initialize the current one. |
|
protected |
Constructor.
Initializes a new IlvAbstractChartCursor
object from the description read in the input file named file.
file | The file used to initialize the current cursor. |
|
virtual |
Returns the bounding box of the axis mark.
scale | The scale to which the cursor is attached. |
cursorPoint | The point in view coordinates on the scale axis. |
cursorAngle | The direction angle of the cursor from the scale axis. |
bbox | The returned bounding box. |
|
virtual |
Returns the bounding box of the cursor.
This method returns the bounding rectangle containing both the delimiter and the axis mark. If the delimiter is drawn in ghost mode (see IlvAbstractChartCursor::isDrawingGhost
), the delimiter is not taken into account. Also, the visibility of the two items is considered for the computation.
scale | The scale to which the cursor is attached. |
cursorPoint | The point in view coordinates on the scale axis. |
cursorAngle | The direction angle of the cursor from the scale axis. |
scaleDataDisplayArea | The data display area of the corresponding scale. |
bbox | The returned bounding box. |
|
pure virtual |
Returns the bounding box of the delimiter.
This method must be defined in subclasses.
scale | The scale to which the cursor is attached. |
cursorPoint | The point in view coordinates on the scale axis. |
cursorAngle | The direction angle of the cursor from the scale axis. |
scaleDataDisplayArea | The data display area of the corresponding scale. |
bbox | The returned bounding box. |
Implemented in IlvRadialChartCursor, IlvCircularChartCursor, and IlvRectangularChartCursor.
|
virtual |
Draws the cursor.
This method draws the cursor. To do this, it checks whether the delimiter and the axis mark should be drawn, and calls the IlvAbstractChartCursor::drawDelimiter
and IlvAbstractChartCursor::drawAxisMark
methods accordingly.
scale | The scale to which the cursor is attached. |
cursorPoint | The point in view coordinates on the scale axis. |
cursorAngle | The direction angle of the cursor from the scale axis. |
scaleDataDisplayArea | The data display area of the corresponding scale. |
dst | The drawing port. |
clip | The drawing clip. |
void IlvAbstractChartCursor::drawAxisMark | ( | IlBoolean | draw | ) |
Specifies whether the cursor draws an axis mark.
draw | A Boolean value indicating whether the axis mark is drawn. |
isDrawingAxisMark
.
|
virtual |
Draws the axis mark.
The default implementation of this method draws an image string containing the cursor label if it is defined (see the IlvAbstractChartCursor::getLabel
method) or the cursor value (see the IlvAbstractChartCursor::getValue
method) with the format defined for the scale (see the IlvAbstractScaleDisplayer::setStepLabelFormat
method).
scale | The scale to which the cursor is attached. |
cursorPoint | The point in view coordinates on the scale axis. |
cursorAngle | The direction angle of the cursor from the scale axis. |
dst | The drawing port. |
clip | The drawing clip. |
void IlvAbstractChartCursor::drawDelimiter | ( | IlBoolean | draw | ) |
Specifies whether the cursor draws a delimiter.
draw | A Boolean value indicating whether the delimiter is drawn. |
isDrawingDelimiter
.
|
pure virtual |
Draws the cursor delimiter.
This method must be defined in subclasses. The defined method should take into account the ghost drawing property of the delimiter (see the IlvAbstractChartCursor::isDrawingGhost
method).
scale | The scale to which the cursor is attached. |
cursorPoint | The point in view coordinates on the scale axis. |
cursorAngle | The direction angle of the cursor from the scale axis. |
scaleDataDisplayArea | The data display area of the corresponding scale. |
dst | The drawing port. |
clip | The drawing clip. |
Implemented in IlvRadialChartCursor, IlvCircularChartCursor, and IlvRectangularChartCursor.
void IlvAbstractChartCursor::drawGhost | ( | IlBoolean | ghost | ) |
Specifies whether the delimiter is drawn is XOR mode.
This method lets you specify that the delimiter must be drawn in XOR mode when ghost is equal to IlTrue
. This is useful when the cursor value is updated frequently since it enables you to avoid expensive redraw operations.
ghost | A Boolean value indicating whether the delimiter should be drawn in XOR mode. |
IlvChartGraphic::moveCursor
, isDrawingGhost
. IlvDrawOrder IlvAbstractChartCursor::getDrawOrder | ( | ) | const |
Returns the drawing order of the cursor.
IlvDrawBelow
if the cursor is drawn below the data and IlvDrawAbove
if it is drawn above. setDrawOrder
, IlvDrawOrder
. const char* IlvAbstractChartCursor::getLabel | ( | ) | const |
Returns the label associated with the cursor.
|
virtual |
Returns the name of the cursor.
Reimplemented from IlvValueInterface.
IlvPalette* IlvAbstractChartCursor::getPalette | ( | ) | const |
Returns the palette used to draw the cursor.
setPalette
. IlDouble IlvAbstractChartCursor::getValue | ( | ) | const |
Returns the value associated with the cursor.
IlBoolean IlvAbstractChartCursor::isDrawingAxisMark | ( | ) | const |
Indicates whether the cursor draws an axis mark.
IlTrue
if the cursor draws an axis mark and IlFalse
otherwise. drawAxisMark(IlBoolean)
. IlBoolean IlvAbstractChartCursor::isDrawingDelimiter | ( | ) | const |
Indicates whether the cursor draws a delimiter.
IlTrue
if the cursor draws a delimiter and IlFalse
otherwise. drawDelimiter(IlBoolean)
. IlBoolean IlvAbstractChartCursor::isDrawingGhost | ( | ) | const |
Indicates whether the delimiter is drawn in XOR mode.
IlTrue
if the delimiter is drawn in XOR mode and IlFalse
otherwise. drawGhost
. IlBoolean IlvAbstractChartCursor::isVisible | ( | ) | const |
Returns the visibility state of the cursor.
IlTrue
if the cursor is visible and IlFalse
otherwise. void IlvAbstractChartCursor::setDrawOrder | ( | IlvDrawOrder | drawOrder | ) |
Sets the drawing order of the cursor.
The drawing order determines whether the cursor is drawn above or below the displayed data.
drawOrder | The new drawing order. |
IlvDrawOrder
. void IlvAbstractChartCursor::setLabel | ( | const char * | label | ) |
Sets the label of the cursor.
The label will be drawn on the axis if it is defined. Otherwise, the value associated with the cursor will be drawn.
label | The new label. The label passed as a parameter is copied. |
drawAxisMark
. void IlvAbstractChartCursor::setName | ( | const char * | name | ) |
Sets the name of the cursor.
name | The new name of the cursor. The name passed as a parameter is copied. |
void IlvAbstractChartCursor::setPalette | ( | IlvPalette * | palette | ) |
Sets the palette used to draw the cursor.
The new palette is locked. If the palette is 0
, the cursor will use the axis palette of the scale to draw itself.
palette | The new palette used to draw the cursor. |
void IlvAbstractChartCursor::setValue | ( | IlDouble | value | ) |
Sets the value of the cursor.
This value is used to compute the position of the cursor on the scale.
value | The new value of the cursor. |
void IlvAbstractChartCursor::setVisible | ( | IlBoolean | visible | ) |
Sets the visibility state of the cursor.
visible | A Boolean indicating whether the cursor is visible (IlTrue ) or hidden (IlFalse ). |
© Copyright 2016, 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.