OGRE  1.12.13
Object-Oriented Graphics Rendering Engine
OgreBites::Widget Class Reference

Abstract base class for all widgets. More...

#include <OgreTrays.h>

+ Inheritance diagram for OgreBites::Widget:

Public Member Functions

 Widget ()
 
virtual ~Widget ()
 
void _assignListener (TrayListener *listener)
 
void _assignToTray (TrayLocation trayLoc)
 
virtual void _cursorMoved (const Ogre::Vector2 &cursorPos, float wheelDelta)
 
virtual void _cursorPressed (const Ogre::Vector2 &cursorPos)
 
virtual void _cursorReleased (const Ogre::Vector2 &cursorPos)
 
virtual void _focusLost ()
 
void cleanup ()
 
const Ogre::StringgetName ()
 
Ogre::OverlayElementgetOverlayElement ()
 
TrayLocation getTrayLocation ()
 
void hide ()
 
bool isVisible ()
 
void show ()
 

Static Public Member Functions

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. More...
 
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. More...
 
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. More...
 
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. More...
 
static void nukeOverlayElement (Ogre::OverlayElement *element)
 Static utility method to recursively delete an overlay element plus all of its children from the system. More...
 

Detailed Description

Abstract base class for all widgets.

Constructor & Destructor Documentation

◆ Widget()

OgreBites::Widget::Widget ( )

◆ ~Widget()

virtual OgreBites::Widget::~Widget ( )
inlinevirtual

Member Function Documentation

◆ cleanup()

void OgreBites::Widget::cleanup ( )

◆ nukeOverlayElement()

static void OgreBites::Widget::nukeOverlayElement ( Ogre::OverlayElement element)
static

Static utility method to recursively delete an overlay element plus all of its children from the system.

◆ isCursorOver()

static bool OgreBites::Widget::isCursorOver ( Ogre::OverlayElement element,
const Ogre::Vector2 cursorPos,
Ogre::Real  voidBorder = 0 
)
static

Static utility method to check if the cursor is over an overlay element.

◆ cursorOffset()

static Ogre::Vector2 OgreBites::Widget::cursorOffset ( Ogre::OverlayElement element,
const Ogre::Vector2 cursorPos 
)
static

Static utility method used to get the cursor's offset from the center of an overlay element in pixels.

◆ getCaptionWidth()

static Ogre::Real OgreBites::Widget::getCaptionWidth ( const Ogre::DisplayString caption,
Ogre::TextAreaOverlayElement area 
)
static

Static utility method used to get the width of a caption in a text area.

◆ fitCaptionToArea()

static void OgreBites::Widget::fitCaptionToArea ( const Ogre::DisplayString caption,
Ogre::TextAreaOverlayElement area,
Ogre::Real  maxWidth 
)
static

Static utility method to cut off a string to fit in a text area.

◆ getOverlayElement()

Ogre::OverlayElement* OgreBites::Widget::getOverlayElement ( )
inline

◆ getName()

const Ogre::String& OgreBites::Widget::getName ( )
inline

◆ getTrayLocation()

TrayLocation OgreBites::Widget::getTrayLocation ( )
inline

◆ hide()

void OgreBites::Widget::hide ( )
inline

◆ show()

void OgreBites::Widget::show ( )
inline

◆ isVisible()

bool OgreBites::Widget::isVisible ( )
inline

◆ _cursorPressed()

virtual void OgreBites::Widget::_cursorPressed ( const Ogre::Vector2 cursorPos)
inlinevirtual

◆ _cursorReleased()

virtual void OgreBites::Widget::_cursorReleased ( const Ogre::Vector2 cursorPos)
inlinevirtual

◆ _cursorMoved()

virtual void OgreBites::Widget::_cursorMoved ( const Ogre::Vector2 cursorPos,
float  wheelDelta 
)
inlinevirtual

◆ _focusLost()

virtual void OgreBites::Widget::_focusLost ( )
inlinevirtual

◆ _assignToTray()

void OgreBites::Widget::_assignToTray ( TrayLocation  trayLoc)
inline

◆ _assignListener()

void OgreBites::Widget::_assignListener ( TrayListener listener)
inline

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