OGRE  1.11.6
Object-Oriented Graphics Rendering Engine
OgreBites::TrayManager Class Reference

Main class to manage a cursor, backdrop, trays and widgets. More...

#include <OgreTrays.h>

+ Inheritance diagram for OgreBites::TrayManager:

Public Member Functions

 TrayManager (const Ogre::String &name, Ogre::RenderWindow *window, TrayListener *listener=0)
 Creates backdrop, cursor, and trays. More...
 
virtual ~TrayManager ()
 Destroys background, cursor, widgets, and trays. More...
 
virtual void adjustTrays ()
 Fits trays to their contents and snaps them to their anchor locations. More...
 
bool areFrameStatsVisible ()
 
bool areTraysVisible ()
 
void buttonHit (Button *button)
 Destroys dialog widgets, notifies listener, and ends high priority session. More...
 
virtual void checkBoxToggled (CheckBox *box)
 
void clearAllTrays ()
 Removes all widgets from all widget trays. More...
 
void clearTray (TrayLocation trayLoc)
 Removes all widgets from a widget tray. More...
 
void closeDialog ()
 Hides whatever dialog is currently showing. More...
 
ButtoncreateButton (TrayLocation trayLoc, const Ogre::String &name, const Ogre::String &caption, Ogre::Real width=0)
 
CheckBoxcreateCheckBox (TrayLocation trayLoc, const Ogre::String &name, const Ogre::DisplayString &caption, Ogre::Real width=0)
 
DecorWidgetcreateDecorWidget (TrayLocation trayLoc, const Ogre::String &name, const Ogre::String &templateName)
 
LabelcreateLabel (TrayLocation trayLoc, const Ogre::String &name, const Ogre::DisplayString &caption, Ogre::Real width=0)
 
SelectMenucreateLongSelectMenu (TrayLocation trayLoc, const Ogre::String &name, const Ogre::DisplayString &caption, Ogre::Real width, Ogre::Real boxWidth, unsigned int maxItemsShown, const Ogre::StringVector &items=Ogre::StringVector())
 
SelectMenucreateLongSelectMenu (TrayLocation trayLoc, const Ogre::String &name, const Ogre::DisplayString &caption, Ogre::Real boxWidth, unsigned int maxItemsShown, const Ogre::StringVector &items=Ogre::StringVector())
 
SlidercreateLongSlider (TrayLocation trayLoc, 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)
 
SlidercreateLongSlider (TrayLocation trayLoc, const Ogre::String &name, const Ogre::DisplayString &caption, Ogre::Real trackWidth, Ogre::Real valueBoxWidth, Ogre::Real minValue, Ogre::Real maxValue, unsigned int snaps)
 
ParamsPanelcreateParamsPanel (TrayLocation trayLoc, const Ogre::String &name, Ogre::Real width, unsigned int lines)
 
ParamsPanelcreateParamsPanel (TrayLocation trayLoc, const Ogre::String &name, Ogre::Real width, const Ogre::StringVector &paramNames)
 
ProgressBarcreateProgressBar (TrayLocation trayLoc, const Ogre::String &name, const Ogre::DisplayString &caption, Ogre::Real width, Ogre::Real commentBoxWidth)
 
SeparatorcreateSeparator (TrayLocation trayLoc, const Ogre::String &name, Ogre::Real width=0)
 
TextBoxcreateTextBox (TrayLocation trayLoc, const Ogre::String &name, const Ogre::DisplayString &caption, Ogre::Real width, Ogre::Real height)
 
SelectMenucreateThickSelectMenu (TrayLocation trayLoc, const Ogre::String &name, const Ogre::DisplayString &caption, Ogre::Real width, unsigned int maxItemsShown, const Ogre::StringVector &items=Ogre::StringVector())
 
SlidercreateThickSlider (TrayLocation trayLoc, const Ogre::String &name, const Ogre::DisplayString &caption, Ogre::Real width, Ogre::Real valueBoxWidth, Ogre::Real minValue, Ogre::Real maxValue, unsigned int snaps)
 
void destroyAllWidgets ()
 Destroys all widgets. More...
 
void destroyAllWidgetsInTray (TrayLocation trayLoc)
 Destroys all widgets in a tray. More...
 
void destroyWidget (Widget *widget)
 Destroys a widget. More...
 
void destroyWidget (TrayLocation trayLoc, size_t place)
 
void destroyWidget (TrayLocation trayLoc, const Ogre::String &name)
 
void destroyWidget (const Ogre::String &name)
 
void frameRendered (const Ogre::FrameEvent &evt)
 Process frame events. More...
 
Ogre::OverlayContainergetBackdropContainer ()
 
Ogre::OverlaygetBackdropLayer ()
 
Ogre::OverlayContainergetCursorContainer ()
 
Ogre::OverlayElementgetCursorImage ()
 
Ogre::OverlaygetCursorLayer ()
 
Ogre::Ray getCursorRay (Ogre::Camera *cam)
 Returns a 3D ray into the scene that is directly underneath the cursor. More...
 
TrayListenergetListener ()
 
unsigned int getNumWidgets ()
 Gets the number of widgets in total. More...
 
Ogre::OverlayContainergetTrayContainer (TrayLocation trayLoc)
 
virtual Ogre::Real getTrayPadding () const
 
Ogre::OverlaygetTraysLayer ()
 
WidgetgetWidget (TrayLocation trayLoc, const Ogre::String &name)
 Gets a widget from a tray by name. More...
 
WidgetgetWidget (const Ogre::String &name)
 Gets a widget by name. More...
 
virtual Ogre::Real getWidgetPadding () const
 
const WidgetListgetWidgets (TrayLocation trayLoc) const
 Gets all the widgets of a specific tray. More...
 
virtual Ogre::Real getWidgetSpacing () const
 
void hideAll ()
 
void hideBackdrop ()
 
void hideCursor ()
 
void hideFrameStats ()
 Hides frame statistics widget set. More...
 
void hideLoadingBar ()
 
void hideLogo ()
 
void hideTrays ()
 
bool isBackdropVisible ()
 
bool isCursorVisible ()
 
bool isDialogVisible ()
 Determines if any dialog is currently visible. More...
 
bool isLoadingBarVisible ()
 
bool isLogoVisible ()
 
virtual void itemSelected (SelectMenu *menu)
 
virtual bool keyPressed (const KeyboardEvent &evt)
 
virtual bool keyReleased (const KeyboardEvent &evt)
 
void labelHit (Label *label)
 Toggles visibility of advanced statistics. More...
 
int locateWidgetInTray (Widget *widget)
 Gets a widget's position in its tray. More...
 
bool mouseMoved (const MouseMotionEvent &evt)
 Updates cursor position. More...
 
bool mousePressed (const MouseButtonEvent &evt)
 Processes mouse button down events. More...
 
bool mouseReleased (const MouseButtonEvent &evt)
 Processes mouse button up events. More...
 
virtual bool mouseWheelRolled (const MouseWheelEvent &evt)
 
void moveWidgetToTray (Widget *widget, TrayLocation trayLoc, size_t place=-1)
 Adds a widget to a specified tray at given position, or at the end if unspecified or invalid. More...
 
void moveWidgetToTray (const Ogre::String &name, TrayLocation trayLoc, size_t place=-1)
 
void moveWidgetToTray (TrayLocation currentTrayLoc, const Ogre::String &name, TrayLocation targetTrayLoc, size_t place=-1)
 
void moveWidgetToTray (TrayLocation currentTrayLoc, size_t currentPlace, TrayLocation targetTrayLoc, size_t targetPlace=-1)
 
virtual void okDialogClosed (const Ogre::DisplayString &message)
 
void refreshCursor ()
 Updates cursor position based on unbuffered mouse state. More...
 
void removeWidgetFromTray (Widget *widget)
 Removes a widget from its tray. More...
 
void removeWidgetFromTray (const Ogre::String &name)
 
void removeWidgetFromTray (TrayLocation trayLoc, const Ogre::String &name)
 
void removeWidgetFromTray (TrayLocation trayLoc, size_t place)
 
virtual void resourceCreated (const ResourcePtr &resource)
 This event is fired when a resource was just created. More...
 
virtual void resourceGroupLoadEnded (const String &groupName)
 This event is fired when a resource group finished loading. More...
 
virtual void resourceGroupLoadStarted (const String &groupName, size_t resourceCount)
 This event is fired when a resource group begins loading. More...
 
void resourceGroupLoadStarted (const Ogre::String &groupName, size_t resourceCount)
 
virtual void resourceGroupPrepareEnded (const String &groupName)
 This event is fired when a resource group finished preparing. More...
 
virtual void resourceGroupPrepareStarted (const String &groupName, size_t resourceCount)
 This event is fired when a resource group begins preparing. More...
 
virtual void resourceGroupScriptingEnded (const String &groupName)
 This event is fired when a resource group finished parsing scripts. More...
 
virtual void resourceGroupScriptingStarted (const String &groupName, size_t scriptCount)
 This event is fired when a resource group begins parsing scripts. More...
 
void resourceGroupScriptingStarted (const Ogre::String &groupName, size_t scriptCount)
 
void resourceLoadEnded ()
 This event is fired when the resource has been loaded. More...
 
void resourceLoadStarted (const Ogre::ResourcePtr &resource)
 This event is fired when a declared resource is about to be loaded. More...
 
virtual void resourcePrepareEnded (void)
 This event is fired when the resource has been prepared. More...
 
virtual void resourcePrepareStarted (const ResourcePtr &resource)
 This event is fired when a declared resource is about to be prepared. More...
 
virtual void resourceRemove (const ResourcePtr &resource)
 This event is fired when a resource is about to be removed. More...
 
virtual void scriptParseEnded (const String &scriptName, bool skipped)
 This event is fired when the script has been fully parsed. More...
 
void scriptParseEnded (const Ogre::String &scriptName, bool skipped)
 
virtual void scriptParseStarted (const String &scriptName, bool &skipThisScript)
 This event is fired when a script is about to be parsed. More...
 
void scriptParseStarted (const Ogre::String &scriptName, bool &skipThisScript)
 
void setListener (TrayListener *listener)
 
void setTrayPadding (Ogre::Real padding)
 
void setTrayWidgetAlignment (TrayLocation trayLoc, Ogre::GuiHorizontalAlignment gha)
 Sets horizontal alignment of a tray's contents. More...
 
void setWidgetPadding (Ogre::Real padding)
 
void setWidgetSpacing (Ogre::Real spacing)
 
void showAll ()
 
void showBackdrop (const Ogre::String &materialName=Ogre::BLANKSTRING)
 Displays specified material on backdrop, or the last material used if none specified. More...
 
void showCursor (const Ogre::String &materialName=Ogre::BLANKSTRING)
 Displays specified material on cursor, or the last material used if none specified. More...
 
void showFrameStats (TrayLocation trayLoc, size_t place=-1)
 Shows frame statistics widget set in the specified location. More...
 
void showLoadingBar (unsigned int numGroupsInit=1, unsigned int numGroupsLoad=1, Ogre::Real initProportion=0.7f)
 Shows loading bar. More...
 
void showLogo (TrayLocation trayLoc, size_t place=-1)
 Shows logo in the specified location. More...
 
void showOkDialog (const Ogre::DisplayString &caption, const Ogre::DisplayString &message)
 Pops up a message dialog with an OK button. More...
 
void showTrays ()
 
void showYesNoDialog (const Ogre::DisplayString &caption, const Ogre::DisplayString &question)
 Pops up a question dialog with Yes and No buttons. More...
 
virtual void sliderMoved (Slider *slider)
 
void toggleAdvancedFrameStats ()
 Toggles visibility of advanced statistics. More...
 
virtual bool touchMoved (const TouchFingerEvent &evt)
 
virtual bool touchPressed (const TouchFingerEvent &evt)
 
virtual bool touchReleased (const TouchFingerEvent &evt)
 
void windowUpdate ()
 
virtual void worldGeometryPrepareStageEnded (void)
 This event is fired when a stage of preparing linked world geometry has been completed. More...
 
virtual void worldGeometryPrepareStageStarted (const String &description)
 This event is fired when a stage of preparing linked world geometry is about to start. More...
 
void worldGeometryStageEnded ()
 This event is fired when a stage of loading linked world geometry has been completed. More...
 
virtual void worldGeometryStageStarted (const String &description)
 This event is fired when a stage of loading linked world geometry is about to start. More...
 
void worldGeometryStageStarted (const Ogre::String &description)
 
virtual void yesNoDialogClosed (const Ogre::DisplayString &question, bool yesHit)
 

Static Public Member Functions

static Ogre::Vector2 sceneToScreen (Ogre::Camera *cam, const Ogre::Vector3 &pt)
 Converts a 3D scene position to a 2D screen position (in relative screen size, 0.0-1.0). More...
 
static Ogre::Ray screenToScene (Ogre::Camera *cam, const Ogre::Vector2 &pt)
 Converts a 2D screen coordinate (in pixels) to a 3D ray into the scene. More...
 

Detailed Description

Main class to manage a cursor, backdrop, trays and widgets.

Constructor & Destructor Documentation

◆ TrayManager()

OgreBites::TrayManager::TrayManager ( const Ogre::String name,
Ogre::RenderWindow window,
TrayListener listener = 0 
)

Creates backdrop, cursor, and trays.

◆ ~TrayManager()

virtual OgreBites::TrayManager::~TrayManager ( )
virtual

Destroys background, cursor, widgets, and trays.

Member Function Documentation

◆ screenToScene()

static Ogre::Ray OgreBites::TrayManager::screenToScene ( Ogre::Camera cam,
const Ogre::Vector2 pt 
)
static

Converts a 2D screen coordinate (in pixels) to a 3D ray into the scene.

◆ sceneToScreen()

static Ogre::Vector2 OgreBites::TrayManager::sceneToScreen ( Ogre::Camera cam,
const Ogre::Vector3 pt 
)
static

Converts a 3D scene position to a 2D screen position (in relative screen size, 0.0-1.0).

◆ getTrayContainer()

Ogre::OverlayContainer* OgreBites::TrayManager::getTrayContainer ( TrayLocation  trayLoc)
inline

◆ getBackdropLayer()

Ogre::Overlay* OgreBites::TrayManager::getBackdropLayer ( )
inline

◆ getTraysLayer()

Ogre::Overlay* OgreBites::TrayManager::getTraysLayer ( )
inline

◆ getCursorLayer()

Ogre::Overlay* OgreBites::TrayManager::getCursorLayer ( )
inline

◆ getBackdropContainer()

Ogre::OverlayContainer* OgreBites::TrayManager::getBackdropContainer ( )
inline

◆ getCursorContainer()

Ogre::OverlayContainer* OgreBites::TrayManager::getCursorContainer ( )
inline

◆ getCursorImage()

Ogre::OverlayElement* OgreBites::TrayManager::getCursorImage ( )
inline

◆ setListener()

void OgreBites::TrayManager::setListener ( TrayListener listener)
inline

◆ getListener()

TrayListener* OgreBites::TrayManager::getListener ( void  )
inline

References Ogre::BLANKSTRING.

◆ showAll()

void OgreBites::TrayManager::showAll ( )

◆ hideAll()

void OgreBites::TrayManager::hideAll ( )

◆ showBackdrop()

void OgreBites::TrayManager::showBackdrop ( const Ogre::String materialName = Ogre::BLANKSTRING)

Displays specified material on backdrop, or the last material used if none specified.

Good for pause menus like in the browser.

◆ hideBackdrop()

void OgreBites::TrayManager::hideBackdrop ( )
inline

References Ogre::BLANKSTRING.

◆ showCursor()

void OgreBites::TrayManager::showCursor ( const Ogre::String materialName = Ogre::BLANKSTRING)

Displays specified material on cursor, or the last material used if none specified.

Used to change cursor type.

◆ hideCursor()

void OgreBites::TrayManager::hideCursor ( )

◆ refreshCursor()

void OgreBites::TrayManager::refreshCursor ( )

Updates cursor position based on unbuffered mouse state.

This is necessary because if the tray manager has been cut off from mouse events for a time, the cursor position will be out of date.

◆ showTrays()

void OgreBites::TrayManager::showTrays ( )

◆ hideTrays()

void OgreBites::TrayManager::hideTrays ( )

◆ isCursorVisible()

bool OgreBites::TrayManager::isCursorVisible ( )
inline

◆ isBackdropVisible()

bool OgreBites::TrayManager::isBackdropVisible ( )
inline

◆ areTraysVisible()

bool OgreBites::TrayManager::areTraysVisible ( )
inline

◆ setTrayWidgetAlignment()

void OgreBites::TrayManager::setTrayWidgetAlignment ( TrayLocation  trayLoc,
Ogre::GuiHorizontalAlignment  gha 
)

Sets horizontal alignment of a tray's contents.

◆ setWidgetPadding()

void OgreBites::TrayManager::setWidgetPadding ( Ogre::Real  padding)

◆ setWidgetSpacing()

void OgreBites::TrayManager::setWidgetSpacing ( Ogre::Real  spacing)

◆ setTrayPadding()

void OgreBites::TrayManager::setTrayPadding ( Ogre::Real  padding)

◆ getWidgetPadding()

virtual Ogre::Real OgreBites::TrayManager::getWidgetPadding ( ) const
inlinevirtual

◆ getWidgetSpacing()

virtual Ogre::Real OgreBites::TrayManager::getWidgetSpacing ( ) const
inlinevirtual

◆ getTrayPadding()

virtual Ogre::Real OgreBites::TrayManager::getTrayPadding ( ) const
inlinevirtual

◆ adjustTrays()

virtual void OgreBites::TrayManager::adjustTrays ( )
virtual

Fits trays to their contents and snaps them to their anchor locations.

◆ getCursorRay()

Ogre::Ray OgreBites::TrayManager::getCursorRay ( Ogre::Camera cam)

Returns a 3D ray into the scene that is directly underneath the cursor.

◆ createButton()

Button* OgreBites::TrayManager::createButton ( TrayLocation  trayLoc,
const Ogre::String name,
const Ogre::String caption,
Ogre::Real  width = 0 
)

◆ createTextBox()

TextBox* OgreBites::TrayManager::createTextBox ( TrayLocation  trayLoc,
const Ogre::String name,
const Ogre::DisplayString caption,
Ogre::Real  width,
Ogre::Real  height 
)

◆ createThickSelectMenu()

SelectMenu* OgreBites::TrayManager::createThickSelectMenu ( TrayLocation  trayLoc,
const Ogre::String name,
const Ogre::DisplayString caption,
Ogre::Real  width,
unsigned int  maxItemsShown,
const Ogre::StringVector items = Ogre::StringVector() 
)

◆ createLongSelectMenu() [1/2]

SelectMenu* OgreBites::TrayManager::createLongSelectMenu ( TrayLocation  trayLoc,
const Ogre::String name,
const Ogre::DisplayString caption,
Ogre::Real  width,
Ogre::Real  boxWidth,
unsigned int  maxItemsShown,
const Ogre::StringVector items = Ogre::StringVector() 
)

◆ createLongSelectMenu() [2/2]

SelectMenu* OgreBites::TrayManager::createLongSelectMenu ( TrayLocation  trayLoc,
const Ogre::String name,
const Ogre::DisplayString caption,
Ogre::Real  boxWidth,
unsigned int  maxItemsShown,
const Ogre::StringVector items = Ogre::StringVector() 
)

◆ createLabel()

Label* OgreBites::TrayManager::createLabel ( TrayLocation  trayLoc,
const Ogre::String name,
const Ogre::DisplayString caption,
Ogre::Real  width = 0 
)

◆ createSeparator()

Separator* OgreBites::TrayManager::createSeparator ( TrayLocation  trayLoc,
const Ogre::String name,
Ogre::Real  width = 0 
)

◆ createThickSlider()

Slider* OgreBites::TrayManager::createThickSlider ( TrayLocation  trayLoc,
const Ogre::String name,
const Ogre::DisplayString caption,
Ogre::Real  width,
Ogre::Real  valueBoxWidth,
Ogre::Real  minValue,
Ogre::Real  maxValue,
unsigned int  snaps 
)

◆ createLongSlider() [1/2]

Slider* OgreBites::TrayManager::createLongSlider ( TrayLocation  trayLoc,
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 
)

◆ createLongSlider() [2/2]

Slider* OgreBites::TrayManager::createLongSlider ( TrayLocation  trayLoc,
const Ogre::String name,
const Ogre::DisplayString caption,
Ogre::Real  trackWidth,
Ogre::Real  valueBoxWidth,
Ogre::Real  minValue,
Ogre::Real  maxValue,
unsigned int  snaps 
)

◆ createParamsPanel() [1/2]

ParamsPanel* OgreBites::TrayManager::createParamsPanel ( TrayLocation  trayLoc,
const Ogre::String name,
Ogre::Real  width,
unsigned int  lines 
)

◆ createParamsPanel() [2/2]

ParamsPanel* OgreBites::TrayManager::createParamsPanel ( TrayLocation  trayLoc,
const Ogre::String name,
Ogre::Real  width,
const Ogre::StringVector paramNames 
)

◆ createCheckBox()

CheckBox* OgreBites::TrayManager::createCheckBox ( TrayLocation  trayLoc,
const Ogre::String name,
const Ogre::DisplayString caption,
Ogre::Real  width = 0 
)

◆ createDecorWidget()

DecorWidget* OgreBites::TrayManager::createDecorWidget ( TrayLocation  trayLoc,
const Ogre::String name,
const Ogre::String templateName 
)

◆ createProgressBar()

ProgressBar* OgreBites::TrayManager::createProgressBar ( TrayLocation  trayLoc,
const Ogre::String name,
const Ogre::DisplayString caption,
Ogre::Real  width,
Ogre::Real  commentBoxWidth 
)

◆ showFrameStats()

void OgreBites::TrayManager::showFrameStats ( TrayLocation  trayLoc,
size_t  place = -1 
)

Shows frame statistics widget set in the specified location.

◆ hideFrameStats()

void OgreBites::TrayManager::hideFrameStats ( )

Hides frame statistics widget set.

◆ areFrameStatsVisible()

bool OgreBites::TrayManager::areFrameStatsVisible ( )
inline

◆ toggleAdvancedFrameStats()

void OgreBites::TrayManager::toggleAdvancedFrameStats ( )
inline

Toggles visibility of advanced statistics.

◆ showLogo()

void OgreBites::TrayManager::showLogo ( TrayLocation  trayLoc,
size_t  place = -1 
)

Shows logo in the specified location.

◆ hideLogo()

void OgreBites::TrayManager::hideLogo ( )

◆ isLogoVisible()

bool OgreBites::TrayManager::isLogoVisible ( )
inline

◆ showLoadingBar()

void OgreBites::TrayManager::showLoadingBar ( unsigned int  numGroupsInit = 1,
unsigned int  numGroupsLoad = 1,
Ogre::Real  initProportion = 0.7f 
)

Shows loading bar.

Also takes job settings: the number of resource groups to be initialised, the number of resource groups to be loaded, and the proportion of the job that will be taken up by initialisation. Usually, script parsing takes up most time, so the default value is 0.7.

◆ hideLoadingBar()

void OgreBites::TrayManager::hideLoadingBar ( )

◆ isLoadingBarVisible()

bool OgreBites::TrayManager::isLoadingBarVisible ( )
inline

◆ showOkDialog()

void OgreBites::TrayManager::showOkDialog ( const Ogre::DisplayString caption,
const Ogre::DisplayString message 
)

Pops up a message dialog with an OK button.

◆ showYesNoDialog()

void OgreBites::TrayManager::showYesNoDialog ( const Ogre::DisplayString caption,
const Ogre::DisplayString question 
)

Pops up a question dialog with Yes and No buttons.

◆ closeDialog()

void OgreBites::TrayManager::closeDialog ( )

Hides whatever dialog is currently showing.

◆ isDialogVisible()

bool OgreBites::TrayManager::isDialogVisible ( )

Determines if any dialog is currently visible.

◆ getWidget() [1/2]

Widget* OgreBites::TrayManager::getWidget ( TrayLocation  trayLoc,
const Ogre::String name 
)

Gets a widget from a tray by name.

◆ getWidget() [2/2]

Widget* OgreBites::TrayManager::getWidget ( const Ogre::String name)

Gets a widget by name.

◆ getNumWidgets()

unsigned int OgreBites::TrayManager::getNumWidgets ( )

Gets the number of widgets in total.

◆ getWidgets()

const WidgetList& OgreBites::TrayManager::getWidgets ( TrayLocation  trayLoc) const
inline

Gets all the widgets of a specific tray.

◆ locateWidgetInTray()

int OgreBites::TrayManager::locateWidgetInTray ( Widget widget)

Gets a widget's position in its tray.

◆ destroyWidget() [1/4]

void OgreBites::TrayManager::destroyWidget ( Widget widget)

Destroys a widget.

◆ destroyWidget() [2/4]

void OgreBites::TrayManager::destroyWidget ( TrayLocation  trayLoc,
size_t  place 
)
inline

◆ destroyWidget() [3/4]

void OgreBites::TrayManager::destroyWidget ( TrayLocation  trayLoc,
const Ogre::String name 
)
inline

◆ destroyWidget() [4/4]

void OgreBites::TrayManager::destroyWidget ( const Ogre::String name)
inline

◆ destroyAllWidgetsInTray()

void OgreBites::TrayManager::destroyAllWidgetsInTray ( TrayLocation  trayLoc)

Destroys all widgets in a tray.

◆ destroyAllWidgets()

void OgreBites::TrayManager::destroyAllWidgets ( )

Destroys all widgets.

◆ moveWidgetToTray() [1/4]

void OgreBites::TrayManager::moveWidgetToTray ( Widget widget,
TrayLocation  trayLoc,
size_t  place = -1 
)

Adds a widget to a specified tray at given position, or at the end if unspecified or invalid.

◆ moveWidgetToTray() [2/4]

void OgreBites::TrayManager::moveWidgetToTray ( const Ogre::String name,
TrayLocation  trayLoc,
size_t  place = -1 
)
inline

◆ moveWidgetToTray() [3/4]

void OgreBites::TrayManager::moveWidgetToTray ( TrayLocation  currentTrayLoc,
const Ogre::String name,
TrayLocation  targetTrayLoc,
size_t  place = -1 
)
inline

◆ moveWidgetToTray() [4/4]

void OgreBites::TrayManager::moveWidgetToTray ( TrayLocation  currentTrayLoc,
size_t  currentPlace,
TrayLocation  targetTrayLoc,
size_t  targetPlace = -1 
)
inline

◆ removeWidgetFromTray() [1/4]

void OgreBites::TrayManager::removeWidgetFromTray ( Widget widget)
inline

Removes a widget from its tray.

Same as moving it to the null tray.

References OgreBites::TL_NONE.

◆ removeWidgetFromTray() [2/4]

void OgreBites::TrayManager::removeWidgetFromTray ( const Ogre::String name)
inline

◆ removeWidgetFromTray() [3/4]

void OgreBites::TrayManager::removeWidgetFromTray ( TrayLocation  trayLoc,
const Ogre::String name 
)
inline

◆ removeWidgetFromTray() [4/4]

void OgreBites::TrayManager::removeWidgetFromTray ( TrayLocation  trayLoc,
size_t  place 
)
inline

◆ clearTray()

void OgreBites::TrayManager::clearTray ( TrayLocation  trayLoc)

Removes all widgets from a widget tray.

◆ clearAllTrays()

void OgreBites::TrayManager::clearAllTrays ( )

Removes all widgets from all widget trays.

◆ frameRendered()

void OgreBites::TrayManager::frameRendered ( const Ogre::FrameEvent evt)
virtual

Process frame events.

Updates frame statistics widget set and deletes all widgets queued for destruction.

Reimplemented from OgreBites::InputListener.

◆ windowUpdate()

void OgreBites::TrayManager::windowUpdate ( )

◆ resourceGroupScriptingStarted() [1/2]

void OgreBites::TrayManager::resourceGroupScriptingStarted ( const Ogre::String groupName,
size_t  scriptCount 
)
inline

◆ scriptParseStarted() [1/2]

void OgreBites::TrayManager::scriptParseStarted ( const Ogre::String scriptName,
bool &  skipThisScript 
)
inline

◆ scriptParseEnded() [1/2]

void OgreBites::TrayManager::scriptParseEnded ( const Ogre::String scriptName,
bool  skipped 
)
inline

◆ resourceGroupLoadStarted() [1/2]

void OgreBites::TrayManager::resourceGroupLoadStarted ( const Ogre::String groupName,
size_t  resourceCount 
)
inline

◆ resourceLoadStarted()

void OgreBites::TrayManager::resourceLoadStarted ( const Ogre::ResourcePtr resource)
inlinevirtual

This event is fired when a declared resource is about to be loaded.

Parameters
resourceWeak reference to the resource loaded.

Reimplemented from Ogre::ResourceGroupListener.

References Ogre::Resource::getName().

◆ resourceLoadEnded()

void OgreBites::TrayManager::resourceLoadEnded ( void  )
inlinevirtual

This event is fired when the resource has been loaded.

Reimplemented from Ogre::ResourceGroupListener.

◆ worldGeometryStageStarted() [1/2]

void OgreBites::TrayManager::worldGeometryStageStarted ( const Ogre::String description)
inline

◆ worldGeometryStageEnded()

void OgreBites::TrayManager::worldGeometryStageEnded ( void  )
inlinevirtual

This event is fired when a stage of loading linked world geometry has been completed.

The number of stages required will have been included in the resourceCount passed in resourceGroupLoadStarted.

Reimplemented from Ogre::ResourceGroupListener.

◆ labelHit()

void OgreBites::TrayManager::labelHit ( Label label)
virtual

Toggles visibility of advanced statistics.

Reimplemented from OgreBites::TrayListener.

◆ buttonHit()

void OgreBites::TrayManager::buttonHit ( Button button)
virtual

Destroys dialog widgets, notifies listener, and ends high priority session.

Reimplemented from OgreBites::TrayListener.

◆ mousePressed()

bool OgreBites::TrayManager::mousePressed ( const MouseButtonEvent evt)
virtual

Processes mouse button down events.

Returns true if the event was consumed and should not be passed on to other handlers.

Reimplemented from OgreBites::InputListener.

◆ mouseReleased()

bool OgreBites::TrayManager::mouseReleased ( const MouseButtonEvent evt)
virtual

Processes mouse button up events.

Returns true if the event was consumed and should not be passed on to other handlers.

Reimplemented from OgreBites::InputListener.

◆ mouseMoved()

bool OgreBites::TrayManager::mouseMoved ( const MouseMotionEvent evt)
virtual

Updates cursor position.

Returns true if the event was consumed and should not be passed on to other handlers.

Reimplemented from OgreBites::InputListener.

◆ itemSelected()

virtual void OgreBites::TrayListener::itemSelected ( SelectMenu menu)
inlinevirtualinherited

◆ sliderMoved()

virtual void OgreBites::TrayListener::sliderMoved ( Slider slider)
inlinevirtualinherited

◆ checkBoxToggled()

virtual void OgreBites::TrayListener::checkBoxToggled ( CheckBox box)
inlinevirtualinherited

◆ okDialogClosed()

virtual void OgreBites::TrayListener::okDialogClosed ( const Ogre::DisplayString message)
inlinevirtualinherited

◆ yesNoDialogClosed()

virtual void OgreBites::TrayListener::yesNoDialogClosed ( const Ogre::DisplayString question,
bool  yesHit 
)
inlinevirtualinherited

◆ resourceGroupScriptingStarted() [2/2]

virtual void Ogre::ResourceGroupListener::resourceGroupScriptingStarted ( const String groupName,
size_t  scriptCount 
)
inlinevirtualinherited

This event is fired when a resource group begins parsing scripts.

Note
Remember that if you are loading resources through ResourceBackgroundQueue, these callbacks will occur in the background thread, so you should not perform any thread-unsafe actions in this callback if that's the case (check the group name / script name).
Parameters
groupNameThe name of the group
scriptCountThe number of scripts which will be parsed

◆ scriptParseStarted() [2/2]

virtual void Ogre::ResourceGroupListener::scriptParseStarted ( const String scriptName,
bool &  skipThisScript 
)
inlinevirtualinherited

This event is fired when a script is about to be parsed.

Parameters
scriptNameName of the to be parsed
skipThisScriptA boolean passed by reference which is by default set to false. If the event sets this to true, the script will be skipped and not parsed. Note that in this case the scriptParseEnded event will not be raised for this script.

◆ scriptParseEnded() [2/2]

virtual void Ogre::ResourceGroupListener::scriptParseEnded ( const String scriptName,
bool  skipped 
)
inlinevirtualinherited

This event is fired when the script has been fully parsed.

◆ resourceGroupScriptingEnded()

virtual void Ogre::ResourceGroupListener::resourceGroupScriptingEnded ( const String groupName)
inlinevirtualinherited

This event is fired when a resource group finished parsing scripts.

◆ resourceGroupPrepareStarted()

virtual void Ogre::ResourceGroupListener::resourceGroupPrepareStarted ( const String groupName,
size_t  resourceCount 
)
inlinevirtualinherited

This event is fired when a resource group begins preparing.

Parameters
groupNameThe name of the group being prepared
resourceCountThe number of resources which will be prepared, including a number of stages required to prepare any linked world geometry

◆ resourcePrepareStarted()

virtual void Ogre::ResourceGroupListener::resourcePrepareStarted ( const ResourcePtr resource)
inlinevirtualinherited

This event is fired when a declared resource is about to be prepared.

Parameters
resourceWeak reference to the resource prepared.

◆ resourcePrepareEnded()

virtual void Ogre::ResourceGroupListener::resourcePrepareEnded ( void  )
inlinevirtualinherited

This event is fired when the resource has been prepared.

◆ worldGeometryPrepareStageStarted()

virtual void Ogre::ResourceGroupListener::worldGeometryPrepareStageStarted ( const String description)
inlinevirtualinherited

This event is fired when a stage of preparing linked world geometry is about to start.

The number of stages required will have been included in the resourceCount passed in resourceGroupLoadStarted.

Parameters
descriptionText description of what was just prepared

◆ worldGeometryPrepareStageEnded()

virtual void Ogre::ResourceGroupListener::worldGeometryPrepareStageEnded ( void  )
inlinevirtualinherited

This event is fired when a stage of preparing linked world geometry has been completed.

The number of stages required will have been included in the resourceCount passed in resourceGroupLoadStarted.

◆ resourceGroupPrepareEnded()

virtual void Ogre::ResourceGroupListener::resourceGroupPrepareEnded ( const String groupName)
inlinevirtualinherited

This event is fired when a resource group finished preparing.

◆ resourceGroupLoadStarted() [2/2]

virtual void Ogre::ResourceGroupListener::resourceGroupLoadStarted ( const String groupName,
size_t  resourceCount 
)
inlinevirtualinherited

This event is fired when a resource group begins loading.

Parameters
groupNameThe name of the group being loaded
resourceCountThe number of resources which will be loaded, including a number of stages required to load any linked world geometry

◆ worldGeometryStageStarted() [2/2]

virtual void Ogre::ResourceGroupListener::worldGeometryStageStarted ( const String description)
inlinevirtualinherited

This event is fired when a stage of loading linked world geometry is about to start.

The number of stages required will have been included in the resourceCount passed in resourceGroupLoadStarted.

Parameters
descriptionText description of what was just loaded

◆ resourceGroupLoadEnded()

virtual void Ogre::ResourceGroupListener::resourceGroupLoadEnded ( const String groupName)
inlinevirtualinherited

This event is fired when a resource group finished loading.

◆ resourceCreated()

virtual void Ogre::ResourceGroupListener::resourceCreated ( const ResourcePtr resource)
inlinevirtualinherited

This event is fired when a resource was just created.

Parameters
resourceWeak reference to the resource created.

◆ resourceRemove()

virtual void Ogre::ResourceGroupListener::resourceRemove ( const ResourcePtr resource)
inlinevirtualinherited

This event is fired when a resource is about to be removed.

Parameters
resourceWeak reference to the resource removed.

◆ keyPressed()

virtual bool OgreBites::InputListener::keyPressed ( const KeyboardEvent evt)
inlinevirtualinherited

◆ keyReleased()

virtual bool OgreBites::InputListener::keyReleased ( const KeyboardEvent evt)
inlinevirtualinherited

Reimplemented in OgreBites::CameraMan.

◆ touchMoved()

virtual bool OgreBites::InputListener::touchMoved ( const TouchFingerEvent evt)
inlinevirtualinherited

◆ touchPressed()

virtual bool OgreBites::InputListener::touchPressed ( const TouchFingerEvent evt)
inlinevirtualinherited

◆ touchReleased()

virtual bool OgreBites::InputListener::touchReleased ( const TouchFingerEvent evt)
inlinevirtualinherited

◆ mouseWheelRolled()

virtual bool OgreBites::InputListener::mouseWheelRolled ( const MouseWheelEvent evt)
inlinevirtualinherited

Reimplemented in OgreBites::CameraMan.


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