OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
inputmanager.hpp
Go to the documentation of this file.
1 #ifndef GAME_MWBASE_INPUTMANAGER_H
2 #define GAME_MWBASE_INPUTMANAGER_H
3 
4 #include <string>
5 #include <set>
6 #include <vector>
7 
8 #include <stdint.h>
9 
10 namespace Loading
11 {
12  class Listener;
13 }
14 
15 namespace ESM
16 {
17  class ESMReader;
18  class ESMWriter;
19 }
20 
21 namespace MWBase
22 {
25  {
26  InputManager (const InputManager&);
28 
31 
32  public:
33 
35 
37  virtual void clear() = 0;
38 
39  virtual ~InputManager() {}
40 
41  virtual bool isWindowVisible() = 0;
42 
43  virtual void update(float dt, bool disableControls, bool disableEvents=false) = 0;
44 
45  virtual void changeInputMode(bool guiMode) = 0;
46 
47  virtual void processChangedSettings(const std::set< std::pair<std::string, std::string> >& changed) = 0;
48 
49  virtual void setDragDrop(bool dragDrop) = 0;
50 
51  virtual void toggleControlSwitch (const std::string& sw, bool value) = 0;
52  virtual bool getControlSwitch (const std::string& sw) = 0;
53 
54  virtual std::string getActionDescription (int action) = 0;
55  virtual std::string getActionKeyBindingName (int action) = 0;
56  virtual std::string getActionControllerBindingName (int action) = 0;
57  virtual std::string sdlControllerAxisToString(int axis) = 0;
58  virtual std::string sdlControllerButtonToString(int button) = 0;
60  virtual std::vector<int> getActionKeySorting() = 0;
62  virtual std::vector<int> getActionControllerSorting() = 0;
63  virtual int getNumActions() = 0;
65  virtual void enableDetectingBindingMode (int action, bool keyboard) = 0;
66  virtual void resetToDefaultKeyBindings() = 0;
67  virtual void resetToDefaultControllerBindings() = 0;
68 
71  virtual bool joystickLastUsed() = 0;
72 
73  virtual int countSavedGameRecords() const = 0;
74  virtual void write(ESM::ESMWriter& writer, Loading::Listener& progress) = 0;
75  virtual void readRecord(ESM::ESMReader& reader, uint32_t type) = 0;
76  };
77 }
78 
79 #endif
InputManager & operator=(const InputManager &)
not implemented
Interface for input manager (implemented in MWInput)
Definition: inputmanager.hpp:24
virtual void update(float dt, bool disableControls, bool disableEvents=false)=0
virtual std::string getActionDescription(int action)=0
Definition: esmreader.hpp:21
virtual ~InputManager()
Definition: inputmanager.hpp:39
virtual void processChangedSettings(const std::set< std::pair< std::string, std::string > > &changed)=0
virtual bool isWindowVisible()=0
virtual int countSavedGameRecords() const =0
virtual void enableDetectingBindingMode(int action, bool keyboard)=0
If keyboard is true, only pay attention to keyboard events. If false, only pay attention to controlle...
virtual void readRecord(ESM::ESMReader &reader, uint32_t type)=0
Definition: loadinglistener.hpp:8
virtual void changeInputMode(bool guiMode)=0
InputManager()
Definition: inputmanager.hpp:34
virtual void resetToDefaultKeyBindings()=0
virtual std::string getActionControllerBindingName(int action)=0
Definition: esmwriter.hpp:17
virtual void write(ESM::ESMWriter &writer, Loading::Listener &progress)=0
virtual int getNumActions()=0
virtual std::string getActionKeyBindingName(int action)=0
virtual std::vector< int > getActionKeySorting()=0
Actions available for binding to keyboard buttons.
virtual bool joystickLastUsed()=0
virtual void toggleControlSwitch(const std::string &sw, bool value)=0
virtual void clear()=0
Clear all savegame-specific data.
virtual void setDragDrop(bool dragDrop)=0
virtual std::vector< int > getActionControllerSorting()=0
Actions available for binding to controller buttons.
virtual void resetToDefaultControllerBindings()=0
virtual bool getControlSwitch(const std::string &sw)=0
virtual std::string sdlControllerAxisToString(int axis)=0
virtual std::string sdlControllerButtonToString(int button)=0