rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Charts Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvAbstractChartCursor Class Reference

Abstract base class for chart cursors. More...

#include <ilviews/charts/cursor.h>

Inheritance diagram for IlvAbstractChartCursor:
IlvCircularChartCursor IlvRadialChartCursor IlvRectangularChartCursor

List of all members.

Public Member Functions

virtual ~IlvAbstractChartCursor ()
 Destructor.
virtual void axisMarkBBox (const IlvSingleScaleDisplayer *scale, const IlvPoint &cursorPoint, IlDouble cursorAngle, IlvRect &bbox) const
 Returns the bounding box of the axis mark.
virtual void boundingBox (const IlvSingleScaleDisplayer *scale, const IlvPoint &cursorPoint, IlDouble cursorAngle, const IlvRect &scaleDataDisplayArea, IlvRect &bbox) const
 Returns the bounding box of the cursor.
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.
virtual void draw (const IlvSingleScaleDisplayer *scale, const IlvPoint &cursorPoint, IlDouble cursorAngle, const IlvRect &scaleDataDisplayArea, IlvPort *dst, const IlvRegion *clip) const
 Draws the cursor.
virtual void drawAxisMark (const IlvSingleScaleDisplayer *scale, const IlvPoint &cursorPoint, IlDouble cursorAngle, IlvPort *dst, const IlvRegion *clip) const
 Draws the axis mark.
void drawAxisMark (IlBoolean draw)
 Specifies whether the cursor draws an axis mark.
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.
void drawDelimiter (IlBoolean draw)
 Specifies whether the cursor draws a delimiter.
void drawGhost (IlBoolean ghost)
 Specifies whether the delimiter is drawn is XOR mode.
IlvDrawOrder getDrawOrder () const
 Returns the drawing order of the cursor.
const char * getLabel () const
 Returns the label associated with the cursor.
const char * getName () const
 Returns the name of the cursor.
IlvPalettegetPalette () const
 Returns the palette used to draw the cursor.
IlDouble getValue () const
 Returns the value associated with the cursor.
IlBoolean isDrawingAxisMark () const
 Indicates whether the cursor draws an axis mark.
IlBoolean isDrawingDelimiter () const
 Indicates whether the cursor draws a delimiter.
IlBoolean isDrawingGhost () const
 Indicates whether the delimiter is drawn in XOR mode.
IlBoolean isVisible () const
 Returns the visibility state of the cursor.
void setDrawOrder (IlvDrawOrder drawOrder)
 Sets the drawing order of the cursor.
void setLabel (const char *label)
 Sets the label of the cursor.
void setName (const char *name)
 Sets the name of the cursor.
void setPalette (IlvPalette *pal)
 Sets the palette used to draw the cursor.
void setValue (IlDouble value)
 Sets the value of the cursor.
void setVisible (IlBoolean visible)
 Sets the visibility state of the cursor.

Protected Member Functions

 IlvAbstractChartCursor (IlvInputFile &file)
 Constructor.
 IlvAbstractChartCursor (const IlvAbstractChartCursor &cursor)
 Constructor.
 IlvAbstractChartCursor (IlDouble value, IlvPalette *palette=0)
 Constructor.

Detailed Description

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.

See also:
IlvCircularChartCursor, IlvRadialChartCursor, IlvRectangularChartCursor.

Constructor & Destructor Documentation

virtual IlvAbstractChartCursor::~IlvAbstractChartCursor (  )  [virtual]

Destructor.

The destructor unlocks the drawing palette if it was defined.

IlvAbstractChartCursor::IlvAbstractChartCursor ( IlDouble  value,
IlvPalette palette = 0 
) [protected]

Constructor.

Initializes a new IlvAbstractChartCursor object.

Parameters:
value The cursor value.
palette The palette used to draw the cursor.
IlvAbstractChartCursor::IlvAbstractChartCursor ( const IlvAbstractChartCursor cursor  )  [protected]

Constructor.

Initializes a new IlvAbstractChartCursor object as a copy of cursor.

Parameters:
cursor The object used to initialize the current one.
IlvAbstractChartCursor::IlvAbstractChartCursor ( IlvInputFile file  )  [protected]

Constructor.

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

Parameters:
file The file used to initialize the current cursor.

Member Function Documentation

virtual void IlvAbstractChartCursor::axisMarkBBox ( const IlvSingleScaleDisplayer scale,
const IlvPoint cursorPoint,
IlDouble  cursorAngle,
IlvRect bbox 
) const [virtual]

Returns the bounding box of the axis mark.

Parameters:
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 void IlvAbstractChartCursor::boundingBox ( const IlvSingleScaleDisplayer scale,
const IlvPoint cursorPoint,
IlDouble  cursorAngle,
const IlvRect scaleDataDisplayArea,
IlvRect bbox 
) const [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.

Parameters:
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.
virtual void IlvAbstractChartCursor::delimiterBBox ( const IlvSingleScaleDisplayer scale,
const IlvPoint cursorPoint,
IlDouble  cursorAngle,
const IlvRect scaleDataDisplayArea,
IlvRect bbox 
) const [pure virtual]

Returns the bounding box of the delimiter.

This method must be defined in subclasses.

Parameters:
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 IlvRectangularChartCursor, IlvCircularChartCursor, and IlvRadialChartCursor.

virtual void IlvAbstractChartCursor::draw ( const IlvSingleScaleDisplayer scale,
const IlvPoint cursorPoint,
IlDouble  cursorAngle,
const IlvRect scaleDataDisplayArea,
IlvPort dst,
const IlvRegion clip 
) const [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.

Parameters:
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.
virtual void IlvAbstractChartCursor::drawAxisMark ( const IlvSingleScaleDisplayer scale,
const IlvPoint cursorPoint,
IlDouble  cursorAngle,
IlvPort dst,
const IlvRegion clip 
) const [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).

Parameters:
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::drawAxisMark ( IlBoolean  draw  ) 

Specifies whether the cursor draws an axis mark.

Parameters:
draw A Boolean value indicating whether the axis mark is drawn.
See also:
isDrawingAxisMark.
virtual void IlvAbstractChartCursor::drawDelimiter ( const IlvSingleScaleDisplayer scale,
const IlvPoint cursorPoint,
IlDouble  cursorAngle,
const IlvRect scaleDataDisplayArea,
IlvPort dst,
const IlvRegion clip 
) const [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).

Parameters:
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 IlvRectangularChartCursor, IlvCircularChartCursor, and IlvRadialChartCursor.

void IlvAbstractChartCursor::drawDelimiter ( IlBoolean  draw  ) 

Specifies whether the cursor draws a delimiter.

Parameters:
draw A Boolean value indicating whether the delimiter is drawn.
See also:
isDrawingDelimiter.
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.

Parameters:
ghost A Boolean value indicating whether the delimiter should be drawn in XOR mode.
See also:
IlvChartGraphic::moveCursor, isDrawingGhost.
IlvDrawOrder IlvAbstractChartCursor::getDrawOrder (  )  const

Returns the drawing order of the cursor.

Returns:
IlvDrawBelow if the cursor is drawn below the data and IlvDrawAbove if it is drawn above.
See also:
setDrawOrder, IlvDrawOrder.
const char* IlvAbstractChartCursor::getLabel (  )  const

Returns the label associated with the cursor.

Returns:
The label associated with the cursor.
const char* IlvAbstractChartCursor::getName (  )  const

Returns the name of the cursor.

Returns:
The name of the cursor.
IlvPalette* IlvAbstractChartCursor::getPalette (  )  const

Returns the palette used to draw the cursor.

Returns:
The palette used to draw the cursor.
See also:
setPalette.
IlDouble IlvAbstractChartCursor::getValue (  )  const

Returns the value associated with the cursor.

Returns:
The value associated with the cursor.
IlBoolean IlvAbstractChartCursor::isDrawingAxisMark (  )  const

Indicates whether the cursor draws an axis mark.

Returns:
IlTrue if the cursor draws an axis mark and IlFalse otherwise.
See also:
drawAxisMark(IlBoolean).
IlBoolean IlvAbstractChartCursor::isDrawingDelimiter (  )  const

Indicates whether the cursor draws a delimiter.

Returns:
IlTrue if the cursor draws a delimiter and IlFalse otherwise.
See also:
drawDelimiter(IlBoolean).
IlBoolean IlvAbstractChartCursor::isDrawingGhost (  )  const

Indicates whether the delimiter is drawn in XOR mode.

Returns:
IlTrue if the delimiter is drawn in XOR mode and IlFalse otherwise.
See also:
drawGhost.
IlBoolean IlvAbstractChartCursor::isVisible (  )  const

Returns the visibility state of the cursor.

Returns:
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.

Parameters:
drawOrder The new drawing order.
See also:
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.

Parameters:
label The new label. The label passed as a parameter is copied.
See also:
drawAxisMark.
void IlvAbstractChartCursor::setName ( const char *  name  ) 

Sets the name of the cursor.

Parameters:
name The new name of the cursor. The name passed as a parameter is copied.
void IlvAbstractChartCursor::setPalette ( IlvPalette pal  ) 

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.

Parameters:
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.

Parameters:
value The new value of the cursor.
void IlvAbstractChartCursor::setVisible ( IlBoolean  visible  ) 

Sets the visibility state of the cursor.

Parameters:
visible A Boolean indicating whether the cursor is visible (IlTrue) or hidden (IlFalse).
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

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