diff --git a/include/wx/utils.h b/include/wx/utils.h index 54d06f2fbd..2131128cb0 100644 --- a/include/wx/utils.h +++ b/include/wx/utils.h @@ -732,8 +732,8 @@ public: // it doesn't do anything explicit wxWindowDisabler(bool disable = true); - // ctor disables all windows except winToSkip - explicit wxWindowDisabler(wxWindow *winToSkip); + // ctor disables all windows except the given one(s) + explicit wxWindowDisabler(wxWindow *winToSkip, wxWindow *winToSkip2 = NULL); // dtor enables back all windows disabled by the ctor ~wxWindowDisabler(); diff --git a/interface/wx/utils.h b/interface/wx/utils.h index 4d4c01920e..1068da4341 100644 --- a/interface/wx/utils.h +++ b/interface/wx/utils.h @@ -97,8 +97,12 @@ public: from happening you may want to use wxFRAME_TOOL_WINDOW, if applicable, or wxFRAME_NO_TASKBAR style when creating the window that will remain enabled. + + The argument @a winToSkip2 may be used to specify another window to + leave enabled, if it is non-null. This parameter is only available + since wxWidgets 3.1.7. */ - explicit wxWindowDisabler(wxWindow* winToSkip); + explicit wxWindowDisabler(wxWindow* winToSkip, wxWindow* winToSkip2 = NULL); /** Reenables the windows disabled by the constructor. diff --git a/src/common/utilscmn.cpp b/src/common/utilscmn.cpp index 6dcc445618..25fa67c75d 100644 --- a/src/common/utilscmn.cpp +++ b/src/common/utilscmn.cpp @@ -1526,12 +1526,14 @@ wxWindowDisabler::wxWindowDisabler(bool disable) } } -wxWindowDisabler::wxWindowDisabler(wxWindow *winToSkip) +wxWindowDisabler::wxWindowDisabler(wxWindow *winToSkip, wxWindow *winToSkip2) { m_disabled = true; if ( winToSkip ) m_windowsToSkip.push_back(winToSkip); + if ( winToSkip2 ) + m_windowsToSkip.push_back(winToSkip2); DoDisable();