Om  1.0.0
A universal framework for multimedia simulation
Classes | Public Types | Public Member Functions | Static Public Attributes | List of all members
om::graphics::gui::objects::GraphViewAxis Class Reference

A class that stores information about a single graph axis. More...

#include <omGraphicsGUIGraphViewAxis.h>

Public Types

enum  Flag {
  MAJOR_DIVISIONS = (1 << 0), MINOR_DIVISIONS = (1 << 1), MAJOR_LABELS = (1 << 2), MINOR_LABELS = (1 << 3),
  NAME = (1 << 4), LABELS = (1 << 4)
}
 An enum of the various boolean flags for a graph view axis. More...
 

Public Member Functions

 GraphViewAxis ()
 Create a new graph axis with the default attributes. More...
 
const UTF8String & getName () const
 Return a reference to the string for the name of this axis, describing what it represents. More...
 
void setName (const UTF8String &newName)
 Set a string for the name of this axis, describing what it represents. More...
 
Bool getNameIsEnabled () const
 Return whether or not the main name label for this axis is enabeld. More...
 
void setNameIsEnabled (Bool newNameIsEnabled)
 Set whether or not the main name label for this axis is enabeld. More...
 
const fonts::TextStylegetNameStyle () const
 Return a reference to the text style that is used to render the name label for the axis. More...
 
void setNameStyle (const fonts::TextStyle &newNameStyle)
 Set the text style that is used to render the name label for the axis. More...
 
const OrigingetNameAlignment () const
 Return an object that describes how this graph axis's name is aligned. More...
 
void setNameAlignment (const Origin &newNameAlignment)
 Set an object that describes how this text field's text is aligned. More...
 
const GlyphLayoutgetNameLayout () const
 Return an object indicating the arrangement of name glyphs for the graph view axis. More...
 
Size getLabelCount () const
 Return the total number of user-defined labels that are part of this graph axis. More...
 
Index addLabel (const UTF8String &label, Float value, Bool labelEnabled=true, Bool divisionEnabled=true)
 Add a new user-defined label to this graph view with the specified name, value, and enable status. More...
 
Bool removeLabel (Index index)
 Remove the user-defined label at the specified index in this graph axis. More...
 
void clearLabels ()
 Remove all user-defined labels from this graph axis. More...
 
const UTF8String & getLabel (Index labelIndex) const
 Return the label string for the user-defined label at the specified index. More...
 
void setLabel (Index labelIndex, const UTF8String &newLabel)
 Set the label string for the user-defined label at the specified index. More...
 
Float getLabelValue (Index labelIndex) const
 Return the value at which the user-defined label at the specified index should be displayed. More...
 
void setLabelValue (Index labelIndex, Float newValue)
 Set the value at which the user-defined label at the specified index should be displayed. More...
 
Bool getLabelIsEnabled (Index labelIndex) const
 Return whether or not the user-defined label at the specified index should display its text label. More...
 
void setLabelIsEnabled (Index labelIndex, Bool newLabelEnabled)
 Set whether or not the user-defined label at the specified index should display its text label. More...
 
Bool getLabelDivisionIsEnabled (Index labelIndex) const
 Return whether or not the user-defined label at the specified index should display its dividing line. More...
 
void setLabelDivisionIsEnabled (Index labelIndex, Bool newDivisionEnabled)
 Set whether or not the user-defined label at the specified index should display its dividing line. More...
 
const UTF8String & getUnits () const
 Return a string representing a short name or abbreviation for the units which this axis represents. More...
 
void setUnits (const UTF8String &newUnits)
 Set a string representing a short name or abbreviation for the units which this axis represents. More...
 
const ValueCurvegetValueCurve () const
 Return an object that describes the scale that is used to display values along this axis. More...
 
void setValueCurve (const ValueCurve &newCurve)
 Set an object that describes the scale that is used to display values along this axis. More...
 
Float getMajorDivision () const
 Return a value indicating how far apart major divisions are spaced on the graph view. More...
 
Float getMinorDivision () const
 Return a value indicating how far apart minor divisions are spaced on the graph view. More...
 
void setMajorDivision (Float newMajorDivision)
 Set a value indicating how far apart major divisions are spaced on the graph view. More...
 
void setMinorDivision (Float newMinorDivision)
 Set a value indicating how far apart minor divisions are spaced on the graph view. More...
 
Float getMajorDivisionWidth () const
 Return the width of the major division gridlines for the graph. More...
 
Float getMinorDivisionWidth () const
 Return the width of the minor division gridlines for the graph. More...
 
void setMajorDivisionWidth (Float newMajorDivisionWidth)
 Set the width of the major division gridlines for the graph. More...
 
void setMinorDivisionWidth (Float newMinorDivisionWidth)
 Set the width of the minor division gridlines for the graph. More...
 
Bool getMajorDivisionsEnabled () const
 Return whether or not major dividing lines should be drawn for this axis. More...
 
Bool getMinorDivisionsEnabled () const
 Return whether or not minor dividing lines should be drawn for this axis. More...
 
void setMajorDivisionsEnabled (Bool newMajorDivisionsEnabled)
 Set whether or not major dividing lines should be drawn for this axis. More...
 
void setMinorDivisionsEnabled (Bool newMinorDivisionsEnabled)
 Set whether or not minor dividing lines should be drawn for this axis. More...
 
Bool getMajorLabelsEnabled () const
 Return whether or not major dividing labels should be drawn for this axis. More...
 
Bool getMinorLabelsEnabled () const
 Return whether or not minor dividing labels should be drawn for this axis. More...
 
void setMajorLabelsEnabled (Bool newMajorLabelsEnabled)
 Set whether or not major dividing labels should be drawn for this axis. More...
 
void setMinorLabelsEnabled (Bool newMinorLabelsEnabled)
 Set whether or not minor dividing labels should be drawn for this axis. More...
 
const Color4f & getMajorDivisionColor () const
 Return the color to use for this axis's major grid lines. More...
 
void setMajorDivisionColor (const Color4f &newMajorDivisionColor)
 Set the color to use for this axis's major grid lines. More...
 
const Color4f & getMinorDivisionColor () const
 Return the color to use for this axis's minor grid lines. More...
 
void setMinorDivisionColor (const Color4f &newMinorDivisionColor)
 Set the color to use for this axis's minor grid lines. More...
 
const fonts::TextStylegetLabelStyle () const
 Return a reference to the text style that is used to render the labels for the axis. More...
 
void setLabelStyle (const fonts::TextStyle &newLabelStyle)
 Set the text style that is used to render the labels for the axis. More...
 

Static Public Attributes

static const Float DEFAULT_MAJOR_DIVISION_WIDTH
 The default width for a major dividing line in a graph view. More...
 
static const Float DEFAULT_MINOR_DIVISION_WIDTH
 The default width for a minor dividing line in a graph view. More...
 
static const Color4f DEFAULT_MAJOR_DIVISION_COLOR
 The default background color that is used for a graph view's area. More...
 
static const Color4f DEFAULT_MINOR_DIVISION_COLOR
 The default border color that is used for a graph view. More...
 
static const Float DEFAULT_NAME_TEXT_SIZE
 The default font size that is used for an axis's name label text. More...
 
static const Color4f DEFAULT_NAME_TEXT_COLOR
 The default color that is used for an axis's name label text. More...
 

Detailed Description

A class that stores information about a single graph axis.

Member Enumeration Documentation

An enum of the various boolean flags for a graph view axis.

Enumerator
MAJOR_DIVISIONS 

A flag indicating that major divisions should be drawn for a graph view axis.

MINOR_DIVISIONS 

A flag indicating that minor divisions should be drawn for a graph view axis.

MAJOR_LABELS 

A flag indicating that major division labels should be drawn for a graph view axis.

MINOR_LABELS 

A flag indicating that minor division labels should be drawn for a graph view axis.

NAME 

A flag indicating that the main name label for a graph view axis should be drawn.

LABELS 

A flag indicating that the user labels for a graph view axis should be drawn.

Constructor & Destructor Documentation

om::graphics::gui::objects::GraphViewAxis::GraphViewAxis ( )

Create a new graph axis with the default attributes.

Member Function Documentation

const UTF8String& om::graphics::gui::objects::GraphViewAxis::getName ( ) const
inline

Return a reference to the string for the name of this axis, describing what it represents.

void om::graphics::gui::objects::GraphViewAxis::setName ( const UTF8String &  newName)

Set a string for the name of this axis, describing what it represents.

Bool om::graphics::gui::objects::GraphViewAxis::getNameIsEnabled ( ) const
inline

Return whether or not the main name label for this axis is enabeld.

void om::graphics::gui::objects::GraphViewAxis::setNameIsEnabled ( Bool  newNameIsEnabled)
inline

Set whether or not the main name label for this axis is enabeld.

const fonts::TextStyle& om::graphics::gui::objects::GraphViewAxis::getNameStyle ( ) const
inline

Return a reference to the text style that is used to render the name label for the axis.

void om::graphics::gui::objects::GraphViewAxis::setNameStyle ( const fonts::TextStyle newNameStyle)

Set the text style that is used to render the name label for the axis.

const Origin& om::graphics::gui::objects::GraphViewAxis::getNameAlignment ( ) const
inline

Return an object that describes how this graph axis's name is aligned.

void om::graphics::gui::objects::GraphViewAxis::setNameAlignment ( const Origin newNameAlignment)
inline

Set an object that describes how this text field's text is aligned.

const GlyphLayout& om::graphics::gui::objects::GraphViewAxis::getNameLayout ( ) const
inline

Return an object indicating the arrangement of name glyphs for the graph view axis.

Size om::graphics::gui::objects::GraphViewAxis::getLabelCount ( ) const
inline

Return the total number of user-defined labels that are part of this graph axis.

Index om::graphics::gui::objects::GraphViewAxis::addLabel ( const UTF8String &  label,
Float  value,
Bool  labelEnabled = true,
Bool  divisionEnabled = true 
)

Add a new user-defined label to this graph view with the specified name, value, and enable status.

The result of this method is that a new label will be drawn at the specified value on the graph (if visible). A label can be drawn as a dividing line with no text label, or as a label with no dividing line, depending on the values of the boolean parameters.

Bool om::graphics::gui::objects::GraphViewAxis::removeLabel ( Index  index)

Remove the user-defined label at the specified index in this graph axis.

void om::graphics::gui::objects::GraphViewAxis::clearLabels ( )

Remove all user-defined labels from this graph axis.

const UTF8String& om::graphics::gui::objects::GraphViewAxis::getLabel ( Index  labelIndex) const
inline

Return the label string for the user-defined label at the specified index.

void om::graphics::gui::objects::GraphViewAxis::setLabel ( Index  labelIndex,
const UTF8String &  newLabel 
)
inline

Set the label string for the user-defined label at the specified index.

Float om::graphics::gui::objects::GraphViewAxis::getLabelValue ( Index  labelIndex) const
inline

Return the value at which the user-defined label at the specified index should be displayed.

void om::graphics::gui::objects::GraphViewAxis::setLabelValue ( Index  labelIndex,
Float  newValue 
)
inline

Set the value at which the user-defined label at the specified index should be displayed.

Bool om::graphics::gui::objects::GraphViewAxis::getLabelIsEnabled ( Index  labelIndex) const
inline

Return whether or not the user-defined label at the specified index should display its text label.

void om::graphics::gui::objects::GraphViewAxis::setLabelIsEnabled ( Index  labelIndex,
Bool  newLabelEnabled 
)
inline

Set whether or not the user-defined label at the specified index should display its text label.

Bool om::graphics::gui::objects::GraphViewAxis::getLabelDivisionIsEnabled ( Index  labelIndex) const
inline

Return whether or not the user-defined label at the specified index should display its dividing line.

void om::graphics::gui::objects::GraphViewAxis::setLabelDivisionIsEnabled ( Index  labelIndex,
Bool  newDivisionEnabled 
)
inline

Set whether or not the user-defined label at the specified index should display its dividing line.

const UTF8String& om::graphics::gui::objects::GraphViewAxis::getUnits ( ) const
inline

Return a string representing a short name or abbreviation for the units which this axis represents.

void om::graphics::gui::objects::GraphViewAxis::setUnits ( const UTF8String &  newUnits)
inline

Set a string representing a short name or abbreviation for the units which this axis represents.

const ValueCurve& om::graphics::gui::objects::GraphViewAxis::getValueCurve ( ) const
inline

Return an object that describes the scale that is used to display values along this axis.

void om::graphics::gui::objects::GraphViewAxis::setValueCurve ( const ValueCurve newCurve)
inline

Set an object that describes the scale that is used to display values along this axis.

Float om::graphics::gui::objects::GraphViewAxis::getMajorDivision ( ) const
inline

Return a value indicating how far apart major divisions are spaced on the graph view.

Float om::graphics::gui::objects::GraphViewAxis::getMinorDivision ( ) const
inline

Return a value indicating how far apart minor divisions are spaced on the graph view.

void om::graphics::gui::objects::GraphViewAxis::setMajorDivision ( Float  newMajorDivision)
inline

Set a value indicating how far apart major divisions are spaced on the graph view.

void om::graphics::gui::objects::GraphViewAxis::setMinorDivision ( Float  newMinorDivision)
inline

Set a value indicating how far apart minor divisions are spaced on the graph view.

Float om::graphics::gui::objects::GraphViewAxis::getMajorDivisionWidth ( ) const
inline

Return the width of the major division gridlines for the graph.

Float om::graphics::gui::objects::GraphViewAxis::getMinorDivisionWidth ( ) const
inline

Return the width of the minor division gridlines for the graph.

void om::graphics::gui::objects::GraphViewAxis::setMajorDivisionWidth ( Float  newMajorDivisionWidth)
inline

Set the width of the major division gridlines for the graph.

void om::graphics::gui::objects::GraphViewAxis::setMinorDivisionWidth ( Float  newMinorDivisionWidth)
inline

Set the width of the minor division gridlines for the graph.

Bool om::graphics::gui::objects::GraphViewAxis::getMajorDivisionsEnabled ( ) const
inline

Return whether or not major dividing lines should be drawn for this axis.

Bool om::graphics::gui::objects::GraphViewAxis::getMinorDivisionsEnabled ( ) const
inline

Return whether or not minor dividing lines should be drawn for this axis.

void om::graphics::gui::objects::GraphViewAxis::setMajorDivisionsEnabled ( Bool  newMajorDivisionsEnabled)
inline

Set whether or not major dividing lines should be drawn for this axis.

void om::graphics::gui::objects::GraphViewAxis::setMinorDivisionsEnabled ( Bool  newMinorDivisionsEnabled)
inline

Set whether or not minor dividing lines should be drawn for this axis.

Bool om::graphics::gui::objects::GraphViewAxis::getMajorLabelsEnabled ( ) const
inline

Return whether or not major dividing labels should be drawn for this axis.

Bool om::graphics::gui::objects::GraphViewAxis::getMinorLabelsEnabled ( ) const
inline

Return whether or not minor dividing labels should be drawn for this axis.

void om::graphics::gui::objects::GraphViewAxis::setMajorLabelsEnabled ( Bool  newMajorLabelsEnabled)
inline

Set whether or not major dividing labels should be drawn for this axis.

void om::graphics::gui::objects::GraphViewAxis::setMinorLabelsEnabled ( Bool  newMinorLabelsEnabled)
inline

Set whether or not minor dividing labels should be drawn for this axis.

const Color4f& om::graphics::gui::objects::GraphViewAxis::getMajorDivisionColor ( ) const
inline

Return the color to use for this axis's major grid lines.

void om::graphics::gui::objects::GraphViewAxis::setMajorDivisionColor ( const Color4f &  newMajorDivisionColor)
inline

Set the color to use for this axis's major grid lines.

const Color4f& om::graphics::gui::objects::GraphViewAxis::getMinorDivisionColor ( ) const
inline

Return the color to use for this axis's minor grid lines.

void om::graphics::gui::objects::GraphViewAxis::setMinorDivisionColor ( const Color4f &  newMinorDivisionColor)
inline

Set the color to use for this axis's minor grid lines.

const fonts::TextStyle& om::graphics::gui::objects::GraphViewAxis::getLabelStyle ( ) const
inline

Return a reference to the text style that is used to render the labels for the axis.

void om::graphics::gui::objects::GraphViewAxis::setLabelStyle ( const fonts::TextStyle newLabelStyle)

Set the text style that is used to render the labels for the axis.

Member Data Documentation

const Float om::graphics::gui::objects::GraphViewAxis::DEFAULT_MAJOR_DIVISION_WIDTH
static

The default width for a major dividing line in a graph view.

const Float om::graphics::gui::objects::GraphViewAxis::DEFAULT_MINOR_DIVISION_WIDTH
static

The default width for a minor dividing line in a graph view.

const Color4f om::graphics::gui::objects::GraphViewAxis::DEFAULT_MAJOR_DIVISION_COLOR
static

The default background color that is used for a graph view's area.

const Color4f om::graphics::gui::objects::GraphViewAxis::DEFAULT_MINOR_DIVISION_COLOR
static

The default border color that is used for a graph view.

const Float om::graphics::gui::objects::GraphViewAxis::DEFAULT_NAME_TEXT_SIZE
static

The default font size that is used for an axis's name label text.

const Color4f om::graphics::gui::objects::GraphViewAxis::DEFAULT_NAME_TEXT_COLOR
static

The default color that is used for an axis's name label text.


The documentation for this class was generated from the following file: