X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e8a8aa37ea56f8b406cb794636116228ac7c4ab6..1fb08526acab831aacfd4549efd32f84b31a24a5:/interface/wx/notifmsg.h?ds=sidebyside

diff --git a/interface/wx/notifmsg.h b/interface/wx/notifmsg.h
index dd900fc7c0..3b5d11900f 100644
--- a/interface/wx/notifmsg.h
+++ b/interface/wx/notifmsg.h
@@ -2,8 +2,7 @@
 // Name:        notifmsg.h
 // Purpose:     interface of wxNotificationMessage
 // Author:      wxWidgets team
-// RCS-ID:      $Id$
-// Licence:     wxWindows license
+// 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);