X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d4f392ea20e048c68626a14181cbf78c8baff3a5..12bb29f5432174ecbd65549bda832d70d34a98ae:/src/dfb/cursor.cpp diff --git a/src/dfb/cursor.cpp b/src/dfb/cursor.cpp index a7dcccf3ec..e013a91295 100644 --- a/src/dfb/cursor.cpp +++ b/src/dfb/cursor.cpp @@ -30,6 +30,15 @@ public: virtual bool IsOk() const { return m_bitmap.IsOk(); } + // Create a deep copy of this object. + wxCursorRefData *Clone() const + { + wxBitmap bitmapCopy(m_bitmap); + bitmapCopy.UnShare(); + + return new wxCursorRefData(bitmapCopy, m_id); + } + int m_id; wxBitmap m_bitmap; }; @@ -43,23 +52,13 @@ public: IMPLEMENT_DYNAMIC_CLASS(wxCursor, wxObject) -wxCursor::wxCursor(wxStockCursor cursorId) +void wxCursor::InitFromStock(wxStockCursor cursorId) { #warning "FIXME -- implement the cursor as bitmaps (that's what DFB uses)" } -wxCursor::wxCursor(const char WXUNUSED(bits)[], - int WXUNUSED(width), - int WXUNUSED(height), - int WXUNUSED(hotSpotX), int WXUNUSED(hotSpotY), - const char WXUNUSED(maskBits)[], - wxColour * WXUNUSED(fg), wxColour * WXUNUSED(bg) ) -{ -#warning "FIXME" -} - wxCursor::wxCursor(const wxString& cursor_file, - long flags, + wxBitmapType type, int WXUNUSED(hotSpotX), int WXUNUSED(hotSpotY)) { #warning "FIXME" @@ -72,7 +71,7 @@ wxGDIRefData *wxCursor::CreateGDIRefData() const wxGDIRefData *wxCursor::CloneGDIRefData(const wxGDIRefData *data) const { - return new wxCursorRefData(*(wxCursorRefData *)data); + return static_cast(data)->Clone(); }