X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/704a4b7524e05d7bf4d208eb1b30be9989abef4c..dae87f93abd93555095575886b8b1ef126f0a0da:/docs/latex/wx/busyinfo.tex diff --git a/docs/latex/wx/busyinfo.tex b/docs/latex/wx/busyinfo.tex index b4202dad12..b84b0f6c9a 100644 --- a/docs/latex/wx/busyinfo.tex +++ b/docs/latex/wx/busyinfo.tex @@ -7,15 +7,40 @@ a message window will be shown. For example: \begin{verbatim} - wxBusyInfo wait("Please wait, working..."); + wxBusyInfo wait("Please wait, working..."); - for (int i = 0; i < 100000; i++) - DoACalculation(); + for (int i = 0; i < 100000; i++) + { + DoACalculation(); + } \end{verbatim} It works by creating a window in the constructor, and deleting it in the destructor. +You may also want to call wxTheApp->Yield() to refresh the window +periodically (in case it had been obscured by other windows, for +example) like this: + +\begin{verbatim} + wxWindowDisabler disableAll; + + wxBusyInfo wait("Please wait, working..."); + + for (int i = 0; i < 100000; i++) + { + DoACalculation(); + + if ( !(i % 1000) ) + wxTheApp->Yield(); + } +\end{verbatim} + +but take care to not cause undesirable reentrancies when doing it (see +\helpref{wxApp::Yield()}{wxappyield} for more details). The simplest way to do +it is to use \helpref{wxWindowDisabler}{wxwindowdisabler} class as illustrated +in the above example. + \wxheading{Derived from} None @@ -26,10 +51,19 @@ None \latexignore{\rtfignore{\wxheading{Members}}} -\membersection{wxBusyInfo::wxBusyInfo} +\membersection{wxBusyInfo::wxBusyInfo}\label{wxbusyinfoctor} + +\func{}{wxBusyInfo}{\param{const wxString\&}{ msg}, \param{wxParent }{*parent = NULL}} + +Constructs a busy info window as child of {\it parent} and displays {\it msg} +in it. + +{\bf NB:} If {\it parent} is not {\tt NULL} you must ensure that it is not +closed while the busy info is shown. -\func{}{wxBusyInfo}{\param{const wxString\&}{ msg}} +\membersection{wxBusyInfo::\destruct{wxBusyInfo}}\label{wxbusyinfodtor} -Constructs a busy info object, displays {\it msg} . +\func{}{\destruct{wxBusyInfo}}{\void} +Hides and closes the window containing the information text.