From: Francesco Montorsi Date: Sun, 1 Mar 2009 21:01:39 +0000 (+0000) Subject: document that wxDialog::ShowModal() creates its own event loop X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/e10539a9f046fd2aa6b093d6948fb6a40e162406?ds=inline document that wxDialog::ShowModal() creates its own event loop git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59255 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/interface/wx/dialog.h b/interface/wx/dialog.h index 07f15907c4..e53af26867 100644 --- a/interface/wx/dialog.h +++ b/interface/wx/dialog.h @@ -583,6 +583,10 @@ public: modeless dialog modal. However ShowModal() can't be called twice without intervening EndModal() calls. + Note that this function creates a temporary event loop which takes + precedence over the application's main event loop (see wxEventLoopBase) + and which is destroyed when the dialog is dismissed. + @return The value set with SetReturnCode(). @see EndModal(), GetReturnCode(), SetReturnCode() diff --git a/interface/wx/evtloop.h b/interface/wx/evtloop.h index 41e4316355..885ce45862 100644 --- a/interface/wx/evtloop.h +++ b/interface/wx/evtloop.h @@ -18,6 +18,7 @@ An object of this class is created by wxAppTraits::CreateEventLoop() and used by wxApp to run the main application event loop. + Temporary event loops are usually created by wxDialog::ShowModal(). You can create your own event loop if you need, provided that you restore the main event loop once yours is destroyed (see wxEventLoopActivator).