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
This commit is contained in:
Francesco Montorsi
2009-03-01 21:01:39 +00:00
parent a3fc1c9455
commit e10539a9f0
2 changed files with 5 additions and 0 deletions

View File

@@ -583,6 +583,10 @@ public:
modeless dialog modal. However ShowModal() can't be called twice modeless dialog modal. However ShowModal() can't be called twice
without intervening EndModal() calls. 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(). @return The value set with SetReturnCode().
@see EndModal(), GetReturnCode(), SetReturnCode() @see EndModal(), GetReturnCode(), SetReturnCode()

View File

@@ -18,6 +18,7 @@
An object of this class is created by wxAppTraits::CreateEventLoop() and An object of this class is created by wxAppTraits::CreateEventLoop() and
used by wxApp to run the main application event loop. 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 You can create your own event loop if you need, provided that you restore
the main event loop once yours is destroyed (see wxEventLoopActivator). the main event loop once yours is destroyed (see wxEventLoopActivator).