ScummVM API documentation
input_translator.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef TITANIC_INPUT_TRANSLATOR_H
23 #define TITANIC_INPUT_TRANSLATOR_H
24 
25 #include "common/events.h"
26 #include "common/keyboard.h"
27 #include "titanic/messages/mouse_messages.h"
28 
29 namespace Titanic {
30 
31 class CInputHandler;
32 
34 private:
38  int getButtons(int special) const;
39 
40 public:
41  CInputHandler *_inputHandler;
42 public:
43  CInputTranslator(CInputHandler *inputHandler);
44 
45  void mouseMove(int special, const Point &pt);
46  void leftButtonDown(int special, const Point &pt);
47  void leftButtonUp(int special, const Point &pt);
48  void leftButtonDoubleClick(int special, const Point &pt);
49  void middleButtonDown(int special, const Point &pt);
50  void middleButtonUp(int special, const Point &pt);
51  void middleButtonDoubleClick(int special, const Point &pt);
52  void mouseWheel(bool wheelUp, const Point &pt);
53  void keyDown(const Common::KeyState &keyState);
54  void actionStart(const Common::CustomEventType &action);
55 
59  bool isMousePressed() const;
60 };
61 
62 } // End of namespace Titanic
63 
64 #endif /* TITANIC_INPUT_TRANSLATOR_H */
Definition: input_translator.h:33
uint32 CustomEventType
Definition: events.h:204
Definition: rect.h:144
Definition: arm.h:30
Definition: input_handler.h:35
Definition: keyboard.h:294