| OGRE 1.11.1 Object-Oriented Graphics Rendering Engine

Public Member Functions | Static Public Member Functions | List of all members
OgreBites::Label Class Reference

Basic label widget. More...

`#include <OgreTrays.h>`

Inheritance diagram for OgreBites::Label:
[legend]

## Public Member Functions
| Label (const Ogre::String &name, const Ogre::DisplayString &caption, Ogre::Real width)
| Do not instantiate any widgets directly. Use TrayManager. More...
void | _assignListener (TrayListener *listener)
void | _assignToTray (TrayLocation trayLoc)
virtual void | _cursorMoved (const Ogre::Vector2 &cursorPos, float wheelDelta)
void | _cursorPressed (const Ogre::Vector2 &cursorPos)
virtual void | _cursorReleased (const Ogre::Vector2 &cursorPos)
virtual void | _focusLost ()
bool | _isFitToTray ()
void | cleanup ()
const Ogre::DisplayString & | getCaption ()
const Ogre::String & | getName ()
Ogre::OverlayElement * | getOverlayElement ()
TrayLocation | getTrayLocation ()
void | hide ()
bool | isVisible ()
void | setCaption (const Ogre::DisplayString &caption)
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

Basic label widget.

## Constructor & Destructor Documentation

## ◆ Label()

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

Do not instantiate any widgets directly. Use TrayManager.

## Member Function Documentation

## ◆ getCaption()

const Ogre::DisplayString& OgreBites::Label::getCaption | ( |  | ) |
| inline

## ◆ setCaption()

void OgreBites::Label::setCaption | ( | const Ogre::DisplayString & | caption | ) |
| inline

## ◆ _cursorPressed()

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

Reimplemented from OgreBites::Widget.

## ◆ _isFitToTray()

bool OgreBites::Label::_isFitToTray | ( |  | ) |
| inline

## ◆ cleanup()

void OgreBites::Widget::cleanup | ( |  | ) |
| inherited

## ◆ nukeOverlayElement()

static void OgreBites::Widget::nukeOverlayElement | ( | Ogre::OverlayElement * | element | ) |
| static inherited

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 inherited

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 inherited

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 inherited

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 inherited

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

## ◆ getOverlayElement()

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

## ◆ getName()

const Ogre::String& OgreBites::Widget::getName | ( | void |  | ) |
| inline inherited

## ◆ getTrayLocation()

TrayLocation OgreBites::Widget::getTrayLocation | ( |  | ) |
| inline inherited

## ◆ hide()

void OgreBites::Widget::hide | ( |  | ) |
| inline inherited

## ◆ show()

void OgreBites::Widget::show | ( |  | ) |
| inline inherited

## ◆ isVisible()

bool OgreBites::Widget::isVisible | ( | void |  | ) |
| inline inherited

## ◆ _cursorReleased()

virtual void OgreBites::Widget::_cursorReleased | ( | const Ogre::Vector2 & | cursorPos | ) |
| inline virtual inherited

Reimplemented in OgreBites::Slider, OgreBites::SelectMenu, OgreBites::TextBox, and OgreBites::Button.

## ◆ _cursorMoved()

virtual void OgreBites::Widget::_cursorMoved | ( | const Ogre::Vector2 & | cursorPos,
|  | float | wheelDelta
| ) |  |
| inline virtual inherited

Reimplemented in OgreBites::CheckBox, OgreBites::Slider, OgreBites::SelectMenu, OgreBites::TextBox, and OgreBites::Button.

## ◆ _focusLost()

virtual void OgreBites::Widget::_focusLost | ( |  | ) |
| inline virtual inherited

Reimplemented in OgreBites::CheckBox, OgreBites::Slider, OgreBites::SelectMenu, OgreBites::TextBox, and OgreBites::Button.

## ◆ _assignToTray()

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

## ◆ _assignListener()

void OgreBites::Widget::_assignListener | ( | TrayListener * | listener | ) |
| inline inherited

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

- OgreTrays.h