Utility: Rework cursors

-Rename WindowCursor to SystemCursor
-Merged Cursor class with SystemCursor enum
This commit is contained in:
Lynix
2017-01-16 00:32:59 +01:00
parent 954298dc1e
commit f406068c45
16 changed files with 281 additions and 202 deletions

View File

@@ -22,18 +22,32 @@ namespace Nz
public:
inline Cursor();
inline Cursor(SystemCursor systemCursor); //< implicit conversion intended
Cursor(const Cursor&) = delete;
inline Cursor(Cursor&& cursor) noexcept;
inline ~Cursor();
bool Create(const Image& cursor, int hotSpotX = 0, int hotSpotY = 0);
bool Create(const Image& cursor, const Vector2i& hotSpot);
bool Create(SystemCursor cursor);
void Destroy();
inline const Image& GetImage() const;
inline SystemCursor GetSystemCursor() const;
inline bool IsValid() const;
Cursor& operator=(const Cursor&) = delete;
inline Cursor& operator=(Cursor&& cursor);
private:
static bool Initialize();
static void Uninitialize();
Image m_cursorImage;
SystemCursor m_systemCursor;
CursorImpl* m_impl;
bool m_usesSystemCursor;
};
}