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:
@@ -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_
|
||||
|
Reference in New Issue
Block a user