]> git.saurik.com Git - wxWidgets.git/blame - include/wx/cursor.h
switched to using wxPopupWindow
[wxWidgets.git] / include / wx / cursor.h
CommitLineData
34138703
JS
1#ifndef _WX_CURSOR_H_BASE_
2#define _WX_CURSOR_H_BASE_
c801d85f 3
4055ed82 4#if defined(__WXPALMOS__)
ffecfa5a
JS
5#include "wx/palmos/cursor.h"
6#elif defined(__WXMSW__)
c801d85f 7#include "wx/msw/cursor.h"
2049ba38 8#elif defined(__WXMOTIF__)
34138703 9#include "wx/motif/cursor.h"
2049ba38 10#elif defined(__WXGTK__)
c801d85f 11#include "wx/gtk/cursor.h"
83df96d6
JS
12#elif defined(__WXX11__)
13#include "wx/x11/cursor.h"
1e6feb95
VZ
14#elif defined(__WXMGL__)
15#include "wx/mgl/cursor.h"
34138703
JS
16#elif defined(__WXMAC__)
17#include "wx/mac/cursor.h"
e64df9bc
DE
18#elif defined(__WXCOCOA__)
19#include "wx/cocoa/cursor.h"
1777b9bb
DW
20#elif defined(__WXPM__)
21#include "wx/os2/cursor.h"
c801d85f
KB
22#endif
23
eebe4016 24#include "wx/utils.h"
83141d3a 25
eebe4016
KB
26/* This is a small class which can be used by all ports
27 to temporarily suspend the busy cursor. Useful in modal
28 dialogs.
f6bcfd97
BP
29
30 Actually that is not (any longer) quite true.. currently it is
31 only used in wxGTK Dialog::ShowModal() and now uses static
32 wxBusyCursor methods that are only implemented for wxGTK so far.
33 The BusyCursor handling code should probably be implemented in
34 common code somewhere instead of the separate implementations we
35 currently have. Also the name BusyCursorSuspender is a little
36 misleading since it doesn't actually suspend the BusyCursor, just
37 masks one that is already showing.
38 If another call to wxBeginBusyCursor is made while this is active
39 the Busy Cursor will again be shown. But at least now it doesn't
40 interfere with the state of wxIsBusy() -- RL
41
eebe4016
KB
42*/
43class wxBusyCursorSuspender
44{
45public:
f6bcfd97
BP
46 wxBusyCursorSuspender()
47 {
48 if( wxIsBusy() )
49 {
50 wxSetCursor( wxBusyCursor::GetStoredCursor() );
f6bcfd97
BP
51 }
52 }
53 ~wxBusyCursorSuspender()
54 {
55 if( wxIsBusy() )
56 {
57 wxSetCursor( wxBusyCursor::GetBusyCursor() );
f6bcfd97
BP
58 }
59 }
eebe4016 60};
c801d85f 61#endif
34138703 62 // _WX_CURSOR_H_BASE_