Spinning Topp Logo BlackTopp Studios
inc
uimanager.h
1 // © Copyright 2010 - 2016 BlackTopp Studios Inc.
2 /* This file is part of The Mezzanine Engine.
3 
4  The Mezzanine Engine is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 3 of the License, or
7  (at your option) any later version.
8 
9  The Mezzanine Engine is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with The Mezzanine Engine. If not, see <http://www.gnu.org/licenses/>.
16 */
17 /* The original authors have included a copy of the license specified above in the
18  'Docs' folder. See 'gpl.txt'
19 */
20 /* We welcome the use of the Mezzanine engine to anyone, including companies who wish to
21  Build professional software and charge for their product.
22 
23  However there are some practical restrictions, so if your project involves
24  any of the following you should contact us and we will try to work something
25  out:
26  - DRM or Copy Protection of any kind(except Copyrights)
27  - Software Patents You Do Not Wish to Freely License
28  - Any Kind of Linking to Non-GPL licensed Works
29  - Are Currently In Violation of Another Copyright Holder's GPL License
30  - If You want to change our code and not add a few hundred MB of stuff to
31  your distribution
32 
33  These and other limitations could cause serious legal problems if you ignore
34  them, so it is best to simply contact us or the Free Software Foundation, if
35  you have any questions.
36 
37  Joseph Toppi - toppij@gmail.com
38  John Blackwood - makoenergy02@gmail.com
39 */
40 #ifndef _uiuimanager_h
41 #define _uiuimanager_h
42 
43 #include "entresolmanager.h"
44 #include "entresolmanagerfactory.h"
45 #include "singleton.h"
46 #include "UI/rect.h"
47 #include "Input/metacode.h"
48 #include "Threading/workunit.h"
49 
50 namespace Mezzanine
51 {
52  namespace Graphics
53  {
54  class Viewport;
55  }
56  namespace UI
57  {
58  class Screen;
59  class Button;
60  class Widget;
61  class TextureAtlas;
62  class TextureAtlasHandler;
63  class HotKeyHandler;
64  class ActionHandler;
65  class QuadRenderable;
66  class MarkupParser;
67  class UIManager;
68 
69  ///////////////////////////////////////////////////////////////////////////////
70  /// @brief This is a Mezzanine::Threading::iWorkUnit for the updating of widgets in the UI system.
71  /// @details
72  ///////////////////////////////////////
74  {
75  protected:
76  /// @internal
77  /// @brief A pointer to the manager this work unit is processing.
79  /// @internal
80  /// @brief Protected copy constructor. THIS IS NOT ALLOWED.
81  /// @param Other The other work unit being copied from. WHICH WILL NEVER HAPPEN.
83  /// @internal
84  /// @brief Protected assignment operator. THIS IS NOT ALLOWED.
85  /// @param Other The other work unit being copied from. WHICH WILL NEVER HAPPEN.
86  /// @return Returns a reference to this. WHICH WILL NEVER HAPPEN.
87  WidgetUpdateWorkUnit& operator=(const WidgetUpdateWorkUnit& Other);
88  public:
89  /// @brief Class constructor.
90  /// @param Target The UIManager this work unit will process during the frame.
92  /// @brief Class destructor.
93  virtual ~WidgetUpdateWorkUnit();
94 
95  ///////////////////////////////////////////////////////////////////////////////
96  // Utility
97 
98  /// @brief This does any required update of the Graphical Scene graph and REnders one frame
99  /// @param CurrentThreadStorage The storage class for all resources owned by this work unit during it's execution.
100  virtual void DoWork(Threading::DefaultThreadSpecificStorage::Type& CurrentThreadStorage);
101  };//WidgetUpdateWorkUnit
102 
103  // Used by the scripting language binder to help create bindgings for this class. SWIG does know to creation template instances
104  #ifdef SWIG
105  %template(SingletonUIManager) Singleton<UIManager>;
106  #endif
107 
108  ///////////////////////////////////////////////////////////////////////////////
109  /// @class UIManager
110  /// @headerfile uimanager.h
111  /// @brief This class is responsible for any and all user interactions with the User interface/HUD.
112  /// @details Currently, you have to create the UI/HUD in code. Font and sprite data is loaded through a premade mta file(*.mta).
113  ///////////////////////////////////////
115  {
116  public:
117  /// @brief Basic container type for @ref MarkupParser storage by this class.
118  typedef std::map<String,MarkupParser*> MarkupParserContainer;
119  /// @brief Iterator type for @ref MarkupParser instances stored by this class.
120  typedef MarkupParserContainer::iterator MarkupParserIterator;
121  /// @brief Const Iterator type for @ref MarkupParser instances stored by this class.
122  typedef MarkupParserContainer::const_iterator ConstMarkupParserIterator;
123  /// @brief Basic container type for @ref Screen storage by this class.
124  typedef std::vector< UI::Screen* > ScreenContainer;
125  /// @brief Iterator type for @ref Screen instances stored by this class.
126  typedef ScreenContainer::iterator ScreenIterator;
127  /// @brief Const Iterator type for @ref Screen instances stored by this class.
128  typedef ScreenContainer::const_iterator ConstScreenIterator;
129  /// @brief Reverse Iterator type for @ref Screen instances stored by this class.
130  typedef ScreenContainer::reverse_iterator ReverseScreenIterator;
131  /// @brief Const Reverse Iterator type for @ref Screen instances stored by this class.
132  typedef ScreenContainer::const_reverse_iterator ConstReverseScreenIterator;
133  /// @brief Basic container type for @ref Input::MetaCode storage by this class.
134  typedef std::vector< Input::MetaCode > InputContainer;
135  /// @brief Iterator type for @ref Input::MetaCode instances stored by this class.
136  typedef InputContainer::iterator InputIterator;
137  /// @brief Const Iterator type for @ref Input::MetaCode instances stored by this class.
138  typedef InputContainer::const_iterator ConstInputIterator;
139  /// @brief An std::pair type for returning the result of a font suggestion.
140  typedef std::pair< String, Real > FontResult;
141 
142  /// @brief A String containing the name of this manager implementation.
144  /// @brief A ManagerType enum value used to describe the type of interface/functionality this manager provides.
146  protected:
147  /// @internal
148  /// @brief A container storing all the registered/known markup parsers.
149  MarkupParserContainer MarkupParsers;
150  /// @internal
151  /// @brief A container storing all the Screens created in the UI system.
152  ScreenContainer Screens;
153  /// @internal
154  /// @brief A container storing all of the Inputs buttons will be set to activate in response to.
155  InputContainer AutoRegisterCodes;
156  /// @internal
157  /// @brief A container storing all of the Inputs generated/tracked during the last UI update.
158  InputContainer InjectedInputs;
159 
160  /// @internal
161  /// @brief Stores the Input that locked the current focus.
163  /// @internal
164  /// @brief A pointer to the current widget in the UI system the mouse is hovered over.
166  /// @internal
167  /// @brief A pointer to the widget that is currently holding the focus.
169  /// @internal
170  /// @brief A pointer to the class responsible for Atlas tasks in the UI system.
172  /// @internal
173  /// @brief A pointer to the class responsible for HotKey tasks in the UI system.
175  /// @internal
176  /// @brief The work unit that updates all of the widgets in the UI system.
178  /// @internal
179  /// @brief Can be used for thread safe logging and other thread specific resources.
181  /// @internal
182  /// @brief Stores whether or not newly created buttons will have activation codes binded to them automatically.
184  /// @internal
185  /// @brief Stores whether or not the mouse moved since the last time the UI was updated.
187 
188  /// @internal
189  /// @brief Handles UI processing prior to the update of the main focus.
190  /// @param Code The MetaCode containing the input to be processed.
191  void HandlePreFocusInput(const Input::MetaCode& Code);
192  /// @internal
193  /// @brief Handles UI processing after the update of the main focus.
194  /// @param Code The MetaCode containing the input to be processed.
195  void HandlePostFocusInput(const Input::MetaCode& Code);
196  /// @internal
197  /// @brief Handles keyboard processes prior to the update of the main focus.
198  /// @param Code The MetaCode containing the input to be processed.
199  void HandlePreFocusKeyboardInput(const Input::MetaCode& Code);
200  /// @internal
201  /// @brief Handles mouse processes prior to the update of the main focus.
202  /// @param Code The MetaCode containing the input to be processed.
203  void HandlePreFocusMouseInput(const Input::MetaCode& Code);
204  /// @internal
205  /// @brief Handles controller processes prior to the update of the main focus.
206  /// @param Code The MetaCode containing the input to be processed.
207  void HandlePreFocusControllerInput(const Input::MetaCode& Code);
208  /// @internal
209  /// @brief Handles keyboard processes after the update of the main focus.
210  /// @param Code The MetaCode containing the input to be processed.
211  void HandlePostFocusKeyboardInput(const Input::MetaCode& Code);
212  /// @internal
213  /// @brief Handles mouse processes after the update of the main focus.
214  /// @param Code The MetaCode containing the input to be processed.
215  void HandlePostFocusMouseInput(const Input::MetaCode& Code);
216  /// @internal
217  /// @brief Handles controller processes after the update of the main focus.
218  /// @param Code The MetaCode containing the input to be processed.
219  void HandlePostFocusControllerInput(const Input::MetaCode& Code);
220 
221  /// @internal
222  /// @brief Updates the current focus to a new target.
223  /// @param NewFocus The new widget obtaining the UI focus.
224  /// @return Returns true if the target widget successfully gained focus, false otherwise.
225  Boole SwitchFocus(Widget* NewFocus);
226  /// @internal
227  /// @brief Gets whether or not the systems current focus is locked.
228  /// @return Returns true if the focus is currently locked, false otherwise.
229  Boole FocusIsLocked() const;
230  public:
231  /// @brief Class Constructor.
232  UIManager();
233  /// @brief XML constructor.
234  /// @param XMLNode The node of the xml document to construct from.
235  UIManager(const XML::Node& XMLNode);
236  /// @brief Class Destructor.
237  virtual ~UIManager();
238 
239  ///////////////////////////////////////////////////////////////////////////////
240  // Texture Atlas Management
241 
242  /// @brief Loads a Mezzanine Texture Atlas file for use with Screens.
243  /// @param Name The name of the file to be loaded.
244  /// @param Group The resource group where the MTA file can be found.
245  void LoadMTA(const String& Name, const String& Group = "UI");
246 
247  /// @brief Gets a loaded Atlas being stored in this manager.
248  /// @param AtlasName The name of the Atlas, which is usually the name of the file without the extension.
249  /// @return Returns a pointer to the requested Atlas, or NULL if it doesn't exist.
250  TextureAtlas* GetAtlas(const String& AtlasName);
251  /// @brief Gets a loaded Atlas being stored in this manager.
252  /// @param AtlasName The name of the Atlas, which is usually the name of the file without the extension.
253  /// @return Returns a pointer to the requested Atlas, or throws an exception if it doesn't exist.
254  TextureAtlas* GetAtlasExcept(const String& AtlasName);
255  /// @brief Destroys a loaded texture atlas.
256  /// @param ToBeDestroyed A pointer to the texture atlas that will be destroyed.
257  void DestroyAtlas(TextureAtlas* ToBeDestroyed);
258  /// @brief Destroys all loaded texture atlases.
259  void DestroyAllAtlases();
260 
261  ///////////////////////////////////////////////////////////////////////////////
262  // Screen Management
263 
264  /// @brief Creates an internal HUD screen.
265  /// @details Screens are the base set of renderable UI you can use, allowing you to switch entire sets of UI's
266  /// on the fly if needed. For performance reasons you should always keep the number of screens you create to a minimum.
267  /// @param ScreenName The name to be given to the screen.
268  /// @param Atlas The name of a previously loaded mta file to be used with this screen.
269  /// @param WindowViewport The viewport to create this screen in.
270  /// @param ZOrder The ZOrder determining the position relative to the other screens.
271  /// @return Returns a pointer to the created Screen.
272  Screen* CreateScreen(const String& ScreenName, const String& Atlas, Graphics::Viewport* WindowViewport, const UInt16 ZOrder);
273  /// @brief Gets a screen by name.
274  /// @param Name The name of the Screen to be retrieved.
275  /// @return Returns a pointer to the screen of the specified name.
276  Screen* GetScreen(const String& Name) const;
277  /// @brief Gets a screen by index.
278  /// @param Index The index of the Screen to be retrieved.
279  /// @return Returns a pointer to the screen at the specified index.
280  Screen* GetScreen(const Whole& Index) const;
281  /// @brief Gets the number of screens created and stored in this manager.
282  /// @return Returns the number of screens this manager is storing.
283  Whole GetNumScreens() const;
284  /// @brief Deletes a screen and removes all trace of it from the manager.
285  /// @details Destroying a screen will also destroy all of it's layers, and everything contained in those layers.
286  /// @param Screen The screen to be destroyed.
287  void DestroyScreen(Screen* Screen);
288  /// @brief Deletes all screens stored in this manager.
289  void DestroyAllScreens();
290 
291  /// @brief Shows all screens bound to a specific viewport.
292  /// @param WindowViewport The viewport bound to all screens to be shown.
293  /// @param Exclude Optional parameter that will make a single screen be excluded from this operation.
294  void ShowScreensOnViewport(Graphics::Viewport* WindowViewport, Screen* Exclude = NULL);
295  /// @brief Shows all screens owned by this manager.
296  /// @param Exclude Optional parameter that will make a single screen be excluded from this operation.
297  void ShowAllScreens(Screen* Exclude = NULL);
298  /// @brief Hides all screens bound to a specific viewport.
299  /// @param WindowViewport The viewport bound to all screens to be hidden.
300  /// @param Exclude Optional parameter that will make a single screen be excluded from this operation.
301  void HideScreensOnViewport(Graphics::Viewport* WindowViewport, Screen* Exclude = NULL);
302  /// @brief Hides all screens owned by this manager.
303  /// @param Exclude Optional parameter that will make a single screen be excluded from this operation.
304  void HideAllScreens(Screen* Exclude = NULL);
305  /// @brief Gets the lowest ZOrder screen that is visible on a viewport.
306  /// @param WindowViewport The viewport to check for a visible screen.
307  /// @return Returns a pointer to the screen at the lowest ZOrder currently being shown on the specified viewport.
308  Screen* GetLowestVisibleScreenOnViewport(Graphics::Viewport* WindowViewport) const;
309  /// @brief Gets the highest ZOrder screen that is visible on a viewport.
310  /// @param WindowViewport The viewport to check for a visible screen.
311  /// @return Returns a pointer to the screen at the highest ZOrder currently being shown on the specified viewport.
312  Screen* GetHighestVisibleScreenOnViewport(Graphics::Viewport* WindowViewport) const;
313 
314  ///////////////////////////////////////////////////////////////////////////////
315  // HotKey Management
316 
317  /// @brief Binds a key to a button.
318  /// @details This function allows buttons to behave like they are pressed without mouse input.
319  /// @param HotKey The key or button (on the input device) to activate the button.
320  /// @param BoundButton The button being bound to the hotkey.
321  void BindHotKey(const Input::MetaCode& HotKey, Button* BoundButton);
322  /// @brief Removes a previously set hotkey binding.
323  /// @param HotKey The key or button (on the input device) to activate the button.
324  /// @param BoundButton The button currently bound to the hotkey.
325  void UnbindHotKey(const Input::MetaCode& HotKey, Button* BoundButton);
326 
327  ///////////////////////////////////////////////////////////////////////////////
328  // Activation Management
329 
330  /// @brief Enables whether or not to automatically set the activation key or button for UI buttons.
331  /// @details If true, this will cause every UI button to have keyboard keys or mouse buttons added with
332  /// AddButtonAutoRegister() to be added as activation keys or buttons immediately after they are created. @n
333  /// Manager Default Setting: False.
334  /// @param Enable Whether or not to enable this feature.
335  void EnableButtonAutoRegister(Boole Enable);
336  /// @brief Gets whether or not the ButtonAutoRegister feature is enabled.
337  /// @return Returns a Boole indicating whether or not the ButtonAutoRegister feature is enabled.
338  Boole ButtonAutoRegisterEnabled() const;
339  /// @brief Adds a key or button that will be auto-registered with every created UI button.
340  /// @note Buttons expect the input to be a button of some sort, but do not descriminate based on device. If you provide an
341  /// input that is not a Mouse, Keyboard, or Controller button then checks inside the button will fail and the button won't
342  /// activate or deactivate.
343  /// @param Code The input code for the keyboard key or mouse button to be added to the list of codes to be auto-registered.
344  void AddAutoRegisterCode(const Input::MetaCode& Code);
345  /// @brief Removes a previously set auto-registering input code.
346  /// @param Code The input code to be removed from the list of auto-registering codes.
347  void RemoveAutoRegisterCode(const Input::MetaCode& Code);
348  /// @brief Removes all auto-registering input codes.
349  void RemoveAllAutoRegisterCodes();
350  /// @brief Gets the list of codes that will be auto-registered with each UI button.
351  /// @return Returns a pointer to the vector containing all the codes to be auto-registered with every UI button.
352  const InputContainer& GetAutoRegisteredCodes() const;
353 
354  ///////////////////////////////////////////////////////////////////////////////
355  // MarkupParser Management
356 
357  /// @brief Registers a new MarkupParser with this Manager.
358  /// @exception This method will thrown a "II_DUPLICATE_IDENTITY_EXCEPTION" if the provided name is already registered.
359  /// @param ParserName The name to be given to the registered MarkupParser.
360  /// @param ToAdd A pointer to the MarkupParser to be registered with the given name.
361  void RegisterMarkupParser(const String& ParserName, MarkupParser* ToAdd);
362  /// @brief Checks to see if a MarkupParser has already been registsered under a specific name.
363  /// @param ParserName The name of the MarkupParser to check for.
364  /// @return Returns true if a MarkupParser is registered under the specified name.
365  Boole IsMarkupParserRegistered(const String& ParserName) const;
366  /// @brief Gets a MarkupParser by it's registered name.
367  /// @param ParserName The name of the MarkupParser to retrieve.
368  /// @return Returns a pointer to the requested MarkupParser, or NULL if none are registered under the specified name.
369  MarkupParser* GetMarkupParser(const String& ParserName) const;
370  /// @brief Removes a MarkupParser from this manager.
371  /// @param ParserName The name of the MarkupParser to be removed.
372  void UnregisterMarkupParser(const String& ParserName);
373  /// @brief Removes all MarkupParsers from this manager.
374  void UnregisterAllMarkupParsers();
375  /// @brief Removes and destroys a MarkupParser from this manager.
376  /// @param ParserName The name of the MarkupParser to be destroyed.
377  void DestroyMarkupParser(const String& ParserName);
378  /// @brief Removes and destroys all MarkupParsers from this manager.
379  void DestroyAllMarkupParsers();
380 
381  ///////////////////////////////////////////////////////////////////////////////
382  // Fetch Methods
383 
384  /// @brief Gets the Widget the mouse is hovering over.
385  /// @return Returns a pointer to the widget, or NULL if it's not over any visable buttons.
386  Widget* GetHoveredWidget() const;
387  /// @brief Gets the current widget being controlled.
388  /// @details The widget control is used mostly for manipulating widgets while the mouse is not
389  /// currently hovering over them, such as the click and drag action of scrollbars and resizing windows.
390  /// @return Returns a pointer to the currently controlled widget, or NULL if none are being controlled this frame.
391  Widget* GetWidgetFocus() const;
392  /// @brief Gets this managers Atlas Handler.
393  /// @return Returns a pointer to this managers Atlas Handler.
394  TextureAtlasHandler* GetAtlasHandler() const;
395 
396  ///////////////////////////////////////////////////////////////////////////////
397  // Utility Methods
398 
399  /// @brief Injects a metacode into this manager, allowing the UI system to be aware of it.
400  /// @param Code The MetaCode to be injected and later processed.
401  void InjectInput(const Input::MetaCode& Code);
402  /// @brief Searches all visable screens and layers to see if a Widget is under the given point.
403  /// @details This is called automatically once every frame. Should only be called on manually if
404  /// you need more then one check per frame.
405  /// @param VP A pointer to the viewport to check.
406  /// @param Point The point on screen(in viewport space) to use when checking Widgets.
407  /// @return Returns the hovered Widget if there is one, NULL if not.
408  Widget* CheckWidgetUnderPoint(Graphics::Viewport* VP, const Vector2& Point);
409  /// @brief Checks to see if the mouse is over a UI element.
410  /// @details This should only be called on after this manager does it's main loop items for best results.
411  /// @return Returns true if the mouse is over a visable UI element, false if not.
412  Boole MouseIsInUISystem() const;
413  /// @brief Suggests a glyph index based on the desired actual height.
414  /// @param Height The desired Height of the glyph wanted in pixels.
415  /// @param Atlas The altas to search.
416  /// @return 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.
417  FontResult SuggestGlyphIndex(const Whole& Height, const String& Atlas);
418 
419  /// @brief Updates the UI system based on the most recent inputs.
420  virtual void UpdateScreens();
421 
422  /// @copydoc ManagerBase::Initialize()
423  virtual void Initialize();
424  /// @copydoc ManagerBase::Deinitialize()
425  virtual void Deinitialize();
426 
427  /// @brief Gets the work unit responsible for updating the widgets in this manager.
428  /// @return Returns a pointer to the WidgetUpdateWorkUnit used by this manager.
429  WidgetUpdateWorkUnit* GetWidgetUpdateWork();
430 
431  ///////////////////////////////////////////////////////////////////////////////
432  // Type Identifier Methods
433 
434  /// @copydoc ManagerBase::GetInterfaceType()
435  virtual ManagerType GetInterfaceType() const;
436  /// @copydoc ManagerBase::GetImplementationTypeName()
437  virtual String GetImplementationTypeName() const;
438  };//UIManager
439 
440  ///////////////////////////////////////////////////////////////////////////////
441  /// @class DefaultUIManagerFactory
442  /// @headerfile uimanager.h
443  /// @brief A factory responsible for the creation and destruction of the default uimanager.
444  ///////////////////////////////////////
446  {
447  public:
448  /// @brief Class constructor.
450  /// @brief Class destructor.
451  virtual ~DefaultUIManagerFactory();
452 
453  /// @copydoc ManagerFactory::GetManagerImplName()
454  String GetManagerImplName() const;
455  /// @copydoc ManagerFactory::GetManagerType() const
456  ManagerBase::ManagerType GetManagerType() const;
457 
458  /// @copydoc EntresolManagerFactory::CreateManager(const NameValuePairList&)
459  EntresolManager* CreateManager(const NameValuePairList& Params);
460  /// @copydoc EntresolManagerFactory::CreateManager(const XML::Node&)
461  EntresolManager* CreateManager(const XML::Node& XMLNode);
462  /// @copydoc EntresolManagerFactory::DestroyManager(EntresolManager*)
463  void DestroyManager(EntresolManager* ToBeDestroyed);
464  };//DefaultUIManagerFactory
465  }//UI
466 }//Mezzanine
467 
468 #endif
Widget * WidgetFocus
A pointer to the widget that is currently holding the focus.
Definition: uimanager.h:168
InputContainer::iterator InputIterator
Iterator type for Input::MetaCode instances stored by this class.
Definition: uimanager.h:136
MarkupParserContainer::iterator MarkupParserIterator
Iterator type for MarkupParser instances stored by this class.
Definition: uimanager.h:120
bool Boole
Generally acts a single bit, true or false.
Definition: datatypes.h:173
Default implementation of WorkUnit. This represents on piece of work through time.
Definition: workunit.h:160
ManagerType
A listing of Manager Types.
Definition: managerbase.h:65
UIManager * TargetManager
A pointer to the manager this work unit is processing.
Definition: uimanager.h:78
static const ManagerBase::ManagerType InterfaceType
A ManagerType enum value used to describe the type of interface/functionality this manager provides...
Definition: uimanager.h:145
This is a base class for factories that construct managers used by the Entresol class.
std::map< String, MarkupParser * > MarkupParserContainer
Basic container type for MarkupParser storage by this class.
Definition: uimanager.h:118
WidgetUpdateWorkUnit * WidgetUpdateWork
The work unit that updates all of the widgets in the UI system.
Definition: uimanager.h:177
TextureAtlasHandler * AtlasHandler
A pointer to the class responsible for Atlas tasks in the UI system.
Definition: uimanager.h:171
This is a collection of smaller textures packed into a larger texture, intended to increase UI perfor...
Definition: textureatlas.h:71
static const String ImplementationName
A String containing the name of this manager implementation.
Definition: uimanager.h:143
HotKeyHandler * HKHandler
A pointer to the class responsible for HotKey tasks in the UI system.
Definition: uimanager.h:174
Boole ButtonAutoRegister
Stores whether or not newly created buttons will have activation codes binded to them automatically...
Definition: uimanager.h:183
std::vector< Input::MetaCode > InputContainer
Basic container type for Input::MetaCode storage by this class.
Definition: uimanager.h:134
InputContainer::const_iterator ConstInputIterator
Const Iterator type for Input::MetaCode instances stored by this class.
Definition: uimanager.h:138
ScreenContainer Screens
A container storing all the Screens created in the UI system.
Definition: uimanager.h:152
Input::MetaCode FocusLockCode
Stores the Input that locked the current focus.
Definition: uimanager.h:162
A thread specific collection of double-buffered and algorithm specific resources. ...
ScreenContainer::const_reverse_iterator ConstReverseScreenIterator
Const Reverse Iterator type for Screen instances stored by this class.
Definition: uimanager.h:132
uint16_t UInt16
An 16-bit unsigned integer.
Definition: datatypes.h:122
This class is for creating and managing viewports within a game window.
Definition: viewport.h:65
This is the base class for all managers that do no describe properties of a single world...
ScreenContainer::const_iterator ConstScreenIterator
Const Iterator type for Screen instances stored by this class.
Definition: uimanager.h:128
A light-weight handle for manipulating nodes in DOM tree.
Definition: node.h:89
ScreenContainer::iterator ScreenIterator
Iterator type for Screen instances stored by this class.
Definition: uimanager.h:126
This is used to represent a point on a 2 dimentional area, such as a screen.
Definition: vector2.h:63
This class is responsible for the registration and handling of hotkeys in the UI system.
Definition: hotkeyhandler.h:58
This is the base class for all widgets.
Definition: widget.h:126
MarkupParserContainer::const_iterator ConstMarkupParserIterator
Const Iterator type for MarkupParser instances stored by this class.
Definition: uimanager.h:122
std::vector< UI::Screen * > ScreenContainer
Basic container type for Screen storage by this class.
Definition: uimanager.h:124
std::list< NameValuePair > NameValuePairList
This is a datatype mostly used for describing settings or parameters that can't be declared in advanc...
Definition: datatypes.h:206
This Determines the kind of user input.
Definition: metacode.h:93
A factory responsible for the creation and destruction of the default uimanager.
Definition: uimanager.h:445
Widget * HoveredWidget
A pointer to the current widget in the UI system the mouse is hovered over.
Definition: uimanager.h:165
std::pair< String, Real > FontResult
An std::pair type for returning the result of a font suggestion.
Definition: uimanager.h:140
This class is responsible for any and all user interactions with the User interface/HUD.
Definition: uimanager.h:114
#define MEZZ_LIB
Some platforms require special decorations to denote what is exported/imported in a share library...
The bulk of the engine components go in this namspace.
Definition: actor.cpp:56
unsigned long Whole
Whole is an unsigned integer, it will be at least 32bits in size.
Definition: datatypes.h:151
This class is a helper class, specifically for use as a button.
Definition: button.h:66
This is a base class for the parsing of markup texts contained in text layers.
Definition: markupparser.h:126
This handles the creation, storage and overall handling of Texture Atlases.
MarkupParserContainer MarkupParsers
A container storing all the registered/known markup parsers.
Definition: uimanager.h:149
Boole MouseMoved
Stores whether or not the mouse moved since the last time the UI was updated.
Definition: uimanager.h:186
This class is a helper class for creating UI's. It is responsible for storing and keeping track of al...
Definition: screen.h:142
std::string String
A datatype used to a series of characters.
Definition: datatypes.h:159
Threading::DefaultThreadSpecificStorage::Type * ThreadResources
Can be used for thread safe logging and other thread specific resources.
Definition: uimanager.h:180
This is a Mezzanine::Threading::iWorkUnit for the updating of widgets in the UI system.
Definition: uimanager.h:73
ScreenContainer::reverse_iterator ReverseScreenIterator
Reverse Iterator type for Screen instances stored by this class.
Definition: uimanager.h:130
This file has the definition of the workunit.
InputContainer InjectedInputs
A container storing all of the Inputs generated/tracked during the last UI update.
Definition: uimanager.h:158
InputContainer AutoRegisterCodes
A container storing all of the Inputs buttons will be set to activate in response to...
Definition: uimanager.h:155