rwlogo
Rogue Wave Views 5.5.1

Rogue Wave Views
Charts Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvPieSliceInfo Class Reference

Class allowing to add specific information to a slice. More...

#include <ilviews/charts/pie.h>

Inheritance diagram for IlvPieSliceInfo:
IlvChartDataGraphicInfo IlvChartDataPointInfo

List of all members.

Public Member Functions

 IlvPieSliceInfo (IlBoolean tornOff, IlvPalette *palette=0, IlvGraphic *graphic=0)
 Constructor.
virtual ~IlvPieSliceInfo ()
 Destructor.
virtual IlvChartDataPointInfocopy () const
 Virtual copy constructor.
const char * getLegendText () const
 Returns the text that will be used in a legend for the associated slice.
IlBoolean isTornOff () const
 Indicates whether the associated slice is torn off.
void setLegendText (const char *legendText)
 Sets the text that will be used in a legend for the associated slice.
void setTornOff (IlBoolean flag)
 Specifies whether the associated slice is torn off.
virtual void write (IlvOutputFile &) const
 Writes the attributes of the current object in a file.

Static Public Member Functions

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

Detailed Description

Class allowing to add specific information to a slice.

Library: ilvcharts

This class is a subclass of IlvChartDataGraphicInfo which is used to add specific information to a slice representing a given data point in a pie displayer. The IlvPieSliceInfo class stores a Boolean indicating whether the slice is torn off and a legend text that will be used in a legend for this slice in addition to the palette and the graphic object that are stored in the base classes.

See also:
IlvChartDataGraphicInfo, IlvPieChartDisplayer.

Constructor & Destructor Documentation

IlvPieSliceInfo::IlvPieSliceInfo ( IlBoolean  tornOff,
IlvPalette palette = 0,
IlvGraphic graphic = 0 
)

Constructor.

Initializes a new IlvPieSliceInfo object.

Parameters:
tornOff The new value of the Boolean indicating whether the slice is torn off.
palette The new specific palette that will be used to display the associated slice.
graphic The new graphic object that will be drawn in addition to the slice. This graphic object can be used for example to define an annotation for the slice.
virtual IlvPieSliceInfo::~IlvPieSliceInfo (  )  [virtual]

Destructor.

The destructor deletes the legend text (if any) defined to be used in a legend for the associated slice.


Member Function Documentation

virtual IlvChartDataPointInfo* IlvPieSliceInfo::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 from IlvChartDataPointInfo.

const char* IlvPieSliceInfo::getLegendText (  )  const

Returns the text that will be used in a legend for the associated slice.

Returns:
The text that will be used in a legend for the associated slice.
IlBoolean IlvPieSliceInfo::isTornOff (  )  const

Indicates whether the associated slice is torn off.

Returns:
IlTrue if the slice is torn off and IlFalse otherwise.
static IlvChartDataPointInfo* IlvPieSliceInfo::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 from IlvChartDataPointInfo.

void IlvPieSliceInfo::setLegendText ( const char *  legendText  ) 

Sets the text that will be used in a legend for the associated slice.

Parameters:
legendText The text that will be used in a legend for the associated slice. The text passed as a parameter is copied.
void IlvPieSliceInfo::setTornOff ( IlBoolean  flag  ) 

Specifies whether the associated slice is torn off.

Parameters:
flag The new value of the Boolean indicating whether the slice is torn off.
virtual void IlvPieSliceInfo::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 from IlvChartDataPointInfo.


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