X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b3c861501a451503b31c075ccb59d16b0ae01e99..e559d790fb102c4f97c19152dbcc76aae312d945:/src/dfb/cursor.cpp diff --git a/src/dfb/cursor.cpp b/src/dfb/cursor.cpp index 58417b3d3b..0751f9ae4e 100644 --- a/src/dfb/cursor.cpp +++ b/src/dfb/cursor.cpp @@ -22,12 +22,14 @@ // wxCursorRefData //----------------------------------------------------------------------------- -class wxCursorRefData: public wxObjectRefData +class wxCursorRefData : public wxGDIRefData { public: wxCursorRefData(const wxBitmap& bmp = wxNullBitmap, int id = -1) : m_id(id), m_bitmap(bmp) {} + virtual bool IsOk() const { return m_bitmap.IsOk(); } + int m_id; wxBitmap m_bitmap; }; @@ -63,36 +65,12 @@ wxCursor::wxCursor(const wxString& cursor_file, #warning "FIXME" } -bool wxCursor::Ok() const -{ - return m_refData && M_CURSOR->m_bitmap.Ok(); -} - -bool wxCursor::operator==(const wxCursor& cursor) const -{ - if ( Ok() ) - { - if ( !cursor.Ok() ) - return false; - else if ( M_CURSOR->m_id != M_CURSOR_OF(cursor)->m_id ) - return false; - else if ( M_CURSOR->m_id == -1 ) // non-stock cursor - return (m_refData == cursor.m_refData); - else - return true; // IDs != -1 and are the same - } - else - { - return !cursor.Ok(); - } -} - -wxObjectRefData *wxCursor::CreateRefData() const +wxGDIRefData *wxCursor::CreateGDIRefData() const { return new wxCursorRefData; } -wxObjectRefData *wxCursor::CloneRefData(const wxObjectRefData *data) const +wxGDIRefData *wxCursor::CloneGDIRefData(const wxGDIRefData *data) const { return new wxCursorRefData(*(wxCursorRefData *)data); }