Simple and Fast Multimedia Library
Documentation for SFML 2.5.0
Initializing search
SFML
Home
Learn
Tutorials
Documentation
Download
Community
Development
Donate
Simple and Fast Multimedia Library
Home
Learn
Tutorials
Documentation
Documentation
SFML 3.1.0
SFML 3.0.2
SFML 3.0.1
SFML 3.0.0
SFML 2.6.2
SFML 2.6.1
SFML 2.6.0
SFML 2.5.1
SFML 2.5.0
SFML 2.4.2
SFML 2.4.1
SFML 2.4.0
SFML 2.3.2
SFML 2.3.1
SFML 2.3
SFML 2.2
SFML 2.1
SFML 2.0
SFML 1.6
Download
Community
Development
Warning
This page refers to an old version of SFML.
Click here to switch to the latest version.
Main Page
Related Pages
Topics
Namespaces
Classes
Files
File List
File Members
Loading...
Searching...
No Matches
SFML
include
SFML
Window
Cursor.hpp
Go to the documentation of this file.
1
2
//
3
// SFML - Simple and Fast Multimedia Library
4
// Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org)
5
//
6
// This software is provided 'as-is', without any express or implied warranty.
7
// In no event will the authors be held liable for any damages arising from the use of this software.
8
//
9
// Permission is granted to anyone to use this software for any purpose,
10
// including commercial applications, and to alter it and redistribute it freely,
11
// subject to the following restrictions:
12
//
13
// 1. The origin of this software must not be misrepresented;
14
// you must not claim that you wrote the original software.
15
// If you use this software in a product, an acknowledgment
16
// in the product documentation would be appreciated but is not required.
17
//
18
// 2. Altered source versions must be plainly marked as such,
19
// and must not be misrepresented as being the original software.
20
//
21
// 3. This notice may not be removed or altered from any source distribution.
22
//
24
25
#ifndef SFML_CURSOR_HPP
26
#define SFML_CURSOR_HPP
27
29
// Headers
31
#include <
SFML/Window/Export.hpp
>
32
#include <
SFML/System/NonCopyable.hpp
>
33
#include <
SFML/System/Vector2.hpp
>
34
35
namespace
sf
36
{
37
namespace
priv
38
{
39
class
CursorImpl;
40
}
41
46
class
SFML_WINDOW_API
Cursor
:
NonCopyable
47
{
48
public
:
49
73
enum
Type
74
{
75
Arrow
,
76
ArrowWait
,
77
Wait
,
78
Text
,
79
Hand
,
80
SizeHorizontal
,
81
SizeVertical
,
82
SizeTopLeftBottomRight
,
83
SizeBottomLeftTopRight
,
84
SizeAll
,
85
Cross
,
86
Help
,
87
NotAllowed
88
};
89
90
public
:
91
101
Cursor
();
102
110
~Cursor
();
111
141
bool
loadFromPixels
(
const
Uint8
* pixels,
Vector2u
size,
Vector2u
hotspot);
142
157
bool
loadFromSystem
(
Type
type);
158
159
private
:
160
161
friend
class
Window
;
162
172
const
priv::CursorImpl& getImpl()
const
;
173
174
private
:
175
177
// Member data
179
priv::CursorImpl* m_impl;
180
};
181
182
}
// namespace sf
183
184
185
#endif
// SFML_CURSOR_HPP
186
187
NonCopyable.hpp
Vector2.hpp
Export.hpp
SFML_WINDOW_API
#define SFML_WINDOW_API
Definition
Window/Export.hpp:43
sf::Cursor::Window
friend class Window
Definition
Cursor.hpp:161
sf::Cursor::Cursor
Cursor()
Default constructor.
sf::Cursor::~Cursor
~Cursor()
Destructor.
sf::Cursor::Type
Type
Enumeration of the native system cursor types.
Definition
Cursor.hpp:74
sf::Cursor::SizeHorizontal
@ SizeHorizontal
Horizontal double arrow cursor.
Definition
Cursor.hpp:80
sf::Cursor::ArrowWait
@ ArrowWait
Busy arrow cursor.
Definition
Cursor.hpp:76
sf::Cursor::Text
@ Text
I-beam, cursor when hovering over a field allowing text entry.
Definition
Cursor.hpp:78
sf::Cursor::SizeAll
@ SizeAll
Combination of SizeHorizontal and SizeVertical.
Definition
Cursor.hpp:84
sf::Cursor::Arrow
@ Arrow
Arrow cursor (default).
Definition
Cursor.hpp:75
sf::Cursor::SizeTopLeftBottomRight
@ SizeTopLeftBottomRight
Double arrow cursor going from top-left to bottom-right.
Definition
Cursor.hpp:82
sf::Cursor::SizeVertical
@ SizeVertical
Vertical double arrow cursor.
Definition
Cursor.hpp:81
sf::Cursor::Wait
@ Wait
Busy cursor.
Definition
Cursor.hpp:77
sf::Cursor::SizeBottomLeftTopRight
@ SizeBottomLeftTopRight
Double arrow cursor going from bottom-left to top-right.
Definition
Cursor.hpp:83
sf::Cursor::NotAllowed
@ NotAllowed
Action not allowed cursor.
Definition
Cursor.hpp:87
sf::Cursor::Hand
@ Hand
Pointing hand cursor.
Definition
Cursor.hpp:79
sf::Cursor::Help
@ Help
Help cursor.
Definition
Cursor.hpp:86
sf::Cursor::Cross
@ Cross
Crosshair cursor.
Definition
Cursor.hpp:85
sf::Cursor::loadFromPixels
bool loadFromPixels(const Uint8 *pixels, Vector2u size, Vector2u hotspot)
Create a cursor with the provided image.
sf::Cursor::loadFromSystem
bool loadFromSystem(Type type)
Create a native system cursor.
sf::NonCopyable::NonCopyable
NonCopyable()
Default constructor.
Definition
NonCopyable.hpp:53
sf
Definition
AlResource.hpp:35
sf::Uint8
unsigned char Uint8
Definition
Config.hpp:214
sf::Vector2u
Vector2< unsigned int > Vector2u
Definition
Vector2.hpp:254
Back to top