The Battle for Wesnoth
1.17.12+dev
cursor.hpp
Go to the documentation of this file.
1
/*
2
Copyright (C) 2003 - 2022
3
by David White <dave@whitevine.net>
4
Part of the Battle for Wesnoth Project https://www.wesnoth.org/
5
6
This program 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 2 of the License, or
9
(at your option) any later version.
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY.
12
13
See the COPYING file for more details.
14
*/
15
16
#pragma once
17
18
class
surface
;
19
20
namespace
cursor
21
{
22
23
struct
manager
24
{
25
manager
();
26
~manager
();
27
};
28
29
enum
CURSOR_TYPE
{
NORMAL
,
WAIT
,
IBEAM
,
MOVE
,
ATTACK
,
HYPERLINK
,
MOVE_DRAG
,
ATTACK_DRAG
,
NO_CURSOR
,
NUM_CURSORS
};
30
31
/**
32
* Use the default parameter to reset cursors.
33
* e.g. after a change in color cursor preferences
34
*/
35
void
set
(
CURSOR_TYPE
type
=
NUM_CURSORS
);
36
void
set_dragging
(
bool
drag);
37
CURSOR_TYPE
get
();
38
39
void
set_focus
(
bool
focus);
40
41
struct
setter
42
{
43
setter
(
CURSOR_TYPE
type);
44
~
setter
();
45
46
private
:
47
CURSOR_TYPE
old_
;
48
};
49
50
}
// end namespace cursor
cursor::WAIT
Definition:
cursor.hpp:29
cursor::NUM_CURSORS
Definition:
cursor.hpp:29
cursor::ATTACK_DRAG
Definition:
cursor.hpp:29
surface
Definition:
surface.hpp:24
cursor::manager::~manager
~manager()
Definition:
cursor.cpp:171
cursor::setter
Definition:
cursor.hpp:41
cursor::CURSOR_TYPE
CURSOR_TYPE
Definition:
cursor.hpp:29
cursor::set_dragging
void set_dragging(bool drag)
Definition:
cursor.cpp:196
cursor::set_focus
void set_focus(bool focus)
Definition:
cursor.cpp:221
cursor::MOVE_DRAG
Definition:
cursor.hpp:29
cursor::IBEAM
Definition:
cursor.hpp:29
cursor::manager
Definition:
cursor.hpp:23
cursor::HYPERLINK
Definition:
cursor.hpp:29
desktop::notifications::type
type
Definition:
notifications.hpp:24
cursor::NO_CURSOR
Definition:
cursor.hpp:29
cursor::manager::manager
manager()
Definition:
cursor.cpp:165
cursor::NORMAL
Definition:
cursor.hpp:29
cursor
Definition:
cursor.cpp:32
cursor::ATTACK
Definition:
cursor.hpp:29
cursor::MOVE
Definition:
cursor.hpp:29
cursor::setter::old_
CURSOR_TYPE old_
Definition:
cursor.hpp:47
Generated by
1.8.13