improved sizing of wxBusyInfo window and updated the docs a bit

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12197 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2001-10-29 14:32:42 +00:00
parent a62b0bcc14
commit 21977bac1a
5 changed files with 73 additions and 20 deletions

View File

@@ -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
@@ -28,7 +53,17 @@ None
\membersection{wxBusyInfo::wxBusyInfo}
\func{}{wxBusyInfo}{\param{const wxString\&}{ msg}}
\func{}{wxBusyInfo}{\param{const wxString\&}{ msg}, \param{wxParent }{*parent = NULL}}
Constructs a busy info object, displays {\it msg}.
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.
\membersection{wxBusyInfo::\destruct{wxBusyInfo}}
\func{}{\destruct{wxBusyInfo}}{\void}
Hides and closes the window containing the information text.

View File

@@ -39,5 +39,7 @@ Disables all top level windows of the applications with the exception of
\membersection{wxWindowDisabler::\destruct{wxWindowDisabler}}
\func{}{\destruct{wxWindowDisabler}}{\void}
Reenables back the windows disabled by the constructor.