The Battle for Wesnoth
1.13.4+dev
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
cursor.hpp
Go to the documentation of this file.
1
/*
2
Copyright (C) 2003 - 2016 by David White <
[email protected]
>
3
Part of the Battle for Wesnoth Project http://www.wesnoth.org/
4
5
This program is free software; you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation; either version 2 of the License, or
8
(at your option) any later version.
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY.
11
12
See the COPYING file for more details.
13
*/
14
15
/** @file */
16
17
#ifndef CURSOR_HPP_INCLUDED
18
#define CURSOR_HPP_INCLUDED
19
20
struct
surface
;
21
22
namespace
cursor
23
{
24
25
struct
manager
26
{
27
manager
();
28
~manager
();
29
};
30
31
enum
CURSOR_TYPE
{
NORMAL
,
WAIT
,
MOVE
,
ATTACK
,
HYPERLINK
,
MOVE_DRAG
,
ATTACK_DRAG
,
NO_CURSOR
,
NUM_CURSORS
};
32
33
/**
34
* Use the default parameter to reset cursors.
35
* e.g. after a change in color cursor preferences
36
*/
37
void
set
(
CURSOR_TYPE
type
=
NUM_CURSORS
);
38
void
set_dragging
(
bool
drag);
39
CURSOR_TYPE
get
();
40
41
// These aren't used, but leaving the prototypes doesn't hurt and allows avoiding an SDL include
42
void
draw
(
surface
screen
);
43
void
undraw
(
surface
screen
);
44
45
void
set_focus
(
bool
focus);
46
47
struct
setter
48
{
49
setter
(
CURSOR_TYPE
type
);
50
~setter
();
51
52
private
:
53
CURSOR_TYPE
old_
;
54
};
55
56
}
// end namespace cursor
57
58
#endif
cursor::WAIT
Definition:
cursor.hpp:31
cursor::set
void set(CURSOR_TYPE type)
Use the default parameter to reset cursors.
Definition:
cursor.cpp:154
type
GLuint GLuint GLsizei GLenum type
Definition:
glew.h:1221
resources::screen
game_display * screen
Definition:
resources.cpp:27
cursor::NUM_CURSORS
Definition:
cursor.hpp:31
cursor::ATTACK_DRAG
Definition:
cursor.hpp:31
cursor::manager::~manager
~manager()
Definition:
cursor.cpp:148
cursor::setter
Definition:
cursor.hpp:47
cursor::CURSOR_TYPE
CURSOR_TYPE
Definition:
cursor.hpp:31
cursor::set_dragging
void set_dragging(bool drag)
Definition:
cursor.cpp:174
cursor::set_focus
void set_focus(bool focus)
Definition:
cursor.cpp:199
cursor::setter::~setter
~setter()
Definition:
cursor.cpp:212
cursor::MOVE_DRAG
Definition:
cursor.hpp:31
cursor::manager
Definition:
cursor.hpp:25
cursor::draw
void draw(surface screen)
cursor::undraw
void undraw(surface screen)
surface
Definition:
utils.hpp:53
cursor::HYPERLINK
Definition:
cursor.hpp:31
cursor::NO_CURSOR
Definition:
cursor.hpp:31
cursor::manager::manager
manager()
Definition:
cursor.cpp:142
cursor::NORMAL
Definition:
cursor.hpp:31
cursor
Definition:
cursor.cpp:139
cursor::ATTACK
Definition:
cursor.hpp:31
cursor::setter::setter
setter(CURSOR_TYPE type)
Definition:
cursor.cpp:207
cursor::MOVE
Definition:
cursor.hpp:31
cursor::setter::old_
CURSOR_TYPE old_
Definition:
cursor.hpp:53
Generated by
1.8.8