]>
git.saurik.com Git - wxWidgets.git/blob - src/qt/cursor.cpp
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
7 // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
13 #pragma implementation "cursor.h"
16 #include "wx/cursor.h"
18 //-----------------------------------------------------------------------------
20 //-----------------------------------------------------------------------------
22 class wxCursorRefData
: public wxObjectRefData
26 wxCursorRefData(void);
27 ~wxCursorRefData(void);
31 wxCursorRefData::wxCursorRefData(void)
35 wxCursorRefData::~wxCursorRefData(void)
39 //-----------------------------------------------------------------------------
41 #define M_CURSORDATA ((wxCursorRefData *)m_refData)
43 IMPLEMENT_DYNAMIC_CLASS(wxCursor
,wxObject
)
45 wxCursor::wxCursor(void)
49 wxCursor::wxCursor( int WXUNUSED(cursorId
) )
51 m_refData
= new wxCursorRefData();
54 wxCursor::wxCursor( const wxCursor
&cursor
)
59 wxCursor::wxCursor( const wxCursor
*cursor
)
62 if (cursor
) Ref( *cursor
);
65 wxCursor::~wxCursor(void)
69 wxCursor
& wxCursor::operator = ( const wxCursor
& cursor
)
71 if (*this == cursor
) return (*this);
76 bool wxCursor::operator == ( const wxCursor
& cursor
)
78 return m_refData
== cursor
.m_refData
;
81 bool wxCursor::operator != ( const wxCursor
& cursor
)
83 return m_refData
!= cursor
.m_refData
;
86 bool wxCursor::Ok(void) const
91 //-----------------------------------------------------------------------------
92 // busy cursor routines
93 //-----------------------------------------------------------------------------
95 bool g_isBusy
= FALSE
;
97 void wxEndBusyCursor(void)
102 void wxBeginBusyCursor( wxCursor
*WXUNUSED(cursor
) )
112 void wxSetCursor( const wxCursor
& cursor
)
114 extern wxCursor
*g_globalCursor
;
115 if (g_globalCursor
) (*g_globalCursor
) = cursor
;