]> git.saurik.com Git - wxWidgets.git/blob - utils/wxPython/src/cmndlgs.i
calendar.cpp
[wxWidgets.git] / utils / wxPython / src / cmndlgs.i
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: cmndlgs.i
3 // Purpose: SWIG definitions for the Common Dialog Classes
4 //
5 // Author: Robin Dunn
6 //
7 // Created: 7/25/98
8 // RCS-ID: $Id$
9 // Copyright: (c) 1998 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
12
13 %module cmndlgs
14
15 %{
16 #include "helpers.h"
17 #include <wx/colordlg.h>
18 #include <wx/dirdlg.h>
19 #include <wx/fontdlg.h>
20 #include <wx/progdlg.h>
21 %}
22
23 //----------------------------------------------------------------------
24
25 %include typemaps.i
26 %include my_typemaps.i
27
28 // Import some definitions of other classes, etc.
29 %import _defs.i
30 %import misc.i
31 %import gdi.i
32 %import windows.i
33 %import frames.i
34
35 %pragma(python) code = "import wx"
36
37 //----------------------------------------------------------------------
38
39 class wxColourData {
40 public:
41 wxColourData();
42 ~wxColourData();
43
44 bool GetChooseFull();
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);
50 };
51
52
53 class wxColourDialog : public wxDialog {
54 public:
55 wxColourDialog(wxWindow* parent, wxColourData* data = NULL);
56
57 %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)"
58
59 wxColourData& GetColourData();
60 int ShowModal();
61 };
62
63
64 //----------------------------------------------------------------------
65
66 class wxDirDialog : public wxDialog {
67 public:
68 wxDirDialog(wxWindow* parent,
69 char* message = "Choose a directory",
70 char* defaultPath = "",
71 long style = 0,
72 const wxPoint& pos = wxPyDefaultPosition);
73
74 %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)"
75
76 wxString GetPath();
77 wxString GetMessage();
78 long GetStyle();
79 void SetMessage(const wxString& message);
80 void SetPath(const wxString& path);
81 int ShowModal();
82 };
83
84 //----------------------------------------------------------------------
85
86 class wxFileDialog : public wxDialog {
87 public:
88 wxFileDialog(wxWindow* parent,
89 char* message = "Choose a file",
90 char* defaultDir = "",
91 char* defaultFile = "",
92 char* wildcard = "*.*",
93 long style = 0,
94 const wxPoint& pos = wxPyDefaultPosition);
95
96 %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)"
97
98 wxString GetDirectory();
99 wxString GetFilename();
100 int GetFilterIndex();
101 wxString GetMessage();
102 wxString GetPath();
103 long GetStyle();
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);
112 int ShowModal();
113 };
114
115
116 //----------------------------------------------------------------------
117
118 //TODO: wxMultipleChoiceDialog
119
120 //----------------------------------------------------------------------
121
122 class wxSingleChoiceDialog : public wxDialog {
123 public:
124 %addmethods {
125 // TODO: ignoring clientData for now...
126 // SWIG is messing up the &/*'s for some reason.
127 wxSingleChoiceDialog(wxWindow* parent,
128 wxString* message,
129 wxString* caption,
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);
136 }
137 }
138
139 %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)"
140
141 int GetSelection();
142 wxString GetStringSelection();
143 void SetSelection(int sel);
144 int ShowModal();
145 };
146
147
148 //----------------------------------------------------------------------
149
150 class wxTextEntryDialog : public wxDialog {
151 public:
152 wxTextEntryDialog(wxWindow* parent,
153 char* message,
154 char* caption = "Input Text",
155 char* defaultValue = "",
156 long style = wxOK | wxCANCEL | wxCENTRE,
157 const wxPoint& pos = wxPyDefaultPosition);
158
159 %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)"
160
161 wxString GetValue();
162 void SetValue(const wxString& value);
163 int ShowModal();
164 };
165
166 //----------------------------------------------------------------------
167
168 class wxFontData {
169 public:
170 wxFontData();
171 ~wxFontData();
172
173 void EnableEffects(bool enable);
174 bool GetAllowSymbols();
175 wxColour& GetColour();
176 wxFont GetChosenFont();
177 bool GetEnableEffects();
178 wxFont GetInitialFont();
179 bool GetShowHelp();
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);
186 };
187
188
189 class wxFontDialog : public wxDialog {
190 public:
191 wxFontDialog(wxWindow* parent, wxFontData* data);
192
193 %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)"
194
195 wxFontData& GetFontData();
196 int ShowModal();
197 };
198
199
200 //----------------------------------------------------------------------
201
202 class wxMessageDialog : public wxDialog {
203 public:
204 wxMessageDialog(wxWindow* parent,
205 char* message,
206 char* caption = "Message box",
207 long style = wxOK | wxCANCEL | wxCENTRE,
208 const wxPoint& pos = wxPyDefaultPosition);
209
210 %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)"
211
212 int ShowModal();
213 };
214
215 //----------------------------------------------------------------------
216
217 class wxProgressDialog : public wxFrame {
218 public:
219 wxProgressDialog(const wxString& title,
220 const wxString& message,
221 int maximum = 100,
222 wxWindow* parent = NULL,
223 int style = wxPD_AUTO_HIDE | wxPD_APP_MODAL );
224
225
226 bool Update(int value = -1, const char* newmsg = NULL);
227 void Resume();
228 }
229
230 //----------------------------------------------------------------------