SDL3pp
A slim C++ wrapper for SDL3
Loading...
Searching...
No Matches
Public Member Functions | List of all members
SDL::Cursor Struct Reference

Handle to an owned cursor. More...

Inheritance diagram for SDL::Cursor:
Inheritance graph
[legend]

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.
 
Cursoroperator= (Cursor other)
 Assignment operator.
 
constexpr CursorRef (const CursorRef &other)
 Copy constructor.
 
constexpr CursorRef (CursorRef &&other)
 Move constructor.
 
- Public Member Functions inherited from SDL::CursorRef
constexpr CursorRef (const CursorRef &other)
 Copy constructor.
 
constexpr CursorRef (CursorRef &&other)
 Move constructor.
 
constexpr ~CursorRef ()=default
 Default constructor.
 
CursorRefoperator= (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.
 
- Public Member Functions inherited from SDL::CursorBase
 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
 
- Public Member Functions inherited from SDL::Resource< SDL_Cursor * >
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
 
Resourceoperator= (const Resource &other)=delete
 
Resourceoperator= (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.
 

Detailed Description

Category:
Resource
See also
CursorBase
CursorRef

The documentation for this struct was generated from the following file: