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