]>
Commit | Line | Data |
---|---|---|
7bf85405 RD |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: cmndlgs.i | |
3 | // Purpose: SWIG definitions for the Common Dialog Classes | |
4 | // | |
5 | // Author: Robin Dunn | |
6 | // | |
7 | // Created: 7/25/98 | |
8 | // RCS-ID: $Id$ | |
9 | // Copyright: (c) 1998 by Total Control Software | |
10 | // Licence: wxWindows license | |
11 | ///////////////////////////////////////////////////////////////////////////// | |
12 | ||
03e9bead | 13 | %module cmndlgs |
7bf85405 | 14 | |
03e9bead | 15 | %{ |
7bf85405 RD |
16 | #include "helpers.h" |
17 | #include <wx/colordlg.h> | |
18 | #include <wx/dirdlg.h> | |
19 | #include <wx/fontdlg.h> | |
20 | #include <wx/printdlg.h> | |
21 | %} | |
22 | ||
23 | //---------------------------------------------------------------------- | |
24 | ||
25 | %include typemaps.i | |
26 | %include my_typemaps.i | |
27 | ||
28 | // Import some definitions of other classes, etc. | |
29 | %import _defs.i | |
30 | %import misc.i | |
31 | %import gdi.i | |
32 | %import windows.i | |
33 | ||
34 | ||
35 | //---------------------------------------------------------------------- | |
36 | ||
37 | class wxColourData { | |
38 | public: | |
39 | wxColourData(); | |
40 | ~wxColourData(); | |
41 | ||
42 | bool GetChooseFull(); | |
43 | wxColour& GetColour(); | |
fb5e0af0 | 44 | wxColour GetCustomColour(int i); |
7bf85405 RD |
45 | void SetChooseFull(int flag); |
46 | void SetColour(const wxColour& colour); | |
47 | void SetCustomColour(int i, const wxColour& colour); | |
48 | }; | |
49 | ||
50 | ||
51 | class wxColourDialog : public wxDialog { | |
52 | public: | |
53 | wxColourDialog(wxWindow* parent, wxColourData* data = NULL); | |
54 | ||
9c039d08 RD |
55 | %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)" |
56 | ||
fb5e0af0 | 57 | #ifdef __WXMSW__ |
7bf85405 | 58 | wxColourData& GetColourData(); |
fb5e0af0 RD |
59 | #else |
60 | wxColourData GetColourData(); | |
61 | #endif | |
7bf85405 RD |
62 | int ShowModal(); |
63 | }; | |
64 | ||
65 | ||
66 | //---------------------------------------------------------------------- | |
67 | ||
fb5e0af0 | 68 | #ifdef __WXMSW__ |
7bf85405 RD |
69 | class wxDirDialog : public wxDialog { |
70 | public: | |
71 | wxDirDialog(wxWindow* parent, | |
72 | char* message = "Choose a directory", | |
73 | char* defaultPath = "", | |
74 | long style = 0, | |
75 | const wxPoint& pos = wxPyDefaultPosition); | |
76 | ||
9c039d08 RD |
77 | %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)" |
78 | ||
7bf85405 RD |
79 | wxString GetPath(); |
80 | wxString GetMessage(); | |
81 | long GetStyle(); | |
82 | void SetMessage(const wxString& message); | |
83 | void SetPath(const wxString& path); | |
84 | int ShowModal(); | |
85 | }; | |
fb5e0af0 | 86 | #endif |
7bf85405 RD |
87 | |
88 | //---------------------------------------------------------------------- | |
89 | ||
90 | class wxFileDialog : public wxDialog { | |
91 | public: | |
92 | wxFileDialog(wxWindow* parent, | |
93 | char* message = "Choose a file", | |
94 | char* defaultDir = "", | |
95 | char* defaultFile = "", | |
96 | char* wildcard = "*.*", | |
97 | long style = 0, | |
98 | const wxPoint& pos = wxPyDefaultPosition); | |
99 | ||
9c039d08 RD |
100 | %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)" |
101 | ||
7bf85405 RD |
102 | wxString GetDirectory(); |
103 | wxString GetFilename(); | |
104 | int GetFilterIndex(); | |
105 | wxString GetMessage(); | |
106 | wxString GetPath(); | |
107 | long GetStyle(); | |
108 | wxString GetWildcard(); | |
109 | void SetDirectory(const wxString& directory); | |
110 | void SetFilename(const wxString& setfilename); | |
111 | void SetFilterIndex(int filterIndex); | |
112 | void SetMessage(const wxString& message); | |
113 | void SetPath(const wxString& path); | |
114 | void SetStyle(long style); | |
115 | void SetWildcard(const wxString& wildCard); | |
116 | int ShowModal(); | |
117 | }; | |
118 | ||
119 | ||
120 | //---------------------------------------------------------------------- | |
121 | ||
122 | //TODO: wxMultipleChoiceDialog | |
123 | ||
124 | //---------------------------------------------------------------------- | |
125 | ||
126 | class wxSingleChoiceDialog : public wxDialog { | |
127 | public: | |
128 | %addmethods { | |
129 | // TODO: ignoring clientData for now... | |
130 | // SWIG is messing up the &/*'s for some reason. | |
131 | wxSingleChoiceDialog(wxWindow* parent, | |
132 | wxString* message, | |
133 | wxString* caption, | |
134 | int LCOUNT, wxString* LIST, | |
135 | //char** clientData = NULL, | |
136 | long style = wxOK | wxCANCEL | wxCENTRE, | |
137 | wxPoint* pos = &wxPyDefaultPosition) { | |
138 | return new wxSingleChoiceDialog(parent, *message, *caption, | |
139 | LCOUNT, LIST, NULL, style, *pos); | |
140 | } | |
141 | } | |
142 | ||
9c039d08 RD |
143 | %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)" |
144 | ||
7bf85405 RD |
145 | int GetSelection(); |
146 | wxString GetStringSelection(); | |
147 | void SetSelection(int sel); | |
148 | int ShowModal(); | |
149 | }; | |
150 | ||
151 | ||
152 | //---------------------------------------------------------------------- | |
153 | ||
154 | class wxTextEntryDialog : public wxDialog { | |
155 | public: | |
156 | wxTextEntryDialog(wxWindow* parent, | |
157 | char* message, | |
158 | char* caption = "Input Text", | |
159 | char* defaultValue = "", | |
160 | long style = wxOK | wxCANCEL | wxCENTRE, | |
161 | const wxPoint& pos = wxPyDefaultPosition); | |
162 | ||
9c039d08 RD |
163 | %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)" |
164 | ||
7bf85405 RD |
165 | wxString GetValue(); |
166 | void SetValue(const wxString& value); | |
167 | int ShowModal(); | |
168 | }; | |
169 | ||
170 | //---------------------------------------------------------------------- | |
171 | ||
172 | class wxFontData { | |
173 | public: | |
174 | wxFontData(); | |
175 | ~wxFontData(); | |
176 | ||
177 | void EnableEffects(bool enable); | |
178 | bool GetAllowSymbols(); | |
179 | wxColour& GetColour(); | |
180 | wxFont GetChosenFont(); | |
181 | bool GetEnableEffects(); | |
182 | wxFont GetInitialFont(); | |
183 | bool GetShowHelp(); | |
184 | void SetAllowSymbols(bool allowSymbols); | |
185 | void SetChosenFont(const wxFont& font); | |
186 | void SetColour(const wxColour& colour); | |
187 | void SetInitialFont(const wxFont& font); | |
188 | void SetRange(int min, int max); | |
189 | void SetShowHelp(bool showHelp); | |
190 | }; | |
191 | ||
192 | ||
193 | class wxFontDialog : public wxDialog { | |
194 | public: | |
195 | wxFontDialog(wxWindow* parent, wxFontData* data = NULL); | |
196 | ||
9c039d08 RD |
197 | %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)" |
198 | ||
7bf85405 RD |
199 | wxFontData& GetFontData(); |
200 | int ShowModal(); | |
201 | }; | |
202 | ||
203 | ||
204 | //---------------------------------------------------------------------- | |
205 | ||
fb5e0af0 | 206 | #ifdef __WXMSW__ |
7bf85405 RD |
207 | class wxPageSetupData { |
208 | public: | |
209 | wxPageSetupData(); | |
210 | ~wxPageSetupData(); | |
211 | ||
212 | void EnableHelp(bool flag); | |
213 | void EnableMargins(bool flag); | |
214 | void EnableOrientation(bool flag); | |
215 | void EnablePaper(bool flag); | |
216 | void EnablePrinter(bool flag); | |
217 | wxPoint GetPaperSize(); | |
218 | wxPoint GetMarginTopLeft(); | |
219 | wxPoint GetMarginBottomRight(); | |
220 | wxPoint GetMinMarginTopLeft(); | |
221 | wxPoint GetMinMarginBottomRight(); | |
222 | int GetOrientation(); | |
223 | bool GetDefaultMinMargins(); | |
224 | bool GetEnableMargins(); | |
225 | bool GetEnableOrientation(); | |
226 | bool GetEnablePaper(); | |
227 | bool GetEnablePrinter(); | |
228 | bool GetEnableHelp(); | |
229 | bool GetDefaultInfo(); | |
230 | void SetPaperSize(const wxPoint& size); | |
231 | void SetMarginTopLeft(const wxPoint& pt); | |
232 | void SetMarginBottomRight(const wxPoint& pt); | |
233 | void SetMinMarginTopLeft(const wxPoint& pt); | |
234 | void SetMinMarginBottomRight(const wxPoint& pt); | |
235 | void SetOrientation(int orientation); | |
236 | void SetDefaultMinMargins(bool flag); | |
237 | void SetDefaultInfo(bool flag); | |
238 | }; | |
239 | ||
240 | ||
241 | class wxPageSetupDialog : public wxDialog { | |
242 | public: | |
243 | wxPageSetupDialog(wxWindow* parent, wxPageSetupData* data = NULL); | |
244 | ||
9c039d08 RD |
245 | %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)" |
246 | ||
7bf85405 RD |
247 | wxPageSetupData& GetPageSetupData(); |
248 | int ShowModal(); | |
249 | }; | |
fb5e0af0 | 250 | #endif |
7bf85405 RD |
251 | |
252 | //---------------------------------------------------------------------- | |
253 | ||
fb5e0af0 | 254 | #ifdef __WXMSW__ |
7bf85405 RD |
255 | class wxPrintData { |
256 | public: | |
257 | wxPrintData(); | |
258 | ~wxPrintData(); | |
259 | ||
260 | void EnableHelp(bool flag); | |
261 | void EnablePageNumbers(bool flag); | |
262 | void EnablePrintToFile(bool flag); | |
263 | void EnableSelection(bool flag); | |
264 | bool GetAllPages(); | |
265 | bool GetCollate(); | |
266 | int GetFromPage(); | |
267 | int GetMaxPage(); | |
268 | int GetMinPage(); | |
269 | int GetNoCopies(); | |
270 | int GetOrientation(); | |
271 | int GetToPage(); | |
272 | void SetCollate(bool flag); | |
273 | void SetFromPage(int page); | |
274 | void SetMaxPage(int page); | |
275 | void SetMinPage(int page); | |
276 | void SetOrientation(int orientation); | |
277 | void SetNoCopies(int n); | |
278 | void SetPrintToFile(bool flag); | |
279 | void SetSetupDialog(bool flag); | |
280 | void SetToPage(int page); | |
281 | }; | |
282 | ||
283 | ||
284 | class wxPrintDialog : public wxDialog { | |
285 | public: | |
286 | wxPrintDialog(wxWindow* parent, wxPrintData* data = NULL); | |
287 | ||
9c039d08 RD |
288 | %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)" |
289 | ||
7bf85405 RD |
290 | wxPrintData& GetPrintData(); |
291 | wxDC* GetPrintDC(); | |
292 | int ShowModal(); | |
293 | }; | |
fb5e0af0 | 294 | #endif |
7bf85405 RD |
295 | |
296 | //---------------------------------------------------------------------- | |
297 | ||
298 | class wxMessageDialog : public wxDialog { | |
299 | public: | |
300 | wxMessageDialog(wxWindow* parent, | |
301 | char* message, | |
302 | char* caption = "Message box", | |
303 | long style = wxOK | wxCANCEL | wxCENTRE, | |
304 | const wxPoint& pos = wxPyDefaultPosition); | |
305 | ||
9c039d08 RD |
306 | %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)" |
307 | ||
7bf85405 RD |
308 | int ShowModal(); |
309 | }; | |
310 | ||
311 | //---------------------------------------------------------------------- | |
312 | ||
313 | ||
314 | ///////////////////////////////////////////////////////////////////////////// | |
315 | // | |
316 | // $Log$ | |
9c039d08 RD |
317 | // Revision 1.4 1998/10/02 06:40:34 RD |
318 | // Version 0.4 of wxPython for MSW. | |
319 | // | |
fb5e0af0 RD |
320 | // Revision 1.3 1998/08/18 19:48:13 RD |
321 | // more wxGTK compatibility things. | |
322 | // | |
323 | // It builds now but there are serious runtime problems... | |
324 | // | |
03e9bead RD |
325 | // Revision 1.2 1998/08/15 07:36:25 RD |
326 | // - Moved the header in the .i files out of the code that gets put into | |
327 | // the .cpp files. It caused CVS conflicts because of the RCS ID being | |
328 | // different each time. | |
329 | // | |
330 | // - A few minor fixes. | |
331 | // | |
7bf85405 RD |
332 | // Revision 1.1 1998/08/09 08:25:49 RD |
333 | // Initial version | |
334 | // | |
335 | // | |
336 |