X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d9317fd47263a9521466156d7bf0f7988000bf15..8fb3bfe20f221dcb868d685d705c5fddb2deef11:/src/msw/enhmeta.cpp 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