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/progdlg.h>
23 //----------------------------------------------------------------------
26 %include my_typemaps.i
28 // Import some definitions of other classes, etc.
35 %pragma(python) code = "import wx"
37 //----------------------------------------------------------------------
45 wxColour& GetColour();
46 wxColour GetCustomColour(int i);
47 void SetChooseFull(int flag);
48 void SetColour(const wxColour& colour);
49 void SetCustomColour(int i, const wxColour& colour);
53 class wxColourDialog : public wxDialog {
55 wxColourDialog(wxWindow* parent, wxColourData* data = NULL);
57 %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)"
59 wxColourData& GetColourData();
64 //----------------------------------------------------------------------
66 class wxDirDialog : public wxDialog {
68 wxDirDialog(wxWindow* parent,
69 char* message = "Choose a directory",
70 char* defaultPath = "",
72 const wxPoint& pos = wxPyDefaultPosition);
74 %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)"
77 wxString GetMessage();
79 void SetMessage(const wxString& message);
80 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 %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)"
98 wxString GetDirectory();
99 wxString GetFilename();
100 int GetFilterIndex();
101 wxString GetMessage();
104 wxString GetWildcard();
105 void SetDirectory(const wxString& directory);
106 void SetFilename(const wxString& setfilename);
107 void SetFilterIndex(int filterIndex);
108 void SetMessage(const wxString& message);
109 void SetPath(const wxString& path);
110 void SetStyle(long style);
111 void SetWildcard(const wxString& wildCard);
116 //----------------------------------------------------------------------
118 //TODO: wxMultipleChoiceDialog
120 //----------------------------------------------------------------------
122 class wxSingleChoiceDialog : public wxDialog {
125 // TODO: ignoring clientData for now...
126 // SWIG is messing up the &/*'s for some reason.
127 wxSingleChoiceDialog(wxWindow* parent,
130 int LCOUNT, wxString* choices,
131 //char** clientData = NULL,
132 long style = wxOK | wxCANCEL | wxCENTRE,
133 wxPoint* pos = &wxPyDefaultPosition) {
134 return new wxSingleChoiceDialog(parent, *message, *caption,
135 LCOUNT, choices, NULL, style, *pos);
139 %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)"
142 wxString GetStringSelection();
143 void SetSelection(int sel);
148 //----------------------------------------------------------------------
150 class wxTextEntryDialog : public wxDialog {
152 wxTextEntryDialog(wxWindow* parent,
154 char* caption = "Input Text",
155 char* defaultValue = "",
156 long style = wxOK | wxCANCEL | wxCENTRE,
157 const wxPoint& pos = wxPyDefaultPosition);
159 %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)"
162 void SetValue(const wxString& value);
166 //----------------------------------------------------------------------
173 void EnableEffects(bool enable);
174 bool GetAllowSymbols();
175 wxColour& GetColour();
176 wxFont GetChosenFont();
177 bool GetEnableEffects();
178 wxFont GetInitialFont();
180 void SetAllowSymbols(bool allowSymbols);
181 void SetChosenFont(const wxFont& font);
182 void SetColour(const wxColour& colour);
183 void SetInitialFont(const wxFont& font);
184 void SetRange(int min, int max);
185 void SetShowHelp(bool showHelp);
189 class wxFontDialog : public wxDialog {
191 wxFontDialog(wxWindow* parent, wxFontData* data);
193 %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)"
195 wxFontData& GetFontData();
200 //----------------------------------------------------------------------
202 class wxMessageDialog : public wxDialog {
204 wxMessageDialog(wxWindow* parent,
206 char* caption = "Message box",
207 long style = wxOK | wxCANCEL | wxCENTRE,
208 const wxPoint& pos = wxPyDefaultPosition);
210 %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)"
215 //----------------------------------------------------------------------
217 class wxProgressDialog : public wxFrame {
219 wxProgressDialog(const wxString& title,
220 const wxString& message,
222 wxWindow* parent = NULL,
223 int style = wxPD_AUTO_HIDE | wxPD_APP_MODAL );
226 bool Update(int value = -1, const char* newmsg = NULL);
230 //----------------------------------------------------------------------