Spinning Topp Logo BlackTopp Studios
inc
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Mezzanine::UI::UIManager Class Reference

This class is responsible for any and all user interactions with the User interface/HUD. More...

#include <uimanager.h>

+ Inheritance diagram for Mezzanine::UI::UIManager:
+ Collaboration diagram for Mezzanine::UI::UIManager:

Public Types

typedef InputContainer::const_iterator ConstInputIterator
 Const Iterator type for Input::MetaCode instances stored by this class.
 
typedef MarkupParserContainer::const_iterator ConstMarkupParserIterator
 Const Iterator type for MarkupParser instances stored by this class.
 
typedef ScreenContainer::const_reverse_iterator ConstReverseScreenIterator
 Const Reverse Iterator type for Screen instances stored by this class.
 
typedef ScreenContainer::const_iterator ConstScreenIterator
 Const Iterator type for Screen instances stored by this class.
 
typedef std::pair< String, RealFontResult
 An std::pair type for returning the result of a font suggestion.
 
typedef std::vector< Input::MetaCodeInputContainer
 Basic container type for Input::MetaCode storage by this class.
 
typedef InputContainer::iterator InputIterator
 Iterator type for Input::MetaCode instances stored by this class.
 
typedef std::map< String, MarkupParser * > MarkupParserContainer
 Basic container type for MarkupParser storage by this class.
 
typedef MarkupParserContainer::iterator MarkupParserIterator
 Iterator type for MarkupParser instances stored by this class.
 
typedef ScreenContainer::reverse_iterator ReverseScreenIterator
 Reverse Iterator type for Screen instances stored by this class.
 
typedef std::vector< UI::Screen * > ScreenContainer
 Basic container type for Screen storage by this class.
 
typedef ScreenContainer::iterator ScreenIterator
 Iterator type for Screen instances stored by this class.
 
- Public Types inherited from Mezzanine::ManagerBase
enum  ManagerType {
  MT_Undefined = 0, MT_AudioManager = 1, MT_AnimationManager = 2, MT_CollisionShapeManager = 3,
  MT_CompositorManager = 4, MT_GraphicsManager = 5, MT_EventManager = 6, MT_InputManager = 7,
  MT_LogManager = 8, MT_MaterialManager = 9, MT_MeshManager = 10, MT_NetworkManager = 11,
  MT_ResourceManager = 12, MT_ScriptingManager = 13, MT_TextureManager = 14, MT_UIManager = 15,
  MT_ActorManager = 101, MT_AreaEffectManager = 102, MT_DebrisManager = 103, MT_PagingManager = 104,
  MT_PhysicsManager = 105, MT_SceneManager = 106, MT_SoundScapeManager = 107, MT_TerrainManager = 108,
  MT_VehicleManager = 109, MT_UserCreated = 512
}
 A listing of Manager Types. More...
 

Public Member Functions

 UIManager ()
 Class Constructor.
 
 UIManager (const XML::Node &XMLNode)
 XML constructor. More...
 
virtual ~UIManager ()
 Class Destructor.
 
void AddAutoRegisterCode (const Input::MetaCode &Code)
 Adds a key or button that will be auto-registered with every created UI button. More...
 
void BindHotKey (const Input::MetaCode &HotKey, Button *BoundButton)
 Binds a key to a button. More...
 
Boole ButtonAutoRegisterEnabled () const
 Gets whether or not the ButtonAutoRegister feature is enabled. More...
 
WidgetCheckWidgetUnderPoint (Graphics::Viewport *VP, const Vector2 &Point)
 Searches all visable screens and layers to see if a Widget is under the given point. More...
 
ScreenCreateScreen (const String &ScreenName, const String &Atlas, Graphics::Viewport *WindowViewport, const UInt16 ZOrder)
 Creates an internal HUD screen. More...
 
virtual void Deinitialize ()
 Removes this manager from any necessary configuration so it can be safely disposed of. More...
 
void DestroyAllAtlases ()
 Destroys all loaded texture atlases.
 
void DestroyAllMarkupParsers ()
 Removes and destroys all MarkupParsers from this manager.
 
void DestroyAllScreens ()
 Deletes all screens stored in this manager.
 
void DestroyAtlas (TextureAtlas *ToBeDestroyed)
 Destroys a loaded texture atlas. More...
 
void DestroyMarkupParser (const String &ParserName)
 Removes and destroys a MarkupParser from this manager. More...
 
void DestroyScreen (Screen *Screen)
 Deletes a screen and removes all trace of it from the manager. More...
 
void EnableButtonAutoRegister (Boole Enable)
 Enables whether or not to automatically set the activation key or button for UI buttons. More...
 
TextureAtlasGetAtlas (const String &AtlasName)
 Gets a loaded Atlas being stored in this manager. More...
 
TextureAtlasGetAtlasExcept (const String &AtlasName)
 Gets a loaded Atlas being stored in this manager. More...
 
TextureAtlasHandlerGetAtlasHandler () const
 Gets this managers Atlas Handler. More...
 
const InputContainerGetAutoRegisteredCodes () const
 Gets the list of codes that will be auto-registered with each UI button. More...
 
ScreenGetHighestVisibleScreenOnViewport (Graphics::Viewport *WindowViewport) const
 Gets the highest ZOrder screen that is visible on a viewport. More...
 
WidgetGetHoveredWidget () const
 Gets the Widget the mouse is hovering over. More...
 
virtual String GetImplementationTypeName () const
 This Allows any manager name to be sent to a stream. Primarily used for logging. More...
 
virtual ManagerType GetInterfaceType () const
 This returns the type of this manager. More...
 
ScreenGetLowestVisibleScreenOnViewport (Graphics::Viewport *WindowViewport) const
 Gets the lowest ZOrder screen that is visible on a viewport. More...
 
MarkupParserGetMarkupParser (const String &ParserName) const
 Gets a MarkupParser by it's registered name. More...
 
Whole GetNumScreens () const
 Gets the number of screens created and stored in this manager. More...
 
ScreenGetScreen (const String &Name) const
 Gets a screen by name. More...
 
ScreenGetScreen (const Whole &Index) const
 Gets a screen by index. More...
 
WidgetGetWidgetFocus () const
 Gets the current widget being controlled. More...
 
WidgetUpdateWorkUnitGetWidgetUpdateWork ()
 Gets the work unit responsible for updating the widgets in this manager. More...
 
void HideAllScreens (Screen *Exclude=NULL)
 Hides all screens owned by this manager. More...
 
void HideScreensOnViewport (Graphics::Viewport *WindowViewport, Screen *Exclude=NULL)
 Hides all screens bound to a specific viewport. More...
 
virtual void Initialize ()
 Configures this manager for use prior to entering the main loop. More...
 
void InjectInput (const Input::MetaCode &Code)
 Injects a metacode into this manager, allowing the UI system to be aware of it. More...
 
Boole IsMarkupParserRegistered (const String &ParserName) const
 Checks to see if a MarkupParser has already been registsered under a specific name. More...
 
void LoadMTA (const String &Name, const String &Group="UI")
 Loads a Mezzanine Texture Atlas file for use with Screens. More...
 
Boole MouseIsInUISystem () const
 Checks to see if the mouse is over a UI element. More...
 
void RegisterMarkupParser (const String &ParserName, MarkupParser *ToAdd)
 Registers a new MarkupParser with this Manager.

Exceptions
Thismethod will thrown a "II_DUPLICATE_IDENTITY_EXCEPTION" if the provided name is already registered.
More...
 
void RemoveAllAutoRegisterCodes ()
 Removes all auto-registering input codes.
 
void RemoveAutoRegisterCode (const Input::MetaCode &Code)
 Removes a previously set auto-registering input code. More...
 
void ShowAllScreens (Screen *Exclude=NULL)
 Shows all screens owned by this manager. More...
 
void ShowScreensOnViewport (Graphics::Viewport *WindowViewport, Screen *Exclude=NULL)
 Shows all screens bound to a specific viewport. More...
 
FontResult SuggestGlyphIndex (const Whole &Height, const String &Atlas)
 Suggests a glyph index based on the desired actual height. More...
 
void UnbindHotKey (const Input::MetaCode &HotKey, Button *BoundButton)
 Removes a previously set hotkey binding. More...
 
void UnregisterAllMarkupParsers ()
 Removes all MarkupParsers from this manager.
 
void UnregisterMarkupParser (const String &ParserName)
 Removes a MarkupParser from this manager. More...
 
virtual void UpdateScreens ()
 Updates the UI system based on the most recent inputs.
 
- Public Member Functions inherited from Mezzanine::EntresolManager
 EntresolManager ()
 Class constructor.
 
virtual ~EntresolManager ()
 Class destructor.
 
- Public Member Functions inherited from Mezzanine::ManagerBase
 ManagerBase ()
 Class constructor.
 
virtual ~ManagerBase ()
 Class destructor.
 
virtual String GetInterfaceTypeAsString () const
 Gets a string of the interface type of this manager. More...
 
Boole IsInitialized () const
 Gets whether or not this manager has been initialized. More...
 
- Public Member Functions inherited from Mezzanine::Singleton< UIManager >
 ~Singleton ()
 Class destructor.
 

Static Public Attributes

static const String ImplementationName = "DefaultUIManager"
 A String containing the name of this manager implementation.
 
static const ManagerBase::ManagerType InterfaceType = ManagerBase::MT_UIManager
 A ManagerType enum value used to describe the type of interface/functionality this manager provides.
 

Protected Member Functions

Boole FocusIsLocked () const
 Gets whether or not the systems current focus is locked. More...
 
void HandlePostFocusControllerInput (const Input::MetaCode &Code)
 Handles controller processes after the update of the main focus. More...
 
void HandlePostFocusInput (const Input::MetaCode &Code)
 Handles UI processing after the update of the main focus. More...
 
void HandlePostFocusKeyboardInput (const Input::MetaCode &Code)
 Handles keyboard processes after the update of the main focus. More...
 
void HandlePostFocusMouseInput (const Input::MetaCode &Code)
 Handles mouse processes after the update of the main focus. More...
 
void HandlePreFocusControllerInput (const Input::MetaCode &Code)
 Handles controller processes prior to the update of the main focus. More...
 
void HandlePreFocusInput (const Input::MetaCode &Code)
 Handles UI processing prior to the update of the main focus. More...
 
void HandlePreFocusKeyboardInput (const Input::MetaCode &Code)
 Handles keyboard processes prior to the update of the main focus. More...
 
void HandlePreFocusMouseInput (const Input::MetaCode &Code)
 Handles mouse processes prior to the update of the main focus. More...
 
Boole SwitchFocus (Widget *NewFocus)
 Updates the current focus to a new target. More...
 
- Protected Member Functions inherited from Mezzanine::Singleton< UIManager >
 Singleton ()
 Class constructor.
 

Protected Attributes

TextureAtlasHandlerAtlasHandler
 A pointer to the class responsible for Atlas tasks in the UI system. More...
 
InputContainer AutoRegisterCodes
 A container storing all of the Inputs buttons will be set to activate in response to. More...
 
Boole ButtonAutoRegister
 Stores whether or not newly created buttons will have activation codes binded to them automatically. More...
 
Input::MetaCode FocusLockCode
 Stores the Input that locked the current focus. More...
 
HotKeyHandlerHKHandler
 A pointer to the class responsible for HotKey tasks in the UI system. More...
 
WidgetHoveredWidget
 A pointer to the current widget in the UI system the mouse is hovered over. More...
 
InputContainer InjectedInputs
 A container storing all of the Inputs generated/tracked during the last UI update. More...
 
MarkupParserContainer MarkupParsers
 A container storing all the registered/known markup parsers. More...
 
Boole MouseMoved
 Stores whether or not the mouse moved since the last time the UI was updated. More...
 
ScreenContainer Screens
 A container storing all the Screens created in the UI system. More...
 
Threading::DefaultThreadSpecificStorage::TypeThreadResources
 Can be used for thread safe logging and other thread specific resources. More...
 
WidgetWidgetFocus
 A pointer to the widget that is currently holding the focus. More...
 
WidgetUpdateWorkUnitWidgetUpdateWork
 The work unit that updates all of the widgets in the UI system. More...
 
- Protected Attributes inherited from Mezzanine::ManagerBase
Boole Initialized
 Simple Boole indicating whether or not this manager has been initialized. More...
 
EntresolTheEntresol
 The actual pointer to the Entresol core class. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Mezzanine::ManagerBase
static String GetTypeAsString (const ManagerType &ManagerType)
 Gets the string form of the type of manager. More...
 
static ManagerType GetTypeFromString (const String &ManagerName)
 Gets the type of manager requested from a string. More...
 
- Static Public Member Functions inherited from Mezzanine::Singleton< UIManager >
static UIManager * GetSingletonPtr ()
 Fetches a pointer to the singleton. More...
 
static Boole SingletonValid ()
 Checks to see if the singleton pointer is valid. More...
 
- Static Protected Attributes inherited from Mezzanine::Singleton< UIManager >
static UIManager * SingletonPtr
 The one and only pointer to the single object. More...
 

Detailed Description

This class is responsible for any and all user interactions with the User interface/HUD.

Currently, you have to create the UI/HUD in code. Font and sprite data is loaded through a premade mta file(*.mta).

Definition at line 114 of file uimanager.h.

Constructor & Destructor Documentation

Mezzanine::UI::UIManager::UIManager ( const XML::Node XMLNode)

XML constructor.

Parameters
XMLNodeThe node of the xml document to construct from.
Todo:
This class currently doesn't initialize anything from XML, if that changes this constructor needs to be expanded.

Definition at line 125 of file uimanager.cpp.

Member Function Documentation

void Mezzanine::UI::UIManager::AddAutoRegisterCode ( const Input::MetaCode Code)

Adds a key or button that will be auto-registered with every created UI button.

Note
Buttons expect the input to be a button of some sort, but do not descriminate based on device. If you provide an input that is not a Mouse, Keyboard, or Controller button then checks inside the button will fail and the button won't activate or deactivate.
Parameters
CodeThe input code for the keyboard key or mouse button to be added to the list of codes to be auto-registered.

Definition at line 444 of file uimanager.cpp.

void Mezzanine::UI::UIManager::BindHotKey ( const Input::MetaCode HotKey,
Button BoundButton 
)

Binds a key to a button.

This function allows buttons to behave like they are pressed without mouse input.

Parameters
HotKeyThe key or button (on the input device) to activate the button.
BoundButtonThe button being bound to the hotkey.

Definition at line 425 of file uimanager.cpp.

Boole Mezzanine::UI::UIManager::ButtonAutoRegisterEnabled ( ) const

Gets whether or not the ButtonAutoRegister feature is enabled.

Returns
Returns a Boole indicating whether or not the ButtonAutoRegister feature is enabled.

Definition at line 441 of file uimanager.cpp.

Widget * Mezzanine::UI::UIManager::CheckWidgetUnderPoint ( Graphics::Viewport VP,
const Vector2 Point 
)

Searches all visable screens and layers to see if a Widget is under the given point.

This is called automatically once every frame. Should only be called on manually if you need more then one check per frame.

Parameters
VPA pointer to the viewport to check.
PointThe point on screen(in viewport space) to use when checking Widgets.
Returns
Returns the hovered Widget if there is one, NULL if not.

Definition at line 558 of file uimanager.cpp.

Screen * Mezzanine::UI::UIManager::CreateScreen ( const String ScreenName,
const String Atlas,
Graphics::Viewport WindowViewport,
const UInt16  ZOrder 
)

Creates an internal HUD screen.

Screens are the base set of renderable UI you can use, allowing you to switch entire sets of UI's on the fly if needed. For performance reasons you should always keep the number of screens you create to a minimum.

Parameters
ScreenNameThe name to be given to the screen.
AtlasThe name of a previously loaded mta file to be used with this screen.
WindowViewportThe viewport to create this screen in.
ZOrderThe ZOrder determining the position relative to the other screens.
Returns
Returns a pointer to the created Screen.

Definition at line 301 of file uimanager.cpp.

void Mezzanine::UI::UIManager::Deinitialize ( )
virtual

Removes this manager from any necessary configuration so it can be safely disposed of.

Implements Mezzanine::ManagerBase.

Definition at line 705 of file uimanager.cpp.

void Mezzanine::UI::UIManager::DestroyAtlas ( TextureAtlas ToBeDestroyed)

Destroys a loaded texture atlas.

Parameters
ToBeDestroyedA pointer to the texture atlas that will be destroyed.

Definition at line 292 of file uimanager.cpp.

void Mezzanine::UI::UIManager::DestroyMarkupParser ( const String ParserName)

Removes and destroys a MarkupParser from this manager.

Parameters
ParserNameThe name of the MarkupParser to be destroyed.

Definition at line 509 of file uimanager.cpp.

void Mezzanine::UI::UIManager::DestroyScreen ( Screen Screen)

Deletes a screen and removes all trace of it from the manager.

Destroying a screen will also destroy all of it's layers, and everything contained in those layers.

Parameters
ScreenThe screen to be destroyed.

Definition at line 339 of file uimanager.cpp.

void Mezzanine::UI::UIManager::EnableButtonAutoRegister ( Boole  Enable)

Enables whether or not to automatically set the activation key or button for UI buttons.

If true, this will cause every UI button to have keyboard keys or mouse buttons added with AddButtonAutoRegister() to be added as activation keys or buttons immediately after they are created.
Manager Default Setting: False.

Parameters
EnableWhether or not to enable this feature.

Definition at line 438 of file uimanager.cpp.

Boole Mezzanine::UI::UIManager::FocusIsLocked ( ) const
protected

Gets whether or not the systems current focus is locked.

Returns
Returns true if the focus is currently locked, false otherwise.

Definition at line 275 of file uimanager.cpp.

TextureAtlas * Mezzanine::UI::UIManager::GetAtlas ( const String AtlasName)

Gets a loaded Atlas being stored in this manager.

Parameters
AtlasNameThe name of the Atlas, which is usually the name of the file without the extension.
Returns
Returns a pointer to the requested Atlas, or NULL if it doesn't exist.

Definition at line 286 of file uimanager.cpp.

TextureAtlas * Mezzanine::UI::UIManager::GetAtlasExcept ( const String AtlasName)

Gets a loaded Atlas being stored in this manager.

Parameters
AtlasNameThe name of the Atlas, which is usually the name of the file without the extension.
Returns
Returns a pointer to the requested Atlas, or throws an exception if it doesn't exist.

Definition at line 289 of file uimanager.cpp.

TextureAtlasHandler * Mezzanine::UI::UIManager::GetAtlasHandler ( ) const

Gets this managers Atlas Handler.

Returns
Returns a pointer to this managers Atlas Handler.

Definition at line 536 of file uimanager.cpp.

const UIManager::InputContainer & Mezzanine::UI::UIManager::GetAutoRegisteredCodes ( ) const

Gets the list of codes that will be auto-registered with each UI button.

Returns
Returns a pointer to the vector containing all the codes to be auto-registered with every UI button.

Definition at line 468 of file uimanager.cpp.

Screen * Mezzanine::UI::UIManager::GetHighestVisibleScreenOnViewport ( Graphics::Viewport WindowViewport) const

Gets the highest ZOrder screen that is visible on a viewport.

Parameters
WindowViewportThe viewport to check for a visible screen.
Returns
Returns a pointer to the screen at the highest ZOrder currently being shown on the specified viewport.

Definition at line 411 of file uimanager.cpp.

Widget * Mezzanine::UI::UIManager::GetHoveredWidget ( ) const

Gets the Widget the mouse is hovering over.

Returns
Returns a pointer to the widget, or NULL if it's not over any visable buttons.

Definition at line 530 of file uimanager.cpp.

String Mezzanine::UI::UIManager::GetImplementationTypeName ( ) const
virtual

This Allows any manager name to be sent to a stream. Primarily used for logging.

Returns
This returns a String that contains the name.

Implements Mezzanine::ManagerBase.

Definition at line 726 of file uimanager.cpp.

ManagerBase::ManagerType Mezzanine::UI::UIManager::GetInterfaceType ( ) const
virtual

This returns the type of this manager.

This is intended to make using and casting from Manager base easier. With this is is possible to cast from ManagerBase to the correct Manager Type.

Returns
This returns a ManagerTypeName to identify what this can be safely cast to.

Implements Mezzanine::ManagerBase.

Definition at line 723 of file uimanager.cpp.

Screen * Mezzanine::UI::UIManager::GetLowestVisibleScreenOnViewport ( Graphics::Viewport WindowViewport) const

Gets the lowest ZOrder screen that is visible on a viewport.

Parameters
WindowViewportThe viewport to check for a visible screen.
Returns
Returns a pointer to the screen at the lowest ZOrder currently being shown on the specified viewport.

Definition at line 400 of file uimanager.cpp.

MarkupParser * Mezzanine::UI::UIManager::GetMarkupParser ( const String ParserName) const

Gets a MarkupParser by it's registered name.

Parameters
ParserNameThe name of the MarkupParser to retrieve.
Returns
Returns a pointer to the requested MarkupParser, or NULL if none are registered under the specified name.

Definition at line 490 of file uimanager.cpp.

Whole Mezzanine::UI::UIManager::GetNumScreens ( ) const

Gets the number of screens created and stored in this manager.

Returns
Returns the number of screens this manager is storing.

Definition at line 334 of file uimanager.cpp.

Screen * Mezzanine::UI::UIManager::GetScreen ( const String Name) const

Gets a screen by name.

Parameters
NameThe name of the Screen to be retrieved.
Returns
Returns a pointer to the screen of the specified name.

Definition at line 317 of file uimanager.cpp.

Screen * Mezzanine::UI::UIManager::GetScreen ( const Whole Index) const

Gets a screen by index.

Parameters
IndexThe index of the Screen to be retrieved.
Returns
Returns a pointer to the screen at the specified index.

Definition at line 329 of file uimanager.cpp.

Widget * Mezzanine::UI::UIManager::GetWidgetFocus ( ) const

Gets the current widget being controlled.

The widget control is used mostly for manipulating widgets while the mouse is not currently hovering over them, such as the click and drag action of scrollbars and resizing windows.

Returns
Returns a pointer to the currently controlled widget, or NULL if none are being controlled this frame.

Definition at line 533 of file uimanager.cpp.

WidgetUpdateWorkUnit * Mezzanine::UI::UIManager::GetWidgetUpdateWork ( )

Gets the work unit responsible for updating the widgets in this manager.

Returns
Returns a pointer to the WidgetUpdateWorkUnit used by this manager.

Definition at line 715 of file uimanager.cpp.

void Mezzanine::UI::UIManager::HandlePostFocusControllerInput ( const Input::MetaCode Code)
protected

Handles controller processes after the update of the main focus.

Parameters
CodeThe MetaCode containing the input to be processed.
Todo:
There is currently nothing that the UI system as a whole needs controller inputs. Perhaps when we implement consoles this should be expanded, maybe even sooner then that.

Definition at line 246 of file uimanager.cpp.

void Mezzanine::UI::UIManager::HandlePostFocusInput ( const Input::MetaCode Code)
protected

Handles UI processing after the update of the main focus.

Parameters
CodeThe MetaCode containing the input to be processed.
Todo:
If other devices are added, appropriate functions should be added to this class, and called here.

Definition at line 176 of file uimanager.cpp.

void Mezzanine::UI::UIManager::HandlePostFocusKeyboardInput ( const Input::MetaCode Code)
protected

Handles keyboard processes after the update of the main focus.

Parameters
CodeThe MetaCode containing the input to be processed.

Definition at line 233 of file uimanager.cpp.

void Mezzanine::UI::UIManager::HandlePostFocusMouseInput ( const Input::MetaCode Code)
protected

Handles mouse processes after the update of the main focus.

Parameters
CodeThe MetaCode containing the input to be processed.

Definition at line 238 of file uimanager.cpp.

void Mezzanine::UI::UIManager::HandlePreFocusControllerInput ( const Input::MetaCode Code)
protected

Handles controller processes prior to the update of the main focus.

Parameters
CodeThe MetaCode containing the input to be processed.
Todo:
There is currently nothing that the UI system as a whole needs controller inputs. Perhaps when we implement consoles this should be expanded, maybe even sooner then that.

Definition at line 227 of file uimanager.cpp.

void Mezzanine::UI::UIManager::HandlePreFocusInput ( const Input::MetaCode Code)
protected

Handles UI processing prior to the update of the main focus.

Parameters
CodeThe MetaCode containing the input to be processed.
Todo:
If other devices are added, appropriate functions should be added to this class, and called here.

Definition at line 165 of file uimanager.cpp.

void Mezzanine::UI::UIManager::HandlePreFocusKeyboardInput ( const Input::MetaCode Code)
protected

Handles keyboard processes prior to the update of the main focus.

Parameters
CodeThe MetaCode containing the input to be processed.

Definition at line 187 of file uimanager.cpp.

void Mezzanine::UI::UIManager::HandlePreFocusMouseInput ( const Input::MetaCode Code)
protected

Handles mouse processes prior to the update of the main focus.

Parameters
CodeThe MetaCode containing the input to be processed.

Definition at line 192 of file uimanager.cpp.

void Mezzanine::UI::UIManager::HideAllScreens ( Screen Exclude = NULL)

Hides all screens owned by this manager.

Parameters
ExcludeOptional parameter that will make a single screen be excluded from this operation.

Definition at line 390 of file uimanager.cpp.

void Mezzanine::UI::UIManager::HideScreensOnViewport ( Graphics::Viewport WindowViewport,
Screen Exclude = NULL 
)

Hides all screens bound to a specific viewport.

Parameters
WindowViewportThe viewport bound to all screens to be hidden.
ExcludeOptional parameter that will make a single screen be excluded from this operation.

Definition at line 380 of file uimanager.cpp.

void Mezzanine::UI::UIManager::Initialize ( )
virtual

Configures this manager for use prior to entering the main loop.

Implements Mezzanine::ManagerBase.

Definition at line 693 of file uimanager.cpp.

void Mezzanine::UI::UIManager::InjectInput ( const Input::MetaCode Code)

Injects a metacode into this manager, allowing the UI system to be aware of it.

Parameters
CodeThe MetaCode to be injected and later processed.

Definition at line 542 of file uimanager.cpp.

Boole Mezzanine::UI::UIManager::IsMarkupParserRegistered ( const String ParserName) const

Checks to see if a MarkupParser has already been registsered under a specific name.

Parameters
ParserNameThe name of the MarkupParser to check for.
Returns
Returns true if a MarkupParser is registered under the specified name.

Definition at line 484 of file uimanager.cpp.

void Mezzanine::UI::UIManager::LoadMTA ( const String Name,
const String Group = "UI" 
)

Loads a Mezzanine Texture Atlas file for use with Screens.

Parameters
NameThe name of the file to be loaded.
GroupThe resource group where the MTA file can be found.

Definition at line 283 of file uimanager.cpp.

Boole Mezzanine::UI::UIManager::MouseIsInUISystem ( ) const

Checks to see if the mouse is over a UI element.

This should only be called on after this manager does it's main loop items for best results.

Returns
Returns true if the mouse is over a visable UI element, false if not.

Definition at line 570 of file uimanager.cpp.

void Mezzanine::UI::UIManager::RegisterMarkupParser ( const String ParserName,
MarkupParser ToAdd 
)

Registers a new MarkupParser with this Manager.

Exceptions
Thismethod will thrown a "II_DUPLICATE_IDENTITY_EXCEPTION" if the provided name is already registered.

Parameters
ParserNameThe name to be given to the registered MarkupParser.
ToAddA pointer to the MarkupParser to be registered with the given name.

Definition at line 474 of file uimanager.cpp.

void Mezzanine::UI::UIManager::RemoveAutoRegisterCode ( const Input::MetaCode Code)

Removes a previously set auto-registering input code.

Parameters
CodeThe input code to be removed from the list of auto-registering codes.

Definition at line 454 of file uimanager.cpp.

void Mezzanine::UI::UIManager::ShowAllScreens ( Screen Exclude = NULL)

Shows all screens owned by this manager.

Parameters
ExcludeOptional parameter that will make a single screen be excluded from this operation.

Definition at line 370 of file uimanager.cpp.

void Mezzanine::UI::UIManager::ShowScreensOnViewport ( Graphics::Viewport WindowViewport,
Screen Exclude = NULL 
)

Shows all screens bound to a specific viewport.

Parameters
WindowViewportThe viewport bound to all screens to be shown.
ExcludeOptional parameter that will make a single screen be excluded from this operation.

Definition at line 360 of file uimanager.cpp.

UIManager::FontResult Mezzanine::UI::UIManager::SuggestGlyphIndex ( const Whole Height,
const String Atlas 
)

Suggests a glyph index based on the desired actual height.

Parameters
HeightThe desired Height of the glyph wanted in pixels.
AtlasThe altas to search.
Returns
Returns a std::pair, First is the name of the font and second is a Real for the scaling that should be provided to it.

Definition at line 575 of file uimanager.cpp.

Boole Mezzanine::UI::UIManager::SwitchFocus ( Widget NewFocus)
protected

Updates the current focus to a new target.

Parameters
NewFocusThe new widget obtaining the UI focus.
Returns
Returns true if the target widget successfully gained focus, false otherwise.

Definition at line 252 of file uimanager.cpp.

void Mezzanine::UI::UIManager::UnbindHotKey ( const Input::MetaCode HotKey,
Button BoundButton 
)

Removes a previously set hotkey binding.

Parameters
HotKeyThe key or button (on the input device) to activate the button.
BoundButtonThe button currently bound to the hotkey.

Definition at line 430 of file uimanager.cpp.

void Mezzanine::UI::UIManager::UnregisterMarkupParser ( const String ParserName)

Removes a MarkupParser from this manager.

Parameters
ParserNameThe name of the MarkupParser to be removed.

Definition at line 497 of file uimanager.cpp.

Member Data Documentation

TextureAtlasHandler* Mezzanine::UI::UIManager::AtlasHandler
protected

A pointer to the class responsible for Atlas tasks in the UI system.

Definition at line 171 of file uimanager.h.

InputContainer Mezzanine::UI::UIManager::AutoRegisterCodes
protected

A container storing all of the Inputs buttons will be set to activate in response to.

Definition at line 155 of file uimanager.h.

Boole Mezzanine::UI::UIManager::ButtonAutoRegister
protected

Stores whether or not newly created buttons will have activation codes binded to them automatically.

Definition at line 183 of file uimanager.h.

Input::MetaCode Mezzanine::UI::UIManager::FocusLockCode
protected

Stores the Input that locked the current focus.

Definition at line 162 of file uimanager.h.

HotKeyHandler* Mezzanine::UI::UIManager::HKHandler
protected

A pointer to the class responsible for HotKey tasks in the UI system.

Definition at line 174 of file uimanager.h.

Widget* Mezzanine::UI::UIManager::HoveredWidget
protected

A pointer to the current widget in the UI system the mouse is hovered over.

Definition at line 165 of file uimanager.h.

InputContainer Mezzanine::UI::UIManager::InjectedInputs
protected

A container storing all of the Inputs generated/tracked during the last UI update.

Definition at line 158 of file uimanager.h.

MarkupParserContainer Mezzanine::UI::UIManager::MarkupParsers
protected

A container storing all the registered/known markup parsers.

Definition at line 149 of file uimanager.h.

Boole Mezzanine::UI::UIManager::MouseMoved
protected

Stores whether or not the mouse moved since the last time the UI was updated.

Definition at line 186 of file uimanager.h.

ScreenContainer Mezzanine::UI::UIManager::Screens
protected

A container storing all the Screens created in the UI system.

Definition at line 152 of file uimanager.h.

Threading::DefaultThreadSpecificStorage::Type* Mezzanine::UI::UIManager::ThreadResources
protected

Can be used for thread safe logging and other thread specific resources.

Definition at line 180 of file uimanager.h.

Widget* Mezzanine::UI::UIManager::WidgetFocus
protected

A pointer to the widget that is currently holding the focus.

Definition at line 168 of file uimanager.h.

WidgetUpdateWorkUnit* Mezzanine::UI::UIManager::WidgetUpdateWork
protected

The work unit that updates all of the widgets in the UI system.

Definition at line 177 of file uimanager.h.


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