X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8907154c1a8a6882c6797d1f16393ddfb23e7f3a..9c97f8ea883afa5db14c37bea63f6d4c327b4596:/include/wx/msw/gdiimage.h diff --git a/include/wx/msw/gdiimage.h b/include/wx/msw/gdiimage.h index 8c6cd818cb..2a085f319f 100644 --- a/include/wx/msw/gdiimage.h +++ b/include/wx/msw/gdiimage.h @@ -20,9 +20,9 @@ #include "wx/gdicmn.h" // wxBITMAP_TYPE_INVALID #include "wx/list.h" -class WXDLLEXPORT wxGDIImageRefData; -class WXDLLEXPORT wxGDIImageHandler; -class WXDLLEXPORT wxGDIImage; +class WXDLLIMPEXP_FWD_CORE wxGDIImageRefData; +class WXDLLIMPEXP_FWD_CORE wxGDIImageHandler; +class WXDLLIMPEXP_FWD_CORE wxGDIImage; WX_DECLARE_EXPORTED_LIST(wxGDIImageHandler, wxGDIImageHandlerList); @@ -51,7 +51,7 @@ public: } // accessors - bool IsOk() const { return m_handle != 0; } + virtual bool IsOk() const { return m_handle != 0; } void SetSize(int w, int h) { m_width = w; m_height = h; } @@ -104,7 +104,7 @@ public: // real handler operations: to implement in derived classes virtual bool Create(wxGDIImage *image, - void *data, + const void* data, long flags, int width, int height, int depth = 1) = 0; virtual bool Load(wxGDIImage *image, @@ -154,8 +154,6 @@ public: void SetHandle(WXHANDLE handle) { AllocExclusive(); GetGDIImageData()->m_handle = handle; } - bool Ok() const { return GetHandle() != 0; } - int GetWidth() const { return IsNull() ? 0 : GetGDIImageData()->m_width; } int GetHeight() const { return IsNull() ? 0 : GetGDIImageData()->m_height; } int GetDepth() const { return IsNull() ? 0 : GetGDIImageData()->m_depth; } @@ -179,8 +177,17 @@ protected: // create the data for the derived class here virtual wxGDIImageRefData *CreateData() const = 0; - // implement the wxObject method in terms of our, more specific, one - virtual wxObjectRefData *CreateRefData() const { return CreateData(); } + // implement the wxGDIObject method in terms of our, more specific, one + virtual wxGDIRefData *CreateGDIRefData() const { return CreateData(); } + + // we can't [efficiently] clone objects of this class + virtual wxGDIRefData * + CloneGDIRefData(const wxGDIRefData *WXUNUSED(data)) const + { + wxFAIL_MSG( _T("must be implemented if used") ); + + return NULL; + } static wxGDIImageHandlerList ms_handlers; };