]>
git.saurik.com Git - wxWidgets.git/blob - src/palmos/enhmeta.cpp
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: palmos/enhmeta.cpp
3 // Purpose: implementation of wxEnhMetaFileXXX classes
4 // Author: William Osborne
8 // Copyright: (c) William Osborne
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
12 // ============================================================================
14 // ============================================================================
16 // ----------------------------------------------------------------------------
18 // ----------------------------------------------------------------------------
20 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
21 #pragma implementation "enhmeta.h"
24 // For compilers that support precompilation, includes "wx.h".
25 #include "wx/wxprec.h"
31 #if wxUSE_ENH_METAFILE
34 #include "wx/string.h"
38 #include "wx/metafile.h"
39 #include "wx/clipbrd.h"
41 #include "wx/palmos/private.h"
43 // ----------------------------------------------------------------------------
45 // ----------------------------------------------------------------------------
47 IMPLEMENT_DYNAMIC_CLASS(wxEnhMetaFile
, wxObject
)
48 IMPLEMENT_ABSTRACT_CLASS(wxEnhMetaFileDC
, wxDC
)
50 // ----------------------------------------------------------------------------
52 // ----------------------------------------------------------------------------
54 #define GetEMF() ((HENHMETAFILE)m_hMF)
55 #define GetEMFOf(mf) ((HENHMETAFILE)((mf).m_hMF))
57 // ----------------------------------------------------------------------------
59 // ----------------------------------------------------------------------------
61 // we must pass NULL if the string is empty to metafile functions
62 static inline const wxChar
*GetMetaFileName(const wxString
& fn
)
63 { return !fn
? (wxChar
*)NULL
: fn
.c_str(); }
65 // ============================================================================
67 // ============================================================================
69 // ----------------------------------------------------------------------------
71 // ----------------------------------------------------------------------------
73 void wxEnhMetaFile::Assign(const wxEnhMetaFile
& mf
)
77 void wxEnhMetaFile::Free()
81 bool wxEnhMetaFile::Play(wxDC
*dc
, wxRect
*rectBound
)
86 wxSize
wxEnhMetaFile::GetSize() const
88 wxSize size
= wxDefaultSize
;
93 bool wxEnhMetaFile::SetClipboard(int WXUNUSED(width
), int WXUNUSED(height
))
98 // ----------------------------------------------------------------------------
100 // ----------------------------------------------------------------------------
102 wxEnhMetaFileDC::wxEnhMetaFileDC(const wxString
& filename
,
103 int width
, int height
,
104 const wxString
& description
)
108 wxEnhMetaFile
*wxEnhMetaFileDC::Close()
113 wxEnhMetaFileDC::~wxEnhMetaFileDC()
117 #if wxUSE_DRAG_AND_DROP
119 // ----------------------------------------------------------------------------
120 // wxEnhMetaFileDataObject
121 // ----------------------------------------------------------------------------
124 wxEnhMetaFileDataObject::GetPreferredFormat(Direction
WXUNUSED(dir
)) const
126 return wxDF_ENHMETAFILE
;
129 size_t wxEnhMetaFileDataObject::GetFormatCount(Direction
WXUNUSED(dir
)) const
131 // wxDF_ENHMETAFILE and wxDF_METAFILE
135 void wxEnhMetaFileDataObject::GetAllFormats(wxDataFormat
*formats
,
136 Direction
WXUNUSED(dir
)) const
140 size_t wxEnhMetaFileDataObject::GetDataSize(const wxDataFormat
& format
) const
145 bool wxEnhMetaFileDataObject::GetDataHere(const wxDataFormat
& format
, void *buf
) const
150 bool wxEnhMetaFileDataObject::SetData(const wxDataFormat
& format
,
151 size_t WXUNUSED(len
),
157 // ----------------------------------------------------------------------------
158 // wxEnhMetaFileSimpleDataObject
159 // ----------------------------------------------------------------------------
161 size_t wxEnhMetaFileSimpleDataObject::GetDataSize() const
166 bool wxEnhMetaFileSimpleDataObject::GetDataHere(void *buf
) const
171 bool wxEnhMetaFileSimpleDataObject::SetData(size_t WXUNUSED(len
),
178 #endif // wxUSE_DRAG_AND_DROP
180 #endif // wxUSE_ENH_METAFILE