The Battle for Wesnoth
1.21.0-dev
Loading...
Searching...
No Matches
cursor.hpp
Go to the documentation of this file.
1
/*
2
Copyright (C) 2003 - 2025
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
19
namespace
cursor
20
{
21
22
struct
manager
23
{
24
manager
();
25
~manager
();
26
};
27
28
enum
CURSOR_TYPE
{
NORMAL
,
WAIT
,
IBEAM
,
MOVE
,
ATTACK
,
HYPERLINK
,
MOVE_DRAG
,
ATTACK_DRAG
,
NO_CURSOR
,
NUM_CURSORS
};
29
30
/**
31
* Use the default parameter to reset cursors.
32
* e.g. after a change in color cursor preferences
33
*/
34
void
set
(
CURSOR_TYPE
type =
NUM_CURSORS
);
35
void
set_dragging
(
bool
drag);
36
CURSOR_TYPE
get
();
37
38
void
set_focus
(
bool
focus);
39
40
struct
setter
41
{
42
setter
(
CURSOR_TYPE
type);
43
~setter
();
44
45
private
:
46
CURSOR_TYPE
old_
;
47
};
48
49
}
// end namespace cursor
cursor
Definition
cursor.cpp:35
cursor::get
CURSOR_TYPE get()
Definition
cursor.cpp:185
cursor::set_dragging
void set_dragging(bool drag)
Definition
cursor.cpp:165
cursor::CURSOR_TYPE
CURSOR_TYPE
Definition
cursor.hpp:28
cursor::WAIT
@ WAIT
Definition
cursor.hpp:28
cursor::ATTACK
@ ATTACK
Definition
cursor.hpp:28
cursor::MOVE_DRAG
@ MOVE_DRAG
Definition
cursor.hpp:28
cursor::NORMAL
@ NORMAL
Definition
cursor.hpp:28
cursor::IBEAM
@ IBEAM
Definition
cursor.hpp:28
cursor::ATTACK_DRAG
@ ATTACK_DRAG
Definition
cursor.hpp:28
cursor::HYPERLINK
@ HYPERLINK
Definition
cursor.hpp:28
cursor::NUM_CURSORS
@ NUM_CURSORS
Definition
cursor.hpp:28
cursor::NO_CURSOR
@ NO_CURSOR
Definition
cursor.hpp:28
cursor::MOVE
@ MOVE
Definition
cursor.hpp:28
cursor::set
void set(CURSOR_TYPE type)
Use the default parameter to reset cursors.
Definition
cursor.cpp:151
cursor::set_focus
void set_focus(bool focus)
Definition
cursor.cpp:190
cursor::manager
Definition
cursor.hpp:23
cursor::manager::manager
manager()
Definition
cursor.cpp:142
cursor::manager::~manager
~manager()
Definition
cursor.cpp:147
cursor::setter
Definition
cursor.hpp:41
cursor::setter::~setter
~setter()
Definition
cursor.cpp:205
cursor::setter::old_
CURSOR_TYPE old_
Definition
cursor.hpp:46
Generated by
1.9.8