]> git.saurik.com Git - wxWidgets.git/blob - src/qt/cursor.cpp
More configure fixes
[wxWidgets.git] / src / qt / cursor.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: cursor.cpp
3 // Purpose:
4 // Author: Robert Roebling
5 // Created: 01/02/97
6 // Id:
7 // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11
12 #ifdef __GNUG__
13 #pragma implementation "cursor.h"
14 #endif
15
16 #include "wx/cursor.h"
17
18 //-----------------------------------------------------------------------------
19 // wxCursor
20 //-----------------------------------------------------------------------------
21
22 class wxCursorRefData: public wxObjectRefData
23 {
24 public:
25
26 wxCursorRefData(void);
27 ~wxCursorRefData(void);
28
29 };
30
31 wxCursorRefData::wxCursorRefData(void)
32 {
33 };
34
35 wxCursorRefData::~wxCursorRefData(void)
36 {
37 };
38
39 //-----------------------------------------------------------------------------
40
41 #define M_CURSORDATA ((wxCursorRefData *)m_refData)
42
43 IMPLEMENT_DYNAMIC_CLASS(wxCursor,wxObject)
44
45 wxCursor::wxCursor(void)
46 {
47 };
48
49 wxCursor::wxCursor( int WXUNUSED(cursorId) )
50 {
51 m_refData = new wxCursorRefData();
52 };
53
54 wxCursor::wxCursor( const wxCursor &cursor )
55 {
56 Ref( cursor );
57 };
58
59 wxCursor::wxCursor( const wxCursor *cursor )
60 {
61 UnRef();
62 if (cursor) Ref( *cursor );
63 };
64
65 wxCursor::~wxCursor(void)
66 {
67 };
68
69 wxCursor& wxCursor::operator = ( const wxCursor& cursor )
70 {
71 if (*this == cursor) return (*this);
72 Ref( cursor );
73 return *this;
74 };
75
76 bool wxCursor::operator == ( const wxCursor& cursor )
77 {
78 return m_refData == cursor.m_refData;
79 };
80
81 bool wxCursor::operator != ( const wxCursor& cursor )
82 {
83 return m_refData != cursor.m_refData;
84 };
85
86 bool wxCursor::Ok(void) const
87 {
88 return TRUE;
89 };
90
91 //-----------------------------------------------------------------------------
92 // busy cursor routines
93 //-----------------------------------------------------------------------------
94
95 bool g_isBusy = FALSE;
96
97 void wxEndBusyCursor(void)
98 {
99 g_isBusy = FALSE;
100 };
101
102 void wxBeginBusyCursor( wxCursor *WXUNUSED(cursor) )
103 {
104 g_isBusy = TRUE;
105 };
106
107 bool wxIsBusy(void)
108 {
109 return g_isBusy;
110 };
111
112 void wxSetCursor( const wxCursor& cursor )
113 {
114 extern wxCursor *g_globalCursor;
115 if (g_globalCursor) (*g_globalCursor) = cursor;
116
117 if (cursor.Ok()) {};
118 };
119
120