X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fbfb8bcc3fa17e079d4219655b173f8ed2ccc65a..61a0b9059a22e0f8b16e4396d0f8cbf49f31998f:/include/wx/mac/classic/metafile.h diff --git a/include/wx/mac/classic/metafile.h b/include/wx/mac/classic/metafile.h index 7026e1bc54..b42deec6fa 100644 --- a/include/wx/mac/classic/metafile.h +++ b/include/wx/mac/classic/metafile.h @@ -38,7 +38,7 @@ class WXDLLEXPORT wxMetafileRefData: public wxGDIRefData friend class WXDLLEXPORT wxMetafile; public: wxMetafileRefData(void); - ~wxMetafileRefData(void); + virtual ~wxMetafileRefData(void); public: WXHMETAFILE m_metafile; @@ -50,20 +50,16 @@ class WXDLLEXPORT wxMetafile: public wxGDIObject { DECLARE_DYNAMIC_CLASS(wxMetafile) public: - // Copy constructor - wxMetafile(const wxMetafile& metafile) - : wxGDIObject() - { Ref(metafile); } - wxMetafile(const wxString& file = wxEmptyString); - ~wxMetafile(void); + virtual ~wxMetafile(void); // After this is called, the metafile cannot be used for anything // since it is now owned by the clipboard. virtual bool SetClipboard(int width = 0, int height = 0); virtual bool Play(wxDC *dc); - inline bool Ok(void) const { return (M_METAFILEDATA && (M_METAFILEDATA->m_metafile != 0)); }; + inline bool Ok() const { return IsOk(); } + inline bool IsOk(void) const { return (M_METAFILEDATA && (M_METAFILEDATA->m_metafile != 0)); }; wxSize GetSize() const; int GetWidth() const { return GetSize().x; } @@ -74,7 +70,6 @@ public: void SetHMETAFILE(WXHMETAFILE mf) ; // Operators - inline wxMetafile& operator = (const wxMetafile& metafile) { if (*this == metafile) return (*this); Ref(metafile); return *this; } inline bool operator == (const wxMetafile& metafile) const { return m_refData == metafile.m_refData; } inline bool operator != (const wxMetafile& metafile) const { return m_refData != metafile.m_refData; } @@ -92,7 +87,7 @@ class WXDLLEXPORT wxMetafileDC: public wxDC int width = 0, int height = 0, const wxString& description = wxEmptyString); - ~wxMetafileDC(void); + virtual ~wxMetafileDC(void); // Should be called at end of drawing virtual wxMetafile *Close(void);