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