This class allows showing the user a message non intrusively.
Currently it is implemented natively for Windows, macOS, GTK and uses generic toast notifications under the other platforms. It's not recommended but
Notice that this class is not a window and so doesn't derive from
Platform Notes
Par: Up to Windows 8 balloon notifications are displayed from an icon in the notification area of the taskbar. If your application uses a
Par: The macOS implementation uses Notification Center to display native notifications. In order to use actions your notifications must use the alert style. This can be enabled by the user in system settings or by setting the
Since: 2.9.0
This class is derived (and can use functions) from:
wxWidgets docs:
Event types emitted from this class:
Default constructor, use
Create a notification object with the given attributes.
See
Destructor does not hide the notification.
The notification can continue to be shown even after the C++ object was destroyed, call
Add an action to the notification.
If supported by the implementation this are usually buttons in the notification selectable by the user.
Return: false if the current implementation or OS version does not support actions in notifications.
Since: 3.1.0
Hides the notification.
Returns true if it was hidden or false if it couldn't be done (e.g. on some systems automatically hidden notifications can't be hidden manually).
This parameter can be currently used to specify the icon to show in the notification.
Valid values are
See:
Specify a custom icon to be displayed in the notification.
Some implementations of this class may not support custom icons.
See:
Since: 3.1.0
Set the main text of the notification.
This should be a more detailed description than the title but still limited to reasonable length (not more than 256 characters).
Set the parent for this notification: the notification will be associated with the top level parent of this window or, if this method is not called, with the main application window by default.
Set the title, it must be a concise string (not more than 64 characters), use
Show the notification to the user and hides it after
Special values
Note: When using native notifications in wxGTK, the timeout is ignored for the notifications with
Return: false if an error occurred.
If the application already uses a
This has no effect if toast notifications are used.
Return: the task bar icon which was used previously (may be
Only for:wxmsw
Enables toast notifications available since Windows 8 and suppresses the additional icon in the notification area on Windows 10.
Toast notifications
Return: false if toast notifications could not be enabled.
Only for:wxmsw
See:
Since: 3.1.0