rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Charts Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

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

List of all members.

Public Member Functions

 IlvChartDataPointInfo (IlvInputFile &file)
 Constructor.
 IlvChartDataPointInfo (const IlvChartDataPointInfo &pointInfo)
 Copy Constructor.
 IlvChartDataPointInfo (IlvPalette *palette=0)
 Constructor.
virtual ~IlvChartDataPointInfo ()
 Destructor.
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.
virtual IlvChartDataPointInfocopy () const
 Virtual copy constructor.
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.
virtual IlBoolean getPalette (const IlvChartDataSet *dataSet, IlUInt idx, const IlvAbstractChartDisplayer *, const IlvPalette *defaultPalette, IlvPalette *returnPalette) const
 Gets the specific palette for a point in the same collection.
IlvPalettegetPalette () const
 Returns the specific palette.
void lock ()
 Locks the current IlvChartDataPointInfo object.
IlvOutputFilesave (IlvOutputFile &file) const
 Writes a complete description of the current object in a file.
void setForeground (IlvColor *color)
 Sets the foreground color for the specific palette.
virtual void setMode (IlvDrawMode mode)
 Sets the drawing mode.
virtual void setOverwrite (IlBoolean o)
 Sets the way the drawing member functions operate.
void setPalette (IlvPalette *pal)
 Sets the specific palette.
void unLock ()
 Unlocks the current IlvChartDataPointInfo object.
virtual void write (IlvOutputFile &file) const
 Writes the attributes of the current object in a file.

Static Public Member Functions

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

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::IlvChartDataPointInfo ( IlvPalette palette = 0  ) 

Constructor.

Initializes a new IlvChartDataPointInfo object.

Parameters:
palette The new palette that will be used to draw the corresponding data point.
IlvChartDataPointInfo::IlvChartDataPointInfo ( const IlvChartDataPointInfo pointInfo  ) 

Copy Constructor.

Initializes a new IlvChartDataPointInfo object which is a copy of pointInfo.

Parameters:
pointInfo The point information that is used to initialize the current one.
IlvChartDataPointInfo::IlvChartDataPointInfo ( IlvInputFile file  ) 

Constructor.

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

Parameters:
file The file used to initialize the current data point information.
virtual IlvChartDataPointInfo::~IlvChartDataPointInfo (  )  [virtual]

Destructor.

The destructor unlocks the specific palette.


Member Function Documentation

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:
point The coordinates of the projected data point.
dataSet The data set holding the considered data point.
ptidx The index of the considered data point in the dataSet dataSet.
chart The chart object for which the graphical information object is drawn.
bbox The returned bounding box.
t The applied transformer.
Returns:
IlTrue if the returned bounding box is not empty and IlFalse otherwise.

Reimplemented in IlvChartDataGraphicInfo, and IlvChartDataPointLabel.

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

Reimplemented in IlvPieSliceInfo.

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:
point The coordinates of the projected data point.
dataSet The data set holding the considered data point.
ptidx The index of the considered data point in the dataSet dataSet.
chart The chart object for which the graphical information is drawn.
dst The port where the graphical information object is drawn.
t The transformer applied to dst.
clip The clipping region.

Reimplemented in IlvChartDataGraphicInfo, and IlvChartDataPointLabel.

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

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

Parameters:
dataSet The data set to which the point belongs.
idx The index of the point.
disp The displayer which displays the data set.
defaultPalette The default palette.
returnPalette A pointer to the specific palette that is changed according to how the data point is drawn.
Returns:
true if the returnPalette is changed.

Reimplemented in IlvChartGradientPointInfo.

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

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:
file The file where the object attributes are stored.
Returns:
A pointer to the created object.

Reimplemented in IlvPieSliceInfo.

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:
file The file where the complete object description is written.
void IlvChartDataPointInfo::setForeground ( IlvColor color  ) 

Sets the foreground color for the specific palette.

Parameters:
color The new foreground color for the specific palette.
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:
mode The new drawing mode for the current object.

Reimplemented in IlvChartDataGraphicInfo.

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:
o The new value of the Boolean indicating the way the drawing member functions operate.

Reimplemented in IlvChartDataGraphicInfo.

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:
pal The new specific palette that will be used to draw the corresponding data point.
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.

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:
file The file where the attributes of the current object are written.

Reimplemented in IlvPieSliceInfo.

 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.