rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Charts Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends
IlvAbstractGridDisplayer Class Referenceabstract

Abstract base class for grid display. More...

#include <ilviews/charts/grid.h>

Inheritance diagram for IlvAbstractGridDisplayer:
IlvCircularGridDisplayer IlvRadialGridDisplayer IlvRectangularGridDisplayer IlvRadarGridDisplayer

Public Member Functions

virtual ~IlvAbstractGridDisplayer ()
 Destructor. More...
 
virtual IlvAbstractGridDisplayercopy () 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...
 
IlvPalettegetDefaultPalette () const
 Returns the palette used by default. More...
 
IlvDrawOrder getDrawOrder () const
 Returns the drawing order for the current grid. More...
 
IlvPalettegetMajorPalette () const
 Returns the palette for the major lines. More...
 
IlvPalettegetMinorPalette () const
 Returns the palette for the minor lines. More...
 
const IlvAbstractProjectorgetProjector () const
 Returns the object used to project the data into screen coordinates. More...
 
const IlvSingleScaleDisplayergetTickScale () 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...
 
IlvOutputFilesave (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 IlvAbstractGridDisplayerLoad (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
 

Detailed Description

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.

See Also
IlvSingleScaleDisplayer.

Constructor & Destructor Documentation

virtual IlvAbstractGridDisplayer::~IlvAbstractGridDisplayer ( )
virtual

Destructor.

The destructor unlocks the palettes used to draw the major and minor lines of the current grid.

IlvAbstractGridDisplayer::IlvAbstractGridDisplayer ( IlvPalette major = 0,
IlvPalette minor = 0 
)
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.

Parameters
majorThe new palette that will be used to draw the major lines of the current grid.
minorThe new palette that will be used to draw the minor lines of the current grid.
IlvAbstractGridDisplayer::IlvAbstractGridDisplayer ( const IlvAbstractGridDisplayer grid)
protected

Constructor.

Initializes a new IlvAbstractGridDisplayer object as a copy of grid.

Parameters
gridThe grid used to initialize the current one.
IlvAbstractGridDisplayer::IlvAbstractGridDisplayer ( IlvInputFile file)
protected

Constructor.

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

Parameters
fileThe file used to initialize the current grid.

Member Function Documentation

virtual IlvAbstractGridDisplayer* IlvAbstractGridDisplayer::copy ( ) const
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.

Returns
A copy of the current object.
void IlvAbstractGridDisplayer::drawMinorLines ( IlBoolean  flag)

Specifies that the minor lines are drawn.

Parameters
flagA Boolean value indicating whether the minor lines are drawn for the current grid.
virtual void IlvAbstractGridDisplayer::drawTick ( IlUInt  tickIdx,
const IlvPoint tickPoint,
IlDouble  tickAngle,
IlBoolean  major,
IlvPort dst,
const IlvRegion clip 
) const
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.

Parameters
tickIdxThe index of the tick on the scale to which the grid is attached.
tickPointThe position in pixels of the scale tick for which the grid line is drawn. This point is already transformed.
tickAngleThe angle of the scale tick for which the grid line is drawn.
majorA Boolean value indicating whether the tick is a major step or a substep.
dstThe port where the grid line is drawn.
clipThe clipping region.
Warning
[note] This method is called inside the IlvSingleScaleDisplayer::drawTick method. Therefore, the grid line is drawn when the scale tick is drawn.
[note] The data display area is automatically set by the scale with the 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.

Returns
A pointer to the axis palette of the scale with which the current grid is associated. If the grid is not associated with a scale, the method returns 0.
IlvDrawOrder IlvAbstractGridDisplayer::getDrawOrder ( ) const

Returns the drawing order for the current grid.

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

Warning
[note] If there is no specific palette defined for the major lines, the palette is obtained by the IlvAbstractGridDisplayer::getDefaultPalette method.
Returns
A pointer to the palette used to draw the major lines of the current grid.
IlvPalette* IlvAbstractGridDisplayer::getMinorPalette ( ) const

Returns the palette for the minor lines.

Warning
[note] If there is no specific palette defined for the minor lines, the palette is obtained by the IlvAbstractGridDisplayer::getDefaultPalette method.
Returns
A pointer to the palette used to draw the minor lines of the current grid.
const IlvAbstractProjector* IlvAbstractGridDisplayer::getProjector ( ) const

Returns the object used to project the data into screen coordinates.

Returns
A pointer to 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.

Returns
A pointer to the scale with which the current grid is associated.
IlBoolean IlvAbstractGridDisplayer::isDrawingMinorLines ( ) const

Indicates whether the minor lines are drawn.

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

Returns
IlTrue if the current grid is visible and IlFalse otherwise.
static IlvAbstractGridDisplayer* IlvAbstractGridDisplayer::Load ( IlvInputFile file)
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.

Parameters
fileThe file where the object description is stored.
Returns
A pointer to the created object.
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.

Parameters
fileThe file where the complete object description is written.
void IlvAbstractGridDisplayer::setDrawOrder ( IlvDrawOrder  drawOrder)

Sets the drawing order for the current grid.

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

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

Parameters
palThe new palette used to draw the minor lines of the current grid.
virtual void IlvAbstractGridDisplayer::setMode ( IlvDrawMode  mode)
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.

Parameters
modeThe new drawing mode for the current object.
virtual void IlvAbstractGridDisplayer::setOverwrite ( IlBoolean  o)
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.

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

Parameters
visibleA Boolean value indicating whether the current grid is visible.
virtual void IlvAbstractGridDisplayer::write ( IlvOutputFile file) const
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.

Parameters
fileThe file where the attributes of the current object are written.

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