]> git.saurik.com Git - wxWidgets.git/blame - src/palmos/metafile.cpp
Include common controls before completing it with missing.h.
[wxWidgets.git] / src / palmos / metafile.cpp
CommitLineData
ffecfa5a 1/////////////////////////////////////////////////////////////////////////////
e2731512 2// Name: src/palmos/metafile.cpp
ffecfa5a 3// Purpose: wxMetafileDC etc.
e2731512 4// Author: William Osborne - minimal working wxPalmOS port
ffecfa5a
JS
5// Modified by:
6// Created: 10/13/04
e2731512 7// RCS-ID: $Id$
ffecfa5a
JS
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// ----------------------------------------------------------------------------
ffecfa5a
JS
146struct mfPLACEABLEHEADER {
147 DWORD key;
148 HANDLE hmf;
149 RECT bbox;
150 WORD inch;
151 DWORD reserved;
152 WORD checksum;
153};
ffecfa5a
JS
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
162bool wxMakeMetafilePlaceable(const wxString& filename, float scale)
163{
164 return false;
165}
166
167bool 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
179size_t wxMetafileDataObject::GetDataSize() const
180{
181 return 0;
182}
183
184bool wxMetafileDataObject::GetDataHere(void *buf) const
185{
186 return false;
187}
188
189bool 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