]> git.saurik.com Git - wxWidgets.git/blame - src/palmos/metafile.cpp
reverted Robert's over-optimisation, correct fix coming soon
[wxWidgets.git] / src / palmos / metafile.cpp
CommitLineData
ffecfa5a
JS
1/////////////////////////////////////////////////////////////////////////////
2// Name: palmos/metafile.cpp
3// Purpose: wxMetafileDC etc.
4// Author: William Osborne
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
54IMPLEMENT_DYNAMIC_CLASS(wxMetafile, wxObject)
55IMPLEMENT_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
71wxMetafileRefData::wxMetafileRefData()
72{
73}
74
75wxMetafileRefData::~wxMetafileRefData()
76{
77}
78
79// ----------------------------------------------------------------------------
80// wxMetafile
81// ----------------------------------------------------------------------------
82
83wxMetafile::wxMetafile(const wxString& file)
84{
85}
86
87wxMetafile::~wxMetafile()
88{
89}
90
91bool wxMetafile::SetClipboard(int width, int height)
92{
93 return false;
94}
95
96bool wxMetafile::Play(wxDC *dc)
97{
98 return false;
99}
100
101void wxMetafile::SetHMETAFILE(WXHANDLE mf)
102{
103}
104
105void 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.
115wxMetafileDC::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.
121wxMetafileDC::wxMetafileDC(const wxString& file, int xext, int yext, int xorg, int yorg)
122{
123}
124
125wxMetafileDC::~wxMetafileDC()
126{
127}
128
129void wxMetafileDC::GetTextExtent(const wxString& string, long *x, long *y,
130 long *descent, long *externalLeading, wxFont *theFont, bool WXUNUSED(use16bit)) const
131{
132}
133
134wxMetafile *wxMetafileDC::Close()
135{
136 return NULL;
137}
138
139void wxMetafileDC::SetMapMode(int mode)
140{
141}
142
143// ----------------------------------------------------------------------------
144// wxMakeMetafilePlaceable
145// ----------------------------------------------------------------------------
146#ifdef __WIN32__
147struct RECT32
148{
149 short left;
150 short top;
151 short right;
152 short bottom;
153};
154
155struct mfPLACEABLEHEADER {
156 DWORD key;
157 short hmf;
158 RECT32 bbox;
159 WORD inch;
160 DWORD reserved;
161 WORD checksum;
162};
163#else
164struct mfPLACEABLEHEADER {
165 DWORD key;
166 HANDLE hmf;
167 RECT bbox;
168 WORD inch;
169 DWORD reserved;
170 WORD checksum;
171};
172#endif
173
174/*
175 * Pass filename of existing non-placeable metafile, and bounding box.
176 * Adds a placeable metafile header, sets the mapping mode to anisotropic,
177 * and sets the window origin and extent to mimic the wxMM_TEXT mapping mode.
178 *
179 */
180
181bool wxMakeMetafilePlaceable(const wxString& filename, float scale)
182{
183 return false;
184}
185
186bool wxMakeMetafilePlaceable(const wxString& filename, int x1, int y1, int x2, int y2, float scale, bool useOriginAndExtent)
187{
188 return false;
189}
190
191
192#if wxUSE_DRAG_AND_DROP
193
194// ----------------------------------------------------------------------------
195// wxMetafileDataObject
196// ----------------------------------------------------------------------------
197
198size_t wxMetafileDataObject::GetDataSize() const
199{
200 return 0;
201}
202
203bool wxMetafileDataObject::GetDataHere(void *buf) const
204{
205 return false;
206}
207
208bool wxMetafileDataObject::SetData(size_t WXUNUSED(len), const void *buf)
209{
210 return false;
211}
212
213#endif // wxUSE_DRAG_AND_DROP
214
215#endif // wxUSE_METAFILE
216