Build wxMetafileDataObject when wxUSE_DATAOBJ==1

wxMetafileDataObject is a specialization of wxDataObject and its
compilation should be controlled directly by wxUSE_DATAOBJ (like it's done
under wxOSX, see e.g. include/wx/osx/metafile.h), not by
wxUSE_DRAG_AND_DROP.
This commit is contained in:
Artur Wieczorek
2017-05-01 19:30:40 +02:00
parent d7f70fc462
commit 2dd726471f
4 changed files with 9 additions and 9 deletions

View File

@@ -32,7 +32,7 @@
#else // also map all metafile classes to enh metafile #else // also map all metafile classes to enh metafile
typedef wxEnhMetaFile wxMetafile; typedef wxEnhMetaFile wxMetafile;
typedef wxEnhMetaFileDC wxMetafileDC; typedef wxEnhMetaFileDC wxMetafileDC;
#if wxUSE_DRAG_AND_DROP #if wxUSE_DATAOBJ
typedef wxEnhMetaFileDataObject wxMetafileDataObject; typedef wxEnhMetaFileDataObject wxMetafileDataObject;
#endif #endif

View File

@@ -14,7 +14,7 @@
#include "wx/dc.h" #include "wx/dc.h"
#include "wx/gdiobj.h" #include "wx/gdiobj.h"
#if wxUSE_DRAG_AND_DROP #if wxUSE_DATAOBJ
#include "wx/dataobj.h" #include "wx/dataobj.h"
#endif #endif
@@ -109,7 +109,7 @@ private:
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxEnhMetaFileDC); wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxEnhMetaFileDC);
}; };
#if wxUSE_DRAG_AND_DROP #if wxUSE_DATAOBJ
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxEnhMetaFileDataObject is a specialization of wxDataObject for enh metafile // wxEnhMetaFileDataObject is a specialization of wxDataObject for enh metafile
@@ -190,6 +190,6 @@ protected:
wxDECLARE_NO_COPY_CLASS(wxEnhMetaFileSimpleDataObject); wxDECLARE_NO_COPY_CLASS(wxEnhMetaFileSimpleDataObject);
}; };
#endif // wxUSE_DRAG_AND_DROP #endif // wxUSE_DATAOBJ
#endif // _WX_MSW_ENHMETA_H_ #endif // _WX_MSW_ENHMETA_H_

View File

@@ -14,7 +14,7 @@
#include "wx/dc.h" #include "wx/dc.h"
#include "wx/gdiobj.h" #include "wx/gdiobj.h"
#if wxUSE_DRAG_AND_DROP #if wxUSE_DATAOBJ
#include "wx/dataobj.h" #include "wx/dataobj.h"
#endif #endif
@@ -155,7 +155,7 @@ bool WXDLLIMPEXP_CORE wxMakeMetaFilePlaceable(const wxString& filename, int x1,
// wxMetafileDataObject is a specialization of wxDataObject for metafile data // wxMetafileDataObject is a specialization of wxDataObject for metafile data
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if wxUSE_DRAG_AND_DROP #if wxUSE_DATAOBJ
class WXDLLIMPEXP_CORE wxMetafileDataObject : public wxDataObjectSimple class WXDLLIMPEXP_CORE wxMetafileDataObject : public wxDataObjectSimple
{ {
@@ -182,7 +182,7 @@ protected:
wxMetafile m_metafile; wxMetafile m_metafile;
}; };
#endif // wxUSE_DRAG_AND_DROP #endif // wxUSE_DATAOBJ
#endif #endif
// _WX_METAFIILE_H_ // _WX_METAFIILE_H_

View File

@@ -456,7 +456,7 @@ bool wxMakeMetafilePlaceable(const wxString& filename, int x1, int y1, int x2, i
} }
#if wxUSE_DRAG_AND_DROP #if wxUSE_DATAOBJ
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxMetafileDataObject // wxMetafileDataObject
@@ -515,6 +515,6 @@ bool wxMetafileDataObject::SetData(size_t WXUNUSED(len), const void *buf)
return true; return true;
} }
#endif // wxUSE_DRAG_AND_DROP #endif // wxUSE_DATAOBJ
#endif // wxUSE_METAFILE #endif // wxUSE_METAFILE