Rogue Wave Views |
Rogue Wave Views Documentation Home |
Base class for graphical decoration of data points. More...
#include <ilviews/charts/data.h>
Public Member Functions | |
IlvChartDataPointInfo (IlvPalette *palette=0) | |
Constructor. More... | |
IlvChartDataPointInfo (const IlvChartDataPointInfo &pointInfo) | |
Copy Constructor. More... | |
IlvChartDataPointInfo (IlvInputFile &file) | |
Constructor. 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 IlvChartDataPointInfo * | copy () const |
Virtual copy constructor. 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... | |
IlvPalette * | getPalette () 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... | |
IlvOutputFile & | save (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 IlvChartDataPointInfo * | Load (IlvInputFile &file) |
Reads a point information object from a file. More... | |
static IlvChartDataPointInfo * | Read (IlvInputFile &file) |
Reads the attributes of a point information object from a file. More... | |
Friends | |
class | IlvPointInfoArray |
class | IlvPointInfoCollection |
class | IlvPointInfoMap |
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.)
IlvChartDataPointInfo::IlvChartDataPointInfo | ( | IlvPalette * | palette = 0 | ) |
Constructor.
Initializes a new IlvChartDataPointInfo
object.
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.
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.
file | The file used to initialize the current data point information. |
|
virtual |
Destructor.
The destructor unlocks the specific palette.
|
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
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. |
IlTrue
if the returned bounding box is not empty and IlFalse
otherwise. Reimplemented in IlvChartDataPointLabel, and IlvChartDataGraphicInfo.
|
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.
|
virtual |
Draws a graphical information object next to the representation of the data point.
The default implementation does nothing.
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 IlvChartDataPointLabel, and IlvChartDataGraphicInfo.
IlvPalette* IlvChartDataPointInfo::getPalette | ( | ) | const |
Returns the specific palette.
|
virtual |
Gets the specific palette for a point in the same collection.
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. |
IlTrue
if returnPalette
is changed. Reimplemented in IlvChartGradientPointInfo.
|
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.
file | The file where the object description is stored. |
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 |
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.
file | The file where the object attributes are stored. |
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.
file | The file where the complete object description is written. |
void IlvChartDataPointInfo::setForeground | ( | IlvColor * | color | ) |
Sets the foreground color for the specific palette.
color | The new foreground color for the specific palette. |
|
virtual |
Sets the drawing mode.
Sets the drawing mode for the current object. The information is passed to the palette stored by the object.
mode | The new drawing mode for the current object. |
Reimplemented in IlvChartDataGraphicInfo.
|
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.
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.)
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 |
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.
file | The file where the attributes of the current object are written. |
© Copyright 2015, 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.