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 //----------------------------------------------------------------------
206 class wxPageSetupData {
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);
240 class wxPageSetupDialog : public wxDialog {
242 wxPageSetupDialog(wxWindow* parent, wxPageSetupData* data = NULL);
244 %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)"
246 wxPageSetupData& GetPageSetupData();
250 //----------------------------------------------------------------------
257 void EnableHelp(bool flag);
258 void EnablePageNumbers(bool flag);
259 void EnablePrintToFile(bool flag);
260 void EnableSelection(bool flag);
267 int GetOrientation();
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);
281 class wxPrintDialog : public wxDialog {
283 wxPrintDialog(wxWindow* parent, wxPrintData* data = NULL);
285 %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)"
287 wxPrintData& GetPrintData();
288 %new wxDC* GetPrintDC();
292 //----------------------------------------------------------------------
294 class wxMessageDialog : public wxDialog {
296 wxMessageDialog(wxWindow* parent,
298 char* caption = "Message box",
299 long style = wxOK | wxCANCEL | wxCENTRE,
300 const wxPoint& pos = wxPyDefaultPosition);
302 %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)"
307 //----------------------------------------------------------------------
310 /////////////////////////////////////////////////////////////////////////////
313 // Revision 1.6 1998/11/25 08:45:22 RD
314 // Added wxPalette, wxRegion, wxRegionIterator, wxTaskbarIcon
315 // Added events for wxGrid
316 // Other various fixes and additions
318 // Revision 1.5 1998/11/15 23:03:43 RD
319 // Removing some ifdef's for wxGTK
321 // Revision 1.4 1998/10/02 06:40:34 RD
323 // Version 0.4 of wxPython for MSW.
325 // Revision 1.3 1998/08/18 19:48:13 RD
326 // more wxGTK compatibility things.
328 // It builds now but there are serious runtime problems...
330 // Revision 1.2 1998/08/15 07:36:25 RD
331 // - Moved the header in the .i files out of the code that gets put into
332 // the .cpp files. It caused CVS conflicts because of the RCS ID being
333 // different each time.
335 // - A few minor fixes.
337 // Revision 1.1 1998/08/09 08:25:49 RD