X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f0875501313903140a41dca0ba6ee2d85ed0536c..6cab4fcac7fe26d9ae5a1d29066e0893d689bb38:/src/msw/enhmeta.cpp?ds=sidebyside diff --git a/src/msw/enhmeta.cpp b/src/msw/enhmeta.cpp index fe4d384aca..82d4adf106 100644 --- a/src/msw/enhmeta.cpp +++ b/src/msw/enhmeta.cpp @@ -69,6 +69,21 @@ static inline const wxChar *GetMetaFileName(const wxString& fn) // wxEnhMetaFile // ---------------------------------------------------------------------------- +wxGDIRefData *wxEnhMetaFile::CreateGDIRefData() const +{ + wxFAIL_MSG( _T("must be implemented if used") ); + + return NULL; +} + +wxGDIRefData * +wxEnhMetaFile::CloneGDIRefData(const wxGDIRefData *WXUNUSED(data)) const +{ + wxFAIL_MSG( _T("must be implemented if used") ); + + return NULL; +} + void wxEnhMetaFile::Init() { if ( m_filename.empty() ) @@ -194,7 +209,7 @@ bool wxEnhMetaFile::SetClipboard(int WXUNUSED(width), int WXUNUSED(height)) } // ---------------------------------------------------------------------------- -// wxEnhMetaFileDC +// wxEnhMetaFileDCImpl // ---------------------------------------------------------------------------- class wxEnhMetaFileDCImpl : public wxMSWDCImpl @@ -218,24 +233,11 @@ private: }; -IMPLEMENT_ABSTRACT_CLASS(wxEnhMetaFileDC, wxDC) - -wxEnhMetaFileDC::wxEnhMetaFileDC(const wxString& filename, - int width, int height, - const wxString& description) - : wxDC(new wxEnhMetaFileDCImpl(this, - filename, - width, height, - description)) -{ -} - - wxEnhMetaFileDCImpl::wxEnhMetaFileDCImpl( wxEnhMetaFileDC* owner, const wxString& filename, int width, int height, const wxString& description ) - : wxMSWDCImpl( owner ) + : wxMSWDCImpl( owner ) { m_width = width; m_height = height; @@ -300,6 +302,31 @@ wxEnhMetaFileDCImpl::~wxEnhMetaFileDCImpl() m_hDC = 0; } +// ---------------------------------------------------------------------------- +// wxEnhMetaFileDC +// ---------------------------------------------------------------------------- + +IMPLEMENT_ABSTRACT_CLASS(wxEnhMetaFileDC, wxDC) + +wxEnhMetaFileDC::wxEnhMetaFileDC(const wxString& filename, + int width, int height, + const wxString& description) + : wxDC(new wxEnhMetaFileDCImpl(this, + filename, + width, height, + description)) +{ +} + +wxEnhMetaFile *wxEnhMetaFileDC::Close() +{ + wxEnhMetaFileDCImpl * const + impl = static_cast(GetImpl()); + wxCHECK_MSG( impl, NULL, _T("no wxEnhMetaFileDC implementation") ); + + return impl->Close(); +} + #if wxUSE_DRAG_AND_DROP // ----------------------------------------------------------------------------