X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d9317fd47263a9521466156d7bf0f7988000bf15..28be2e8a170979d476a5ea4f585505b8a2f5af27:/src/msw/enhmeta.cpp?ds=sidebyside diff --git a/src/msw/enhmeta.cpp b/src/msw/enhmeta.cpp index 6602ce9a24..2f1661b329 100644 --- a/src/msw/enhmeta.cpp +++ b/src/msw/enhmeta.cpp @@ -36,6 +36,7 @@ #endif //WX_PRECOMP #include "wx/metafile.h" +#include "wx/clipbrd.h" #include "wx/msw/private.h" @@ -161,6 +162,18 @@ wxSize wxEnhMetaFile::GetSize() const return size; } +bool wxEnhMetaFile::SetClipboard(int WXUNUSED(width), int WXUNUSED(height)) +{ +#if wxUSE_DRAG_AND_DROP + wxCHECK_MSG( m_hMF, FALSE, _T("can't copy invalid metafile to clipboard") ); + + return wxTheClipboard->AddData(new wxEnhMetaFileDataObject(*this)); +#else // !wxUSE_DRAG_AND_DROP + wxFAIL_MSG(_T("not implemented")); + return FALSE; +#endif // wxUSE_DRAG_AND_DROP/!wxUSE_DRAG_AND_DROP +} + // ---------------------------------------------------------------------------- // wxEnhMetaFileDC // ---------------------------------------------------------------------------- @@ -225,6 +238,8 @@ wxEnhMetaFileDC::~wxEnhMetaFileDC() // wxEnhMetaFileDataObject // ---------------------------------------------------------------------------- +#if wxUSE_DRAG_AND_DROP + wxDataFormat wxEnhMetaFileDataObject::GetPreferredFormat(Direction WXUNUSED(dir)) const { @@ -376,5 +391,6 @@ bool wxEnhMetaFileDataObject::SetData(const wxDataFormat& format, return TRUE; } +#endif // wxUSE_DRAG_AND_DROP #endif // wxUSE_ENH_METAFILE