载入中...
搜索中...
未找到
Cursor.h
浏览该文件的文档.
1#pragma once
2#include "mouse/Cursor.h"
3#include <SDL2/SDL_mouse.h>
4#include <map>
5
6namespace eve::image {
7 class ImageData;
8}
9
10namespace eve::mouse::sdl {
11
14{
15public:
17 Cursor(image::ImageData *imageData, int hotx, int hoty);
19 Cursor(std::string cursortype);
20 ~Cursor();
21
23 void *getHandle() const;
25 bool isCustom() const override { return is_custom; }
26 std::string getSystemType() const override { return systemType; }
27
28private:
29 SDL_Cursor *cursor;
30 bool is_custom;
31 std::string systemType;
32
33 static std::map<std::string, SDL_SystemCursor> systemCursorEntries;
34};
35
36} // eve::mouse::sdl
37
38
Represents raw pixel data.
Definition ImageData.h:26
SDL 鼠标光标实现(自定义图像或系统光标)。
Definition Cursor.h:14
void * getHandle() const
底层 SDL_Cursor 句柄。
Definition Cursor.cpp:62
std::string getSystemType() const override
Returns the type of system cursor used, if this Cursor is using a system-defined image.
Definition Cursor.h:26
bool isCustom() const override
是否自定义 / 系统光标类型名。
Definition Cursor.h:25