X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/526954c5968baa29218c994ec48e476ae2bd4b9f..e4097f77c440b1f31a80fe273cc732c14d606096:/interface/wx/notifmsg.h diff --git a/interface/wx/notifmsg.h b/interface/wx/notifmsg.h index 40e039bf9e..3b5d11900f 100644 --- a/interface/wx/notifmsg.h +++ b/interface/wx/notifmsg.h @@ -2,7 +2,6 @@ // Name: notifmsg.h // Purpose: interface of wxNotificationMessage // Author: wxWidgets team -// RCS-ID: $Id$ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -11,10 +10,9 @@ This class allows to show the user a message non intrusively. - Currently it is implemented natively only for the Maemo platform and uses + Currently it is implemented natively for Windows and GTK and uses (non-modal) dialogs for the display of the notifications under the other - platforms but it will be extended to use the platform-specific notifications - in the other ports in the future. + platforms. Notice that this class is not a window and so doesn't derive from wxWindow. @@ -24,6 +22,13 @@ class wxNotificationMessage : public wxEvtHandler { public: + /// Possible values for Show() timeout. + enum + { + Timeout_Auto = -1, ///< Notification will be hidden automatically. + Timeout_Never = 0 ///< Notification will never time out. + }; + /** Default constructor, use SetParent(), SetTitle() and SetMessage() to initialize the object before showing it. @@ -39,6 +44,14 @@ public: wxNotificationMessage(const wxString& title, const wxString& message = wxEmptyString, wxWindow* parent = NULL, int flags = wxICON_INFORMATION); + /** + Destructor does not hide the notification. + + The notification can continue to be shown even after the C++ object was + destroyed, call Close() explicitly if it needs to be hidden. + */ + virtual ~wxNotificationMessage(); + /** Hides the notification. @@ -88,6 +101,11 @@ public: because the current platform may only support default timeout value and also because the user may be able to close the notification. + @note When using native notifications in wxGTK, the timeout is ignored + for the notifications with @c wxICON_WARNING or @c wxICON_ERROR + flags, they always remain shown unless they're explicitly hidden by + the user, i.e. behave as if Timeout_Auto were given. + @return @false if an error occurred. */ virtual bool Show(int timeout = Timeout_Auto);