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 
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 
56 
57 #endif // !ENIGMA_CURSOR_H
CursorMode
Definition: Cursor.hpp:11
#define NS_ENIGMA_BEGIN
Enable/Disable Assertions.
Definition: Macros.hpp:13
#define NS_ENIGMA_END
Definition: Macros.hpp:14
const GLFWcursor * GetGLFWCursor() const noexcept
Definition: Cursor.hpp:47
CursorMode GetMode() const noexcept
Definition: Cursor.hpp:46
Cursor() noexcept
void Destroy()
GLFWcursor * GetGLFWCursor() noexcept
Definition: Cursor.hpp:48
std::uint8_t byte
Definition: Types.hpp:12