Rogue Wave Views Charts Package API Reference Guide |
Rogue Wave Views Documentation Home |
Abstract base class for grid display. More...
#include <ilviews/charts/grid.h>
Public Member Functions | |
virtual | ~IlvAbstractGridDisplayer () |
Destructor. More... | |
virtual IlvAbstractGridDisplayer * | copy () const =0 |
Virtual copy constructor. More... | |
void | drawMinorLines (IlBoolean flag) |
Specifies that the minor lines are drawn. More... | |
virtual void | drawTick (IlUInt tickIdx, const IlvPoint &tickPoint, IlDouble tickAngle, IlBoolean major, IlvPort *dst, const IlvRegion *clip) const =0 |
Draws the grid line for a given tick of the scale with which the grid is associated. More... | |
IlvPalette * | getDefaultPalette () const |
Returns the palette used by default. More... | |
IlvDrawOrder | getDrawOrder () const |
Returns the drawing order for the current grid. More... | |
IlvPalette * | getMajorPalette () const |
Returns the palette for the major lines. More... | |
IlvPalette * | getMinorPalette () const |
Returns the palette for the minor lines. More... | |
const IlvAbstractProjector * | getProjector () const |
Returns the object used to project the data into screen coordinates. More... | |
const IlvSingleScaleDisplayer * | getTickScale () const |
Returns the scale with which the current grid is associated. More... | |
IlBoolean | isDrawingMinorLines () const |
Indicates whether the minor lines are drawn. More... | |
IlBoolean | isVisible () const |
Indicates whether the current grid is visible. More... | |
IlvOutputFile & | save (IlvOutputFile &file) const |
Writes a complete description of the current object in a file. More... | |
void | setDrawOrder (IlvDrawOrder drawOrder) |
Sets the drawing order for the current grid. More... | |
void | setMajorPalette (IlvPalette *pal) |
Sets the palette for the major lines. More... | |
void | setMinorPalette (IlvPalette *pal) |
Sets the palette for the minor lines. More... | |
virtual void | setMode (IlvDrawMode mode) |
Sets the drawing mode. More... | |
virtual void | setOverwrite (IlBoolean o) |
Sets the way the drawing member functions operate. More... | |
void | setVisible (IlBoolean visible) |
Specifies whether the current grid is visible. More... | |
virtual void | write (IlvOutputFile &file) const |
Writes the attributes of the current object in a file. More... | |
Static Public Member Functions | |
static IlvAbstractGridDisplayer * | Load (IlvInputFile &file) |
Reads a grid object from a file. More... | |
Protected Member Functions | |
IlvAbstractGridDisplayer (IlvPalette *major=0, IlvPalette *minor=0) | |
Constructor. More... | |
IlvAbstractGridDisplayer (const IlvAbstractGridDisplayer &grid) | |
Constructor. More... | |
IlvAbstractGridDisplayer (IlvInputFile &file) | |
Constructor. More... | |
Friends | |
class | IlvAbscissaAxisElement |
class | IlvAxisElement |
Abstract base class for grid display.
Library: ilvcharts
This abstract class allows you to define a grid that can be added to a given scale. This grid is composed of major lines that are drawn at the scale steps and minor lines that are drawn at the scale substeps.
The current class stores a pointer to the scale with which the grid is associated.
IlvSingleScaleDisplayer
.
|
virtual |
Destructor.
The destructor unlocks the palettes used to draw the major and minor lines of the current grid.
|
protected |
Constructor.
Initializes a new IlvAbstractGridDisplayer
object. By default, the scale with which the current grid is associated is set to 0
. The Boolean indicating that the grid is visible is set to IlTrue
. The Boolean indicating that the minor lines are drawn is set to IlFalse
, meaning that by default only the major lines will be drawn. The drawing order is set to IlvDrawAbove
, thus specifying that the grid is drawn above the graphic representations of the data in the chart.
major | The new palette that will be used to draw the major lines of the current grid. |
minor | The new palette that will be used to draw the minor lines of the current grid. |
|
protected |
Constructor.
Initializes a new IlvAbstractGridDisplayer
object as a copy of grid.
grid | The grid used to initialize the current one. |
|
protected |
Constructor.
Initializes a new IlvAbstractGridDisplayer
object from the description read in the input file named file.
file | The file used to initialize the current grid. |
|
pure virtual |
Virtual copy constructor.
Creates and returns a copy of the current object. This method must be overloaded in subclasses. It is automatically declared by the DeclareGridDisplayerTypeInfo
macro. The IlvPredefinedGridDisplayerIOMembers
macro lets you define a default implementation, which returns an instance initialized with the copy constructor.
void IlvAbstractGridDisplayer::drawMinorLines | ( | IlBoolean | flag | ) |
Specifies that the minor lines are drawn.
flag | A Boolean value indicating whether the minor lines are drawn for the current grid. |
|
pure virtual |
Draws the grid line for a given tick of the scale with which the grid is associated.
Draws the grid line for the scale tick of index tickIdx, defined by the point tickPoint, which is its position in pixels, and by its angle tickAngle.
The grid line is drawn in the given port named dst using the clipping region clip.
tickIdx | The index of the tick on the scale to which the grid is attached. |
tickPoint | The position in pixels of the scale tick for which the grid line is drawn. This point is already transformed. |
tickAngle | The angle of the scale tick for which the grid line is drawn. |
major | A Boolean value indicating whether the tick is a major step or a substep. |
dst | The port where the grid line is drawn. |
clip | The clipping region. |
IlvSingleScaleDisplayer::drawTick()
method. Therefore, the grid line is drawn when the scale tick is drawn.IlvAbstractGridDisplayer::setDataDisplayArea()
method before the grid lines are drawn. This area can therefore be fetched with the IlvAbstractGridDisplayer::getDataDisplayArea()
method. Implemented in IlvRadialGridDisplayer, IlvCircularGridDisplayer, IlvRectangularGridDisplayer, and IlvRadarGridDisplayer.
IlvPalette* IlvAbstractGridDisplayer::getDefaultPalette | ( | ) | const |
Returns the palette used by default.
Returns a pointer to the palette used by default if no specific palette is defined for the major or the minor lines of the grid.
0
. IlvDrawOrder IlvAbstractGridDisplayer::getDrawOrder | ( | ) | const |
Returns the drawing order for the current grid.
IlvDrawAbove
if the grid is drawn above the graphic representations of the data in the chart, and IlvDrawBelow
if the grid is drawn below. IlvPalette* IlvAbstractGridDisplayer::getMajorPalette | ( | ) | const |
Returns the palette for the major lines.
IlvAbstractGridDisplayer::getDefaultPalette()
method.IlvPalette* IlvAbstractGridDisplayer::getMinorPalette | ( | ) | const |
Returns the palette for the minor lines.
IlvAbstractGridDisplayer::getDefaultPalette()
method.const IlvAbstractProjector* IlvAbstractGridDisplayer::getProjector | ( | ) | const |
Returns the object used to project the data into screen coordinates.
const IlvSingleScaleDisplayer* IlvAbstractGridDisplayer::getTickScale | ( | ) | const |
Returns the scale with which the current grid is associated.
IlBoolean IlvAbstractGridDisplayer::isDrawingMinorLines | ( | ) | const |
Indicates whether the minor lines are drawn.
IlTrue
if the minor lines are drawn for the current grid and IlFalse
otherwise. IlBoolean IlvAbstractGridDisplayer::isVisible | ( | ) | const |
Indicates whether the current grid is visible.
IlTrue
if the current grid is visible and IlFalse
otherwise.
|
static |
Reads a grid object from a file.
Creates a grid instance from the description stored in the file file. The object description must have been written with the IlvAbstractGridDisplayer::save
method.
file | The file where the object description is stored. |
IlvOutputFile& IlvAbstractGridDisplayer::save | ( | IlvOutputFile & | file | ) | const |
Writes a complete description of the current object in a file.
Writes the complete object description in a file. This description contains all the information necessary to read back this object with the IlvAbstractGridDisplayer::Load
member function. This method first writes information regarding the type of the object and calls the IlvAbstractGridDisplayer::write
method.
file | The file where the complete object description is written. |
void IlvAbstractGridDisplayer::setDrawOrder | ( | IlvDrawOrder | drawOrder | ) |
Sets the drawing order for the current grid.
drawOrder | The new drawing order. If drawOrder is equal to IlvDrawAbove , the grid will be drawn above the graphic representations of data in the chart. If drawOrder is equal to IlvDrawBelow , the grid will be drawn below. |
void IlvAbstractGridDisplayer::setMajorPalette | ( | IlvPalette * | pal | ) |
Sets the palette for the major lines.
The old palette, if it exists, is unlocked. The new palette is locked. (See the methods IlvResource::lock
and IlvResource::unLock
for more details.)
pal | The new palette used to draw the major lines of the current grid. |
void IlvAbstractGridDisplayer::setMinorPalette | ( | IlvPalette * | pal | ) |
Sets the palette for the minor lines.
The old palette, if one exists, is unlocked. The new palette is locked. (See the methods IlvResource::lock
and IlvResource::unLock
for more details.)
pal | The new palette used to draw the minor lines of the current grid. |
|
virtual |
Sets the drawing mode.
Sets the drawing mode for the current object. The information is passed to the palettes defined for the major and the minor lines.
mode | The new drawing mode for the current object. |
|
virtual |
Sets the way the drawing member functions operate.
Modifies the way the drawing member functions of the current object operate, when drawing on the root port. If the o parameter is set to IlFalse
, the drawing operations are hidden by the windows stored on the top window. If the parameter is set to IlTrue
, the drawing operations are performed on top of every window present on the screen, just as if the windows were part of the root window. The information is passed to the palettes defined for the major and the minor lines.
o | The new value of the Boolean indicating the way the drawing member functions operate. |
void IlvAbstractGridDisplayer::setVisible | ( | IlBoolean | visible | ) |
Specifies whether the current grid is visible.
visible | A Boolean value indicating whether the current grid is visible. |
|
virtual |
Writes the attributes of the current object in a file.
Called by the IlvAbstractGridDisplayer::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 DeclareGridDisplayerTypeInfo
macro within the class declaration.
file | The file where the attributes of the current object are written. |
© Copyright 2018, 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.