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

A class that represents a number-only text input field that works like a slider. More...

#include <omGraphicsGUINumberField.h>

Inheritance diagram for om::graphics::gui::objects::NumberField:
om::graphics::gui::objects::GUIObject om::gui::input::InputHandler

Classes

class  Delegate
 A class that contains function objects that recieve NumberField events. More...
 

Public Member Functions

 NumberField ()
 Create a new number field with value 0 and positioned at the origin of its coordinate system. More...
 
 NumberField (const Rectangle &newRectangle)
 Create a new number field which occupies the specified rectangular region with value 0. More...
 
 NumberField (const Rectangle &newRectangle, Double newValue)
 Create a new number field which places the specified number value within the given rectangle. More...
 
virtual Bool setSize (const Vector3f &newSize)
 Set the 3D size of this number field along each of its local axes. More...
 
Double getValue () const
 Return the floating-point value that is stored in this number field. More...
 
void setValue (Double newValue)
 Set the floating-point value that is stored in this number field. More...
 
const AABB1dgetRange () const
 Return an object that describes the minimum and maximum allowed values for the slider. More...
 
void setRange (const AABB1d &newRange)
 Set an object that describes the minimum and maximum allowed values for the slider. More...
 
void setRange (Double rangeMin, Double rangeMax)
 Set an object that describes the minimum and maximum allowed values for the slider. More...
 
Size getStepCount () const
 Return the total number of value steps there are for this number field. More...
 
void setStepCount (Size newNumSteps)
 Set the total number of value steps there are for this number field. More...
 
ValueCurve getValueCurve () const
 Return an object representing the curve that is used to map from mouse positions to number values. More...
 
void setValueCurve (ValueCurve newCurve)
 Set an object representing the curve that is used to map from mouse positions to number values. More...
 
Float getSensitivity () const
 Return the number of pixels the mouse must move to change the field from the minimum to the maximum value. More...
 
void setSensitivity (Float newSensitivity)
 Set the number of pixels the mouse must move to change the field from the minimum to the maximum value. More...
 
const AxisgetAxis () const
 Return an object that describes the direction that this number field changes along based on mouse input. More...
 
void setAxis (const Axis &newAxis)
 Set an object that describes the direction that this number field changes along based on mouse input. More...
 
Size getBase () const
 Return the numeric base in which to display the value. More...
 
void setBase (Size newBase)
 Set the numeric base in which to display the value. More...
 
Size getDigits () const
 Return the number of digits of precision that should be displayed for this number field. More...
 
void setDigits (Size newNumDigits)
 Set the number of digits of precision that should be displayed for this number field. More...
 
const UTF8String & getUnits () const
 Return the units to display for this number field, if any. More...
 
void setUnits (const UTF8String &newUnits)
 Set the units to display for this number field, if any. More...
 
const fonts::TextStylegetTextStyle () const
 Return a reference to the text style that is used to render the text for a number field. More...
 
void setTextStyle (const fonts::TextStyle &newTextStyle)
 Set the text style that is used to render the text for a number field. More...
 
Float getTextSize () const
 Return the nominal font size of the text in this number field. More...
 
void setTextSize (Float newFontSize)
 Set the nominal font size of the text in this number field. More...
 
FontgetFont () const
 Return a pointer to the font to use in this number field. More...
 
Bool setFont (Font *newFont)
 Set the font to use in this number field. More...
 
const TextLayoutgetTextLayout () const
 Return the font layout used for this number field. More...
 
void setTextLayout (const TextLayout &newTextLayout)
 Set the font layout used for this number field. More...
 
const OrigingetTextAlignment () const
 Return an object that describes how this number field's text is aligned. More...
 
void setTextAlignment (const Origin &newTextAlignment)
 Set an object that describes how this number field's text is aligned. More...
 
void setTextAlignment (Origin::XOrigin newXOrigin, Origin::YOrigin newYOrigin)
 Set an object that describes how this number field's text is aligned. More...
 
const TextFlagsgetTextFlags () const
 Return boolean flags used to configure this number field's text style. More...
 
void setTextFlags (const TextFlags &newTextFlags)
 set boolean flags used to configure this number field's text style. More...
 
void setTextFlag (TextFlags::Flag flag, Bool newIsSet=true)
 Set whether or not the specified boolan text flag is set for this number field. More...
 
Bool textFlagIsSet (TextFlags::Flag flag) const
 Return whether or not the specified boolan text flag is set for this number field. More...
 
const Color4f & getTextColor () const
 Return the text color for a number field. More...
 
void setTextColor (const Color4f &newTextColor)
 Set the text color for a number field. More...
 
const TextFieldgetTextField () const
 Return a reference to the underlying text field for this number field that handles text display. More...
 
virtual Bool setBorder (const Border &newBorder)
 Set an object that describes this number field's border. More...
 
virtual Bool setBorderColor (const Color4f &newBorderColor)
 Set the border color for a number field. More...
 
virtual Bool setBackgroundColor (const Color4f &newBackgroundColor)
 Set the background color for this number field's text area. More...
 
const Color4f & getSelectionColor () const
 Return the selection color for a number field. More...
 
void setSelectionColor (const Color4f &newSelectionColor)
 Set the selection color for a number field. More...
 
const Color4f & getFocusColor () const
 Return the focus color for a number field. More...
 
void setFocusColor (const Color4f &newFocusColor)
 Set the focus color for a number field. More...
 
virtual Bool setFocus (Bool newHasFocus)
 Set whether or not this number field currently has keyboard focus at its level in the GUI hierarchy. More...
 
Bool getIsEnabled () const
 Return whether or not this number field is currently active. More...
 
void setIsEnabled (Bool newIsEnabled)
 Set whether or not this number field is currently active. More...
 
Bool getIsGrabbed () const
 Return whether or not this number field is currently grabbed by the mouse. More...
 
virtual Bool guiEvent (const GUIEvent &event)
 Handle the specified GUI event that occured when this number field had focus. More...
 
virtual Bool textEvent (const TextEvent &text)
 Handle the specified text input event that occured when this object had focus. More...
 
virtual Bool keyEvent (const KeyEvent &event)
 Handle the specified keyboard event that occured when this object had focus. More...
 
virtual Bool mouseMotionEvent (const MouseMotionEvent &event)
 Handle the specified mouse motion event that occurred. More...
 
virtual Bool mouseButtonEvent (const MouseButtonEvent &event)
 Handle the specified mouse button event that occurred. More...
 
virtual Bool mouseWheelEvent (const MouseWheelEvent &event)
 Handle the specified mouse wheel event that occurred. More...
 
DelegategetDelegate ()
 Return a reference to the delegate which responds to events for this number field. More...
 
const DelegategetDelegate () const
 Return a reference to the delegate which responds to events for this number field. More...
 
void setDelegate (const Delegate &newDelegate)
 Return a reference to the delegate which responds to events for this number field. More...
 
virtual Bool drawSelf (GUIRenderer &renderer, const AABB3f &parentBounds) const
 Draw this object using the specified GUI renderer to the given parent coordinate system bounds. More...
 
- Public Member Functions inherited from om::graphics::gui::objects::GUIObject
 GUIObject ()
 Create a default visible GUI object positioned at the origin (0,0) with 0 width and 0 height. More...
 
 GUIObject (const RectangleStyle &newRectangleStyle)
 Create a visible GUI object positioned at the origin (0,0) with 0 width and 0 height and the given rectangle style. More...
 
 GUIObject (const Rectangle &newRectangle)
 Create a visible GUI object that occupies the specified rectangle. More...
 
 GUIObject (const Rectangle &newRectangle, const RectangleStyle &newRectangleStyle)
 Create a visible GUI object that occupies the specified rectangle and rectangle style. More...
 
virtual ~GUIObject ()
 Destory the GUI object, releasing all internal resources. More...
 
const RectanglegetRectangle () const
 Return a reference to this GUI object's rectangle. More...
 
const Vector3fgetSize () const
 Return a reference to the 3D size of this object along each of its local axes. More...
 
const Vector2fgetSizeXY () const
 Return a reference to the 2D scaling factor of this object along each of its local axes. More...
 
Bool setSize (const Vector2f &newSizeXY)
 Set the 2D size of this object along the X and Y local axes. More...
 
Bool setSize (Float newWidth, Float newHeight)
 Set the 2D size of this object along the X and Y local axes. More...
 
Bool setSizeX (Float newWidth)
 Set the size of this object along the X axis. More...
 
Bool setSizeY (Float newHeight)
 Set the size of this object along the Y axis. More...
 
Bool setSizeZ (Float newDepth)
 Set the size of this object along the Z axis. More...
 
virtual Bool resizeForContent ()
 Resize this object to fit tightly around its contents, if possible. More...
 
void fillParent (const Vector3f &parentSize)
 Resize and resposition this object so that it fills the specified parent bounding box size. More...
 
const Vector3fgetScale () const
 Return a reference to the 3D scaling factor of this object along each of its local axes. More...
 
const Vector2fgetScaleXY () const
 Return a reference to the 2D scaling factor of this object along each of its local axes. More...
 
virtual Bool setScale (const Vector3f &newScale)
 Set the 3D scaling factor of this object along each of its local axes. More...
 
Bool setScale (const Vector2f &newScaleXY)
 Set the 2D scaling factor of this object along the X and Y local axes. More...
 
Bool setScale (Float newScaleX, Float newScaleY)
 Set the 2D scaling factor of this object along the X and Y local axes. More...
 
Bool setScale (Float newScale)
 Set the scaling factor of this object along all 3 axes. More...
 
const Vector3fgetPosition () const
 Return the position of this GUI object's origin relative to its parent's coordinate origin. More...
 
const Vector2fgetPositionXY () const
 Return the 2D position of this GUI object's origin relative to its parent's coordinate origin. More...
 
Bool setPosition (const Vector2f &newPosition)
 Set the position of this GUI object's origin relative to its parent's coordinate origin. More...
 
virtual Bool setPosition (const Vector3f &newPosition)
 Set the position of this GUI object's origin relative to its parent's coordinate origin. More...
 
const Matrix3fgetRotation () const
 Return a 3x3 orthonormal matrix indicating the basis of this object's coordinate frame. More...
 
virtual Bool setRotation (const Matrix3f &newRotation)
 Set a 3x3 orthonormal matrix indicating the basis of this object's coordinate frame. More...
 
Bool setRotation (Float radians)
 Set the rotation of this GUI object to be along the Z-axis with a rotation specified in radians. More...
 
Bool setRotationDegrees (Float degrees)
 Set the rotation of this GUI object to be along the Z-axis with a rotation specified in degrees. More...
 
OrigingetOrigin ()
 Return the alignment of the coordinate origin for this object. More...
 
const OrigingetOrigin () const
 Return the alignment of the coordinate origin for this object. More...
 
virtual Bool setOrigin (const Origin &newPositionOrigin)
 Set the alignment of the coordinate origin for this object. More...
 
void setOrigin (Origin::XOrigin newXOrigin, Origin::YOrigin newYOrigin)
 Set the XY alignment of the coordinate origin for this object. More...
 
void setOrigin (Origin::XOrigin newXOrigin, Origin::YOrigin newYOrigin, Origin::ZOrigin newZOrigin)
 Set the XYZ alignment of the coordinate origin for this object. More...
 
AABB2f getBoundsInParent (const AABB2f &parentBounds) const
 Return the 2D bounding box of this object in the coordinate frame of the specified parent bounding box. More...
 
AABB3f getBoundsInParent (const AABB3f &parentBounds) const
 Return the 3D bounding box of this object in the coordinate frame of the specified parent bounding box. More...
 
AABB2f getLocalBoundsXY () const
 Return the 2D bounding box of this object in its local coordinate frame. More...
 
AABB3f getLocalBounds () const
 Return the 3D bounding box of this object in its local coordinate frame. More...
 
Vector2f getLocalCenterXY () const
 Return the 2D center of this object's rectangle in its local coordinate frame. More...
 
Vector3f getLocalCenter () const
 Return the 3D center of this object's rectangle in its local coordinate frame. More...
 
Matrix4f getTransformMatrix (const AABB3f &parentBounds) const
 Return the object-space-to-parent-space homogeneous transformation matrix for the given parent bounding box. More...
 
Vector2f transformToLocal (const Vector2f &pointInParent, const AABB2f &parentBounds) const
 Transform a 3D point in the parent coordinate system into this object's coordinate system. More...
 
Vector3f transformToLocal (const Vector3f &pointInParent, const AABB3f &parentBounds) const
 Transform a 3D point in the parent coordinate system into this object's coordinate system. More...
 
Vector2f transformFromLocal (const Vector2f &localPoint, const AABB2f &parentBounds) const
 Transform a 2D point in this object's local coordinate system into its parent's coordinate system. More...
 
Vector3f transformFromLocal (const Vector3f &localPoint, const AABB3f &parentBounds) const
 Transform a 3D point in this object's local coordinate system into its parent's coordinate system. More...
 
Vector2f transformVectorToLocal (const Vector2f &vectorInParent) const
 Transform a 3D vector in the parent coordinate system into this object's coordinate system. More...
 
Vector3f transformVectorToLocal (const Vector3f &vectorInParent) const
 Transform a 3D vector in the parent coordinate system into this object's coordinate system. More...
 
Vector2f transformVectorFromLocal (const Vector2f &localVector) const
 Transform a 2D vector in this object's local coordinate system into its parent's coordinate system. More...
 
Vector3f transformVectorFromLocal (const Vector3f &localVector) const
 Transform a 3D vector in this object's local coordinate system into its parent's coordinate system. More...
 
MouseButtonEvent transformEventToLocal (const MouseButtonEvent &event, const AABB2f &parentBounds) const
 Transform a mouse button event in the parent coordinate system into this object's coordinate system. More...
 
MouseButtonEvent transformEventFromLocal (const MouseButtonEvent &event, const AABB2f &parentBounds) const
 Transform a mouse button event in this object's local coordinate system into its parent's coordinate system. More...
 
MouseMotionEvent transformEventToLocal (const MouseMotionEvent &event, const AABB2f &parentBounds) const
 Transform a mouse motion event in the parent coordinate system into this object's coordinate system. More...
 
MouseMotionEvent transformEventFromLocal (const MouseMotionEvent &event, const AABB2f &parentBounds) const
 Transform a mouse motion event in this object's local coordinate system into its parent's coordinate system. More...
 
MouseWheelEvent transformEventToLocal (const MouseWheelEvent &event, const AABB2f &parentBounds) const
 Transform a mouse wheel event in the parent coordinate system into this object's coordinate system. More...
 
MouseWheelEvent transformEventFromLocal (const MouseWheelEvent &event, const AABB2f &parentBounds) const
 Transform a mouse wheel event in this object's local coordinate system into its parent's coordinate system. More...
 
virtual Bool containsLocalPoint (const Vector2f &localPoint) const
 Return whether or not this GUI object contains the specified local 2D point within its local bounds. More...
 
virtual Bool containsLocalPoint (const Vector3f &localPoint) const
 Return whether or not this GUI object contains the specified local 3D point within its local bounds. More...
 
AABB2f getLocalContentBoundsXY () const
 Return the 2D bounding box for the object's rectangle inside area in its local coordinate frame. More...
 
virtual AABB3f getLocalContentBounds () const
 Return the 3D bounding box for the object's rectangle inside area in its local coordinate frame. More...
 
GUIStylegetStyle () const
 Return a pointer to the style object to use when drawing this GUI object. More...
 
void setStyle (GUIStyle *newStyle)
 Set a pointer to the style object to use when drawing this GUI object. More...
 
const RectangleStylegetRectangleStyle () const
 Return an object that describes the style of the main outside rectangle of this object. More...
 
virtual Bool setRectangleStyle (const RectangleStyle &newRectangleStyle)
 Set an object that describes the style of the main outside rectangle of this object. More...
 
const BordergetBorder () const
 Return an object that describes the border for this object's main rectangle. More...
 
Float getBorderWidth () const
 Return the width of this object's main rectangle border. More...
 
Bool setBorderWidth (Float newWidth)
 Set the width of this object's main rectangle border. More...
 
Float getBorderRadius () const
 Return the corner radius of this object's main rectangle border. More...
 
Bool setBorderRadius (Float newRadius)
 Set the corner radius of this object's main rectangle border. More...
 
const MargingetBorderMargin () const
 Return an object that describes the padding between the exterior and interior of the object's main rectangle. More...
 
Bool setBorderMargin (const Margin &newMargin)
 Set an object that describes the padding between the exterior and interior of the object's main rectangle. More...
 
const Color4f & getBackgroundColor () const
 Return the background color for this object's main rectangle. More...
 
const Color4f & getBorderColor () const
 Return the border color used when rendering the object's main rectangle. More...
 
const GUIObjectFlagsgetFlags () const
 Return a const reference to the flags for this GUI object. More...
 
Bool flagIsSet (GUIObjectFlags::Flag flag) const
 Return whether or not the specified boolan flag is set for this GUI object. More...
 
virtual Bool setFlags (const GUIObjectFlags &newFlags)
 Set the flags for this GUI object. More...
 
Bool setFlag (GUIObjectFlags::Flag flag, Bool newIsSet=true)
 Set whether or not the specified boolan flag is set for this GUI object. More...
 
Bool getIsVisible () const
 Return whether or not this GUI object should be drawn to the screen. More...
 
void setIsVisible (Bool newIsVisible)
 Set whether or not this GUI object should be drawn to the screen. More...
 
Bool hasFocus () const
 Return whether or not this GUI object currently has keyboard focus at its level in the GUI hierarchy. More...
 
virtual void update (Float dt)
 Update the current internal state of this object for the specified time interval in seconds. More...
 
- Public Member Functions inherited from om::gui::input::InputHandler
virtual ~InputHandler ()
 Destroy an input handler. More...
 

Static Public Attributes

static const Axis DEFAULT_AXIS
 The default major axis that is used for a number field's mouse input. More...
 
static const Double DEFAULT_VALUE
 The default initial value that is used for a number field. More...
 
static const AABB1d DEFAULT_RANGE
 The default initial value range that is used for a number field. More...
 
static const Size DEFAULT_BASE = 10
 The default initial base that is used for a number field. More...
 
static const Size DEFAULT_DIGITS = 3
 The default initial number of display digits that are used for a number field. More...
 
static const Float DEFAULT_SENSITIVITY
 The default sensitivity to mouse movement that is used for a number field. More...
 

Detailed Description

A class that represents a number-only text input field that works like a slider.

The user can single-click on the field to drag the mouse and change the value, or can double-click to manually type in a value in a text field.

Constructor & Destructor Documentation

om::graphics::gui::objects::NumberField::NumberField ( )

Create a new number field with value 0 and positioned at the origin of its coordinate system.

om::graphics::gui::objects::NumberField::NumberField ( const Rectangle newRectangle)

Create a new number field which occupies the specified rectangular region with value 0.

om::graphics::gui::objects::NumberField::NumberField ( const Rectangle newRectangle,
Double  newValue 
)

Create a new number field which places the specified number value within the given rectangle.

Member Function Documentation

virtual Bool om::graphics::gui::objects::NumberField::setSize ( const Vector3f newSize)
virtual

Set the 3D size of this number field along each of its local axes.

Reimplemented from om::graphics::gui::objects::GUIObject.

Double om::graphics::gui::objects::NumberField::getValue ( ) const
inline

Return the floating-point value that is stored in this number field.

void om::graphics::gui::objects::NumberField::setValue ( Double  newValue)

Set the floating-point value that is stored in this number field.

const AABB1d& om::graphics::gui::objects::NumberField::getRange ( ) const
inline

Return an object that describes the minimum and maximum allowed values for the slider.

The range's minimum value is placed at the minimum coordinate of the slider's major axis, and the maximum value is placed at the maximum coordinate of the slider's major axis.

The minimum and maximum values do not have to be properly ordered - they can be reversed in order to reverse the effective direction of the slider.

void om::graphics::gui::objects::NumberField::setRange ( const AABB1d newRange)

Set an object that describes the minimum and maximum allowed values for the slider.

The range's minimum value is placed at the minimum coordinate of the slider's major axis, and the maximum value is placed at the maximum coordinate of the slider's major axis.

The minimum and maximum values do not have to be properly ordered - they can be reversed in order to reverse the effective direction of the slider.

The slider's value is clamped so that is lies within the new range.

void om::graphics::gui::objects::NumberField::setRange ( Double  rangeMin,
Double  rangeMax 
)
inline

Set an object that describes the minimum and maximum allowed values for the slider.

The range's minimum value is placed at the minimum coordinate of the slider's major axis, and the maximum value is placed at the maximum coordinate of the slider's major axis.

The minimum and maximum values do not have to be properly ordered - they can be reversed in order to reverse the effective direction of the slider.

The slider's value is clamped so that is lies within the new range.

Size om::graphics::gui::objects::NumberField::getStepCount ( ) const
inline

Return the total number of value steps there are for this number field.

This allows the user to quantize the field's allowed values to a fixed number of evenly-spaced steps.

If this value is 0, the default, the slider's resolution is unquantized and can be used to represent any value in the valid range.

void om::graphics::gui::objects::NumberField::setStepCount ( Size  newNumSteps)
inline

Set the total number of value steps there are for this number field.

This allows the user to quantize the field's allowed values to a fixed number of evenly-spaced steps.

If this value is 0, the default, the field's resolution is unquantized and can be used to represent any value in the valid range.

ValueCurve om::graphics::gui::objects::NumberField::getValueCurve ( ) const
inline

Return an object representing the curve that is used to map from mouse positions to number values.

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

Set an object representing the curve that is used to map from mouse positions to number values.

Float om::graphics::gui::objects::NumberField::getSensitivity ( ) const
inline

Return the number of pixels the mouse must move to change the field from the minimum to the maximum value.

void om::graphics::gui::objects::NumberField::setSensitivity ( Float  newSensitivity)
inline

Set the number of pixels the mouse must move to change the field from the minimum to the maximum value.

const Axis& om::graphics::gui::objects::NumberField::getAxis ( ) const
inline

Return an object that describes the direction that this number field changes along based on mouse input.

void om::graphics::gui::objects::NumberField::setAxis ( const Axis newAxis)
inline

Set an object that describes the direction that this number field changes along based on mouse input.

Size om::graphics::gui::objects::NumberField::getBase ( ) const
inline

Return the numeric base in which to display the value.

void om::graphics::gui::objects::NumberField::setBase ( Size  newBase)
inline

Set the numeric base in which to display the value.

The new base is clamped to be in the range [2,16].

Size om::graphics::gui::objects::NumberField::getDigits ( ) const
inline

Return the number of digits of precision that should be displayed for this number field.

void om::graphics::gui::objects::NumberField::setDigits ( Size  newNumDigits)
inline

Set the number of digits of precision that should be displayed for this number field.

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

Return the units to display for this number field, if any.

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

Set the units to display for this number field, if any.

const fonts::TextStyle& om::graphics::gui::objects::NumberField::getTextStyle ( ) const
inline

Return a reference to the text style that is used to render the text for a number field.

void om::graphics::gui::objects::NumberField::setTextStyle ( const fonts::TextStyle newTextStyle)
inline

Set the text style that is used to render the text for a number field.

Float om::graphics::gui::objects::NumberField::getTextSize ( ) const
inline

Return the nominal font size of the text in this number field.

void om::graphics::gui::objects::NumberField::setTextSize ( Float  newFontSize)
inline

Set the nominal font size of the text in this number field.

Font* om::graphics::gui::objects::NumberField::getFont ( ) const
inline

Return a pointer to the font to use in this number field.

Bool om::graphics::gui::objects::NumberField::setFont ( Font newFont)
inline

Set the font to use in this number field.

The method returns whether or not the new font was able to be used.

const TextLayout& om::graphics::gui::objects::NumberField::getTextLayout ( ) const
inline

Return the font layout used for this number field.

void om::graphics::gui::objects::NumberField::setTextLayout ( const TextLayout newTextLayout)
inline

Set the font layout used for this number field.

const Origin& om::graphics::gui::objects::NumberField::getTextAlignment ( ) const
inline

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

void om::graphics::gui::objects::NumberField::setTextAlignment ( const Origin newTextAlignment)
inline

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

void om::graphics::gui::objects::NumberField::setTextAlignment ( Origin::XOrigin  newXOrigin,
Origin::YOrigin  newYOrigin 
)
inline

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

const TextFlags& om::graphics::gui::objects::NumberField::getTextFlags ( ) const
inline

Return boolean flags used to configure this number field's text style.

void om::graphics::gui::objects::NumberField::setTextFlags ( const TextFlags newTextFlags)
inline

set boolean flags used to configure this number field's text style.

void om::graphics::gui::objects::NumberField::setTextFlag ( TextFlags::Flag  flag,
Bool  newIsSet = true 
)
inline

Set whether or not the specified boolan text flag is set for this number field.

Bool om::graphics::gui::objects::NumberField::textFlagIsSet ( TextFlags::Flag  flag) const
inline

Return whether or not the specified boolan text flag is set for this number field.

const Color4f& om::graphics::gui::objects::NumberField::getTextColor ( ) const
inline

Return the text color for a number field.

void om::graphics::gui::objects::NumberField::setTextColor ( const Color4f &  newTextColor)
inline

Set the text color for a number field.

const TextField& om::graphics::gui::objects::NumberField::getTextField ( ) const
inline

Return a reference to the underlying text field for this number field that handles text display.

virtual Bool om::graphics::gui::objects::NumberField::setBorder ( const Border newBorder)
virtual

Set an object that describes this number field's border.

Reimplemented from om::graphics::gui::objects::GUIObject.

virtual Bool om::graphics::gui::objects::NumberField::setBorderColor ( const Color4f &  newBorderColor)
virtual

Set the border color for a number field.

Reimplemented from om::graphics::gui::objects::GUIObject.

virtual Bool om::graphics::gui::objects::NumberField::setBackgroundColor ( const Color4f &  newBackgroundColor)
virtual

Set the background color for this number field's text area.

Reimplemented from om::graphics::gui::objects::GUIObject.

const Color4f& om::graphics::gui::objects::NumberField::getSelectionColor ( ) const
inline

Return the selection color for a number field.

void om::graphics::gui::objects::NumberField::setSelectionColor ( const Color4f &  newSelectionColor)
inline

Set the selection color for a number field.

const Color4f& om::graphics::gui::objects::NumberField::getFocusColor ( ) const
inline

Return the focus color for a number field.

void om::graphics::gui::objects::NumberField::setFocusColor ( const Color4f &  newFocusColor)
inline

Set the focus color for a number field.

virtual Bool om::graphics::gui::objects::NumberField::setFocus ( Bool  newHasFocus)
virtual

Set whether or not this number field currently has keyboard focus at its level in the GUI hierarchy.

Reimplemented from om::graphics::gui::objects::GUIObject.

Bool om::graphics::gui::objects::NumberField::getIsEnabled ( ) const
inline

Return whether or not this number field is currently active.

void om::graphics::gui::objects::NumberField::setIsEnabled ( Bool  newIsEnabled)
inline

Set whether or not this number field is currently active.

Bool om::graphics::gui::objects::NumberField::getIsGrabbed ( ) const
inline

Return whether or not this number field is currently grabbed by the mouse.

virtual Bool om::graphics::gui::objects::NumberField::guiEvent ( const GUIEvent event)
virtual

Handle the specified GUI event that occured when this number field had focus.

Reimplemented from om::gui::input::InputHandler.

virtual Bool om::graphics::gui::objects::NumberField::textEvent ( const TextEvent text)
virtual

Handle the specified text input event that occured when this object had focus.

Reimplemented from om::gui::input::InputHandler.

virtual Bool om::graphics::gui::objects::NumberField::keyEvent ( const KeyEvent event)
virtual

Handle the specified keyboard event that occured when this object had focus.

Reimplemented from om::gui::input::InputHandler.

virtual Bool om::graphics::gui::objects::NumberField::mouseMotionEvent ( const MouseMotionEvent event)
virtual

Handle the specified mouse motion event that occurred.

Reimplemented from om::gui::input::InputHandler.

virtual Bool om::graphics::gui::objects::NumberField::mouseButtonEvent ( const MouseButtonEvent event)
virtual

Handle the specified mouse button event that occurred.

Reimplemented from om::gui::input::InputHandler.

virtual Bool om::graphics::gui::objects::NumberField::mouseWheelEvent ( const MouseWheelEvent event)
virtual

Handle the specified mouse wheel event that occurred.

Reimplemented from om::gui::input::InputHandler.

Delegate& om::graphics::gui::objects::NumberField::getDelegate ( )
inline

Return a reference to the delegate which responds to events for this number field.

const Delegate& om::graphics::gui::objects::NumberField::getDelegate ( ) const
inline

Return a reference to the delegate which responds to events for this number field.

void om::graphics::gui::objects::NumberField::setDelegate ( const Delegate newDelegate)
inline

Return a reference to the delegate which responds to events for this number field.

virtual Bool om::graphics::gui::objects::NumberField::drawSelf ( GUIRenderer renderer,
const AABB3f parentBounds 
) const
virtual

Draw this object using the specified GUI renderer to the given parent coordinate system bounds.

The method returns whether or not the object was successfully drawn.

The default implementation draws nothing and returns TRUE.

Reimplemented from om::graphics::gui::objects::GUIObject.

Member Data Documentation

const Axis om::graphics::gui::objects::NumberField::DEFAULT_AXIS
static

The default major axis that is used for a number field's mouse input.

const Double om::graphics::gui::objects::NumberField::DEFAULT_VALUE
static

The default initial value that is used for a number field.

const AABB1d om::graphics::gui::objects::NumberField::DEFAULT_RANGE
static

The default initial value range that is used for a number field.

const Size om::graphics::gui::objects::NumberField::DEFAULT_BASE = 10
static

The default initial base that is used for a number field.

const Size om::graphics::gui::objects::NumberField::DEFAULT_DIGITS = 3
static

The default initial number of display digits that are used for a number field.

const Float om::graphics::gui::objects::NumberField::DEFAULT_SENSITIVITY
static

The default sensitivity to mouse movement that is used for a number field.


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