Emergency 20 Dokumentation  4.2.0
BuildingOverlayWindowManager.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 BuildingOverlayWindow;
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 BuildingOverlayWindowManager(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, BuildingOverlayWindow*> BuildingOverlayWindowMap;
69 
70 
71  //[-------------------------------------------------------]
72  //[ Private methods ]
73  //[-------------------------------------------------------]
74  private:
75  void onReloadGui();
76  void createElementDocument();
77  void destroyElementDocument();
78  void destroyAllWindows();
79 
80 
81  //[-------------------------------------------------------]
82  //[ Private data ]
83  //[-------------------------------------------------------]
84  private:
85  bool mAllOverlaysVisible;
86  Rocket::Core::ElementDocument* mElementDocument;
87  BuildingOverlayWindowMap mBuildingOverlayWindowMap;
88  std::vector<BuildingOverlayWindow*> mFreeBuildingOverlayWindowList;
89 
90 
91  };
92 
93 
94 //[-------------------------------------------------------]
95 //[ Namespace ]
96 //[-------------------------------------------------------]
97 } // em5
Definition: ActionPriority.h:13
EMERGENCY 5 building overlay window manager.
Definition: BuildingOverlayWindowManager.h:43
uint64_t uint64
Definition: PlatformTypes.h:184
virtual OverlayWindow * getOverlayWindowInstance(uint64 entityId) override
Return a new or a resuable status overlay window instance.
Ingame Graphical User Interface (GUI) context class.
Definition: GuiContext.h:62
virtual void setAllOverlaysVisible(bool visible) override
Set the visibility state of all overlays.
EMERGENCY 5 overlay window base class.
Definition: OverlayWindow.h:32
virtual void releaseOverlayWindowInstance(uint64 entityId) override
Return the status overlay window instance.
EMERGENCY 5 overlay window manager base class.
Definition: OverlayWindowManager.h:43
BuildingOverlayWindowManager(qsf::GuiContext &guiContext)