1 \section{\class{wxApp
}}\label{wxapp
}
3 The
{\bf wxApp
} class represents the application itself. It is used
6 \begin{itemize
}\itemsep=
0pt
7 \item set and get application-wide properties;
8 \item implement the windowing system message or event loop;
9 \item initiate application processing via
\helpref{wxApp::OnInit
}{wxapponinit
};
10 \item allow default processing of events not handled by other
11 objects in the application.
14 You should use the macro IMPLEMENT
\_APP(appClass) in your application implementation
15 file to tell wxWidgets how to create an instance of your application class.
17 Use DECLARE
\_APP(appClass) in a header file if you want the wxGetApp function (which returns
18 a reference to your application object) to be visible to other files.
20 \wxheading{Derived from
}
22 \helpref{wxEvtHandler
}{wxevthandler
}\\
23 \helpref{wxObject
}{wxobject
}
25 \wxheading{Include files
}
31 \helpref{wxApp overview
}{wxappoverview
}
33 \latexignore{\rtfignore{\wxheading{Members
}}}
36 \membersection{wxApp::wxApp
}\label{wxappctor
}
40 Constructor. Called implicitly with a definition of a wxApp object.
43 \membersection{wxApp::
\destruct{wxApp
}}\label{wxappdtor
}
45 \func{virtual
}{\destruct{wxApp
}}{\void}
47 Destructor. Will be called implicitly on program exit if the wxApp
48 object is created on the stack.
51 \membersection{wxApp::argc
}\label{wxappargc
}
55 Number of command line arguments (after environment-specific processing).
58 \membersection{wxApp::argv
}\label{wxappargv
}
60 \member{wxChar **
}{argv
}
62 Command line arguments (after environment-specific processing).
65 \membersection{wxApp::CreateLogTarget
}\label{wxappcreatelogtarget
}
67 \func{virtual wxLog*
}{CreateLogTarget
}{\void}
69 Creates a wxLog class for the application to use for logging errors. The default
70 implementation returns a new wxLogGui class.
74 \helpref{wxLog
}{wxlog
}
77 \membersection{wxApp::CreateTraits
}\label{wxappcreatetraits
}
79 \func{virtual wxAppTraits *
}{CreateTraits
}{\void}
81 Creates the
\helpref{wxAppTraits
}{wxapptraits
} object when
\helpref{GetTraits
}{wxappgettraits
}
82 needs it for the first time.
86 \helpref{wxAppTraits
}{wxapptraits
}
89 \membersection{wxApp::Dispatch
}\label{wxappdispatch
}
91 \func{virtual void
}{Dispatch
}{\void}
93 Dispatches the next event in the windowing system event queue.
95 This can be used for programming event loops, e.g.
104 \helpref{wxApp::Pending
}{wxapppending
}
107 \membersection{wxApp::ExitMainLoop
}\label{wxappexitmainloop
}
109 \func{virtual void
}{ExitMainLoop
}{\void}
111 Call this to explicitly exit the main message (event) loop.
112 You should normally exit the main loop (and the application) by deleting
116 \membersection{wxApp::FilterEvent
}\label{wxappfilterevent
}
118 \func{int
}{FilterEvent
}{\param{wxEvent\&
}{event
}}
120 This function is called before processing any event and allows the application
121 to preempt the processing of some events. If this method returns $-
1$ the event
122 is processed normally, otherwise either
{\tt true
} or
{\tt false
} should be
123 returned and the event processing stops immediately considering that the event
124 had been already processed (for the former return value) or that it is not
125 going to be processed at all (for the latter one).
128 \membersection{wxApp::GetAppName
}\label{wxappgetappname
}
130 \constfunc{wxString
}{GetAppName
}{\void}
132 Returns the application name.
136 wxWidgets sets this to a reasonable default before
137 calling
\helpref{wxApp::OnInit
}{wxapponinit
}, but the application can reset it at will.
140 \membersection{wxApp::GetClassName
}\label{wxappgetclassname
}
142 \constfunc{wxString
}{GetClassName
}{\void}
144 Gets the class name of the application. The class name may be used in a platform specific
145 manner to refer to the application.
149 \helpref{wxApp::SetClassName
}{wxappsetclassname
}
152 \membersection{wxApp::GetExitOnFrameDelete
}\label{wxappgetexitonframedelete
}
154 \constfunc{bool
}{GetExitOnFrameDelete
}{\void}
156 Returns true if the application will exit when the top-level window is deleted, false
161 \helpref{wxApp::SetExitOnFrameDelete
}{wxappsetexitonframedelete
},\\
162 \helpref{wxApp shutdown overview
}{wxappshutdownoverview
}
165 \membersection{wxApp::GetInstance
}\label{wxappgetinstance
}
167 \func{static wxAppConsole *
}{GetInstance
}{\void}
169 Returns the one and only global application object.
170 Usually
\texttt{wxTheApp
} is usead instead.
174 \helpref{wxApp::SetInstance
}{wxappsetinstance
}
177 \membersection{wxApp::GetTopWindow
}\label{wxappgettopwindow
}
179 \constfunc{virtual wxWindow *
}{GetTopWindow
}{\void}
181 Returns a pointer to the top window.
185 If the top window hasn't been set using
\helpref{wxApp::SetTopWindow
}{wxappsettopwindow
}, this
186 function will find the first top-level window (frame or dialog) and return that.
190 \helpref{SetTopWindow
}{wxappsettopwindow
}
194 \membersection{wxApp::GetTraits
}\label{wxappgettraits
}
196 \func{wxAppTraits *
}{GetTraits
}{\void}
198 Returns a pointer to the
\helpref{wxAppTraits
}{wxapptraits
} object for the application.
199 If you want to customize the
\helpref{wxAppTraits
}{wxapptraits
} object, you must override the
200 \helpref{CreateTraits
}{wxappcreatetraits
} function.
204 \membersection{wxApp::GetUseBestVisual
}\label{wxappgetusebestvisual
}
206 \constfunc{bool
}{GetUseBestVisual
}{\void}
208 Returns true if the application will use the best visual on systems that support
209 different visuals, false otherwise.
213 \helpref{SetUseBestVisual
}{wxappsetusebestvisual
}
216 \membersection{wxApp::GetVendorName
}\label{wxappgetvendorname
}
218 \constfunc{wxString
}{GetVendorName
}{\void}
220 Returns the application's vendor name.
223 \membersection{wxApp::IsActive
}\label{wxappisactive
}
225 \constfunc{bool
}{IsActive
}{\void}
227 Returns
\true if the application is active, i.e. if one of its windows is
228 currently in the foreground. If this function returns
\false and you need to
229 attract users attention to the application, you may use
230 \helpref{wxTopLevelWindow::RequestUserAttention
}{wxtoplevelwindowrequestuserattention
}
234 \membersection{wxApp::IsMainLoopRunning
}\label{wxappismainlooprunning
}
236 \func{static bool
}{IsMainLoopRunning
}{\void}
238 Returns
\true if the main event loop is currently running, i.e. if the
239 application is inside
\helpref{OnRun
}{wxapponrun
}.
241 This can be useful to test whether the events can be dispatched. For example,
242 if this function returns
\false, non-blocking sockets cannot be used because
243 the events from them would never be processed.
246 \membersection{wxApp::MainLoop
}\label{wxappmainloop
}
248 \func{virtual int
}{MainLoop
}{\void}
250 Called by wxWidgets on creation of the application. Override this if you wish
251 to provide your own (environment-dependent) main loop.
253 \wxheading{Return value
}
255 Returns
0 under X, and the wParam of the WM
\_QUIT message under Windows.
257 %% VZ: OnXXX() functions should *not* be documented
259 %%\membersection{wxApp::OnActivate}\label{wxapponactivate}
261 %%\func{void}{OnActivate}{\param{wxActivateEvent\& }{event}}
263 %%Provide this member function to know whether the application is being
264 %%activated or deactivated (Windows only).
266 %%\wxheading{See also}
268 %%\helpref{wxWindow::OnActivate}{wxwindowonactivate}, \helpref{wxActivateEvent}{wxactivateevent}
270 %%\membersection{wxApp::OnCharHook}\label{wxapponcharhook}
272 %%\func{void}{OnCharHook}{\param{wxKeyEvent\&}{ event}}
274 %%This event handler function is called (under Windows only) to allow the window to intercept keyboard events
275 %%before they are processed by child windows.
277 %%\wxheading{Parameters}
279 %%\docparam{event}{The keypress event.}
281 %%\wxheading{Remarks}
283 %%Use the wxEVT\_CHAR\_HOOK macro in your event table.
285 %%If you use this member, you can selectively consume keypress events by calling\rtfsp
286 %%\helpref{wxEvent::Skip}{wxeventskip} for characters the application is not interested in.
288 %%\wxheading{See also}
290 %%\helpref{wxKeyEvent}{wxkeyevent}, \helpref{wxWindow::OnChar}{wxwindowonchar},\rtfsp
291 %%\helpref{wxWindow::OnCharHook}{wxwindowoncharhook}, \helpref{wxDialog::OnCharHook}{wxdialogoncharhook}
294 \membersection{wxApp::OnAssertFailure
}\label{wxapponassertfailure
}
296 \func{void
}{OnAssertFailure
}{\param{const wxChar
}{*file
},
\param{int
}{line
},
\param{const wxChar
}{*func
},
\param{const wxChar
}{*cond
},
\param{const wxChar
}{*msg
}}
298 This function is called when an assert failure occurs, i.e. the condition
299 specified in
\helpref{wxASSERT
}{wxassert
} macro evaluated to
{\tt false
}.
300 It is only called in debug mode (when
{\tt \_\_WXDEBUG\_\_} is defined) as
301 asserts are not left in the release code at all.
303 The base class version shows the default assert failure dialog box proposing to
304 the user to stop the program, continue or ignore all subsequent asserts.
306 \wxheading{Parameters
}
308 \docparam{file
}{the name of the source file where the assert occurred
}
310 \docparam{line
}{the line number in this file where the assert occurred
}
312 \docparam{func
}{the name of the function where the assert occurred, may be
313 empty if the compiler doesn't support C99
\texttt{\_\_FUNCTION\_\_}}
315 \docparam{cond
}{the condition of the failed assert in text form
}
317 \docparam{msg
}{the message specified as argument to
318 \helpref{wxASSERT
\_MSG}{wxassertmsg
} or
\helpref{wxFAIL
\_MSG}{wxfailmsg
}, will
319 be
{\tt NULL
} if just
\helpref{wxASSERT
}{wxassert
} or
\helpref{wxFAIL
}{wxfail
}
323 \membersection{wxApp::OnCmdLineError
}\label{wxapponcmdlineerror
}
325 \func{bool
}{OnCmdLineError
}{\param{wxCmdLineParser\&
}{parser
}}
327 Called when command line parsing fails (i.e. an incorrect command line option
328 was specified by the user). The default behaviour is to show the program usage
329 text and abort the program.
331 Return
{\tt true
} to continue normal execution or
{\tt false
} to return
332 {\tt false
} from
\helpref{OnInit
}{wxapponinit
} thus terminating the program.
336 \helpref{OnInitCmdLine
}{wxapponinitcmdline
}
339 \membersection{wxApp::OnCmdLineHelp
}\label{wxapponcmdlinehelp
}
341 \func{bool
}{OnCmdLineHelp
}{\param{wxCmdLineParser\&
}{parser
}}
343 Called when the help option (
{\tt --help
}) was specified on the command line.
344 The default behaviour is to show the program usage text and abort the program.
346 Return
{\tt true
} to continue normal execution or
{\tt false
} to return
347 {\tt false
} from
\helpref{OnInit
}{wxapponinit
} thus terminating the program.
351 \helpref{OnInitCmdLine
}{wxapponinitcmdline
}
354 \membersection{wxApp::OnCmdLineParsed
}\label{wxapponcmdlineparsed
}
356 \func{bool
}{OnCmdLineParsed
}{\param{wxCmdLineParser\&
}{parser
}}
358 Called after the command line had been successfully parsed. You may override
359 this method to test for the values of the various parameters which could be
360 set from the command line.
362 Don't forget to call the base class version unless you want to suppress
363 processing of the standard command line options.
365 Return
{\tt true
} to continue normal execution or
{\tt false
} to return
366 {\tt false
} from
\helpref{OnInit
}{wxapponinit
} thus terminating the program.
370 \helpref{OnInitCmdLine
}{wxapponinitcmdline
}
373 \membersection{wxApp::OnExceptionInMainLoop
}\label{wxapponexceptioninmainloop
}
375 \func{virtual bool
}{OnExceptionInMainLoop
}{\void}
377 This function is called if an unhandled exception occurs inside the main
378 application event loop. It can return
\true to ignore the exception and to
379 continue running the loop or
\false to exit the loop and terminate the
380 program. In the latter case it can also use C++
\texttt{throw
} keyword to
381 rethrow the current exception.
383 The default behaviour of this function is the latter in all ports except under
384 Windows where a dialog is shown to the user which allows him to choose between
385 the different options. You may override this function in your class to do
386 something more appropriate.
388 Finally note that if the exception is rethrown from here, it can be caught in
389 \helpref{OnUnhandledException
}{wxapponunhandledexception
}.
392 \membersection{wxApp::OnExit
}\label{wxapponexit
}
394 \func{virtual int
}{OnExit
}{\void}
396 Override this member function for any processing which needs to be
397 done as the application is about to exit. OnExit is called after
398 destroying all application windows and controls, but before
399 wxWidgets cleanup. Note that it is not called at all if
400 \helpref{OnInit
}{wxapponinit
} failed.
402 The return value of this function is currently ignored, return the same value
403 as returned by the base class method if you override it.
406 \membersection{wxApp::OnFatalException
}\label{wxapponfatalexception
}
408 \func{void
}{OnFatalException
}{\void}
410 This function may be called if something fatal happens: an unhandled
411 exception under Win32 or a a fatal signal under Unix, for example. However,
412 this will not happen by default: you have to explicitly call
413 \helpref{wxHandleFatalExceptions
}{wxhandlefatalexceptions
} to enable this.
415 Generally speaking, this function should only show a message to the user and
416 return. You may attempt to save unsaved data but this is not guaranteed to
417 work and, in fact, probably won't.
421 \helpref{wxHandleFatalExceptions
}{wxhandlefatalexceptions
}
423 %% VZ: the wxApp event handler are private and should not be documented here!
425 %%\membersection{wxApp::OnIdle}\label{wxapponidle}
427 %%\func{void}{OnIdle}{\param{wxIdleEvent\& }{event}}
429 %%Override this member function for any processing which needs to be done
430 %%when the application is idle. You should call wxApp::OnIdle from your own function,
431 %%since this forwards OnIdle events to windows and also performs garbage collection for
432 %%windows whose destruction has been delayed.
434 %%wxWidgets' strategy for OnIdle processing is as follows. After pending user interface events for an
435 %%application have all been processed, wxWidgets sends an OnIdle event to the application object. wxApp::OnIdle itself
436 %%sends an OnIdle event to each application window, allowing windows to do idle processing such as updating
437 %%their appearance. If either wxApp::OnIdle or a window OnIdle function requested more time, by
438 %%calling \helpref{wxIdleEvent::RequestMore}{wxidleeventrequestmore}, wxWidgets will send another OnIdle
439 %%event to the application object. This will occur in a loop until either a user event is found to be
440 %%pending, or OnIdle requests no more time. Then all pending user events are processed until the system
441 %%goes idle again, when OnIdle is called, and so on.
443 %%\wxheading{See also}
445 %%\helpref{wxWindow::OnIdle}{wxwindowonidle}, \helpref{wxIdleEvent}{wxidleevent},\rtfsp
446 %%\helpref{wxWindow::SendIdleEvents}{wxappsendidleevents}
448 %%\membersection{wxApp::OnEndSession}\label{wxapponendsession}
450 %%\func{void}{OnEndSession}{\param{wxCloseEvent\& }{event}}
452 %%This is an event handler function called when the operating system or GUI session is
453 %%about to close down. The application has a chance to silently save information,
454 %%and can optionally close itself.
456 %%Use the EVT\_END\_SESSION event table macro to handle query end session events.
458 %%The default handler calls \helpref{wxWindow::Close}{wxwindowclose} with a true argument
459 %%(forcing the application to close itself silently).
461 %%\wxheading{Remarks}
463 %%Under X, OnEndSession is called in response to the `die' event.
465 %%Under Windows, OnEndSession is called in response to the WM\_ENDSESSION message.
467 %%\wxheading{See also}
469 %%\helpref{wxWindow::Close}{wxwindowclose},\rtfsp
470 %%\helpref{wxWindow::OnCloseWindow}{wxwindowonclosewindow},\rtfsp
471 %%\helpref{wxCloseEvent}{wxcloseevent},\rtfsp
474 \membersection{wxApp::OnInit
}\label{wxapponinit
}
476 \func{bool
}{OnInit
}{\void}
478 This must be provided by the application, and will usually create the
479 application's main window, optionally calling
480 \helpref{wxApp::SetTopWindow
}{wxappsettopwindow
}. You may use
481 \helpref{OnExit
}{wxapponexit
} to clean up anything initialized here, provided
482 that the function returns
\true.
484 Notice that if you want to to use the command line processing provided by
485 wxWidgets you have to call the base class version in the derived class
488 Return
\true to continue processing,
\false to exit the application
492 \membersection{wxApp::OnInitCmdLine
}\label{wxapponinitcmdline
}
494 \func{void
}{OnInitCmdLine
}{\param{wxCmdLineParser\&
}{parser
}}
496 Called from
\helpref{OnInit
}{wxapponinit
} and may be used to initialize the
497 parser with the command line options for this application. The base class
498 versions adds support for a few standard options only.
500 \membersection{wxApp::OnRun
}\label{wxapponrun
}
502 \func{virtual int
}{OnRun
}{\void}
504 This virtual function is where the execution of a program written in wxWidgets
505 starts. The default implementation just enters the main loop and starts
506 handling the events until it terminates, either because
507 \helpref{ExitMainLoop
}{wxappexitmainloop
} has been explicitly called or because
508 the last frame has been deleted and
509 \helpref{GetExitOnFrameDelete
}{wxappgetexitonframedelete
} flag is
\true (this
512 The return value of this function becomes the exit code of the program, so it
513 should return $
0$ in case of successful termination.
516 \membersection{wxApp::OnUnhandledException
}\label{wxapponunhandledexception
}
518 \func{virtual void
}{OnUnhandledException
}{\void}
520 This function is called when an unhandled C++ exception occurs inside
521 \helpref{OnRun()
}{wxapponrun
} (the exceptions which occur during the program
522 startup and shutdown might not be caught at all).
523 Note that the exception type is lost by now, so if you want to really handle
524 the exception you should override
\helpref{OnRun()
}{wxapponrun
} and put a
525 try/catch clause around the call to the base class version there.
528 \membersection{wxApp::ProcessMessage
}\label{wxappprocessmessage
}
530 \func{bool
}{ProcessMessage
}{\param{WXMSG *
}{msg
}}
532 Windows-only function for processing a message. This function
533 is called from the main message loop, checking for windows that
534 may wish to process it. The function returns true if the message
535 was processed, false otherwise. If you use wxWidgets with another class
536 library with its own message loop, you should make sure that this
537 function is called to allow wxWidgets to receive messages. For example,
538 to allow co-existence with the Microsoft Foundation Classes, override
539 the PreTranslateMessage function:
542 // Provide wxWidgets message loop compatibility
543 BOOL CTheApp::PreTranslateMessage(MSG *msg)
545 if (wxTheApp && wxTheApp->ProcessMessage((WXMSW *)msg))
548 return CWinApp::PreTranslateMessage(msg);
553 \membersection{wxApp::Pending
}\label{wxapppending
}
555 \func{virtual bool
}{Pending
}{\void}
557 Returns true if unprocessed events are in the window system event queue.
561 \helpref{wxApp::Dispatch
}{wxappdispatch
}
564 \membersection{wxApp::SendIdleEvents
}\label{wxappsendidleevents
}
566 \func{bool
}{SendIdleEvents
}{\param{wxWindow*
}{ win
},
\param{wxIdleEvent\&
}{event
}}
568 Sends idle events to a window and its children.
570 Please note that this function is internal to wxWidgets and shouldn't be used
575 These functions poll the top-level windows, and their children, for idle event processing.
576 If true is returned, more OnIdle processing is requested by one or more window.
580 \helpref{wxIdleEvent
}{wxidleevent
}
583 \membersection{wxApp::SetAppName
}\label{wxappsetappname
}
585 \func{void
}{SetAppName
}{\param{const wxString\&
}{name
}}
587 Sets the name of the application. The name may be used in dialogs
588 (for example by the
document/view framework). A default name is set by
593 \helpref{wxApp::GetAppName
}{wxappgetappname
}
596 \membersection{wxApp::SetClassName
}\label{wxappsetclassname
}
598 \func{void
}{SetClassName
}{\param{const wxString\&
}{name
}}
600 Sets the class name of the application. This may be used in a platform specific
601 manner to refer to the application.
605 \helpref{wxApp::GetClassName
}{wxappgetclassname
}
608 \membersection{wxApp::SetExitOnFrameDelete
}\label{wxappsetexitonframedelete
}
610 \func{void
}{SetExitOnFrameDelete
}{\param{bool
}{ flag
}}
612 Allows the programmer to specify whether the application will exit when the
613 top-level frame is deleted.
615 \wxheading{Parameters
}
617 \docparam{flag
}{If true (the default), the application will exit when the top-level frame is
618 deleted. If false, the application will continue to run.
}
622 \helpref{wxApp::GetExitOnFrameDelete
}{wxappgetexitonframedelete
},\\
623 \helpref{wxApp shutdown overview
}{wxappshutdownoverview
}
626 \membersection{wxApp::SetInstance
}\label{wxappsetinstance
}
628 \func{static void
}{SetInstance
}{\param{wxAppConsole*
}{app
}}
630 Allows external code to modify global
\texttt{wxTheApp
}, but you should really
631 know what you're doing if you call it.
633 \wxheading{Parameters
}
635 \docparam{app
}{Replacement for the global application object.
}
639 \helpref{wxApp::GetInstance
}{wxappgetinstance
}
642 \membersection{wxApp::SetTopWindow
}\label{wxappsettopwindow
}
644 \func{void
}{SetTopWindow
}{\param{wxWindow*
}{window
}}
646 Sets the `top' window. You can call this from within
\helpref{wxApp::OnInit
}{wxapponinit
} to
647 let wxWidgets know which is the main window. You don't have to set the top window;
648 it is only a convenience so that (for example) certain dialogs without parents can use a
649 specific window as the top window. If no top window is specified by the application,
650 wxWidgets just uses the first frame or dialog in its top-level window list, when it
651 needs to use the top window.
653 \wxheading{Parameters
}
655 \docparam{window
}{The new top window.
}
659 \helpref{wxApp::GetTopWindow
}{wxappgettopwindow
},
\helpref{wxApp::OnInit
}{wxapponinit
}
663 \membersection{wxApp::SetVendorName
}\label{wxappsetvendorname
}
665 \func{void
}{SetVendorName
}{\param{const wxString\&
}{name
}}
667 Sets the name of application's vendor. The name will be used
668 in registry access. A default name is set by
673 \helpref{wxApp::GetVendorName
}{wxappgetvendorname
}
676 \membersection{wxApp::SetUseBestVisual
}\label{wxappsetusebestvisual
}
678 \func{void
}{SetUseBestVisual
}{\param{bool
}{ flag
}}
680 Allows the programmer to specify whether the application will use the best visual
681 on systems that support several visual on the same display. This is typically the
682 case under Solaris and IRIX, where the default visual is only
8-bit whereas certain
683 applications are supposed to run in TrueColour mode.
685 Note that this function has to be called in the constructor of the
{\tt wxApp
}
686 instance and won't have any effect when called later on.
688 This function currently only has effect under GTK.
690 \wxheading{Parameters
}
692 \docparam{flag
}{If true, the app will use the best visual.
}
695 \membersection{wxApp::HandleEvent
}\label{wxapphandleevent
}
697 \constfunc{virtual void
}{HandleEvent
}{\param{wxEvtHandler
}{ *handler
},
\param{wxEventFunction
}{ func
},
\param{wxEvent\&
}{event
}}
699 This function simply invokes the given method
\arg{func
} of the specified
700 event handler
\arg{handler
} with the
\arg{event
} as parameter. It exists solely
701 to allow to catch the C++ exceptions which could be thrown by all event
702 handlers in the application in one place: if you want to do this, override this
703 function in your wxApp-derived class and add try/catch clause(s) to it.
706 \membersection{wxApp::Yield
}\label{wxappyield
}
708 \func{bool
}{Yield
}{\param{bool
}{ onlyIfNeeded = false
}}
710 Yields control to pending messages in the windowing system. This can be useful, for example, when a
711 time-consuming process writes to a text window. Without an occasional
712 yield, the text window will not be updated properly, and on systems with
713 cooperative multitasking, such as Windows
3.1 other processes will not respond.
715 Caution should be exercised, however, since yielding may allow the
716 user to perform actions which are not compatible with the current task.
717 Disabling menu items or whole menus during processing can avoid unwanted
718 reentrance of code: see
\helpref{::wxSafeYield
}{wxsafeyield
} for a better
721 Note that Yield() will not flush the message logs. This is intentional as
722 calling Yield() is usually done to quickly update the screen and popping up a
723 message box dialog may be undesirable. If you do wish to flush the log
724 messages immediately (otherwise it will be done during the next idle loop
725 iteration), call
\helpref{wxLog::FlushActive
}{wxlogflushactive
}.
727 Calling Yield() recursively is normally an error and an assert failure is
728 raised in debug build if such situation is detected. However if the
729 {\it onlyIfNeeded
} parameter is
{\tt true
}, the method will just silently
730 return
{\tt false
} instead.