]> git.saurik.com Git - wxWidgets.git/blob - include/wx/cursor.h
Get SetLabel working again for wxStaticText by overriding SetLabel so that we can...
[wxWidgets.git] / include / wx / cursor.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/cursor.h
3 // Purpose: wxCursor base header
4 // Author: Julian Smart
5 // Modified by:
6 // Created:
7 // Copyright: (c) Julian Smart
8 // RCS-ID: $Id$
9 // Licence: wxWindows Licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_CURSOR_H_BASE_
13 #define _WX_CURSOR_H_BASE_
14
15 #include "wx/defs.h"
16
17 #if defined(__WXPALMOS__)
18 #define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_CUR_RESOURCE
19 #include "wx/palmos/cursor.h"
20 #elif defined(__WXMSW__)
21 #define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_CUR_RESOURCE
22 #include "wx/msw/cursor.h"
23 #elif defined(__WXMOTIF__)
24 #define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_XBM
25 #include "wx/motif/cursor.h"
26 #elif defined(__WXGTK20__)
27 #define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_XPM
28 #include "wx/gtk/cursor.h"
29 #elif defined(__WXGTK__)
30 #define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_XPM
31 #include "wx/gtk1/cursor.h"
32 #elif defined(__WXX11__)
33 #define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_XPM
34 #include "wx/x11/cursor.h"
35 #elif defined(__WXMGL__)
36 #define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_CUR_RESOURCE
37 #include "wx/mgl/cursor.h"
38 #elif defined(__WXDFB__)
39 #define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_CUR_RESOURCE
40 #include "wx/dfb/cursor.h"
41 #elif defined(__WXMAC__)
42 #define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_MACCURSOR_RESOURCE
43 #include "wx/osx/cursor.h"
44 #elif defined(__WXCOCOA__)
45 #define wxCURSOR_DEFAULT_TYPE 0
46 #include "wx/cocoa/cursor.h"
47 #elif defined(__WXPM__)
48 #define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_CUR_RESOURCE
49 #include "wx/os2/cursor.h"
50 #endif
51
52 #include "wx/utils.h"
53
54 /* This is a small class which can be used by all ports
55 to temporarily suspend the busy cursor. Useful in modal
56 dialogs.
57
58 Actually that is not (any longer) quite true.. currently it is
59 only used in wxGTK Dialog::ShowModal() and now uses static
60 wxBusyCursor methods that are only implemented for wxGTK so far.
61 The BusyCursor handling code should probably be implemented in
62 common code somewhere instead of the separate implementations we
63 currently have. Also the name BusyCursorSuspender is a little
64 misleading since it doesn't actually suspend the BusyCursor, just
65 masks one that is already showing.
66 If another call to wxBeginBusyCursor is made while this is active
67 the Busy Cursor will again be shown. But at least now it doesn't
68 interfere with the state of wxIsBusy() -- RL
69
70 */
71 class wxBusyCursorSuspender
72 {
73 public:
74 wxBusyCursorSuspender()
75 {
76 if( wxIsBusy() )
77 {
78 wxSetCursor( wxBusyCursor::GetStoredCursor() );
79 }
80 }
81 ~wxBusyCursorSuspender()
82 {
83 if( wxIsBusy() )
84 {
85 wxSetCursor( wxBusyCursor::GetBusyCursor() );
86 }
87 }
88 };
89 #endif
90 // _WX_CURSOR_H_BASE_