// Purpose: wxPreferencesEditor class documentation.
// Author: Vaclav Slavik
// Created: 2013-02-26
-// RCS-ID: $Id$
// Copyright: (c) 2013 Vaclav Slavik <vslavik@fastmail.fm>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@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();
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();
};