Emergency 20 Dokumentation  4.2.0
MouseCursorManager.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 //[-------------------------------------------------------]
13 #include "em5/Export.h"
14 
15 #include <boost/noncopyable.hpp>
16 
17 
18 //[-------------------------------------------------------]
19 //[ Forward declarations ]
20 //[-------------------------------------------------------]
21 namespace qsf
22 {
23  class GuiContext;
24 }
25 namespace Rocket
26 {
27  namespace Core
28  {
29  class ElementDocument;
30  }
31 }
32 
33 
34 //[-------------------------------------------------------]
35 //[ Namespace ]
36 //[-------------------------------------------------------]
37 namespace em5
38 {
39 
40 
41  //[-------------------------------------------------------]
42  //[ Classes ]
43  //[-------------------------------------------------------]
48  class EM5_API_EXPORT MouseCursorManager : public boost::noncopyable
49  {
50 
51 
52  //[-------------------------------------------------------]
53  //[ Public methods ]
54  //[-------------------------------------------------------]
55  public:
63  explicit MouseCursorManager(qsf::GuiContext& guiContext);
64 
69  virtual ~MouseCursorManager();
70 
75  void startup();
76 
81  void setMouseCursor(const std::string& cursorName);
82 
87  void resetMouseCursor();
88 
96  void showCursor(bool show);
97 
98 
99  //[-------------------------------------------------------]
100  //[ Private methods ]
101  //[-------------------------------------------------------]
102  private:
103  bool loadMouseCursor(const std::string& cursorName);
104  void setMouseCursorCssClass(const std::string& mouseCursorCssClassName);
105 
106 
107  //[-------------------------------------------------------]
108  //[ Private data ]
109  //[-------------------------------------------------------]
110  private:
111  qsf::GuiContext& mGuiContext;
112  Rocket::Core::ElementDocument* mCursorDocument;
113  std::string mCurrentMouseCursorName;
114  int mCursorShowCalls;
115 
116 
117  };
118 
119 
120 //[-------------------------------------------------------]
121 //[ Namespace ]
122 //[-------------------------------------------------------]
123 } // em5
Definition: ActionPriority.h:13
#define EM5_API_EXPORT
Definition: Export.h:28
Definition: OverlayComponent.h:29
Definition: PickupPersonByParamedicAction.h:21
Ingame Graphical User Interface (GUI) context class.
Definition: GuiContext.h:62
Manager for handling mouse cursors via libRocket.
Definition: MouseCursorManager.h:48