Enigma
3.2.0
A Simple, Reliable and Efficient Encryption Tool
Cursor.hpp
Go to the documentation of this file.
1
#pragma once
2
#ifndef ENIGMA_CURSOR_H
3
#define ENIGMA_CURSOR_H
4
5
#include <
Core/Core.hpp
>
6
#include <GLFW/glfw3.h>
7
8
NS_ENIGMA_BEGIN
9
10
/*Ref https://www.glfw.org/docs/3.4/group__shapes.html */
11
enum class
CursorMode
:
byte
{
12
Arrow
= 0,
13
IBeam
,
14
CrossHair
,
15
Hand
,
16
HResize
,
17
VResize
,
18
19
NumCursors
,
20
21
NONE
=
Arrow
22
};
23
24
class
Cursor
{
25
public
:
26
/*
27
* Default Constructor
28
*/
29
Cursor
() noexcept;
30
31
/*
32
* Creates Standard Cursor
33
*/
34
explicit
Cursor
(
CursorMode
mode);
35
36
/*
37
* Creates Image Based Cursor
38
*/
39
explicit
Cursor
(const fs::path& image_path, const std::int32_t xhot = 0, const std::int32_t yhot = 0);
40
41
~
Cursor
();
42
43
void
Destroy
();
44
45
public:
46
CursorMode
GetMode
() const noexcept {
return
m_mode; }
47
const
GLFWcursor *
GetGLFWCursor
() const noexcept {
return
m_GLFWcursor; }
48
GLFWcursor *
GetGLFWCursor
() noexcept {
return
m_GLFWcursor; }
49
50
private
:
51
CursorMode
m_mode;
52
GLFWcursor *m_GLFWcursor;
53
};
54
55
NS_ENIGMA_END
56
57
#endif
// !ENIGMA_CURSOR_H
Core.hpp
CursorMode
CursorMode
Definition:
Cursor.hpp:11
CursorMode::Arrow
@ Arrow
CursorMode::IBeam
@ IBeam
CursorMode::NumCursors
@ NumCursors
CursorMode::VResize
@ VResize
CursorMode::Hand
@ Hand
CursorMode::HResize
@ HResize
CursorMode::CrossHair
@ CrossHair
EventType::NONE
@ NONE
NS_ENIGMA_BEGIN
#define NS_ENIGMA_BEGIN
Enable/Disable Assertions.
Definition:
Macros.hpp:13
NS_ENIGMA_END
#define NS_ENIGMA_END
Definition:
Macros.hpp:14
Cursor
Definition:
Cursor.hpp:24
Cursor::GetGLFWCursor
const GLFWcursor * GetGLFWCursor() const noexcept
Definition:
Cursor.hpp:47
Cursor::GetMode
CursorMode GetMode() const noexcept
Definition:
Cursor.hpp:46
Cursor::Cursor
Cursor() noexcept
Cursor::Destroy
void Destroy()
Cursor::GetGLFWCursor
GLFWcursor * GetGLFWCursor() noexcept
Definition:
Cursor.hpp:48
Enigma::byte
std::uint8_t byte
Definition:
Types.hpp:12
src
Window
Cursor
Cursor.hpp
Generated on Sat Oct 19 2024 20:10:46 for Enigma by
1.9.1