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

Handle to an owned trayEntry. More...

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

Public Member Functions

constexpr TrayEntry (SDL_TrayEntry *resource={})
 Constructs from the underlying resource.
 
constexpr TrayEntry (const TrayEntry &other)=delete
 
constexpr TrayEntry (TrayEntry &&other)=default
 Move constructor.
 
 ~TrayEntry ()
 Frees up resource when object goes out of scope.
 
TrayEntryoperator= (TrayEntry other)
 Assignment operator.
 
constexpr TrayEntryRef (const TrayEntryRef &other)
 Copy constructor.
 
constexpr TrayEntryRef (TrayEntryRef &&other)
 Move constructor.
 
- Public Member Functions inherited from SDL::TrayEntryRef
constexpr TrayEntryRef (const TrayEntryRef &other)
 Copy constructor.
 
constexpr TrayEntryRef (TrayEntryRef &&other)
 Move constructor.
 
constexpr ~TrayEntryRef ()=default
 Default constructor.
 
TrayEntryRefoperator= (TrayEntryRef other)
 Assignment operator.
 
void reset (SDL_TrayEntry *newResource={})
 Removes a tray entry.
 
void Remove ()
 Removes a tray entry.
 
- Public Member Functions inherited from SDL::TrayEntryBase
TrayMenu CreateSubmenu ()
 Create a submenu for a system tray entry.
 
TrayMenu GetSubmenu ()
 Gets a previously created tray entry submenu.
 
void SetLabel (StringParam label)
 Sets the label of an entry.
 
const char * GetLabel () const
 Gets the label of an entry.
 
void SetChecked (bool checked)
 Sets whether or not an entry is checked.
 
bool GetChecked () const
 Gets whether or not an entry is checked.
 
void SetEnabled (bool enabled)
 Sets whether or not an entry is enabled.
 
bool GetEnabled () const
 Gets whether or not an entry is enabled.
 
void SetCallback (TrayCB callback)
 Sets a callback to be invoked when the entry is selected.
 
void SetCallback (TrayCallback callback, void *userdata)
 Sets a callback to be invoked when the entry is selected.
 
void Click ()
 Simulate a click on a tray entry.
 
TrayMenu GetParent ()
 Gets the menu containing a certain tray entry.
 
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_TrayEntry * >
constexpr Resource (SDL_TrayEntry * 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_TrayEntry * get () const
 Return contained resource;.
 
constexpr SDL_TrayEntry * release (SDL_TrayEntry * newResource={})
 Return contained resource and empties or replace value.
 
constexpr const SDL_TrayEntry * operator-> () const
 Access to fields.
 
constexpr SDL_TrayEntry * operator-> ()
 Access to fields.
 

Detailed Description

Category:
Resource
See also
TrayEntryBase
TrayEntryRef

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