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