Emergency 20 Dokumentation  4.2.0
StatusOverlayWindowManager.h
Go to the documentation of this file.
1 // Copyright (C) 2012-2018 Promotion Software GmbH
2 
3 
4 //[-------------------------------------------------------]
5 //[ Header guard ]
6 //[-------------------------------------------------------]
7 #pragma once
8 
9 
10 //[-------------------------------------------------------]
11 //[ Includes ]
12 //[-------------------------------------------------------]
14 
15 #include <qsf/gui/GuiDocument.h>
16 
17 #include <unordered_map>
18 
19 
20 //[-------------------------------------------------------]
21 //[ Forward declarations ]
22 //[-------------------------------------------------------]
23 namespace em5
24 {
25  class StatusOverlayWindow;
26 }
27 
28 
29 //[-------------------------------------------------------]
30 //[ Namespace ]
31 //[-------------------------------------------------------]
32 namespace em5
33 {
34 
35 
36  //[-------------------------------------------------------]
37  //[ Classes ]
38  //[-------------------------------------------------------]
44  {
45 
46 
47  //[-------------------------------------------------------]
48  //[ Public methods ]
49  //[-------------------------------------------------------]
50  public:
51  explicit StatusOverlayWindowManager(qsf::GuiContext& guiContext);
53 
54 
55  //[-------------------------------------------------------]
56  //[ Public virtual em5::OverlayWindowManager methods ]
57  //[-------------------------------------------------------]
58  public:
59  virtual void setAllOverlaysVisible(bool visible) override;
60  virtual OverlayWindow* getOverlayWindowInstance(uint64 entityId) override;
61  virtual void releaseOverlayWindowInstance(uint64 entityId) override;
62 
63 
64  //[-------------------------------------------------------]
65  //[ Private definitions ]
66  //[-------------------------------------------------------]
67  private:
68  typedef std::unordered_map<uint64, StatusOverlayWindow*> StatusOverlayWindowMap;
69 
70 
71  //[-------------------------------------------------------]
72  //[ Private data ]
73  //[-------------------------------------------------------]
74  private:
75  bool mAllOverlaysVisible;
76  Rocket::Core::ElementDocument* mElementDocument;
77  StatusOverlayWindowMap mStatusOverlayWindowMap;
78  std::vector<StatusOverlayWindow*> mFreeStatusOverlayWindowList;
79 
80 
81  };
82 
83 
84 //[-------------------------------------------------------]
85 //[ Namespace ]
86 //[-------------------------------------------------------]
87 } // em5
Definition: ActionPriority.h:13
virtual OverlayWindow * getOverlayWindowInstance(uint64 entityId) override
Return a new or a resuable status overlay window instance.
virtual void releaseOverlayWindowInstance(uint64 entityId) override
Return the status overlay window instance.
uint64_t uint64
Definition: PlatformTypes.h:184
Ingame Graphical User Interface (GUI) context class.
Definition: GuiContext.h:62
StatusOverlayWindowManager(qsf::GuiContext &guiContext)
EMERGENCY 5 overlay window base class.
Definition: OverlayWindow.h:32
EMERGENCY 5 overlay window manager base class.
Definition: OverlayWindowManager.h:43
EMERGENCY 5 status overlay window manager.
Definition: StatusOverlayWindowManager.h:43
virtual void setAllOverlaysVisible(bool visible) override
Set the visibility state of all overlays.