OpenXcom  1.0
Open-source clone of the original X-Com
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Cursor.h
1 /*
2  * Copyright 2010-2014 OpenXcom Developers.
3  *
4  * This file is part of OpenXcom.
5  *
6  * OpenXcom is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * OpenXcom is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with OpenXcom. If not, see <http://www.gnu.org/licenses/>.
18  */
19 #ifndef OPENXCOM_CURSOR_H
20 #define OPENXCOM_CURSOR_H
21 
22 #include "../Engine/Surface.h"
23 
24 namespace OpenXcom
25 {
26 
27 class Action;
28 
34 class Cursor : public Surface
35 {
36 private:
37  Uint8 _color;
38 
39 public:
41  Cursor(int width, int height, int x = 0, int y = 0);
43  ~Cursor();
45  void handle(Action *action);
47  void setColor(Uint8 color);
49  Uint8 getColor() const;
51  void draw();
52 };
53 
54 }
55 
56 #endif
Container for all the information associated with a given user action, like mouse clicks...
Definition: Action.h:34
~Cursor()
Cleans up the cursor.
Definition: Cursor.cpp:44
Uint8 getColor() const
Gets the cursor's color.
Definition: Cursor.cpp:76
Cursor(int width, int height, int x=0, int y=0)
Creates a new cursor with the specified size and position.
Definition: Cursor.cpp:37
void draw()
Draws the cursor.
Definition: Cursor.cpp:84
void handle(Action *action)
Handles mouse events.
Definition: Cursor.cpp:53
Element that is blit (rendered) onto the screen.
Definition: Surface.h:39
Mouse cursor that replaces the system cursor.
Definition: Cursor.h:34
void setColor(Uint8 color)
Sets the cursor's color.
Definition: Cursor.cpp:66