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

An opaque handle representing an entry on a system tray object. More...

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

Public Member Functions

constexpr TrayEntry ()=default
 Default ctor.
 
constexpr TrayEntry (const TrayEntryRaw resource)
 Constructs from TrayEntryParam. More...
 
constexpr TrayEntry (const TrayEntry &other)=default
 Copy constructor.
 
constexpr TrayEntry (TrayEntry &&other)
 Move constructor.
 
 ~TrayEntry ()
 Destructor.
 
TrayEntryoperator= (TrayEntry other)
 Assignment operator.
 
constexpr TrayEntryRaw get () const
 Retrieves underlying TrayEntryRaw.
 
constexpr TrayEntryRaw release ()
 Retrieves underlying TrayEntryRaw and clear this.
 
constexpr auto operator<=> (const TrayEntry &other) const =default
 Comparison.
 
constexpr bool operator== (std::nullptr_t _) const
 Comparison.
 
constexpr operator bool () const
 Converts to bool.
 
constexpr operator TrayEntryParam () const
 Converts to TrayEntryParam.
 
void Remove ()
 Removes a tray entry. More...
 
TrayMenu CreateSubmenu ()
 Create a submenu for a system tray entry. More...
 
TrayMenu GetSubmenu ()
 Gets a previously created tray entry submenu. More...
 
void SetLabel (StringParam label)
 Sets the label of an entry. More...
 
const char * GetLabel () const
 Gets the label of an entry. More...
 
void SetChecked (bool checked)
 Sets whether or not an entry is checked. More...
 
bool GetChecked () const
 Gets whether or not an entry is checked. More...
 
void SetEnabled (bool enabled)
 Sets whether or not an entry is enabled. More...
 
bool GetEnabled () const
 Gets whether or not an entry is enabled. More...
 
void SetCallback (TrayCB callback)
 Sets a callback to be invoked when the entry is selected. More...
 
void SetCallback (TrayCallback callback, void *userdata)
 Sets a callback to be invoked when the entry is selected. More...
 
void Click ()
 Simulate a click on a tray entry. More...
 
TrayMenu GetParent ()
 Gets the menu containing a certain tray entry. More...
 

Detailed Description

Since
This struct is available since SDL 3.2.0.
Category:
Resource

Constructor & Destructor Documentation

◆ TrayEntry()

constexpr SDL::TrayEntry::TrayEntry ( const TrayEntryRaw  resource)
inlineconstexpr
Parameters
resourcea TrayEntryRaw to be wrapped.

Member Function Documentation

◆ SetCallback()

void SDL::TrayEntry::SetCallback ( TrayCB  callback)
inline
Parameters
callbacka callback to be invoked when the entry is selected.
Thread safety:
This function should be called on the thread that created the tray.
Since
This function is available since SDL 3.2.0.
See also
TrayMenu.GetEntries
TrayMenu.InsertEntry

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