]> git.saurik.com Git - wxWidgets.git/blob - utils/wxPython/src/cmndlgs.i
Removing some ifdef's for wxGTK
[wxWidgets.git] / utils / wxPython / src / cmndlgs.i
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
13 %module cmndlgs
14
15 %{
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();
44 wxColour GetCustomColour(int i);
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
55 %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)"
56
57 #ifdef __WXMSW__
58 wxColourData& GetColourData();
59 #else
60 wxColourData GetColourData();
61 #endif
62 int ShowModal();
63 };
64
65
66 //----------------------------------------------------------------------
67
68 #ifdef __WXMSW__
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
77 %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)"
78
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 };
86 #endif
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
100 %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)"
101
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
143 %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)"
144
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
163 %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)"
164
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
197 %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)"
198
199 wxFontData& GetFontData();
200 int ShowModal();
201 };
202
203
204 //----------------------------------------------------------------------
205
206 class wxPageSetupData {
207 public:
208 wxPageSetupData();
209 ~wxPageSetupData();
210
211 void EnableHelp(bool flag);
212 void EnableMargins(bool flag);
213 void EnableOrientation(bool flag);
214 void EnablePaper(bool flag);
215 void EnablePrinter(bool flag);
216 wxPoint GetPaperSize();
217 wxPoint GetMarginTopLeft();
218 wxPoint GetMarginBottomRight();
219 wxPoint GetMinMarginTopLeft();
220 wxPoint GetMinMarginBottomRight();
221 int GetOrientation();
222 bool GetDefaultMinMargins();
223 bool GetEnableMargins();
224 bool GetEnableOrientation();
225 bool GetEnablePaper();
226 bool GetEnablePrinter();
227 bool GetEnableHelp();
228 bool GetDefaultInfo();
229 void SetPaperSize(const wxPoint& size);
230 void SetMarginTopLeft(const wxPoint& pt);
231 void SetMarginBottomRight(const wxPoint& pt);
232 void SetMinMarginTopLeft(const wxPoint& pt);
233 void SetMinMarginBottomRight(const wxPoint& pt);
234 void SetOrientation(int orientation);
235 void SetDefaultMinMargins(bool flag);
236 void SetDefaultInfo(bool flag);
237 };
238
239
240 class wxPageSetupDialog : public wxDialog {
241 public:
242 wxPageSetupDialog(wxWindow* parent, wxPageSetupData* data = NULL);
243
244 %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)"
245
246 wxPageSetupData& GetPageSetupData();
247 int ShowModal();
248 };
249
250 //----------------------------------------------------------------------
251
252 class wxPrintData {
253 public:
254 wxPrintData();
255 ~wxPrintData();
256
257 void EnableHelp(bool flag);
258 void EnablePageNumbers(bool flag);
259 void EnablePrintToFile(bool flag);
260 void EnableSelection(bool flag);
261 bool GetAllPages();
262 bool GetCollate();
263 int GetFromPage();
264 int GetMaxPage();
265 int GetMinPage();
266 int GetNoCopies();
267 int GetOrientation();
268 int GetToPage();
269 void SetCollate(bool flag);
270 void SetFromPage(int page);
271 void SetMaxPage(int page);
272 void SetMinPage(int page);
273 void SetOrientation(int orientation);
274 void SetNoCopies(int n);
275 void SetPrintToFile(bool flag);
276 void SetSetupDialog(bool flag);
277 void SetToPage(int page);
278 };
279
280
281 class wxPrintDialog : public wxDialog {
282 public:
283 wxPrintDialog(wxWindow* parent, wxPrintData* data = NULL);
284
285 %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)"
286
287 wxPrintData& GetPrintData();
288 wxDC* GetPrintDC();
289 int ShowModal();
290 };
291
292 //----------------------------------------------------------------------
293
294 class wxMessageDialog : public wxDialog {
295 public:
296 wxMessageDialog(wxWindow* parent,
297 char* message,
298 char* caption = "Message box",
299 long style = wxOK | wxCANCEL | wxCENTRE,
300 const wxPoint& pos = wxPyDefaultPosition);
301
302 %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)"
303
304 int ShowModal();
305 };
306
307 //----------------------------------------------------------------------
308
309
310 /////////////////////////////////////////////////////////////////////////////
311 //
312 // $Log$
313 // Revision 1.5 1998/11/15 23:03:43 RD
314 // Removing some ifdef's for wxGTK
315 //
316 // Revision 1.4 1998/10/02 06:40:34 RD
317 //
318 // Version 0.4 of wxPython for MSW.
319 //
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 //
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 //
332 // Revision 1.1 1998/08/09 08:25:49 RD
333 // Initial version
334 //
335 //
336