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);
56 wxColourData& GetColourData();
58 wxColourData GetColourData();
64 //----------------------------------------------------------------------
67 class wxDirDialog : public wxDialog {
69 wxDirDialog(wxWindow* parent,
70 char* message = "Choose a directory",
71 char* defaultPath = "",
73 const wxPoint& pos = wxPyDefaultPosition);
76 wxString GetMessage();
78 void SetMessage(const wxString& message);
79 void SetPath(const wxString& path);
84 //----------------------------------------------------------------------
86 class wxFileDialog : public wxDialog {
88 wxFileDialog(wxWindow* parent,
89 char* message = "Choose a file",
90 char* defaultDir = "",
91 char* defaultFile = "",
92 char* wildcard = "*.*",
94 const wxPoint& pos = wxPyDefaultPosition);
96 wxString GetDirectory();
97 wxString GetFilename();
99 wxString GetMessage();
102 wxString GetWildcard();
103 void SetDirectory(const wxString& directory);
104 void SetFilename(const wxString& setfilename);
105 void SetFilterIndex(int filterIndex);
106 void SetMessage(const wxString& message);
107 void SetPath(const wxString& path);
108 void SetStyle(long style);
109 void SetWildcard(const wxString& wildCard);
114 //----------------------------------------------------------------------
116 //TODO: wxMultipleChoiceDialog
118 //----------------------------------------------------------------------
120 class wxSingleChoiceDialog : public wxDialog {
123 // TODO: ignoring clientData for now...
124 // SWIG is messing up the &/*'s for some reason.
125 wxSingleChoiceDialog(wxWindow* parent,
128 int LCOUNT, wxString* LIST,
129 //char** clientData = NULL,
130 long style = wxOK | wxCANCEL | wxCENTRE,
131 wxPoint* pos = &wxPyDefaultPosition) {
132 return new wxSingleChoiceDialog(parent, *message, *caption,
133 LCOUNT, LIST, NULL, style, *pos);
138 wxString GetStringSelection();
139 void SetSelection(int sel);
144 //----------------------------------------------------------------------
146 class wxTextEntryDialog : public wxDialog {
148 wxTextEntryDialog(wxWindow* parent,
150 char* caption = "Input Text",
151 char* defaultValue = "",
152 long style = wxOK | wxCANCEL | wxCENTRE,
153 const wxPoint& pos = wxPyDefaultPosition);
156 void SetValue(const wxString& value);
160 //----------------------------------------------------------------------
167 void EnableEffects(bool enable);
168 bool GetAllowSymbols();
169 wxColour& GetColour();
170 wxFont GetChosenFont();
171 bool GetEnableEffects();
172 wxFont GetInitialFont();
174 void SetAllowSymbols(bool allowSymbols);
175 void SetChosenFont(const wxFont& font);
176 void SetColour(const wxColour& colour);
177 void SetInitialFont(const wxFont& font);
178 void SetRange(int min, int max);
179 void SetShowHelp(bool showHelp);
183 class wxFontDialog : public wxDialog {
185 wxFontDialog(wxWindow* parent, wxFontData* data = NULL);
187 wxFontData& GetFontData();
192 //----------------------------------------------------------------------
195 class wxPageSetupData {
200 void EnableHelp(bool flag);
201 void EnableMargins(bool flag);
202 void EnableOrientation(bool flag);
203 void EnablePaper(bool flag);
204 void EnablePrinter(bool flag);
205 wxPoint GetPaperSize();
206 wxPoint GetMarginTopLeft();
207 wxPoint GetMarginBottomRight();
208 wxPoint GetMinMarginTopLeft();
209 wxPoint GetMinMarginBottomRight();
210 int GetOrientation();
211 bool GetDefaultMinMargins();
212 bool GetEnableMargins();
213 bool GetEnableOrientation();
214 bool GetEnablePaper();
215 bool GetEnablePrinter();
216 bool GetEnableHelp();
217 bool GetDefaultInfo();
218 void SetPaperSize(const wxPoint& size);
219 void SetMarginTopLeft(const wxPoint& pt);
220 void SetMarginBottomRight(const wxPoint& pt);
221 void SetMinMarginTopLeft(const wxPoint& pt);
222 void SetMinMarginBottomRight(const wxPoint& pt);
223 void SetOrientation(int orientation);
224 void SetDefaultMinMargins(bool flag);
225 void SetDefaultInfo(bool flag);
229 class wxPageSetupDialog : public wxDialog {
231 wxPageSetupDialog(wxWindow* parent, wxPageSetupData* data = NULL);
233 wxPageSetupData& GetPageSetupData();
238 //----------------------------------------------------------------------
246 void EnableHelp(bool flag);
247 void EnablePageNumbers(bool flag);
248 void EnablePrintToFile(bool flag);
249 void EnableSelection(bool flag);
256 int GetOrientation();
258 void SetCollate(bool flag);
259 void SetFromPage(int page);
260 void SetMaxPage(int page);
261 void SetMinPage(int page);
262 void SetOrientation(int orientation);
263 void SetNoCopies(int n);
264 void SetPrintToFile(bool flag);
265 void SetSetupDialog(bool flag);
266 void SetToPage(int page);
270 class wxPrintDialog : public wxDialog {
272 wxPrintDialog(wxWindow* parent, wxPrintData* data = NULL);
274 wxPrintData& GetPrintData();
280 //----------------------------------------------------------------------
282 class wxMessageDialog : public wxDialog {
284 wxMessageDialog(wxWindow* parent,
286 char* caption = "Message box",
287 long style = wxOK | wxCANCEL | wxCENTRE,
288 const wxPoint& pos = wxPyDefaultPosition);
293 //----------------------------------------------------------------------
296 /////////////////////////////////////////////////////////////////////////////
299 // Revision 1.3 1998/08/18 19:48:13 RD
300 // more wxGTK compatibility things.
302 // It builds now but there are serious runtime problems...
304 // Revision 1.2 1998/08/15 07:36:25 RD
305 // - Moved the header in the .i files out of the code that gets put into
306 // the .cpp files. It caused CVS conflicts because of the RCS ID being
307 // different each time.
309 // - A few minor fixes.
311 // Revision 1.1 1998/08/09 08:25:49 RD