Fix Ok/IsOk() mess in wxGDIObject-derived classes; also added

wxGDIObject::Create/CloneGDIRefData() and implemented them for (almost) all
ports


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50727 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-12-15 17:54:20 +00:00
parent d6906a06a2
commit 8f884a0dcc
161 changed files with 1244 additions and 1139 deletions

View File

@@ -27,15 +27,18 @@ class WXDLLIMPEXP_FWD_CORE wxMetafile;
class WXDLLEXPORT wxMetafileRefData: public wxGDIRefData
{
friend class WXDLLIMPEXP_FWD_CORE wxMetafile;
public:
wxMetafileRefData();
virtual ~wxMetafileRefData();
virtual bool IsOk() const { return m_metafile != 0; }
public:
WXHANDLE m_metafile;
int m_windowsMappingMode;
int m_width, m_height;
friend class WXDLLIMPEXP_FWD_CORE wxMetafile;
};
#define M_METAFILEDATA ((wxMetafileRefData *)m_refData)
@@ -51,8 +54,6 @@ public:
virtual bool SetClipboard(int width = 0, int height = 0);
virtual bool Play(wxDC *dc);
bool Ok() const { return IsOk(); }
bool IsOk() const { return (M_METAFILEDATA && (M_METAFILEDATA->m_metafile != 0)); };
// set/get the size of metafile for clipboard operations
wxSize GetSize() const { return wxSize(GetWidth(), GetHeight()); }
@@ -96,6 +97,9 @@ public:
protected:
virtual void DoGetSize(int *width, int *height) const;
virtual wxGDIRefData *CreateGDIRefData() const;
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
int m_windowsMappingMode;
wxMetafile* m_metaFile;