X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e8a8aa37ea56f8b406cb794636116228ac7c4ab6..1ec4e9c2b72a01a7ba7da569e0f8d04a81aaba10:/interface/wx/notifmsg.h diff --git a/interface/wx/notifmsg.h b/interface/wx/notifmsg.h index dd900fc7c0..b2561a3bd0 100644 --- a/interface/wx/notifmsg.h +++ b/interface/wx/notifmsg.h @@ -3,7 +3,7 @@ // Purpose: interface of wxNotificationMessage // Author: wxWidgets team // RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// /** @@ -11,10 +11,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 +23,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 +45,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 +102,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);