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

Basic button class. More...

#include <OgreTrays.h>

Inheritance diagram for OgreBites::Button:

Public Member Functions

 Button (const Ogre::String &name, const Ogre::DisplayString &caption, Ogre::Real width)
 Do not instantiate any widgets directly. Use TrayManager.
virtual ~Button ()
void _cursorMoved (const Ogre::Vector2 &cursorPos, float wheelDelta) override
void _cursorPressed (const Ogre::Vector2 &cursorPos) override
void _cursorReleased (const Ogre::Vector2 &cursorPos) override
void _focusLost () override
const Ogre::DisplayStringgetCaption ()
const ButtonStategetState ()
void setCaption (const Ogre::DisplayString &caption)
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 button class.

Constructor & Destructor Documentation

◆ Button()

OgreBites::Button::Button ( const Ogre::String & name,
const Ogre::DisplayString & caption,
Ogre::Real width )

Do not instantiate any widgets directly. Use TrayManager.

◆ ~Button()

virtual OgreBites::Button::~Button ( )
inlinevirtual

Member Function Documentation

◆ getCaption()

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

◆ setCaption()

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

◆ getState()

const ButtonState & OgreBites::Button::getState ( )
inline

◆ _cursorPressed()

void OgreBites::Button::_cursorPressed ( const Ogre::Vector2 & cursorPos)
overridevirtual

Reimplemented from OgreBites::Widget.

◆ _cursorReleased()

void OgreBites::Button::_cursorReleased ( const Ogre::Vector2 & cursorPos)
overridevirtual

Reimplemented from OgreBites::Widget.

◆ _cursorMoved()

void OgreBites::Button::_cursorMoved ( const Ogre::Vector2 & cursorPos,
float wheelDelta )
overridevirtual

Reimplemented from OgreBites::Widget.

◆ _focusLost()

void OgreBites::Button::_focusLost ( )
overridevirtual

Reimplemented from OgreBites::Widget.


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