X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2aab96f58d53e83313cc1d619dde1c00f6ccaa80..36a0190ebd5bd9a7302f60f6dcd608b80574e21c:/interface/wx/preferences.h?ds=sidebyside diff --git a/interface/wx/preferences.h b/interface/wx/preferences.h index 222419e035..8ce835c319 100644 --- a/interface/wx/preferences.h +++ b/interface/wx/preferences.h @@ -3,7 +3,6 @@ // Purpose: wxPreferencesEditor class documentation. // Author: Vaclav Slavik // Created: 2013-02-26 -// RCS-ID: $Id$ // Copyright: (c) 2013 Vaclav Slavik // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -38,8 +37,13 @@ public: Constructor. Creates an empty editor, use AddPage() to add controls to it. + + @param title The title overriding the default title of the top level + window used by the editor. It is recommended to not specify this + parameter to use the native convention for the preferences dialogs + instead. */ - wxPreferencesEditor(); + wxPreferencesEditor(const wxString& title = wxString()); /** Destructor. @@ -72,14 +76,13 @@ public: @param parent The window that invokes the preferences. Call Dismiss() before it's destroyed. */ - void Show(wxWindow* parent); + virtual void Show(wxWindow* parent); /** Hide the currently shown dialog, if any. - This doesn't do anything on the platforms using modal preferences - dialogs (e.g. Windows) but should be called to dismiss the dialog if - the object whose preferences it is editing was closed. + This is typically called to dismiss the dialog if the object whose + preferences it is editing was closed. */ void Dismiss(); @@ -93,6 +96,23 @@ public: in this case as well. */ static bool ShouldApplyChangesImmediately() + + /** + Returns whether the preferences dialog is shown modally. + + If this method returns false, as it currently does in wxGTK and wxOSX, + Show() simply makes the dialog visible and returns immediately. If it + returns true, as it does in wxMSW and under the other platforms, then + the dialog is shown modally, i.e. Show() blocks until the user + dismisses it. + + Notice that it isn't necessary to test the return value of this method + to use this class normally, its interface is designed to work in both + cases. However it can sometimes be necessary to call it if the program + needs to handle modal dialogs specially, e.g. perhaps to block some + periodic background update operation while a modal dialog is shown. + */ + static bool ShownModally(); }; @@ -112,8 +132,11 @@ public: class wxPreferencesPage { public: + /// Constructor. + wxPreferencesPage(); + /// Destructor. - virtual ~wxPreferencesPage() {} + virtual ~wxPreferencesPage(); /** Return name of the page. @@ -184,10 +207,10 @@ public: }; /// Constructor. - wxStockPreferencesPage(Kind kind) : m_kind(kind) {} + wxStockPreferencesPage(Kind kind); /// Returns the page's kind. - Kind GetKind() const { return m_kind; } + Kind GetKind() const; /// Reimplemented to return suitable name for the page's kind. virtual wxString GetName() const;