ScummVM API documentation
mouse_cursor.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 ULTIMA_SHARED_CORE_MOUSE_CURSOR_H
23 #define ULTIMA_SHARED_CORE_MOUSE_CURSOR_H
24 
25 #include "common/scummsys.h"
26 #include "ultima/shared/core/rect.h"
27 #include "common/stream.h"
28 
29 namespace Ultima {
30 namespace Shared {
31 
32 #define CURSOR_WIDTH 16
33 #define CURSOR_HEIGHT 16
34 /*
35 namespace Early {
36 
37 enum CursorId {
38  CURSOR_ARROW = 0
39 };
40 
41 } // End of namespace Early
42 
43 namespace Later {
44 namespace Xanth {
45 
46 enum CursorId {
47  CURSOR_BIG_ARROW = 0,
48  CURSOR_SMALL_ARROW = 1,
49  CURSOR_TICK = 2,
50  CURSOR_HOURGLASS = 3
51 };
52 
53 } // End of namespace Xanth
54 } // End of namespace Later
55 */
56 
60 class MouseCursor {
61  struct MouseCursorData {
62  Point _hotspot;
63  uint16 _pixels[16];
64  uint16 _mask[16];
65 
66  void load(Common::SeekableReadStream &s);
67  };
68 private:
70  int _cursorId;
71 private:
75  void loadCursors();
76 public:
77  MouseCursor();
78 
82  void setCursor(int cursorId);
83 
87  int getCursor() const { return _cursorId; }
88 
92  void show();
93 
97  void hide();
98 };
99 
100 } // End of namespace Shared
101 } // End of namespace Ultima
102 
103 #endif
Definition: mouse_cursor.h:60
Definition: stream.h:745
Definition: detection.h:27
Definition: rect.h:45
int getCursor() const
Definition: mouse_cursor.h:87
void setCursor(int cursorId)