X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/654c4b7b14bae64a11ac652984833a048ae832ea..2abf7107861e98b964fb6f792643ce314a782bcd:/interface/wx/preferences.h diff --git a/interface/wx/preferences.h b/interface/wx/preferences.h index 3688fa3e06..7e0e9f679e 100644 --- a/interface/wx/preferences.h +++ b/interface/wx/preferences.h @@ -77,14 +77,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(); @@ -98,6 +97,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(); };