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/keyboard.h"
26 #include "titanic/messages/mouse_messages.h"
27 
28 namespace Titanic {
29 
30 class CInputHandler;
31 
33 private:
37  int getButtons(int special) const;
38 
43  bool isSpecialKey(Common::KeyCode key);
44 public:
45  CInputHandler *_inputHandler;
46 public:
47  CInputTranslator(CInputHandler *inputHandler);
48 
49  void mouseMove(int special, const Point &pt);
50  void leftButtonDown(int special, const Point &pt);
51  void leftButtonUp(int special, const Point &pt);
52  void leftButtonDoubleClick(int special, const Point &pt);
53  void middleButtonDown(int special, const Point &pt);
54  void middleButtonUp(int special, const Point &pt);
55  void middleButtonDoubleClick(int special, const Point &pt);
56  void mouseWheel(bool wheelUp, const Point &pt);
57  void keyDown(const Common::KeyState &keyState);
58 
62  bool isMousePressed() const;
63 };
64 
65 } // End of namespace Titanic
66 
67 #endif /* TITANIC_INPUT_TRANSLATOR_H */
Definition: input_translator.h:32
Definition: rect.h:45
Definition: arm.h:30
Definition: input_handler.h:35
Definition: keyboard.h:294