|
SDL3pp
A slim C++ wrapper for SDL3
|
RAII owning version TrayEntry. More...
Public Member Functions | |
| constexpr | TrayEntryScoped (const TrayEntryScoped &other)=delete |
| constexpr | TrayEntryScoped (TrayEntryScoped &&other) noexcept |
| Move constructor. | |
| constexpr | TrayEntryScoped (TrayEntry &&other) noexcept |
| Move constructor. | |
| ~TrayEntryScoped () | |
| Destructor. | |
| TrayEntry (TrayMenu menu, int pos, StringParam label, TrayEntryFlags flags) | |
| Insert a tray entry at a given position. | |
| TrayEntry (TrayMenuRaw menu, StringParam label, TrayEntryFlags flags) | |
| Appends a tray entry. | |
| Public Member Functions inherited from SDL::TrayEntry | |
| TrayEntry (TrayMenu menu, int pos, StringParam label, TrayEntryFlags flags) | |
| Insert a tray entry at a given position. | |
| TrayEntry (TrayMenuRaw menu, StringParam label, TrayEntryFlags flags) | |
| Appends a tray entry. | |
| constexpr | operator TrayEntryRaw () const noexcept |
| Converts to underlying TrayEntryRaw. | |
| void | Remove () |
| Removes a tray entry. | |
| 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 (TrayCallback callback, void *userdata) |
| Sets a callback to be invoked when the entry is selected. | |
| void | SetCallback (TrayCB callback) |
| 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 | ResourceBase (RawPointer resource) |
| Constructs from resource pointer. | |
| constexpr | ResourceBase (std::nullptr_t=nullptr) |
| Constructs null/invalid. | |
| Public Member Functions inherited from SDL::ResourceBase< TrayEntryRaw > | |
| constexpr | ResourceBase (RawPointer resource) |
| Constructs from resource pointer. | |
| constexpr | operator bool () const |
| Converts to bool. | |
| constexpr auto | operator<=> (const ResourceBase &other) const=default |
| Comparison. | |
| constexpr RawConstPointer | operator-> () const noexcept |
| member access to underlying resource pointer. | |
| constexpr RawPointer | get () const noexcept |
| Retrieves underlying resource pointer. | |
| constexpr RawPointer | release () noexcept |
| Retrieves underlying resource pointer and clear this. | |
Additional Inherited Members | |
| Public Types inherited from SDL::ResourceBase< TrayEntryRaw > | |
| using | RawPointer |
| The underlying raw pointer type. | |
| using | RawConstPointer |
| The underlying const raw pointer type. | |
RAII owning version TrayEntry.
|
inline |
Insert a tray entry at a given position.
If label is nullptr, the entry will be a separator. Many functions won't work for an entry that is a separator.
An entry does not need to be destroyed; it will be destroyed with the tray.
| menu | the menu to append the entry to. |
| pos | the desired position for the new entry. Entries at or following this place will be moved. If pos is -1, the entry is appended. |
| label | the text to be displayed on the entry, in UTF-8 encoding, or nullptr for a separator. |
| flags | a combination of flags, some of which are mandatory. |
|
inline |
Appends a tray entry.
If label is nullptr, the entry will be a separator. Many functions won't work for an entry that is a separator.
An entry does not need to be destroyed; it will be destroyed with the tray.
| menu | the menu to append the entry to. |
| label | the text to be displayed on the entry, in UTF-8 encoding, or nullptr for a separator. |
| flags | a combination of flags, some of which are mandatory. |