]> git.saurik.com Git - wxWidgets.git/blob - utils/wxPython/src/cmndlgs.i
Removed an extra method definition
[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 wxColourData& GetColourData();
56 int ShowModal();
57 };
58
59
60 //----------------------------------------------------------------------
61
62 class wxDirDialog : public wxDialog {
63 public:
64 wxDirDialog(wxWindow* parent,
65 char* message = "Choose a directory",
66 char* defaultPath = "",
67 long style = 0,
68 const wxPoint& pos = wxPyDefaultPosition);
69
70 wxString GetPath();
71 wxString GetMessage();
72 long GetStyle();
73 void SetMessage(const wxString& message);
74 void SetPath(const wxString& path);
75 int ShowModal();
76 };
77
78 //----------------------------------------------------------------------
79
80 class wxFileDialog : public wxDialog {
81 public:
82 wxFileDialog(wxWindow* parent,
83 char* message = "Choose a file",
84 char* defaultDir = "",
85 char* defaultFile = "",
86 char* wildcard = "*.*",
87 long style = 0,
88 const wxPoint& pos = wxPyDefaultPosition);
89
90 wxString GetDirectory();
91 wxString GetFilename();
92 int GetFilterIndex();
93 wxString GetMessage();
94 wxString GetPath();
95 long GetStyle();
96 wxString GetWildcard();
97 void SetDirectory(const wxString& directory);
98 void SetFilename(const wxString& setfilename);
99 void SetFilterIndex(int filterIndex);
100 void SetMessage(const wxString& message);
101 void SetPath(const wxString& path);
102 void SetStyle(long style);
103 void SetWildcard(const wxString& wildCard);
104 int ShowModal();
105 };
106
107
108 //----------------------------------------------------------------------
109
110 //TODO: wxMultipleChoiceDialog
111
112 //----------------------------------------------------------------------
113
114 class wxSingleChoiceDialog : public wxDialog {
115 public:
116 %addmethods {
117 // TODO: ignoring clientData for now...
118 // SWIG is messing up the &/*'s for some reason.
119 wxSingleChoiceDialog(wxWindow* parent,
120 wxString* message,
121 wxString* caption,
122 int LCOUNT, wxString* LIST,
123 //char** clientData = NULL,
124 long style = wxOK | wxCANCEL | wxCENTRE,
125 wxPoint* pos = &wxPyDefaultPosition) {
126 return new wxSingleChoiceDialog(parent, *message, *caption,
127 LCOUNT, LIST, NULL, style, *pos);
128 }
129 }
130
131 int GetSelection();
132 wxString GetStringSelection();
133 void SetSelection(int sel);
134 int ShowModal();
135 };
136
137
138 //----------------------------------------------------------------------
139
140 class wxTextEntryDialog : public wxDialog {
141 public:
142 wxTextEntryDialog(wxWindow* parent,
143 char* message,
144 char* caption = "Input Text",
145 char* defaultValue = "",
146 long style = wxOK | wxCANCEL | wxCENTRE,
147 const wxPoint& pos = wxPyDefaultPosition);
148
149 wxString GetValue();
150 void SetValue(const wxString& value);
151 int ShowModal();
152 };
153
154 //----------------------------------------------------------------------
155
156 class wxFontData {
157 public:
158 wxFontData();
159 ~wxFontData();
160
161 void EnableEffects(bool enable);
162 bool GetAllowSymbols();
163 wxColour& GetColour();
164 wxFont GetChosenFont();
165 bool GetEnableEffects();
166 wxFont GetInitialFont();
167 bool GetShowHelp();
168 void SetAllowSymbols(bool allowSymbols);
169 void SetChosenFont(const wxFont& font);
170 void SetColour(const wxColour& colour);
171 void SetInitialFont(const wxFont& font);
172 void SetRange(int min, int max);
173 void SetShowHelp(bool showHelp);
174 };
175
176
177 class wxFontDialog : public wxDialog {
178 public:
179 wxFontDialog(wxWindow* parent, wxFontData* data = NULL);
180
181 wxFontData& GetFontData();
182 int ShowModal();
183 };
184
185
186 //----------------------------------------------------------------------
187
188 class wxPageSetupData {
189 public:
190 wxPageSetupData();
191 ~wxPageSetupData();
192
193 void EnableHelp(bool flag);
194 void EnableMargins(bool flag);
195 void EnableOrientation(bool flag);
196 void EnablePaper(bool flag);
197 void EnablePrinter(bool flag);
198 wxPoint GetPaperSize();
199 wxPoint GetMarginTopLeft();
200 wxPoint GetMarginBottomRight();
201 wxPoint GetMinMarginTopLeft();
202 wxPoint GetMinMarginBottomRight();
203 int GetOrientation();
204 bool GetDefaultMinMargins();
205 bool GetEnableMargins();
206 bool GetEnableOrientation();
207 bool GetEnablePaper();
208 bool GetEnablePrinter();
209 bool GetEnableHelp();
210 bool GetDefaultInfo();
211 void SetPaperSize(const wxPoint& size);
212 void SetMarginTopLeft(const wxPoint& pt);
213 void SetMarginBottomRight(const wxPoint& pt);
214 void SetMinMarginTopLeft(const wxPoint& pt);
215 void SetMinMarginBottomRight(const wxPoint& pt);
216 void SetOrientation(int orientation);
217 void SetDefaultMinMargins(bool flag);
218 void SetDefaultInfo(bool flag);
219 };
220
221
222 class wxPageSetupDialog : public wxDialog {
223 public:
224 wxPageSetupDialog(wxWindow* parent, wxPageSetupData* data = NULL);
225
226 wxPageSetupData& GetPageSetupData();
227 int ShowModal();
228 };
229
230 //----------------------------------------------------------------------
231
232 class wxPrintData {
233 public:
234 wxPrintData();
235 ~wxPrintData();
236
237 void EnableHelp(bool flag);
238 void EnablePageNumbers(bool flag);
239 void EnablePrintToFile(bool flag);
240 void EnableSelection(bool flag);
241 bool GetAllPages();
242 bool GetCollate();
243 int GetFromPage();
244 int GetMaxPage();
245 int GetMinPage();
246 int GetNoCopies();
247 int GetOrientation();
248 int GetToPage();
249 void SetCollate(bool flag);
250 void SetFromPage(int page);
251 void SetMaxPage(int page);
252 void SetMinPage(int page);
253 void SetOrientation(int orientation);
254 void SetNoCopies(int n);
255 void SetPrintToFile(bool flag);
256 void SetSetupDialog(bool flag);
257 void SetToPage(int page);
258 };
259
260
261 class wxPrintDialog : public wxDialog {
262 public:
263 wxPrintDialog(wxWindow* parent, wxPrintData* data = NULL);
264
265 wxPrintData& GetPrintData();
266 wxDC* GetPrintDC();
267 int ShowModal();
268 };
269
270 //----------------------------------------------------------------------
271
272 class wxMessageDialog : public wxDialog {
273 public:
274 wxMessageDialog(wxWindow* parent,
275 char* message,
276 char* caption = "Message box",
277 long style = wxOK | wxCANCEL | wxCENTRE,
278 const wxPoint& pos = wxPyDefaultPosition);
279
280 int ShowModal();
281 };
282
283 //----------------------------------------------------------------------
284
285
286 /////////////////////////////////////////////////////////////////////////////
287 //
288 // $Log$
289 // Revision 1.2 1998/08/15 07:36:25 RD
290 // - Moved the header in the .i files out of the code that gets put into
291 // the .cpp files. It caused CVS conflicts because of the RCS ID being
292 // different each time.
293 //
294 // - A few minor fixes.
295 //
296 // Revision 1.1 1998/08/09 08:25:49 RD
297 // Initial version
298 //
299 //
300