X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/670f9935630beb2123a5ca62894ae92a3f0efa4f..89efaf2b6595e59af618556d7e79492cab50c73c:/src/x11/cursor.cpp diff --git a/src/x11/cursor.cpp b/src/x11/cursor.cpp index b94f974e5a..7eaa5e6fde 100644 --- a/src/x11/cursor.cpp +++ b/src/x11/cursor.cpp @@ -16,12 +16,12 @@ #ifndef WX_PRECOMP #include "wx/app.h" + #include "wx/utils.h" + #include "wx/icon.h" + #include "wx/gdicmn.h" + #include "wx/image.h" #endif -#include "wx/gdicmn.h" -#include "wx/icon.h" -#include "wx/utils.h" - #include "wx/x11/private.h" #if !wxUSE_NANOX @@ -32,12 +32,12 @@ // wxCursor //----------------------------------------------------------------------------- -class wxCursorRefData: public wxObjectRefData +class wxCursorRefData: public wxGDIRefData { public: wxCursorRefData(); - ~wxCursorRefData(); + virtual ~wxCursorRefData(); WXCursor m_cursor; WXDisplay *m_display; @@ -66,7 +66,7 @@ wxCursor::wxCursor() } -wxCursor::wxCursor( int cursorId ) +void wxCursor::InitFromStock( wxStockCursor cursorId ) { m_refData = new wxCursorRefData(); @@ -124,15 +124,15 @@ wxCursor::wxCursor( int cursorId ) #endif } -wxCursor::wxCursor(const char bits[], int width, int height, - int hotSpotX, int hotSpotY, - const char maskBits[], wxColour *fg, wxColour *bg) +wxCursor::wxCursor(const wxString& name, + wxBitmapType type, + int hotSpotX, int hotSpotY) { - wxFAIL_MSG( wxT("wxCursor creation from bits not yet implemented") ); + wxFAIL_MSG( wxT("wxCursor creation from file not yet implemented") ); } #if wxUSE_IMAGE -wxCursor::wxCursor( const wxImage & image ) +wxCursor::wxCursor( const wxImage & WXUNUSED(image) ) { wxFAIL_MSG( wxT("wxCursor creation from wxImage not yet implemented") ); } @@ -142,19 +142,14 @@ wxCursor::~wxCursor() { } -bool wxCursor::operator == ( const wxCursor& cursor ) const -{ - return m_refData == cursor.m_refData; -} - -bool wxCursor::operator != ( const wxCursor& cursor ) const +wxGDIRefData *wxCursor::CreateGDIRefData() const { - return m_refData != cursor.m_refData; + return new wxCursorRefData; } -bool wxCursor::Ok() const +wxGDIRefData *wxCursor::CloneGDIRefData(const wxGDIRefData *data) const { - return (m_refData != NULL); + return new wxCursorRefData(*static_cast(data)); } WXCursor wxCursor::GetCursor() const