AxesDisplayData.h

Classes

AxesDisplayData -- Interface and simple implementation of axis labelling. (full description)

class AxesDisplayData : public PassiveCachingDD

Interface

Public Members
AxesDisplayData()
virtual ~AxesDisplayData()
virtual void setDefaultOptions()
virtual Bool setOptions(Record &rec, Record &recOut)
virtual Record getOptions()
virtual Display::DisplayDataType classType()
virtual CachingDisplayMethod *newDisplayMethod(WorldCanvas *worldCanvas, AttributeBuffer *wchAttributes, AttributeBuffer *ddAttributes, CachingDisplayData *dd)
virtual AttributeBuffer optionsAsAttributes()
virtual String titleText() const
virtual String xAxisText(const WorldCanvas* wc=0) const
virtual String yAxisText(const WorldCanvas* wc=0) const
virtual String xGridType() const
virtual String yGridType() const
virtual String titleTextColor() const
virtual String xAxisColor() const
virtual String yAxisColor() const
virtual Float lineWidth() const
virtual String charFont() const
virtual Float charSize() const
virtual String outlineColor() const
Protected Members
AxesDisplayData(const AxesDisplayData &other)
void operator=(const AxesDisplayData &other)

Description

Synopsis

This class adds to the interface defined by CachingDisplayData to provide the necessary infrastructure for drawing axis labels on WorldCanvases. This class serves as a basic implementation which can (and probably should) be over-written in derived classes.

Member Description

AxesDisplayData()

Constructor.

virtual ~AxesDisplayData()

Destructor.

virtual void setDefaultOptions()

Install the default options for this DisplayData.

virtual Bool setOptions(Record &rec, Record &recOut)

Apply options stored in rec to the DisplayData. A return value of True means a refresh is needed. recOut contains any fields which were implicitly changed as a result of the call to this function.

virtual Record getOptions()

Retrieve the current and default options and parameter types.

virtual Display::DisplayDataType classType()

Return the type of this DisplayData.

virtual CachingDisplayMethod *newDisplayMethod(WorldCanvas *worldCanvas, AttributeBuffer *wchAttributes, AttributeBuffer *ddAttributes, CachingDisplayData *dd)

Create a new AxesDisplayMethod for drawing on the given WorldCanvas when the AttributeBuffers are suitably matched to the current state of this DisplayData and of the WorldCanvas/Holder. The tag is a unique number used to identify the age of the newly constructed CachingDisplayMethod.

virtual AttributeBuffer optionsAsAttributes()

Return the current options of this DisplayData as an AttributeBuffer.

virtual String titleText() const

Get the title text for labelling.

virtual String xAxisText(const WorldCanvas* wc=0) const
virtual String yAxisText(const WorldCanvas* wc=0) const

Get the X and Y axis text Strings for labelling. a WC can be supplied in order to retrieve default titles from the WC CS.

virtual String xGridType() const
virtual String yGridType() const

Get what type of grid should be marked in each direction.

virtual String titleTextColor() const
virtual String xAxisColor() const
virtual String yAxisColor() const

Get the color to use for the title text, the X axis text, and the Y axis text labels.

virtual Float lineWidth() const

Get the line width for labelling.

virtual String charFont() const

Get the character font for labelling.

virtual Float charSize() const

Get the character size for labelling.

virtual String outlineColor() const

Get the color of the plot outline.

AxesDisplayData(const AxesDisplayData &other)

(Required) copy constructor.

void operator=(const AxesDisplayData &other)

(Required) copy assignment.