SDL3pp
A slim C++ wrapper for SDL3
|
Handle to an owned cursor. More...
Public Member Functions | |
constexpr | Cursor (SDL_Cursor *resource={}) |
Constructs from the underlying resource. | |
constexpr | Cursor (const Cursor &other)=delete |
constexpr | Cursor (Cursor &&other)=default |
Move constructor. | |
~Cursor () | |
Frees up resource when object goes out of scope. | |
Cursor & | operator= (Cursor other) |
Assignment operator. | |
constexpr | CursorRef (const CursorRef &other) |
Copy constructor. | |
constexpr | CursorRef (CursorRef &&other) |
Move constructor. | |
![]() | |
constexpr | CursorRef (const CursorRef &other) |
Copy constructor. | |
constexpr | CursorRef (CursorRef &&other) |
Move constructor. | |
constexpr | ~CursorRef ()=default |
Default constructor. | |
CursorRef & | operator= (CursorRef other) |
Assignment operator. | |
void | reset (SDL_Cursor *newResource={}) |
Free a previously-created cursor. | |
CursorBase (const Uint8 *data, const Uint8 *mask, int w, int h, int hot_x, int hot_y) | |
Create a cursor using the specified bitmap data and mask (in MSB format). | |
CursorBase (SurfaceBase &surface, int hot_x, int hot_y) | |
Create a color cursor. | |
CursorBase (SystemCursor id) | |
Create a system cursor. | |
![]() | |
CursorBase (const Uint8 *data, const Uint8 *mask, int w, int h, int hot_x, int hot_y) | |
Create a cursor using the specified bitmap data and mask (in MSB format). | |
CursorBase (SurfaceBase &surface, int hot_x, int hot_y) | |
Create a color cursor. | |
CursorBase (SystemCursor id) | |
Create a system cursor. | |
constexpr | Resource (T resource={}) |
Constructs the underlying resource. | |
constexpr | Resource (std::nullptr_t) |
Equivalent to default ctor. | |
constexpr | Resource (std::nullopt_t) |
Equivalent to default ctor. | |
Resource (const Resource &other)=delete | |
Resource (Resource &&other)=delete | |
![]() | |
constexpr | Resource (SDL_Cursor * resource={}) |
Constructs the underlying resource. | |
constexpr | Resource (std::nullptr_t) |
Equivalent to default ctor. | |
constexpr | Resource (std::nullopt_t) |
Equivalent to default ctor. | |
Resource (const Resource &other)=delete | |
Resource (Resource &&other)=delete | |
Resource & | operator= (const Resource &other)=delete |
Resource & | operator= (Resource &&other)=delete |
constexpr | operator bool () const |
True if contains a valid resource. | |
constexpr bool | operator== (const Resource &other) const=default |
Comparison. | |
constexpr bool | operator== (std::nullopt_t) const |
Comparison. | |
constexpr bool | operator== (std::nullptr_t) const |
Comparison. | |
constexpr SDL_Cursor * | get () const |
Return contained resource;. | |
constexpr SDL_Cursor * | release (SDL_Cursor * newResource={}) |
Return contained resource and empties or replace value. | |
constexpr const SDL_Cursor * | operator-> () const |
Access to fields. | |
constexpr SDL_Cursor * | operator-> () |
Access to fields. | |