]>
Commit | Line | Data |
---|---|---|
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/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 | ||
50 | IMPLEMENT_DYNAMIC_CLASS(wxMetafile, wxObject) | |
51 | IMPLEMENT_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 | ||
67 | wxMetafileRefData::wxMetafileRefData() | |
68 | { | |
69 | } | |
70 | ||
71 | wxMetafileRefData::~wxMetafileRefData() | |
72 | { | |
73 | } | |
74 | ||
75 | // ---------------------------------------------------------------------------- | |
76 | // wxMetafile | |
77 | // ---------------------------------------------------------------------------- | |
78 | ||
79 | wxMetafile::wxMetafile(const wxString& file) | |
80 | { | |
81 | } | |
82 | ||
83 | wxMetafile::~wxMetafile() | |
84 | { | |
85 | } | |
86 | ||
87 | bool wxMetafile::SetClipboard(int width, int height) | |
88 | { | |
89 | return false; | |
90 | } | |
91 | ||
92 | bool wxMetafile::Play(wxDC *dc) | |
93 | { | |
94 | return false; | |
95 | } | |
96 | ||
97 | void wxMetafile::SetHMETAFILE(WXHANDLE mf) | |
98 | { | |
99 | } | |
100 | ||
101 | void 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. | |
111 | wxMetafileDC::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. | |
117 | wxMetafileDC::wxMetafileDC(const wxString& file, int xext, int yext, int xorg, int yorg) | |
118 | { | |
119 | } | |
120 | ||
121 | wxMetafileDC::~wxMetafileDC() | |
122 | { | |
123 | } | |
124 | ||
125 | void wxMetafileDC::GetTextExtent(const wxString& string, long *x, long *y, | |
126 | long *descent, long *externalLeading, wxFont *theFont, bool WXUNUSED(use16bit)) const | |
127 | { | |
128 | } | |
129 | ||
130 | wxMetafile *wxMetafileDC::Close() | |
131 | { | |
132 | return NULL; | |
133 | } | |
134 | ||
135 | void wxMetafileDC::SetMapMode(int mode) | |
136 | { | |
137 | } | |
138 | ||
139 | // ---------------------------------------------------------------------------- | |
140 | // wxMakeMetafilePlaceable | |
141 | // ---------------------------------------------------------------------------- | |
142 | struct mfPLACEABLEHEADER { | |
143 | DWORD key; | |
144 | HANDLE hmf; | |
145 | RECT bbox; | |
146 | WORD inch; | |
147 | DWORD reserved; | |
148 | WORD checksum; | |
149 | }; | |
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 | ||
158 | bool wxMakeMetafilePlaceable(const wxString& filename, float scale) | |
159 | { | |
160 | return false; | |
161 | } | |
162 | ||
163 | bool 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 | ||
175 | size_t wxMetafileDataObject::GetDataSize() const | |
176 | { | |
177 | return 0; | |
178 | } | |
179 | ||
180 | bool wxMetafileDataObject::GetDataHere(void *buf) const | |
181 | { | |
182 | return false; | |
183 | } | |
184 | ||
185 | bool 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 |