]> git.saurik.com Git - wxWidgets.git/blob - src/palmos/metafile.cpp
cleanup
[wxWidgets.git] / src / palmos / metafile.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/palmos/metafile.cpp
3 // Purpose: wxMetafileDC etc.
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 #ifndef WX_PRECOMP
28 #include "wx/utils.h"
29 #include "wx/app.h"
30 #endif
31
32 #include "wx/metafile.h"
33
34 #if wxUSE_METAFILE && !defined(wxMETAFILE_IS_ENH)
35
36 #include "wx/clipbrd.h"
37 #include "wx/palmos/private.h"
38
39 #include <stdio.h>
40 #include <string.h>
41
42 // ----------------------------------------------------------------------------
43 // wxWin macros
44 // ----------------------------------------------------------------------------
45
46 IMPLEMENT_DYNAMIC_CLASS(wxMetafile, wxObject)
47 IMPLEMENT_ABSTRACT_CLASS(wxMetafileDC, wxDC)
48
49 // ============================================================================
50 // implementation
51 // ============================================================================
52
53 // ----------------------------------------------------------------------------
54 // wxMetafileRefData
55 // ----------------------------------------------------------------------------
56
57 /*
58 * Metafiles
59 * Currently, the only purpose for making a metafile is to put
60 * it on the clipboard.
61 */
62
63 wxMetafileRefData::wxMetafileRefData()
64 {
65 }
66
67 wxMetafileRefData::~wxMetafileRefData()
68 {
69 }
70
71 // ----------------------------------------------------------------------------
72 // wxMetafile
73 // ----------------------------------------------------------------------------
74
75 wxMetafile::wxMetafile(const wxString& file)
76 {
77 }
78
79 wxMetafile::~wxMetafile()
80 {
81 }
82
83 bool wxMetafile::SetClipboard(int width, int height)
84 {
85 return false;
86 }
87
88 bool wxMetafile::Play(wxDC *dc)
89 {
90 return false;
91 }
92
93 void wxMetafile::SetHMETAFILE(WXHANDLE mf)
94 {
95 }
96
97 void wxMetafile::SetWindowsMappingMode(int mm)
98 {
99 }
100
101 // ----------------------------------------------------------------------------
102 // Metafile device context
103 // ----------------------------------------------------------------------------
104
105 // Original constructor that does not takes origin and extent. If you use this,
106 // *DO* give origin/extent arguments to wxMakeMetafilePlaceable.
107 wxMetafileDC::wxMetafileDC(const wxString& file)
108 {
109 }
110
111 // New constructor that takes origin and extent. If you use this, don't
112 // give origin/extent arguments to wxMakeMetafilePlaceable.
113 wxMetafileDC::wxMetafileDC(const wxString& file, int xext, int yext, int xorg, int yorg)
114 {
115 }
116
117 wxMetafileDC::~wxMetafileDC()
118 {
119 }
120
121 void wxMetafileDC::GetTextExtent(const wxString& string, long *x, long *y,
122 long *descent, long *externalLeading,
123 const wxFont *theFont, bool WXUNUSED(use16bit)) const
124 {
125 }
126
127 wxMetafile *wxMetafileDC::Close()
128 {
129 return NULL;
130 }
131
132 void wxMetafileDC::SetMapMode(int mode)
133 {
134 }
135
136 // ----------------------------------------------------------------------------
137 // wxMakeMetafilePlaceable
138 // ----------------------------------------------------------------------------
139 struct mfPLACEABLEHEADER {
140 DWORD key;
141 HANDLE hmf;
142 RECT bbox;
143 WORD inch;
144 DWORD reserved;
145 WORD checksum;
146 };
147
148 /*
149 * Pass filename of existing non-placeable metafile, and bounding box.
150 * Adds a placeable metafile header, sets the mapping mode to anisotropic,
151 * and sets the window origin and extent to mimic the wxMM_TEXT mapping mode.
152 *
153 */
154
155 bool wxMakeMetafilePlaceable(const wxString& filename, float scale)
156 {
157 return false;
158 }
159
160 bool wxMakeMetafilePlaceable(const wxString& filename, int x1, int y1, int x2, int y2, float scale, bool useOriginAndExtent)
161 {
162 return false;
163 }
164
165
166 #if wxUSE_DRAG_AND_DROP
167
168 // ----------------------------------------------------------------------------
169 // wxMetafileDataObject
170 // ----------------------------------------------------------------------------
171
172 size_t wxMetafileDataObject::GetDataSize() const
173 {
174 return 0;
175 }
176
177 bool wxMetafileDataObject::GetDataHere(void *buf) const
178 {
179 return false;
180 }
181
182 bool wxMetafileDataObject::SetData(size_t WXUNUSED(len), const void *buf)
183 {
184 return false;
185 }
186
187 #endif // wxUSE_DRAG_AND_DROP
188
189 #endif // wxUSE_METAFILE