Om
1.0.0
A universal framework for multimedia simulation
|
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::TextStyle & | getNameStyle () 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 Origin & | getNameAlignment () 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 GlyphLayout & | getNameLayout () 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 ValueCurve & | getValueCurve () 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::TextStyle & | getLabelStyle () 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... | |
A class that stores information about a single graph axis.
An enum of the various boolean flags for a graph view axis.
om::graphics::gui::objects::GraphViewAxis::GraphViewAxis | ( | ) |
Create a new graph axis with the default attributes.
|
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.
|
inline |
Return whether or not the main name label for this axis is enabeld.
|
inline |
Set whether or not the main name label for this axis is enabeld.
|
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.
|
inline |
Return an object that describes how this graph axis's name is aligned.
|
inline |
Set an object that describes how this text field's text is aligned.
|
inline |
Return an object indicating the arrangement of name glyphs for the graph view axis.
|
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.
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.
|
inline |
Return the label string for the user-defined label at the specified index.
|
inline |
Set the label string for the user-defined label at the specified index.
Return the value at which the user-defined label at the specified index should be displayed.
|
inline |
Set the value at which the user-defined label at the specified index should be displayed.
Return whether or not the user-defined label at the specified index should display its text label.
|
inline |
Set whether or not the user-defined label at the specified index should display its text label.
|
inline |
Return whether or not the user-defined label at the specified index should display its dividing line.
|
inline |
Set whether or not the user-defined label at the specified index should display its dividing line.
|
inline |
Return a string representing a short name or abbreviation for the units which this axis represents.
|
inline |
Set a string representing a short name or abbreviation for the units which this axis represents.
|
inline |
Return an object that describes the scale that is used to display values along this axis.
|
inline |
Set an object that describes the scale that is used to display values along this axis.
|
inline |
Return a value indicating how far apart major divisions are spaced on the graph view.
|
inline |
Return a value indicating how far apart minor divisions are spaced on the graph view.
|
inline |
Set a value indicating how far apart major divisions are spaced on the graph view.
|
inline |
Set a value indicating how far apart minor divisions are spaced on the graph view.
|
inline |
Return the width of the major division gridlines for the graph.
|
inline |
Return the width of the minor division gridlines for the graph.
|
inline |
Set the width of the major division gridlines for the graph.
|
inline |
Set the width of the minor division gridlines for the graph.
|
inline |
Return whether or not major dividing lines should be drawn for this axis.
|
inline |
Return whether or not minor dividing lines should be drawn for this axis.
|
inline |
Set whether or not major dividing lines should be drawn for this axis.
|
inline |
Set whether or not minor dividing lines should be drawn for this axis.
|
inline |
Return whether or not major dividing labels should be drawn for this axis.
|
inline |
Return whether or not minor dividing labels should be drawn for this axis.
|
inline |
Set whether or not major dividing labels should be drawn for this axis.
|
inline |
Set whether or not minor dividing labels should be drawn for this axis.
|
inline |
Return the color to use for this axis's major grid lines.
|
inline |
Set the color to use for this axis's major grid lines.
|
inline |
Return the color to use for this axis's minor grid lines.
|
inline |
Set the color to use for this axis's minor grid lines.
|
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.
|
static |
The default width for a major dividing line in a graph view.
|
static |
The default width for a minor dividing line in a graph view.
|
static |
The default background color that is used for a graph view's area.
|
static |
The default border color that is used for a graph view.
|
static |
The default font size that is used for an axis's name label text.
|
static |
The default color that is used for an axis's name label text.