X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/23324ae1c7938ba904770fc456d3c07764b9c5e9..592584e4e9c3c01a05fda770dcd1f88a8a8d69f1:/interface/busyinfo.h?ds=sidebyside diff --git a/interface/busyinfo.h b/interface/busyinfo.h index 30305cc191..97eeee288e 100644 --- a/interface/busyinfo.h +++ b/interface/busyinfo.h @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: busyinfo.h -// Purpose: documentation for wxBusyInfo class +// Purpose: interface of wxBusyInfo // Author: wxWidgets team // RCS-ID: $Id$ // Licence: wxWindows license @@ -9,65 +9,64 @@ /** @class wxBusyInfo @wxheader{busyinfo.h} - + This class makes it easy to tell your user that the program is temporarily busy. Just create a wxBusyInfo object on the stack, and within the current scope, a message window will be shown. - + For example: - + @code - wxBusyInfo wait("Please wait, working..."); - - for (int i = 0; i 100000; i++) + wxBusyInfo wait("Please wait, working..."); + + for (int i = 0; i < 100000; i++) { DoACalculation(); } @endcode - - It works by creating a window in the constructor, - and deleting it in the destructor. - + + 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: - + @code - wxWindowDisabler disableAll; - + wxWindowDisabler disableAll; + wxBusyInfo wait("Please wait, working..."); - - for (int i = 0; i 100000; i++) + + for (int i = 0; i < 100000; i++) { DoACalculation(); - + if ( !(i % 1000) ) wxTheApp-Yield(); } @endcode - - but take care to not cause undesirable reentrancies when doing it (see - wxApp::Yield for more details). The simplest way to do - it is to use wxWindowDisabler class as illustrated - in the above example. - + + but take care to not cause undesirable reentrancies when doing it (see + wxApp::Yield for more details). The simplest way to do it is to use + wxWindowDisabler class as illustrated in the above example. + @library{wxcore} - @category{FIXME} + @category{cmndlg} */ -class wxBusyInfo +class wxBusyInfo { public: /** - Constructs a busy info window as child of @e parent and displays @e msg - in it. - - @b NB: If @e parent is not @NULL you must ensure that it is not - closed while the busy info is shown. + Constructs a busy info window as child of @a parent and displays @e msg in it. + + @note If @a parent is not @NULL you must ensure that it is not + closed while the busy info is shown. */ - wxBusyInfo(const wxString& msg, wxWindow* parent = @NULL); + wxBusyInfo(const wxString& msg, wxWindow* parent = NULL); /** Hides and closes the window containing the information text. */ ~wxBusyInfo(); }; +