OGRE 1.12.10
Object-Oriented Graphics Rendering Engine
Loading...
Searching...
No Matches
OgreBites::Slider Class Reference

Basic slider widget. More...

#include <OgreTrays.h>

Inheritance diagram for OgreBites::Slider:

Public Member Functions

 Slider (const Ogre::String &name, const Ogre::DisplayString &caption, Ogre::Real width, Ogre::Real trackWidth, Ogre::Real valueBoxWidth, Ogre::Real minValue, Ogre::Real maxValue, unsigned int snaps)
 Do not instantiate any widgets directly. Use TrayManager.
void _cursorMoved (const Ogre::Vector2 &cursorPos, float wheelDelta)
void _cursorPressed (const Ogre::Vector2 &cursorPos)
void _cursorReleased (const Ogre::Vector2 &cursorPos)
void _focusLost ()
const Ogre::DisplayStringgetCaption ()
Ogre::Real getValue ()
const Ogre::DisplayStringgetValueCaption ()
void setCaption (const Ogre::DisplayString &caption)
void setRange (Ogre::Real minValue, Ogre::Real maxValue, unsigned int snaps, bool notifyListener=true)
 Sets the minimum value, maximum value, and the number of snapping points.
void setValue (Ogre::Real value, bool notifyListener=true)
void setValueCaption (const Ogre::DisplayString &caption)
 You can use this method to manually format how the value is displayed.
Public Member Functions inherited from OgreBites::Widget
 Widget ()
virtual ~Widget ()
void _assignListener (TrayListener *listener)
void _assignToTray (TrayLocation trayLoc)
void cleanup ()
const Ogre::StringgetName ()
Ogre::OverlayElementgetOverlayElement ()
TrayLocation getTrayLocation ()
void hide ()
bool isVisible ()
void show ()

Additional Inherited Members

Static Public Member Functions inherited from OgreBites::Widget
static Ogre::Vector2 cursorOffset (Ogre::OverlayElement *element, const Ogre::Vector2 &cursorPos)
 Static utility method used to get the cursor's offset from the center of an overlay element in pixels.
static void fitCaptionToArea (const Ogre::DisplayString &caption, Ogre::TextAreaOverlayElement *area, Ogre::Real maxWidth)
 Static utility method to cut off a string to fit in a text area.
static Ogre::Real getCaptionWidth (const Ogre::DisplayString &caption, Ogre::TextAreaOverlayElement *area)
 Static utility method used to get the width of a caption in a text area.
static bool isCursorOver (Ogre::OverlayElement *element, const Ogre::Vector2 &cursorPos, Ogre::Real voidBorder=0)
 Static utility method to check if the cursor is over an overlay element.
static void nukeOverlayElement (Ogre::OverlayElement *element)
 Static utility method to recursively delete an overlay element plus all of its children from the system.

Detailed Description

Basic slider widget.

Constructor & Destructor Documentation

◆ Slider()

OgreBites::Slider::Slider ( const Ogre::String & name,
const Ogre::DisplayString & caption,
Ogre::Real width,
Ogre::Real trackWidth,
Ogre::Real valueBoxWidth,
Ogre::Real minValue,
Ogre::Real maxValue,
unsigned int snaps )

Do not instantiate any widgets directly. Use TrayManager.

Member Function Documentation

◆ setRange()

void OgreBites::Slider::setRange ( Ogre::Real minValue,
Ogre::Real maxValue,
unsigned int snaps,
bool notifyListener = true )

Sets the minimum value, maximum value, and the number of snapping points.

◆ getValueCaption()

const Ogre::DisplayString & OgreBites::Slider::getValueCaption ( )
inline

◆ setValueCaption()

void OgreBites::Slider::setValueCaption ( const Ogre::DisplayString & caption)
inline

You can use this method to manually format how the value is displayed.

◆ setValue()

void OgreBites::Slider::setValue ( Ogre::Real value,
bool notifyListener = true )

◆ getValue()

Ogre::Real OgreBites::Slider::getValue ( )
inline

◆ getCaption()

const Ogre::DisplayString & OgreBites::Slider::getCaption ( )
inline

◆ setCaption()

void OgreBites::Slider::setCaption ( const Ogre::DisplayString & caption)

◆ _cursorPressed()

void OgreBites::Slider::_cursorPressed ( const Ogre::Vector2 & cursorPos)
virtual

Reimplemented from OgreBites::Widget.

◆ _cursorReleased()

void OgreBites::Slider::_cursorReleased ( const Ogre::Vector2 & cursorPos)
virtual

Reimplemented from OgreBites::Widget.

◆ _cursorMoved()

void OgreBites::Slider::_cursorMoved ( const Ogre::Vector2 & cursorPos,
float wheelDelta )
virtual

Reimplemented from OgreBites::Widget.

◆ _focusLost()

void OgreBites::Slider::_focusLost ( )
inlinevirtual

Reimplemented from OgreBites::Widget.


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