An opaque handle representing a toplevel system tray object.
More...
|
void | SetIcon (SurfaceRef icon) |
| Updates the system tray icon's icon.
|
|
void | SetTooltip (StringParam tooltip) |
| Updates the system tray icon's tooltip.
|
|
TrayMenu | CreateMenu () |
| Create a menu for a system tray.
|
|
TrayMenu | GetMenu () const |
| Gets a previously created tray menu.
|
|
constexpr | Resource (T resource={}) |
| Constructs from the underlying resource.
|
|
constexpr | Resource (const ResourceHandle< Resource< T > > auto &resource) |
| Constructs from pointer like.
|
|
constexpr | Resource (std::nullptr_t) |
| Equivalent to default ctor.
|
|
constexpr | Resource (std::nullopt_t) |
| Equivalent to default ctor.
|
|
constexpr | Resource (SDL_Tray * resource={}) |
| Constructs from the underlying resource.
|
|
constexpr | Resource (const ResourceHandle< Resource< SDL_Tray * > > auto &resource) |
| Constructs from pointer like.
|
|
constexpr | Resource (std::nullptr_t) |
| Equivalent to default ctor.
|
|
constexpr | Resource (std::nullopt_t) |
| Equivalent to default ctor.
|
|
constexpr | operator bool () const |
| True if contains a valid resource.
|
|
constexpr | operator value_type () const |
| Converts back to underlying type.
|
|
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_Tray * | get () const |
| Return contained resource;.
|
|
constexpr const SDL_Tray * | operator-> () const |
| Access to fields.
|
|
constexpr SDL_Tray * | operator-> () |
| Access to fields.
|
|
|
static void | reset (SDL_Tray *resource) |
| Destroys a tray object.
|
|
|
using | value_type = SDL_Tray * |
| The raw resource type.
|
|
- Since
- This struct is available since SDL 3.2.0.
- Category:
- Resource
- See also
- Tray
◆ reset()
static void SDL::TrayRef::reset |
( |
SDL_Tray * |
resource | ) |
|
|
inlinestatic |
This also destroys all associated menus and entries.
- Parameters
-
resource | the tray icon to be destroyed. |
- 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
- Tray.Create
◆ SetIcon()
- Parameters
-
icon | the new icon. May be nullptr. |
- 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
- Tray.Create
◆ SetTooltip()
- Parameters
-
tooltip | the new tooltip in UTF-8 encoding. May be nullptr. |
- 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
- Tray.Create
The documentation for this struct was generated from the following file: