wxWidgets: wxBusyInfo Class Reference

| Version: 3.0.5

Public Member Functions | List of all members
wxBusyInfo Class Reference
Class List by Category » Common Dialogs

`#include </home/Hamis/wxwidgets/wxWidgets3.0/wxWidgets3.0-3.0.5.1-2.x86_64/src/wxWidgets-3.0.5.1/interface/wx/busyinfo.h>`

## Detailed Description

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:

wxBusyInfo wait("Please wait, working...");
for (int i = 0; i < 100000; i++)
{
DoACalculation();
}
wxBusyInfo
This class makes it easy to tell your user that the program is temporarily busy.
Definition: busyinfo.h:57

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:

wxWindowDisabler disableAll;
wxBusyInfo wait("Please wait, working...");
for (int i = 0; i < 100000; i++)
{
DoACalculation();
if ( !(i % 1000) )
wxTheApp->Yield();
}
wxAppConsole::Yield
bool Yield(bool onlyIfNeeded=false)
Process all pending events; it is necessary to call this function to process events posted with wxEvt...
wxWindowDisabler
This class disables all windows of the application (may be with the exception of one of them) in its ...
Definition: utils.h:74
wxTheApp
wxApp * wxTheApp
The global pointer to the singleton wxApp object.
Definition: app.h:961

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.

Note that a wxBusyInfo is always built with the `wxSTAY_ON_TOP` window style (see wxFrame window styles for more info).

##

Library: wxCore

<>< =''>:</>&;&;< =''>\ </></>

## Public Member Functions
| wxBusyInfo (const wxString &msg, wxWindow *parent=NULL)
| Constructs a busy info window as child of parent and displays msg in it. More...
virtual | ~wxBusyInfo ()
| Hides and closes the window containing the information text. More...

## Constructor & Destructor Documentation

## ◆ wxBusyInfo()

wxBusyInfo::wxBusyInfo | ( | const wxString & | msg,
|  | wxWindow * | parent = `NULL`
| ) |  |

Constructs a busy info window as child of parent and displays msg in it.

Note
  If parent is not NULL you must ensure that it is not closed while the busy info is shown.

## ◆ ~wxBusyInfo()

virtual wxBusyInfo::~wxBusyInfo | ( |  | ) |
| virtual

Hides and closes the window containing the information text.