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.
34 %pragma(python) code = "import wx"
36 //----------------------------------------------------------------------
44 wxColour& GetColour();
45 wxColour GetCustomColour(int i);
46 void SetChooseFull(int flag);
47 void SetColour(const wxColour& colour);
48 void SetCustomColour(int i, const wxColour& colour);
52 class wxColourDialog : public wxDialog {
54 wxColourDialog(wxWindow* parent, wxColourData* data = NULL);
56 %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)"
59 wxColourData& GetColourData();
61 wxColourData GetColourData();
67 //----------------------------------------------------------------------
70 class wxDirDialog : public wxDialog {
72 wxDirDialog(wxWindow* parent,
73 char* message = "Choose a directory",
74 char* defaultPath = "",
76 const wxPoint& pos = wxPyDefaultPosition);
78 %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)"
81 wxString GetMessage();
83 void SetMessage(const wxString& message);
84 void SetPath(const wxString& path);
89 //----------------------------------------------------------------------
91 class wxFileDialog : public wxDialog {
93 wxFileDialog(wxWindow* parent,
94 char* message = "Choose a file",
95 char* defaultDir = "",
96 char* defaultFile = "",
97 char* wildcard = "*.*",
99 const wxPoint& pos = wxPyDefaultPosition);
101 %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)"
103 wxString GetDirectory();
104 wxString GetFilename();
105 int GetFilterIndex();
106 wxString GetMessage();
109 wxString GetWildcard();
110 void SetDirectory(const wxString& directory);
111 void SetFilename(const wxString& setfilename);
112 void SetFilterIndex(int filterIndex);
113 void SetMessage(const wxString& message);
114 void SetPath(const wxString& path);
115 void SetStyle(long style);
116 void SetWildcard(const wxString& wildCard);
121 //----------------------------------------------------------------------
123 //TODO: wxMultipleChoiceDialog
125 //----------------------------------------------------------------------
127 class wxSingleChoiceDialog : public wxDialog {
130 // TODO: ignoring clientData for now...
131 // SWIG is messing up the &/*'s for some reason.
132 wxSingleChoiceDialog(wxWindow* parent,
135 int LCOUNT, wxString* LIST,
136 //char** clientData = NULL,
137 long style = wxOK | wxCANCEL | wxCENTRE,
138 wxPoint* pos = &wxPyDefaultPosition) {
139 return new wxSingleChoiceDialog(parent, *message, *caption,
140 LCOUNT, LIST, NULL, style, *pos);
144 %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)"
147 wxString GetStringSelection();
148 void SetSelection(int sel);
153 //----------------------------------------------------------------------
155 class wxTextEntryDialog : public wxDialog {
157 wxTextEntryDialog(wxWindow* parent,
159 char* caption = "Input Text",
160 char* defaultValue = "",
161 long style = wxOK | wxCANCEL | wxCENTRE,
162 const wxPoint& pos = wxPyDefaultPosition);
164 %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)"
167 void SetValue(const wxString& value);
171 //----------------------------------------------------------------------
178 void EnableEffects(bool enable);
179 bool GetAllowSymbols();
180 wxColour& GetColour();
181 wxFont GetChosenFont();
182 bool GetEnableEffects();
183 wxFont GetInitialFont();
185 void SetAllowSymbols(bool allowSymbols);
186 void SetChosenFont(const wxFont& font);
187 void SetColour(const wxColour& colour);
188 void SetInitialFont(const wxFont& font);
189 void SetRange(int min, int max);
190 void SetShowHelp(bool showHelp);
194 class wxFontDialog : public wxDialog {
196 wxFontDialog(wxWindow* parent, wxFontData* data = NULL);
198 %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)"
200 wxFontData& GetFontData();
205 //----------------------------------------------------------------------
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__:wx._StdDialogCallbacks(self)"
247 wxPageSetupData& GetPageSetupData();
251 //----------------------------------------------------------------------
258 void EnableHelp(bool flag);
259 void EnablePageNumbers(bool flag);
260 void EnablePrintToFile(bool flag);
261 void EnableSelection(bool flag);
268 int GetOrientation();
270 void SetCollate(bool flag);
271 void SetFromPage(int page);
272 void SetMaxPage(int page);
273 void SetMinPage(int page);
274 void SetOrientation(int orientation);
275 void SetNoCopies(int n);
276 void SetPrintToFile(bool flag);
277 void SetSetupDialog(bool flag);
278 void SetToPage(int page);
282 class wxPrintDialog : public wxDialog {
284 wxPrintDialog(wxWindow* parent, wxPrintData* data = NULL);
286 %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)"
288 wxPrintData& GetPrintData();
289 %new wxDC* GetPrintDC();
293 //----------------------------------------------------------------------
295 class wxMessageDialog : public wxDialog {
297 wxMessageDialog(wxWindow* parent,
299 char* caption = "Message box",
300 long style = wxOK | wxCANCEL | wxCENTRE,
301 const wxPoint& pos = wxPyDefaultPosition);
303 %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)"
308 //----------------------------------------------------------------------
311 /////////////////////////////////////////////////////////////////////////////
314 // Revision 1.7 1998/12/15 20:41:14 RD
315 // Changed the import semantics from "from wxPython import *" to "from
316 // wxPython.wx import *" This is for people who are worried about
317 // namespace pollution, they can use "from wxPython import wx" and then
318 // prefix all the wxPython identifiers with "wx."
320 // Added wxTaskbarIcon for wxMSW.
322 // Made the events work for wxGrid.
326 // Added wxMiniFrame for wxGTK, (untested.)
328 // Changed many of the args and return values that were pointers to gdi
329 // objects to references to reflect changes in the wxWindows API.
331 // Other assorted fixes and additions.
333 // Revision 1.6 1998/11/25 08:45:22 RD
335 // Added wxPalette, wxRegion, wxRegionIterator, wxTaskbarIcon
336 // Added events for wxGrid
337 // Other various fixes and additions
339 // Revision 1.5 1998/11/15 23:03:43 RD
340 // Removing some ifdef's for wxGTK
342 // Revision 1.4 1998/10/02 06:40:34 RD
344 // Version 0.4 of wxPython for MSW.
346 // Revision 1.3 1998/08/18 19:48:13 RD
347 // more wxGTK compatibility things.
349 // It builds now but there are serious runtime problems...
351 // Revision 1.2 1998/08/15 07:36:25 RD
352 // - Moved the header in the .i files out of the code that gets put into
353 // the .cpp files. It caused CVS conflicts because of the RCS ID being
354 // different each time.
356 // - A few minor fixes.
358 // Revision 1.1 1998/08/09 08:25:49 RD