Useful little fix that automatically hides the busy cursor in modal dialogs.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3360 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Karsten Ballüder
1999-08-12 15:36:50 +00:00
parent 265b457741
commit eebe401675
4 changed files with 30 additions and 7 deletions

View File

@@ -17,5 +17,27 @@
#include "wx/stubs/cursor.h"
#endif
#include "wx/utils.h"
/* This is a small class which can be used by all ports
to temporarily suspend the busy cursor. Useful in modal
dialogs.
*/
class wxBusyCursorSuspender
{
public:
wxBusyCursorSuspender()
{
m_wasBusy = wxIsBusy();
if(m_wasBusy)
wxEndBusyCursor();
}
~wxBusyCursorSuspender()
{
if(m_wasBusy)
wxBeginBusyCursor();
}
private:
bool m_wasBusy;
};
#endif
// _WX_CURSOR_H_BASE_