]> git.saurik.com Git - wxWidgets.git/blob - src/palmos/enhmeta.cpp
Forgot header with OSX prefix
[wxWidgets.git] / src / palmos / enhmeta.cpp
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: src/palmos/enhmeta.cpp
3 // Purpose: implementation of wxEnhMetaFileXXX classes
4 // Author: William Osborne - minimal working wxPalmOS port
5 // Modified by:
6 // Created: 10.13.04
7 // RCS-ID: $Id$
8 // Copyright: (c) William Osborne
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
11
12 // ============================================================================
13 // declarations
14 // ============================================================================
15
16 // ----------------------------------------------------------------------------
17 // headers
18 // ----------------------------------------------------------------------------
19
20 // For compilers that support precompilation, includes "wx.h".
21 #include "wx/wxprec.h"
22
23 #ifdef __BORLANDC__
24 #pragma hdrstop
25 #endif
26
27 #if wxUSE_ENH_METAFILE
28
29 #ifndef WX_PRECOMP
30 #include "wx/string.h"
31 #include "wx/log.h"
32 #endif //WX_PRECOMP
33
34 #include "wx/metafile.h"
35 #include "wx/clipbrd.h"
36
37 #include "wx/palmos/private.h"
38
39 // ----------------------------------------------------------------------------
40 // wxWin macros
41 // ----------------------------------------------------------------------------
42
43 IMPLEMENT_DYNAMIC_CLASS(wxEnhMetaFile, wxObject)
44 IMPLEMENT_ABSTRACT_CLASS(wxEnhMetaFileDC, wxDC)
45
46 // ----------------------------------------------------------------------------
47 // macros
48 // ----------------------------------------------------------------------------
49
50 #define GetEMF() ((HENHMETAFILE)m_hMF)
51 #define GetEMFOf(mf) ((HENHMETAFILE)((mf).m_hMF))
52
53 // ----------------------------------------------------------------------------
54 // private functions
55 // ----------------------------------------------------------------------------
56
57 // we must pass NULL if the string is empty to metafile functions
58 static inline const wxChar *GetMetaFileName(const wxString& fn)
59 { return !fn ? NULL : fn.c_str(); }
60
61 // ============================================================================
62 // implementation
63 // ============================================================================
64
65 // ----------------------------------------------------------------------------
66 // wxEnhMetaFile
67 // ----------------------------------------------------------------------------
68
69 void wxEnhMetaFile::Assign(const wxEnhMetaFile& mf)
70 {
71 }
72
73 void wxEnhMetaFile::Free()
74 {
75 }
76
77 bool wxEnhMetaFile::Play(wxDC *dc, wxRect *rectBound)
78 {
79 return false;
80 }
81
82 wxSize wxEnhMetaFile::GetSize() const
83 {
84 wxSize size = wxDefaultSize;
85
86 return size;
87 }
88
89 bool wxEnhMetaFile::SetClipboard(int WXUNUSED(width), int WXUNUSED(height))
90 {
91 return false;
92 }
93
94 // ----------------------------------------------------------------------------
95 // wxEnhMetaFileDC
96 // ----------------------------------------------------------------------------
97
98 wxEnhMetaFileDC::wxEnhMetaFileDC(const wxString& filename,
99 int width, int height,
100 const wxString& description)
101 {
102 }
103
104 wxEnhMetaFile *wxEnhMetaFileDC::Close()
105 {
106 return NULL;
107 }
108
109 wxEnhMetaFileDC::~wxEnhMetaFileDC()
110 {
111 }
112
113 #if wxUSE_DRAG_AND_DROP
114
115 // ----------------------------------------------------------------------------
116 // wxEnhMetaFileDataObject
117 // ----------------------------------------------------------------------------
118
119 wxDataFormat
120 wxEnhMetaFileDataObject::GetPreferredFormat(Direction WXUNUSED(dir)) const
121 {
122 return wxDF_ENHMETAFILE;
123 }
124
125 size_t wxEnhMetaFileDataObject::GetFormatCount(Direction WXUNUSED(dir)) const
126 {
127 // wxDF_ENHMETAFILE and wxDF_METAFILE
128 return 2;
129 }
130
131 void wxEnhMetaFileDataObject::GetAllFormats(wxDataFormat *formats,
132 Direction WXUNUSED(dir)) const
133 {
134 }
135
136 size_t wxEnhMetaFileDataObject::GetDataSize(const wxDataFormat& format) const
137 {
138 return 0u;
139 }
140
141 bool wxEnhMetaFileDataObject::GetDataHere(const wxDataFormat& format, void *buf) const
142 {
143 return false;
144 }
145
146 bool wxEnhMetaFileDataObject::SetData(const wxDataFormat& format,
147 size_t WXUNUSED(len),
148 const void *buf)
149 {
150 return false;
151 }
152
153 // ----------------------------------------------------------------------------
154 // wxEnhMetaFileSimpleDataObject
155 // ----------------------------------------------------------------------------
156
157 size_t wxEnhMetaFileSimpleDataObject::GetDataSize() const
158 {
159 return 0u;
160 }
161
162 bool wxEnhMetaFileSimpleDataObject::GetDataHere(void *buf) const
163 {
164 return false;
165 }
166
167 bool wxEnhMetaFileSimpleDataObject::SetData(size_t WXUNUSED(len),
168 const void *buf)
169 {
170 return false;
171 }
172
173
174 #endif // wxUSE_DRAG_AND_DROP
175
176 #endif // wxUSE_ENH_METAFILE