]>
Commit | Line | Data |
---|---|---|
d14a1e28 RD |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: _pywindows.i | |
3 | // Purpose: SWIG interface for wxPyWindow, and etc. These classes support | |
4 | // overriding many of wxWindow's virtual methods in Python derived | |
5 | // classes. | |
6 | // | |
7 | // Author: Robin Dunn | |
8 | // | |
9 | // Created: 2-June-1998 | |
10 | // RCS-ID: $Id$ | |
11 | // Copyright: (c) 2003 by Total Control Software | |
12 | // Licence: wxWindows license | |
13 | ///////////////////////////////////////////////////////////////////////////// | |
14 | ||
15 | // Not a %module | |
16 | ||
17 | ||
18 | //--------------------------------------------------------------------------- | |
19 | %newgroup | |
20 | ||
21 | // TODO: Redo these with SWIG directors? | |
22 | ||
23 | // TODO: Which (if any?) of these should be done also??? | |
24 | // Destroy | |
25 | // DoCaptureMouse | |
26 | // DoClientToScreen | |
27 | // DoHitTest | |
28 | // DoMoveWindow | |
29 | // DoPopupMenu | |
30 | // DoReleaseMouse | |
31 | // DoScreenToClient | |
32 | // DoSetToolTip | |
33 | // Enable | |
34 | // Fit | |
35 | // GetCharHeight | |
36 | // GetCharWidth | |
37 | // GetClientAreaOrigin | |
38 | // GetDefaultItem | |
39 | // IsTopLevel | |
40 | // SetBackgroundColour | |
41 | // SetDefaultItem | |
42 | // SetFocus | |
43 | // SetFocusFromKbd | |
44 | // SetForegroundColour | |
45 | // SetSizeHints | |
46 | // SetVirtualSizeHints | |
47 | // Show | |
48 | ||
49 | ||
d14a1e28 RD |
50 | //--------------------------------------------------------------------------- |
51 | ||
52 | ||
53 | %{ // C++ version of Python aware wxWindow | |
54 | class wxPyWindow : public wxWindow | |
55 | { | |
56 | DECLARE_DYNAMIC_CLASS(wxPyWindow) | |
57 | public: | |
58 | wxPyWindow() : wxWindow() {} | |
59 | wxPyWindow(wxWindow* parent, const wxWindowID id, | |
60 | const wxPoint& pos = wxDefaultPosition, | |
61 | const wxSize& size = wxDefaultSize, | |
62 | long style = 0, | |
63 | const wxString& name = wxPyPanelNameStr) | |
64 | : wxWindow(parent, id, pos, size, style, name) {} | |
65 | ||
1a10485f | 66 | void SetBestSize(const wxSize& size) { wxWindow::SetBestSize(size); } |
d14a1e28 RD |
67 | |
68 | DEC_PYCALLBACK_VOID_INT4(DoMoveWindow); | |
69 | DEC_PYCALLBACK_VOID_INT5(DoSetSize); | |
70 | DEC_PYCALLBACK_VOID_INTINT(DoSetClientSize); | |
71 | DEC_PYCALLBACK_VOID_INTINT(DoSetVirtualSize); | |
72 | ||
73 | DEC_PYCALLBACK_VOID_INTPINTP_const(DoGetSize); | |
74 | DEC_PYCALLBACK_VOID_INTPINTP_const(DoGetClientSize); | |
75 | DEC_PYCALLBACK_VOID_INTPINTP_const(DoGetPosition); | |
76 | ||
77 | DEC_PYCALLBACK_SIZE_const(DoGetVirtualSize); | |
78 | DEC_PYCALLBACK_SIZE_const(DoGetBestSize); | |
79 | ||
80 | DEC_PYCALLBACK__(InitDialog); | |
81 | DEC_PYCALLBACK_BOOL_(TransferDataFromWindow); | |
82 | DEC_PYCALLBACK_BOOL_(TransferDataToWindow); | |
83 | DEC_PYCALLBACK_BOOL_(Validate); | |
84 | ||
85 | DEC_PYCALLBACK_BOOL_const(AcceptsFocus); | |
86 | DEC_PYCALLBACK_BOOL_const(AcceptsFocusFromKeyboard); | |
87 | DEC_PYCALLBACK_SIZE_const(GetMaxSize); | |
88 | ||
89 | DEC_PYCALLBACK_VOID_WXWINBASE(AddChild); | |
90 | DEC_PYCALLBACK_VOID_WXWINBASE(RemoveChild); | |
91 | ||
1a10485f | 92 | DEC_PYCALLBACK_BOOL_const(ShouldInheritColours); |
1a10485f | 93 | DEC_PYCALLBACK_VIZATTR_(GetDefaultAttributes); |
4d2962b1 | 94 | |
b035e80b RD |
95 | DEC_PYCALLBACK_BOOL_(HasTransparentBackground); |
96 | ||
d14a1e28 RD |
97 | PYPRIVATE; |
98 | }; | |
99 | ||
100 | IMPLEMENT_DYNAMIC_CLASS(wxPyWindow, wxWindow); | |
101 | ||
102 | IMP_PYCALLBACK_VOID_INT4(wxPyWindow, wxWindow, DoMoveWindow); | |
103 | IMP_PYCALLBACK_VOID_INT5(wxPyWindow, wxWindow, DoSetSize); | |
104 | IMP_PYCALLBACK_VOID_INTINT(wxPyWindow, wxWindow, DoSetClientSize); | |
105 | IMP_PYCALLBACK_VOID_INTINT(wxPyWindow, wxWindow, DoSetVirtualSize); | |
106 | ||
107 | IMP_PYCALLBACK_VOID_INTPINTP_const(wxPyWindow, wxWindow, DoGetSize); | |
108 | IMP_PYCALLBACK_VOID_INTPINTP_const(wxPyWindow, wxWindow, DoGetClientSize); | |
109 | IMP_PYCALLBACK_VOID_INTPINTP_const(wxPyWindow, wxWindow, DoGetPosition); | |
110 | ||
111 | IMP_PYCALLBACK_SIZE_const(wxPyWindow, wxWindow, DoGetVirtualSize); | |
112 | IMP_PYCALLBACK_SIZE_const(wxPyWindow, wxWindow, DoGetBestSize); | |
113 | ||
114 | IMP_PYCALLBACK__(wxPyWindow, wxWindow, InitDialog); | |
115 | IMP_PYCALLBACK_BOOL_(wxPyWindow, wxWindow, TransferDataFromWindow); | |
116 | IMP_PYCALLBACK_BOOL_(wxPyWindow, wxWindow, TransferDataToWindow); | |
117 | IMP_PYCALLBACK_BOOL_(wxPyWindow, wxWindow, Validate); | |
118 | ||
119 | IMP_PYCALLBACK_BOOL_const(wxPyWindow, wxWindow, AcceptsFocus); | |
120 | IMP_PYCALLBACK_BOOL_const(wxPyWindow, wxWindow, AcceptsFocusFromKeyboard); | |
121 | IMP_PYCALLBACK_SIZE_const(wxPyWindow, wxWindow, GetMaxSize); | |
122 | ||
123 | IMP_PYCALLBACK_VOID_WXWINBASE(wxPyWindow, wxWindow, AddChild); | |
124 | IMP_PYCALLBACK_VOID_WXWINBASE(wxPyWindow, wxWindow, RemoveChild); | |
125 | ||
1a10485f | 126 | IMP_PYCALLBACK_BOOL_const(wxPyWindow, wxWindow, ShouldInheritColours); |
1a10485f | 127 | IMP_PYCALLBACK_VIZATTR_(wxPyWindow, wxWindow, GetDefaultAttributes); |
b035e80b RD |
128 | |
129 | IMP_PYCALLBACK_BOOL_(wxPyWindow, wxWindow, HasTransparentBackground); | |
d14a1e28 RD |
130 | %} |
131 | ||
132 | // And now the one for SWIG to see | |
ab1f7d2a | 133 | MustHaveApp(wxPyWindow); |
d14a1e28 RD |
134 | class wxPyWindow : public wxWindow |
135 | { | |
136 | public: | |
2b9048c5 | 137 | %pythonAppend wxPyWindow "self._setOORInfo(self); self._setCallbackInfo(self, PyWindow)" |
d43da706 | 138 | %pythonAppend wxPyWindow() "" |
d14a1e28 | 139 | |
d5573410 | 140 | wxPyWindow(wxWindow* parent, const wxWindowID id=-1, |
d14a1e28 RD |
141 | const wxPoint& pos = wxDefaultPosition, |
142 | const wxSize& size = wxDefaultSize, | |
143 | long style = 0, | |
144 | const wxString& name = wxPyPanelNameStr); | |
145 | ||
1b8c7ba6 | 146 | %RenameCtor(PrePyWindow, wxPyWindow()); |
d43da706 | 147 | |
d14a1e28 RD |
148 | void _setCallbackInfo(PyObject* self, PyObject* _class); |
149 | ||
150 | ||
1a10485f RD |
151 | void SetBestSize(const wxSize& size); |
152 | ||
d14a1e28 RD |
153 | void base_DoMoveWindow(int x, int y, int width, int height); |
154 | void base_DoSetSize(int x, int y, int width, int height, | |
155 | int sizeFlags = wxSIZE_AUTO); | |
156 | void base_DoSetClientSize(int width, int height); | |
157 | void base_DoSetVirtualSize( int x, int y ); | |
158 | ||
322913ce RD |
159 | DocDeclA( |
160 | void, base_DoGetSize( int *OUTPUT, int *OUTPUT ) const, | |
161 | "base_DoGetSize() -> (width, height)"); | |
162 | DocDeclA( | |
163 | void, base_DoGetClientSize( int *OUTPUT, int *OUTPUT ) const, | |
164 | "base_DoGetClientSize() -> (width, height)"); | |
165 | DocDeclA( | |
166 | void, base_DoGetPosition( int *OUTPUT, int *OUTPUT ) const, | |
167 | "base_DoGetPosition() -> (x,y)"); | |
d14a1e28 RD |
168 | |
169 | wxSize base_DoGetVirtualSize() const; | |
170 | wxSize base_DoGetBestSize() const; | |
171 | ||
172 | void base_InitDialog(); | |
173 | bool base_TransferDataToWindow(); | |
174 | bool base_TransferDataFromWindow(); | |
175 | bool base_Validate(); | |
176 | ||
177 | bool base_AcceptsFocus() const; | |
178 | bool base_AcceptsFocusFromKeyboard() const; | |
179 | wxSize base_GetMaxSize() const; | |
180 | ||
181 | void base_AddChild(wxWindow* child); | |
182 | void base_RemoveChild(wxWindow* child); | |
d43da706 | 183 | |
1a10485f | 184 | bool base_ShouldInheritColours() const; |
1a10485f | 185 | wxVisualAttributes base_GetDefaultAttributes(); |
d14a1e28 RD |
186 | }; |
187 | ||
188 | //--------------------------------------------------------------------------- | |
189 | // Do the same thing for wxControl | |
190 | ||
191 | // ** See _pycontrol.i, it was moved there because of dependency on wxControl | |
192 | ||
193 | ||
194 | //--------------------------------------------------------------------------- | |
195 | // and for wxPanel | |
196 | ||
197 | %{ // C++ version of Python aware wxPanel | |
198 | class wxPyPanel : public wxPanel | |
199 | { | |
200 | DECLARE_DYNAMIC_CLASS(wxPyPanel) | |
201 | public: | |
202 | wxPyPanel() : wxPanel() {} | |
203 | wxPyPanel(wxWindow* parent, const wxWindowID id, | |
204 | const wxPoint& pos = wxDefaultPosition, | |
205 | const wxSize& size = wxDefaultSize, | |
206 | long style = 0, | |
207 | const wxString& name = wxPyPanelNameStr) | |
208 | : wxPanel(parent, id, pos, size, style, name) {} | |
209 | ||
1a10485f RD |
210 | void SetBestSize(const wxSize& size) { wxPanel::SetBestSize(size); } |
211 | ||
d14a1e28 RD |
212 | |
213 | DEC_PYCALLBACK_VOID_INT4(DoMoveWindow); | |
214 | DEC_PYCALLBACK_VOID_INT5(DoSetSize); | |
215 | DEC_PYCALLBACK_VOID_INTINT(DoSetClientSize); | |
216 | DEC_PYCALLBACK_VOID_INTINT(DoSetVirtualSize); | |
217 | ||
218 | DEC_PYCALLBACK_VOID_INTPINTP_const(DoGetSize); | |
219 | DEC_PYCALLBACK_VOID_INTPINTP_const(DoGetClientSize); | |
220 | DEC_PYCALLBACK_VOID_INTPINTP_const(DoGetPosition); | |
221 | ||
222 | DEC_PYCALLBACK_SIZE_const(DoGetVirtualSize); | |
223 | DEC_PYCALLBACK_SIZE_const(DoGetBestSize); | |
224 | ||
225 | DEC_PYCALLBACK__(InitDialog); | |
226 | DEC_PYCALLBACK_BOOL_(TransferDataFromWindow); | |
227 | DEC_PYCALLBACK_BOOL_(TransferDataToWindow); | |
228 | DEC_PYCALLBACK_BOOL_(Validate); | |
229 | ||
230 | DEC_PYCALLBACK_BOOL_const(AcceptsFocus); | |
231 | DEC_PYCALLBACK_BOOL_const(AcceptsFocusFromKeyboard); | |
232 | DEC_PYCALLBACK_SIZE_const(GetMaxSize); | |
233 | ||
234 | DEC_PYCALLBACK_VOID_WXWINBASE(AddChild); | |
235 | DEC_PYCALLBACK_VOID_WXWINBASE(RemoveChild); | |
236 | ||
1a10485f | 237 | DEC_PYCALLBACK_BOOL_const(ShouldInheritColours); |
1a10485f | 238 | DEC_PYCALLBACK_VIZATTR_(GetDefaultAttributes); |
4d2962b1 | 239 | |
b035e80b RD |
240 | DEC_PYCALLBACK_BOOL_(HasTransparentBackground); |
241 | ||
d14a1e28 RD |
242 | PYPRIVATE; |
243 | }; | |
244 | ||
245 | IMPLEMENT_DYNAMIC_CLASS(wxPyPanel, wxPanel); | |
246 | ||
247 | IMP_PYCALLBACK_VOID_INT4(wxPyPanel, wxPanel, DoMoveWindow); | |
248 | IMP_PYCALLBACK_VOID_INT5(wxPyPanel, wxPanel, DoSetSize); | |
249 | IMP_PYCALLBACK_VOID_INTINT(wxPyPanel, wxPanel, DoSetClientSize); | |
250 | IMP_PYCALLBACK_VOID_INTINT(wxPyPanel, wxPanel, DoSetVirtualSize); | |
251 | ||
252 | IMP_PYCALLBACK_VOID_INTPINTP_const(wxPyPanel, wxPanel, DoGetSize); | |
253 | IMP_PYCALLBACK_VOID_INTPINTP_const(wxPyPanel, wxPanel, DoGetClientSize); | |
254 | IMP_PYCALLBACK_VOID_INTPINTP_const(wxPyPanel, wxPanel, DoGetPosition); | |
255 | ||
256 | IMP_PYCALLBACK_SIZE_const(wxPyPanel, wxPanel, DoGetVirtualSize); | |
257 | IMP_PYCALLBACK_SIZE_const(wxPyPanel, wxPanel, DoGetBestSize); | |
258 | ||
259 | IMP_PYCALLBACK__(wxPyPanel, wxPanel, InitDialog); | |
260 | IMP_PYCALLBACK_BOOL_(wxPyPanel, wxPanel, TransferDataFromWindow); | |
261 | IMP_PYCALLBACK_BOOL_(wxPyPanel, wxPanel, TransferDataToWindow); | |
262 | IMP_PYCALLBACK_BOOL_(wxPyPanel, wxPanel, Validate); | |
263 | ||
264 | IMP_PYCALLBACK_BOOL_const(wxPyPanel, wxPanel, AcceptsFocus); | |
265 | IMP_PYCALLBACK_BOOL_const(wxPyPanel, wxPanel, AcceptsFocusFromKeyboard); | |
266 | IMP_PYCALLBACK_SIZE_const(wxPyPanel, wxPanel, GetMaxSize); | |
267 | ||
268 | IMP_PYCALLBACK_VOID_WXWINBASE(wxPyPanel, wxPanel, AddChild); | |
269 | IMP_PYCALLBACK_VOID_WXWINBASE(wxPyPanel, wxPanel, RemoveChild); | |
270 | ||
1a10485f | 271 | IMP_PYCALLBACK_BOOL_const(wxPyPanel, wxPanel, ShouldInheritColours); |
1a10485f RD |
272 | IMP_PYCALLBACK_VIZATTR_(wxPyPanel, wxPanel, GetDefaultAttributes); |
273 | ||
b035e80b RD |
274 | IMP_PYCALLBACK_BOOL_(wxPyPanel, wxPanel, HasTransparentBackground); |
275 | %} | |
d14a1e28 RD |
276 | |
277 | // And now the one for SWIG to see | |
ab1f7d2a | 278 | MustHaveApp(wxPyPanel); |
d14a1e28 RD |
279 | class wxPyPanel : public wxPanel |
280 | { | |
281 | public: | |
2b9048c5 | 282 | %pythonAppend wxPyPanel "self._setOORInfo(self); self._setCallbackInfo(self, PyPanel)" |
d43da706 | 283 | %pythonAppend wxPyPanel() "" |
d14a1e28 | 284 | |
d5573410 | 285 | wxPyPanel(wxWindow* parent, const wxWindowID id=-1, |
d14a1e28 RD |
286 | const wxPoint& pos = wxDefaultPosition, |
287 | const wxSize& size = wxDefaultSize, | |
288 | long style = 0, | |
289 | const wxString& name = wxPyPanelNameStr); | |
290 | ||
1b8c7ba6 | 291 | %RenameCtor(PrePyPanel, wxPyPanel()); |
d43da706 RD |
292 | |
293 | void _setCallbackInfo(PyObject* self, PyObject* _class); | |
294 | ||
1a10485f | 295 | void SetBestSize(const wxSize& size); |
d43da706 RD |
296 | |
297 | void base_DoMoveWindow(int x, int y, int width, int height); | |
298 | void base_DoSetSize(int x, int y, int width, int height, | |
299 | int sizeFlags = wxSIZE_AUTO); | |
300 | void base_DoSetClientSize(int width, int height); | |
301 | void base_DoSetVirtualSize( int x, int y ); | |
302 | ||
303 | DocDeclA( | |
304 | void, base_DoGetSize( int *OUTPUT, int *OUTPUT ) const, | |
305 | "base_DoGetSize() -> (width, height)"); | |
306 | DocDeclA( | |
307 | void, base_DoGetClientSize( int *OUTPUT, int *OUTPUT ) const, | |
308 | "base_DoGetClientSize() -> (width, height)"); | |
309 | DocDeclA( | |
310 | void, base_DoGetPosition( int *OUTPUT, int *OUTPUT ) const, | |
311 | "base_DoGetPosition() -> (x,y)"); | |
312 | ||
313 | wxSize base_DoGetVirtualSize() const; | |
314 | wxSize base_DoGetBestSize() const; | |
315 | ||
316 | void base_InitDialog(); | |
317 | bool base_TransferDataToWindow(); | |
318 | bool base_TransferDataFromWindow(); | |
319 | bool base_Validate(); | |
320 | ||
321 | bool base_AcceptsFocus() const; | |
322 | bool base_AcceptsFocusFromKeyboard() const; | |
323 | wxSize base_GetMaxSize() const; | |
324 | ||
325 | void base_AddChild(wxWindow* child); | |
326 | void base_RemoveChild(wxWindow* child); | |
327 | ||
1a10485f | 328 | bool base_ShouldInheritColours() const ; |
1a10485f | 329 | wxVisualAttributes base_GetDefaultAttributes(); |
d43da706 RD |
330 | }; |
331 | ||
332 | //--------------------------------------------------------------------------- | |
333 | // and for wxScrolledWindow | |
334 | ||
335 | %{ // C++ version of Python aware wxScrolledWindow | |
336 | class wxPyScrolledWindow : public wxScrolledWindow | |
337 | { | |
338 | DECLARE_DYNAMIC_CLASS(wxPyScrolledWindow) | |
339 | public: | |
340 | wxPyScrolledWindow() : wxScrolledWindow() {} | |
341 | wxPyScrolledWindow(wxWindow* parent, const wxWindowID id, | |
342 | const wxPoint& pos = wxDefaultPosition, | |
343 | const wxSize& size = wxDefaultSize, | |
344 | long style = 0, | |
345 | const wxString& name = wxPyPanelNameStr) | |
346 | : wxScrolledWindow(parent, id, pos, size, style, name) {} | |
347 | ||
1a10485f | 348 | void SetBestSize(const wxSize& size) { wxScrolledWindow::SetBestSize(size); } |
d43da706 RD |
349 | |
350 | DEC_PYCALLBACK_VOID_INT4(DoMoveWindow); | |
351 | DEC_PYCALLBACK_VOID_INT5(DoSetSize); | |
352 | DEC_PYCALLBACK_VOID_INTINT(DoSetClientSize); | |
353 | DEC_PYCALLBACK_VOID_INTINT(DoSetVirtualSize); | |
354 | ||
355 | DEC_PYCALLBACK_VOID_INTPINTP_const(DoGetSize); | |
356 | DEC_PYCALLBACK_VOID_INTPINTP_const(DoGetClientSize); | |
357 | DEC_PYCALLBACK_VOID_INTPINTP_const(DoGetPosition); | |
358 | ||
359 | DEC_PYCALLBACK_SIZE_const(DoGetVirtualSize); | |
360 | DEC_PYCALLBACK_SIZE_const(DoGetBestSize); | |
361 | ||
362 | DEC_PYCALLBACK__(InitDialog); | |
363 | DEC_PYCALLBACK_BOOL_(TransferDataFromWindow); | |
364 | DEC_PYCALLBACK_BOOL_(TransferDataToWindow); | |
365 | DEC_PYCALLBACK_BOOL_(Validate); | |
366 | ||
367 | DEC_PYCALLBACK_BOOL_const(AcceptsFocus); | |
368 | DEC_PYCALLBACK_BOOL_const(AcceptsFocusFromKeyboard); | |
369 | DEC_PYCALLBACK_SIZE_const(GetMaxSize); | |
370 | ||
371 | DEC_PYCALLBACK_VOID_WXWINBASE(AddChild); | |
372 | DEC_PYCALLBACK_VOID_WXWINBASE(RemoveChild); | |
373 | ||
1a10485f | 374 | DEC_PYCALLBACK_BOOL_const(ShouldInheritColours); |
1a10485f | 375 | DEC_PYCALLBACK_VIZATTR_(GetDefaultAttributes); |
d43da706 | 376 | |
b035e80b RD |
377 | DEC_PYCALLBACK_BOOL_(HasTransparentBackground); |
378 | ||
d43da706 RD |
379 | PYPRIVATE; |
380 | }; | |
381 | ||
382 | IMPLEMENT_DYNAMIC_CLASS(wxPyScrolledWindow, wxScrolledWindow); | |
383 | ||
384 | IMP_PYCALLBACK_VOID_INT4(wxPyScrolledWindow, wxScrolledWindow, DoMoveWindow); | |
385 | IMP_PYCALLBACK_VOID_INT5(wxPyScrolledWindow, wxScrolledWindow, DoSetSize); | |
386 | IMP_PYCALLBACK_VOID_INTINT(wxPyScrolledWindow, wxScrolledWindow, DoSetClientSize); | |
387 | IMP_PYCALLBACK_VOID_INTINT(wxPyScrolledWindow, wxScrolledWindow, DoSetVirtualSize); | |
388 | ||
389 | IMP_PYCALLBACK_VOID_INTPINTP_const(wxPyScrolledWindow, wxScrolledWindow, DoGetSize); | |
390 | IMP_PYCALLBACK_VOID_INTPINTP_const(wxPyScrolledWindow, wxScrolledWindow, DoGetClientSize); | |
391 | IMP_PYCALLBACK_VOID_INTPINTP_const(wxPyScrolledWindow, wxScrolledWindow, DoGetPosition); | |
392 | ||
393 | IMP_PYCALLBACK_SIZE_const(wxPyScrolledWindow, wxScrolledWindow, DoGetVirtualSize); | |
394 | IMP_PYCALLBACK_SIZE_const(wxPyScrolledWindow, wxScrolledWindow, DoGetBestSize); | |
395 | ||
396 | IMP_PYCALLBACK__(wxPyScrolledWindow, wxScrolledWindow, InitDialog); | |
397 | IMP_PYCALLBACK_BOOL_(wxPyScrolledWindow, wxScrolledWindow, TransferDataFromWindow); | |
398 | IMP_PYCALLBACK_BOOL_(wxPyScrolledWindow, wxScrolledWindow, TransferDataToWindow); | |
399 | IMP_PYCALLBACK_BOOL_(wxPyScrolledWindow, wxScrolledWindow, Validate); | |
400 | ||
401 | IMP_PYCALLBACK_BOOL_const(wxPyScrolledWindow, wxScrolledWindow, AcceptsFocus); | |
402 | IMP_PYCALLBACK_BOOL_const(wxPyScrolledWindow, wxScrolledWindow, AcceptsFocusFromKeyboard); | |
403 | IMP_PYCALLBACK_SIZE_const(wxPyScrolledWindow, wxScrolledWindow, GetMaxSize); | |
404 | ||
405 | IMP_PYCALLBACK_VOID_WXWINBASE(wxPyScrolledWindow, wxScrolledWindow, AddChild); | |
406 | IMP_PYCALLBACK_VOID_WXWINBASE(wxPyScrolledWindow, wxScrolledWindow, RemoveChild); | |
407 | ||
1a10485f | 408 | IMP_PYCALLBACK_BOOL_const(wxPyScrolledWindow, wxScrolledWindow, ShouldInheritColours); |
1a10485f RD |
409 | IMP_PYCALLBACK_VIZATTR_(wxPyScrolledWindow, wxScrolledWindow, GetDefaultAttributes); |
410 | ||
b035e80b | 411 | IMP_PYCALLBACK_BOOL_(wxPyScrolledWindow, wxScrolledWindow, HasTransparentBackground); |
d43da706 RD |
412 | %} |
413 | ||
414 | // And now the one for SWIG to see | |
ab1f7d2a | 415 | MustHaveApp(wxPyScrolledWindow); |
d43da706 RD |
416 | class wxPyScrolledWindow : public wxScrolledWindow |
417 | { | |
418 | public: | |
419 | %pythonAppend wxPyScrolledWindow "self._setOORInfo(self); self._setCallbackInfo(self, PyPanel)" | |
420 | %pythonAppend wxPyScrolledWindow() "" | |
421 | ||
d5573410 | 422 | wxPyScrolledWindow(wxWindow* parent, const wxWindowID id=-1, |
d43da706 RD |
423 | const wxPoint& pos = wxDefaultPosition, |
424 | const wxSize& size = wxDefaultSize, | |
425 | long style = 0, | |
426 | const wxString& name = wxPyPanelNameStr); | |
427 | ||
1b8c7ba6 | 428 | %RenameCtor(PrePyScrolledWindow, wxPyScrolledWindow()); |
d43da706 | 429 | |
d14a1e28 | 430 | void _setCallbackInfo(PyObject* self, PyObject* _class); |
d14a1e28 | 431 | |
1a10485f | 432 | void SetBestSize(const wxSize& size); |
d14a1e28 RD |
433 | |
434 | void base_DoMoveWindow(int x, int y, int width, int height); | |
435 | void base_DoSetSize(int x, int y, int width, int height, | |
436 | int sizeFlags = wxSIZE_AUTO); | |
437 | void base_DoSetClientSize(int width, int height); | |
438 | void base_DoSetVirtualSize( int x, int y ); | |
439 | ||
322913ce RD |
440 | DocDeclA( |
441 | void, base_DoGetSize( int *OUTPUT, int *OUTPUT ) const, | |
442 | "base_DoGetSize() -> (width, height)"); | |
443 | DocDeclA( | |
444 | void, base_DoGetClientSize( int *OUTPUT, int *OUTPUT ) const, | |
445 | "base_DoGetClientSize() -> (width, height)"); | |
446 | DocDeclA( | |
447 | void, base_DoGetPosition( int *OUTPUT, int *OUTPUT ) const, | |
448 | "base_DoGetPosition() -> (x,y)"); | |
d14a1e28 RD |
449 | |
450 | wxSize base_DoGetVirtualSize() const; | |
451 | wxSize base_DoGetBestSize() const; | |
452 | ||
453 | void base_InitDialog(); | |
454 | bool base_TransferDataToWindow(); | |
455 | bool base_TransferDataFromWindow(); | |
456 | bool base_Validate(); | |
457 | ||
458 | bool base_AcceptsFocus() const; | |
459 | bool base_AcceptsFocusFromKeyboard() const; | |
460 | wxSize base_GetMaxSize() const; | |
461 | ||
462 | void base_AddChild(wxWindow* child); | |
463 | void base_RemoveChild(wxWindow* child); | |
d43da706 | 464 | |
1a10485f | 465 | bool base_ShouldInheritColours() const; |
1a10485f | 466 | wxVisualAttributes base_GetDefaultAttributes(); |
d14a1e28 RD |
467 | }; |
468 | ||
469 | ||
470 | //--------------------------------------------------------------------------- | |
471 | //--------------------------------------------------------------------------- |