Views
Charts Package API Reference Guide
Product Documentation:
Views Documentation Home
List of all members | Public Member Functions | Static Public Member Functions | Friends
IlvChartDataPointInfo Class Reference

Base class for graphical decoration of data points. More...

#include <ilviews/charts/data.h>

Inheritance diagram for IlvChartDataPointInfo:
IlvChartDataGraphicInfo IlvChartGradientPointInfo IlvChartDataPointLabel IlvPieSliceInfo

Public Member Functions

 IlvChartDataPointInfo (const IlvChartDataPointInfo &pointInfo)
 Initializes a new IlvChartDataPointInfo object as a copy of another IlvChartDataPointInfo. More...
 
 IlvChartDataPointInfo (IlvInputFile &file)
 Initializes a new IlvChartDataPointInfo object from an input file. More...
 
 IlvChartDataPointInfo (IlvPalette *palette=0)
 Initializes a new IlvChartDataPointInfo object. More...
 
virtual ~IlvChartDataPointInfo ()
 Destructor. More...
 
virtual IlBoolean boundingBox (const IlvPoint &point, const IlvChartDataSet *dataSet, IlUInt ptidx, const IlvChartGraphic *chart, IlvRect &bbox, const IlvTransformer *t=0) const
 Returns the bounding box of the graphical information object drawn next to the representation of the data point. More...
 
virtual IlvChartDataPointInfocopy () const
 Creates and returns a copy of the current object. More...
 
virtual void draw (const IlvPoint &point, const IlvChartDataSet *dataSet, IlUInt ptidx, const IlvChartGraphic *chart, IlvPort *dst, const IlvTransformer *t=0, const IlvRegion *clip=0) const
 Draws a graphical information object next to the representation of the data point. More...
 
IlvPalettegetPalette () const
 Returns the specific palette. More...
 
virtual IlBoolean getPalette (const IlvChartDataSet *dataSet, IlUInt idx, const IlvAbstractChartDisplayer *disp, const IlvPalette *defaultPalette, IlvPalette *returnPalette) const
 Gets the specific palette for a point in the same collection. More...
 
void lock ()
 Locks the current IlvChartDataPointInfo object. More...
 
IlvOutputFilesave (IlvOutputFile &file) const
 Writes a complete description of the current object in a file. More...
 
void setForeground (IlvColor *color)
 Sets the foreground color for the specific palette. 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 setPalette (IlvPalette *pal)
 Sets the specific palette. More...
 
void unLock ()
 Unlocks the current IlvChartDataPointInfo object. More...
 
virtual void write (IlvOutputFile &file) const
 Writes the attributes of the current object in a file. More...
 

Static Public Member Functions

static IlvChartDataPointInfoLoad (IlvInputFile &file)
 Reads a point information object from a file. More...
 
static IlvChartDataPointInfoRead (IlvInputFile &file)
 Reads the attributes of a point information object from a file. More...
 

Friends

class IlvPointInfoArray
 
class IlvPointInfoCollection
 
class IlvPointInfoMap
 

Detailed Description

Base class for graphical decoration of data points.

Library: ilvcharts

This class is used to add specific graphical information to a given data point. An IlvChartDataPointInfo instance stores a palette that allows you to draw a data point with a specific palette.

This class also provides an interface to draw any kind of graphical information next to the representation of a data point.

A lock/unlock system is provided to share an IlvChartDataPointInfo object among different data points (for example, a common instance can be used to specify that a set of data points must be drawn with a given color). The lock/unlock system ensures that the object will not be deleted as long as a data point needs it. (See the IlvChartDataPointInfo::lock() and IlvChartDataPointInfo::unLock() methods for more details.)

See also
IlvChartDataGraphicInfo, IlvChartDataPointLabel, IlvPointInfoCollection.

Constructor & Destructor Documentation

◆ IlvChartDataPointInfo() [1/3]

IlvChartDataPointInfo::IlvChartDataPointInfo ( IlvPalette palette = 0)

Initializes a new IlvChartDataPointInfo object.

Parameters
paletteThe new palette that will be used to draw the corresponding data point.

◆ IlvChartDataPointInfo() [2/3]

IlvChartDataPointInfo::IlvChartDataPointInfo ( const IlvChartDataPointInfo pointInfo)

Initializes a new IlvChartDataPointInfo object as a copy of another IlvChartDataPointInfo.

Parameters
pointInfoThe point information that is copied to initialize the new point information object.

◆ IlvChartDataPointInfo() [3/3]

IlvChartDataPointInfo::IlvChartDataPointInfo ( IlvInputFile file)

Initializes a new IlvChartDataPointInfo object from an input file.

Parameters
fileThe file that is read to initialize the new data point information.

◆ ~IlvChartDataPointInfo()

virtual IlvChartDataPointInfo::~IlvChartDataPointInfo ( )
virtual

Destructor.

The destructor unlocks the specific palette.

Member Function Documentation

◆ boundingBox()

virtual IlBoolean IlvChartDataPointInfo::boundingBox ( const IlvPoint point,
const IlvChartDataSet dataSet,
IlUInt  ptidx,
const IlvChartGraphic chart,
IlvRect bbox,
const IlvTransformer t = 0 
) const
virtual

Returns the bounding box of the graphical information object drawn next to the representation of the data point.

The default implementation does nothing and returns IlFalse

Parameters
pointThe coordinates of the projected data point.
dataSetThe data set holding the considered data point.
ptidxThe index of the considered data point in the dataSet dataSet.
chartThe chart object for which the graphical information object is drawn.
bboxThe returned bounding box.
tThe applied transformer.
Returns
IlTrue if the returned bounding box is not empty and IlFalse otherwise.

Reimplemented in IlvChartDataGraphicInfo, and IlvChartDataPointLabel.

◆ copy()

virtual IlvChartDataPointInfo* IlvChartDataPointInfo::copy ( ) const
virtual

Creates and returns a copy of the current object.

This method must be overloaded in subclasses. It is automatically declared by the DeclareChartDataPointInfoTypeInfo() macro. The IlvPredefinedChartDataPointInfoIOMembers macro lets you define a default implementation, which returns an instance initialized with the copy constructor.

Returns
A copy of the current object.

◆ draw()

virtual void IlvChartDataPointInfo::draw ( const IlvPoint point,
const IlvChartDataSet dataSet,
IlUInt  ptidx,
const IlvChartGraphic chart,
IlvPort dst,
const IlvTransformer t = 0,
const IlvRegion clip = 0 
) const
virtual

Draws a graphical information object next to the representation of the data point.

The default implementation does nothing.

Parameters
pointThe coordinates of the projected data point.
dataSetThe data set holding the considered data point.
ptidxThe index of the considered data point in the dataSet dataSet.
chartThe chart object for which the graphical information is drawn.
dstThe port where the graphical information object is drawn.
tThe transformer applied to dst.
clipThe clipping region.

Reimplemented in IlvChartDataGraphicInfo, and IlvChartDataPointLabel.

◆ getPalette() [1/2]

IlvPalette* IlvChartDataPointInfo::getPalette ( ) const

Returns the specific palette.

Returns
A pointer to the specific palette that will be used to draw the corresponding data point.

◆ getPalette() [2/2]

virtual IlBoolean IlvChartDataPointInfo::getPalette ( const IlvChartDataSet dataSet,
IlUInt  idx,
const IlvAbstractChartDisplayer disp,
const IlvPalette defaultPalette,
IlvPalette returnPalette 
) const
virtual

Gets the specific palette for a point in the same collection.

Parameters
dataSetThe data set to which the point belongs.
idxThe index of the point.
dispThe displayer which displays the data set.
defaultPaletteThe default palette.
returnPaletteA pointer to the specific palette that is changed according to how the data point is drawn.
Returns
IlTrue if returnPalette is changed.

Reimplemented in IlvChartGradientPointInfo.

◆ Load()

static IlvChartDataPointInfo* IlvChartDataPointInfo::Load ( IlvInputFile file)
static

Reads a point information object from a file.

Creates a point information instance from the description stored in the file file. The object description must have been written with the IlvChartDataPointInfo::save() method.

Parameters
fileThe file where the object description is stored.
Returns
A pointer to the created object.

◆ lock()

void IlvChartDataPointInfo::lock ( )

Locks the current IlvChartDataPointInfo object.

Increments a reference count initially set to 0.

Ensures that the IlvChartDataPointInfo object will not be destroyed until it is unlocked.
This function increments a reference count initially set to 0. When you keep a pointer to an IlvChartDataPointInfo object (because you store it in the field of an object or it is in a variable), you should lock it for the duration of its use so that it is not destroyed by some other object or component. When you do not need the IlvChartDataPointInfo anymore, you should release it with a call to IlvChartDataPointInfo::unLock(); if the lock you just removed was the last one, Rogue Wave Views will free the IlvChartDataPointInfo.

◆ Read()

static IlvChartDataPointInfo* IlvChartDataPointInfo::Read ( IlvInputFile file)
static

Reads the attributes of a point information object from a file.

Reads from a file the attributes specific to an object which have been written by the corresponding IlvChartDataPointInfo::write() method and creates a copy of this object. The Read method is called by the IlvChartDataPointInfo::Load() method. The IlvChartDataPointInfo::Load() method reads the information indicating the type of the stored object before calling the Read() method. Therefore, you should use the Read() method directly only when you know the type of the stored object.

Parameters
fileThe file where the object attributes are stored.
Returns
A pointer to the created object.

◆ save()

IlvOutputFile& IlvChartDataPointInfo::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 IlvChartDataPointInfo::Load() member function. This method first writes information regarding the type of the object and calls the IlvChartDataPointInfo::write() method.

Parameters
fileThe file where the complete object description is written.

◆ setForeground()

void IlvChartDataPointInfo::setForeground ( IlvColor color)

Sets the foreground color for the specific palette.

Parameters
colorThe new foreground color for the specific palette.

◆ setMode()

virtual void IlvChartDataPointInfo::setMode ( IlvDrawMode  mode)
virtual

Sets the drawing mode.

Sets the drawing mode for the current object. The information is passed to the palette stored by the object.

Parameters
modeThe new drawing mode for the current object.

Reimplemented in IlvChartDataGraphicInfo.

◆ setOverwrite()

virtual void IlvChartDataPointInfo::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 palette stored by the object.

Parameters
oThe new value of the Boolean indicating the way the drawing member functions operate.

Reimplemented in IlvChartDataGraphicInfo.

◆ setPalette()

void IlvChartDataPointInfo::setPalette ( IlvPalette pal)

Sets the specific palette.

The old palette, if one exists, is unlocked and the new palette is locked. (See the methods IlvResource::lock() and IlvResource::unLock() for more details.)

Parameters
palThe new specific palette that will be used to draw the corresponding data point.

◆ unLock()

void IlvChartDataPointInfo::unLock ( )

Unlocks the current IlvChartDataPointInfo object.

Decrements the reference count of the current object and deletes the object when the count becomes 0.

◆ write()

virtual void IlvChartDataPointInfo::write ( IlvOutputFile file) const
virtual

Writes the attributes of the current object in a file.

Called by the IlvChartDataPointInfo::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 DeclareChartDataPointInfoTypeInfo macro within the class declaration.

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