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