1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: SWIG definitions for the Common Dialog Classes
9 // Copyright: (c) 1998 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
17 #include <wx/colordlg.h>
18 #include <wx/dirdlg.h>
19 #include <wx/fontdlg.h>
20 #include <wx/printdlg.h>
23 //----------------------------------------------------------------------
26 %include my_typemaps.i
28 // Import some definitions of other classes, etc.
35 //----------------------------------------------------------------------
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);
51 class wxColourDialog : public wxDialog {
53 wxColourDialog(wxWindow* parent, wxColourData* data = NULL);
55 %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)"
58 wxColourData& GetColourData();
60 wxColourData GetColourData();
66 //----------------------------------------------------------------------
69 class wxDirDialog : public wxDialog {
71 wxDirDialog(wxWindow* parent,
72 char* message = "Choose a directory",
73 char* defaultPath = "",
75 const wxPoint& pos = wxPyDefaultPosition);
77 %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)"
80 wxString GetMessage();
82 void SetMessage(const wxString& message);
83 void SetPath(const wxString& path);
88 //----------------------------------------------------------------------
90 class wxFileDialog : public wxDialog {
92 wxFileDialog(wxWindow* parent,
93 char* message = "Choose a file",
94 char* defaultDir = "",
95 char* defaultFile = "",
96 char* wildcard = "*.*",
98 const wxPoint& pos = wxPyDefaultPosition);
100 %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)"
102 wxString GetDirectory();
103 wxString GetFilename();
104 int GetFilterIndex();
105 wxString GetMessage();
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);
120 //----------------------------------------------------------------------
122 //TODO: wxMultipleChoiceDialog
124 //----------------------------------------------------------------------
126 class wxSingleChoiceDialog : public wxDialog {
129 // TODO: ignoring clientData for now...
130 // SWIG is messing up the &/*'s for some reason.
131 wxSingleChoiceDialog(wxWindow* parent,
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);
143 %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)"
146 wxString GetStringSelection();
147 void SetSelection(int sel);
152 //----------------------------------------------------------------------
154 class wxTextEntryDialog : public wxDialog {
156 wxTextEntryDialog(wxWindow* parent,
158 char* caption = "Input Text",
159 char* defaultValue = "",
160 long style = wxOK | wxCANCEL | wxCENTRE,
161 const wxPoint& pos = wxPyDefaultPosition);
163 %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)"
166 void SetValue(const wxString& value);
170 //----------------------------------------------------------------------
177 void EnableEffects(bool enable);
178 bool GetAllowSymbols();
179 wxColour& GetColour();
180 wxFont GetChosenFont();
181 bool GetEnableEffects();
182 wxFont GetInitialFont();
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);
193 class wxFontDialog : public wxDialog {
195 wxFontDialog(wxWindow* parent, wxFontData* data = NULL);
197 %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)"
199 wxFontData& GetFontData();
204 //----------------------------------------------------------------------
207 class wxPageSetupData {
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);
241 class wxPageSetupDialog : public wxDialog {
243 wxPageSetupDialog(wxWindow* parent, wxPageSetupData* data = NULL);
245 %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)"
247 wxPageSetupData& GetPageSetupData();
252 //----------------------------------------------------------------------
260 void EnableHelp(bool flag);
261 void EnablePageNumbers(bool flag);
262 void EnablePrintToFile(bool flag);
263 void EnableSelection(bool flag);
270 int GetOrientation();
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);
284 class wxPrintDialog : public wxDialog {
286 wxPrintDialog(wxWindow* parent, wxPrintData* data = NULL);
288 %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)"
290 wxPrintData& GetPrintData();
296 //----------------------------------------------------------------------
298 class wxMessageDialog : public wxDialog {
300 wxMessageDialog(wxWindow* parent,
302 char* caption = "Message box",
303 long style = wxOK | wxCANCEL | wxCENTRE,
304 const wxPoint& pos = wxPyDefaultPosition);
306 %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)"
311 //----------------------------------------------------------------------
314 /////////////////////////////////////////////////////////////////////////////
317 // Revision 1.4 1998/10/02 06:40:34 RD
318 // Version 0.4 of wxPython for MSW.
320 // Revision 1.3 1998/08/18 19:48:13 RD
321 // more wxGTK compatibility things.
323 // It builds now but there are serious runtime problems...
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.
330 // - A few minor fixes.
332 // Revision 1.1 1998/08/09 08:25:49 RD