]>
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); |
d43da706 | 93 | DEC_PYCALLBACK__COLOUR(ApplyParentThemeBackground); |
1a10485f | 94 | DEC_PYCALLBACK_VIZATTR_(GetDefaultAttributes); |
4d2962b1 | 95 | |
d14a1e28 RD |
96 | PYPRIVATE; |
97 | }; | |
98 | ||
99 | IMPLEMENT_DYNAMIC_CLASS(wxPyWindow, wxWindow); | |
100 | ||
101 | IMP_PYCALLBACK_VOID_INT4(wxPyWindow, wxWindow, DoMoveWindow); | |
102 | IMP_PYCALLBACK_VOID_INT5(wxPyWindow, wxWindow, DoSetSize); | |
103 | IMP_PYCALLBACK_VOID_INTINT(wxPyWindow, wxWindow, DoSetClientSize); | |
104 | IMP_PYCALLBACK_VOID_INTINT(wxPyWindow, wxWindow, DoSetVirtualSize); | |
105 | ||
106 | IMP_PYCALLBACK_VOID_INTPINTP_const(wxPyWindow, wxWindow, DoGetSize); | |
107 | IMP_PYCALLBACK_VOID_INTPINTP_const(wxPyWindow, wxWindow, DoGetClientSize); | |
108 | IMP_PYCALLBACK_VOID_INTPINTP_const(wxPyWindow, wxWindow, DoGetPosition); | |
109 | ||
110 | IMP_PYCALLBACK_SIZE_const(wxPyWindow, wxWindow, DoGetVirtualSize); | |
111 | IMP_PYCALLBACK_SIZE_const(wxPyWindow, wxWindow, DoGetBestSize); | |
112 | ||
113 | IMP_PYCALLBACK__(wxPyWindow, wxWindow, InitDialog); | |
114 | IMP_PYCALLBACK_BOOL_(wxPyWindow, wxWindow, TransferDataFromWindow); | |
115 | IMP_PYCALLBACK_BOOL_(wxPyWindow, wxWindow, TransferDataToWindow); | |
116 | IMP_PYCALLBACK_BOOL_(wxPyWindow, wxWindow, Validate); | |
117 | ||
118 | IMP_PYCALLBACK_BOOL_const(wxPyWindow, wxWindow, AcceptsFocus); | |
119 | IMP_PYCALLBACK_BOOL_const(wxPyWindow, wxWindow, AcceptsFocusFromKeyboard); | |
120 | IMP_PYCALLBACK_SIZE_const(wxPyWindow, wxWindow, GetMaxSize); | |
121 | ||
122 | IMP_PYCALLBACK_VOID_WXWINBASE(wxPyWindow, wxWindow, AddChild); | |
123 | IMP_PYCALLBACK_VOID_WXWINBASE(wxPyWindow, wxWindow, RemoveChild); | |
124 | ||
1a10485f | 125 | IMP_PYCALLBACK_BOOL_const(wxPyWindow, wxWindow, ShouldInheritColours); |
d43da706 | 126 | IMP_PYCALLBACK__COLOUR(wxPyWindow, wxWindow, ApplyParentThemeBackground); |
1a10485f | 127 | IMP_PYCALLBACK_VIZATTR_(wxPyWindow, wxWindow, GetDefaultAttributes); |
d43da706 | 128 | |
d14a1e28 RD |
129 | %} |
130 | ||
131 | // And now the one for SWIG to see | |
132 | class wxPyWindow : public wxWindow | |
133 | { | |
134 | public: | |
2b9048c5 | 135 | %pythonAppend wxPyWindow "self._setOORInfo(self); self._setCallbackInfo(self, PyWindow)" |
d43da706 | 136 | %pythonAppend wxPyWindow() "" |
d14a1e28 RD |
137 | |
138 | wxPyWindow(wxWindow* parent, const wxWindowID id, | |
139 | const wxPoint& pos = wxDefaultPosition, | |
140 | const wxSize& size = wxDefaultSize, | |
141 | long style = 0, | |
142 | const wxString& name = wxPyPanelNameStr); | |
143 | ||
d43da706 RD |
144 | %name(PrePyWindow) wxPyWindow(); |
145 | ||
d14a1e28 RD |
146 | void _setCallbackInfo(PyObject* self, PyObject* _class); |
147 | ||
148 | ||
1a10485f RD |
149 | void SetBestSize(const wxSize& size); |
150 | ||
d14a1e28 RD |
151 | void base_DoMoveWindow(int x, int y, int width, int height); |
152 | void base_DoSetSize(int x, int y, int width, int height, | |
153 | int sizeFlags = wxSIZE_AUTO); | |
154 | void base_DoSetClientSize(int width, int height); | |
155 | void base_DoSetVirtualSize( int x, int y ); | |
156 | ||
322913ce RD |
157 | DocDeclA( |
158 | void, base_DoGetSize( int *OUTPUT, int *OUTPUT ) const, | |
159 | "base_DoGetSize() -> (width, height)"); | |
160 | DocDeclA( | |
161 | void, base_DoGetClientSize( int *OUTPUT, int *OUTPUT ) const, | |
162 | "base_DoGetClientSize() -> (width, height)"); | |
163 | DocDeclA( | |
164 | void, base_DoGetPosition( int *OUTPUT, int *OUTPUT ) const, | |
165 | "base_DoGetPosition() -> (x,y)"); | |
d14a1e28 RD |
166 | |
167 | wxSize base_DoGetVirtualSize() const; | |
168 | wxSize base_DoGetBestSize() const; | |
169 | ||
170 | void base_InitDialog(); | |
171 | bool base_TransferDataToWindow(); | |
172 | bool base_TransferDataFromWindow(); | |
173 | bool base_Validate(); | |
174 | ||
175 | bool base_AcceptsFocus() const; | |
176 | bool base_AcceptsFocusFromKeyboard() const; | |
177 | wxSize base_GetMaxSize() const; | |
178 | ||
179 | void base_AddChild(wxWindow* child); | |
180 | void base_RemoveChild(wxWindow* child); | |
d43da706 | 181 | |
1a10485f | 182 | bool base_ShouldInheritColours() const; |
d43da706 | 183 | void base_ApplyParentThemeBackground(const wxColour& c); |
1a10485f | 184 | wxVisualAttributes base_GetDefaultAttributes(); |
d14a1e28 RD |
185 | }; |
186 | ||
187 | //--------------------------------------------------------------------------- | |
188 | // Do the same thing for wxControl | |
189 | ||
190 | // ** See _pycontrol.i, it was moved there because of dependency on wxControl | |
191 | ||
192 | ||
193 | //--------------------------------------------------------------------------- | |
194 | // and for wxPanel | |
195 | ||
196 | %{ // C++ version of Python aware wxPanel | |
197 | class wxPyPanel : public wxPanel | |
198 | { | |
199 | DECLARE_DYNAMIC_CLASS(wxPyPanel) | |
200 | public: | |
201 | wxPyPanel() : wxPanel() {} | |
202 | wxPyPanel(wxWindow* parent, const wxWindowID id, | |
203 | const wxPoint& pos = wxDefaultPosition, | |
204 | const wxSize& size = wxDefaultSize, | |
205 | long style = 0, | |
206 | const wxString& name = wxPyPanelNameStr) | |
207 | : wxPanel(parent, id, pos, size, style, name) {} | |
208 | ||
1a10485f RD |
209 | void SetBestSize(const wxSize& size) { wxPanel::SetBestSize(size); } |
210 | ||
d14a1e28 RD |
211 | |
212 | DEC_PYCALLBACK_VOID_INT4(DoMoveWindow); | |
213 | DEC_PYCALLBACK_VOID_INT5(DoSetSize); | |
214 | DEC_PYCALLBACK_VOID_INTINT(DoSetClientSize); | |
215 | DEC_PYCALLBACK_VOID_INTINT(DoSetVirtualSize); | |
216 | ||
217 | DEC_PYCALLBACK_VOID_INTPINTP_const(DoGetSize); | |
218 | DEC_PYCALLBACK_VOID_INTPINTP_const(DoGetClientSize); | |
219 | DEC_PYCALLBACK_VOID_INTPINTP_const(DoGetPosition); | |
220 | ||
221 | DEC_PYCALLBACK_SIZE_const(DoGetVirtualSize); | |
222 | DEC_PYCALLBACK_SIZE_const(DoGetBestSize); | |
223 | ||
224 | DEC_PYCALLBACK__(InitDialog); | |
225 | DEC_PYCALLBACK_BOOL_(TransferDataFromWindow); | |
226 | DEC_PYCALLBACK_BOOL_(TransferDataToWindow); | |
227 | DEC_PYCALLBACK_BOOL_(Validate); | |
228 | ||
229 | DEC_PYCALLBACK_BOOL_const(AcceptsFocus); | |
230 | DEC_PYCALLBACK_BOOL_const(AcceptsFocusFromKeyboard); | |
231 | DEC_PYCALLBACK_SIZE_const(GetMaxSize); | |
232 | ||
233 | DEC_PYCALLBACK_VOID_WXWINBASE(AddChild); | |
234 | DEC_PYCALLBACK_VOID_WXWINBASE(RemoveChild); | |
235 | ||
1a10485f | 236 | DEC_PYCALLBACK_BOOL_const(ShouldInheritColours); |
d43da706 | 237 | DEC_PYCALLBACK__COLOUR(ApplyParentThemeBackground); |
1a10485f | 238 | DEC_PYCALLBACK_VIZATTR_(GetDefaultAttributes); |
4d2962b1 | 239 | |
d14a1e28 RD |
240 | PYPRIVATE; |
241 | }; | |
242 | ||
243 | IMPLEMENT_DYNAMIC_CLASS(wxPyPanel, wxPanel); | |
244 | ||
245 | IMP_PYCALLBACK_VOID_INT4(wxPyPanel, wxPanel, DoMoveWindow); | |
246 | IMP_PYCALLBACK_VOID_INT5(wxPyPanel, wxPanel, DoSetSize); | |
247 | IMP_PYCALLBACK_VOID_INTINT(wxPyPanel, wxPanel, DoSetClientSize); | |
248 | IMP_PYCALLBACK_VOID_INTINT(wxPyPanel, wxPanel, DoSetVirtualSize); | |
249 | ||
250 | IMP_PYCALLBACK_VOID_INTPINTP_const(wxPyPanel, wxPanel, DoGetSize); | |
251 | IMP_PYCALLBACK_VOID_INTPINTP_const(wxPyPanel, wxPanel, DoGetClientSize); | |
252 | IMP_PYCALLBACK_VOID_INTPINTP_const(wxPyPanel, wxPanel, DoGetPosition); | |
253 | ||
254 | IMP_PYCALLBACK_SIZE_const(wxPyPanel, wxPanel, DoGetVirtualSize); | |
255 | IMP_PYCALLBACK_SIZE_const(wxPyPanel, wxPanel, DoGetBestSize); | |
256 | ||
257 | IMP_PYCALLBACK__(wxPyPanel, wxPanel, InitDialog); | |
258 | IMP_PYCALLBACK_BOOL_(wxPyPanel, wxPanel, TransferDataFromWindow); | |
259 | IMP_PYCALLBACK_BOOL_(wxPyPanel, wxPanel, TransferDataToWindow); | |
260 | IMP_PYCALLBACK_BOOL_(wxPyPanel, wxPanel, Validate); | |
261 | ||
262 | IMP_PYCALLBACK_BOOL_const(wxPyPanel, wxPanel, AcceptsFocus); | |
263 | IMP_PYCALLBACK_BOOL_const(wxPyPanel, wxPanel, AcceptsFocusFromKeyboard); | |
264 | IMP_PYCALLBACK_SIZE_const(wxPyPanel, wxPanel, GetMaxSize); | |
265 | ||
266 | IMP_PYCALLBACK_VOID_WXWINBASE(wxPyPanel, wxPanel, AddChild); | |
267 | IMP_PYCALLBACK_VOID_WXWINBASE(wxPyPanel, wxPanel, RemoveChild); | |
268 | ||
1a10485f | 269 | IMP_PYCALLBACK_BOOL_const(wxPyPanel, wxPanel, ShouldInheritColours); |
d43da706 | 270 | IMP_PYCALLBACK__COLOUR(wxPyPanel, wxPanel, ApplyParentThemeBackground); |
1a10485f RD |
271 | IMP_PYCALLBACK_VIZATTR_(wxPyPanel, wxPanel, GetDefaultAttributes); |
272 | ||
273 | %} | |
d14a1e28 RD |
274 | |
275 | // And now the one for SWIG to see | |
276 | class wxPyPanel : public wxPanel | |
277 | { | |
278 | public: | |
2b9048c5 | 279 | %pythonAppend wxPyPanel "self._setOORInfo(self); self._setCallbackInfo(self, PyPanel)" |
d43da706 | 280 | %pythonAppend wxPyPanel() "" |
d14a1e28 RD |
281 | |
282 | wxPyPanel(wxWindow* parent, const wxWindowID id, | |
283 | const wxPoint& pos = wxDefaultPosition, | |
284 | const wxSize& size = wxDefaultSize, | |
285 | long style = 0, | |
286 | const wxString& name = wxPyPanelNameStr); | |
287 | ||
d43da706 RD |
288 | %name(PrePyPanel) wxPyPanel(); |
289 | ||
290 | void _setCallbackInfo(PyObject* self, PyObject* _class); | |
291 | ||
1a10485f | 292 | void SetBestSize(const wxSize& size); |
d43da706 RD |
293 | |
294 | void base_DoMoveWindow(int x, int y, int width, int height); | |
295 | void base_DoSetSize(int x, int y, int width, int height, | |
296 | int sizeFlags = wxSIZE_AUTO); | |
297 | void base_DoSetClientSize(int width, int height); | |
298 | void base_DoSetVirtualSize( int x, int y ); | |
299 | ||
300 | DocDeclA( | |
301 | void, base_DoGetSize( int *OUTPUT, int *OUTPUT ) const, | |
302 | "base_DoGetSize() -> (width, height)"); | |
303 | DocDeclA( | |
304 | void, base_DoGetClientSize( int *OUTPUT, int *OUTPUT ) const, | |
305 | "base_DoGetClientSize() -> (width, height)"); | |
306 | DocDeclA( | |
307 | void, base_DoGetPosition( int *OUTPUT, int *OUTPUT ) const, | |
308 | "base_DoGetPosition() -> (x,y)"); | |
309 | ||
310 | wxSize base_DoGetVirtualSize() const; | |
311 | wxSize base_DoGetBestSize() const; | |
312 | ||
313 | void base_InitDialog(); | |
314 | bool base_TransferDataToWindow(); | |
315 | bool base_TransferDataFromWindow(); | |
316 | bool base_Validate(); | |
317 | ||
318 | bool base_AcceptsFocus() const; | |
319 | bool base_AcceptsFocusFromKeyboard() const; | |
320 | wxSize base_GetMaxSize() const; | |
321 | ||
322 | void base_AddChild(wxWindow* child); | |
323 | void base_RemoveChild(wxWindow* child); | |
324 | ||
1a10485f | 325 | bool base_ShouldInheritColours() const ; |
d43da706 | 326 | void base_ApplyParentThemeBackground(const wxColour& c); |
1a10485f | 327 | wxVisualAttributes base_GetDefaultAttributes(); |
d43da706 RD |
328 | }; |
329 | ||
330 | //--------------------------------------------------------------------------- | |
331 | // and for wxScrolledWindow | |
332 | ||
333 | %{ // C++ version of Python aware wxScrolledWindow | |
334 | class wxPyScrolledWindow : public wxScrolledWindow | |
335 | { | |
336 | DECLARE_DYNAMIC_CLASS(wxPyScrolledWindow) | |
337 | public: | |
338 | wxPyScrolledWindow() : wxScrolledWindow() {} | |
339 | wxPyScrolledWindow(wxWindow* parent, const wxWindowID id, | |
340 | const wxPoint& pos = wxDefaultPosition, | |
341 | const wxSize& size = wxDefaultSize, | |
342 | long style = 0, | |
343 | const wxString& name = wxPyPanelNameStr) | |
344 | : wxScrolledWindow(parent, id, pos, size, style, name) {} | |
345 | ||
1a10485f | 346 | void SetBestSize(const wxSize& size) { wxScrolledWindow::SetBestSize(size); } |
d43da706 RD |
347 | |
348 | DEC_PYCALLBACK_VOID_INT4(DoMoveWindow); | |
349 | DEC_PYCALLBACK_VOID_INT5(DoSetSize); | |
350 | DEC_PYCALLBACK_VOID_INTINT(DoSetClientSize); | |
351 | DEC_PYCALLBACK_VOID_INTINT(DoSetVirtualSize); | |
352 | ||
353 | DEC_PYCALLBACK_VOID_INTPINTP_const(DoGetSize); | |
354 | DEC_PYCALLBACK_VOID_INTPINTP_const(DoGetClientSize); | |
355 | DEC_PYCALLBACK_VOID_INTPINTP_const(DoGetPosition); | |
356 | ||
357 | DEC_PYCALLBACK_SIZE_const(DoGetVirtualSize); | |
358 | DEC_PYCALLBACK_SIZE_const(DoGetBestSize); | |
359 | ||
360 | DEC_PYCALLBACK__(InitDialog); | |
361 | DEC_PYCALLBACK_BOOL_(TransferDataFromWindow); | |
362 | DEC_PYCALLBACK_BOOL_(TransferDataToWindow); | |
363 | DEC_PYCALLBACK_BOOL_(Validate); | |
364 | ||
365 | DEC_PYCALLBACK_BOOL_const(AcceptsFocus); | |
366 | DEC_PYCALLBACK_BOOL_const(AcceptsFocusFromKeyboard); | |
367 | DEC_PYCALLBACK_SIZE_const(GetMaxSize); | |
368 | ||
369 | DEC_PYCALLBACK_VOID_WXWINBASE(AddChild); | |
370 | DEC_PYCALLBACK_VOID_WXWINBASE(RemoveChild); | |
371 | ||
1a10485f | 372 | DEC_PYCALLBACK_BOOL_const(ShouldInheritColours); |
d43da706 | 373 | DEC_PYCALLBACK__COLOUR(ApplyParentThemeBackground); |
1a10485f | 374 | DEC_PYCALLBACK_VIZATTR_(GetDefaultAttributes); |
d43da706 RD |
375 | |
376 | PYPRIVATE; | |
377 | }; | |
378 | ||
379 | IMPLEMENT_DYNAMIC_CLASS(wxPyScrolledWindow, wxScrolledWindow); | |
380 | ||
381 | IMP_PYCALLBACK_VOID_INT4(wxPyScrolledWindow, wxScrolledWindow, DoMoveWindow); | |
382 | IMP_PYCALLBACK_VOID_INT5(wxPyScrolledWindow, wxScrolledWindow, DoSetSize); | |
383 | IMP_PYCALLBACK_VOID_INTINT(wxPyScrolledWindow, wxScrolledWindow, DoSetClientSize); | |
384 | IMP_PYCALLBACK_VOID_INTINT(wxPyScrolledWindow, wxScrolledWindow, DoSetVirtualSize); | |
385 | ||
386 | IMP_PYCALLBACK_VOID_INTPINTP_const(wxPyScrolledWindow, wxScrolledWindow, DoGetSize); | |
387 | IMP_PYCALLBACK_VOID_INTPINTP_const(wxPyScrolledWindow, wxScrolledWindow, DoGetClientSize); | |
388 | IMP_PYCALLBACK_VOID_INTPINTP_const(wxPyScrolledWindow, wxScrolledWindow, DoGetPosition); | |
389 | ||
390 | IMP_PYCALLBACK_SIZE_const(wxPyScrolledWindow, wxScrolledWindow, DoGetVirtualSize); | |
391 | IMP_PYCALLBACK_SIZE_const(wxPyScrolledWindow, wxScrolledWindow, DoGetBestSize); | |
392 | ||
393 | IMP_PYCALLBACK__(wxPyScrolledWindow, wxScrolledWindow, InitDialog); | |
394 | IMP_PYCALLBACK_BOOL_(wxPyScrolledWindow, wxScrolledWindow, TransferDataFromWindow); | |
395 | IMP_PYCALLBACK_BOOL_(wxPyScrolledWindow, wxScrolledWindow, TransferDataToWindow); | |
396 | IMP_PYCALLBACK_BOOL_(wxPyScrolledWindow, wxScrolledWindow, Validate); | |
397 | ||
398 | IMP_PYCALLBACK_BOOL_const(wxPyScrolledWindow, wxScrolledWindow, AcceptsFocus); | |
399 | IMP_PYCALLBACK_BOOL_const(wxPyScrolledWindow, wxScrolledWindow, AcceptsFocusFromKeyboard); | |
400 | IMP_PYCALLBACK_SIZE_const(wxPyScrolledWindow, wxScrolledWindow, GetMaxSize); | |
401 | ||
402 | IMP_PYCALLBACK_VOID_WXWINBASE(wxPyScrolledWindow, wxScrolledWindow, AddChild); | |
403 | IMP_PYCALLBACK_VOID_WXWINBASE(wxPyScrolledWindow, wxScrolledWindow, RemoveChild); | |
404 | ||
1a10485f | 405 | IMP_PYCALLBACK_BOOL_const(wxPyScrolledWindow, wxScrolledWindow, ShouldInheritColours); |
d43da706 | 406 | IMP_PYCALLBACK__COLOUR(wxPyScrolledWindow, wxScrolledWindow, ApplyParentThemeBackground); |
1a10485f RD |
407 | IMP_PYCALLBACK_VIZATTR_(wxPyScrolledWindow, wxScrolledWindow, GetDefaultAttributes); |
408 | ||
d43da706 RD |
409 | %} |
410 | ||
411 | // And now the one for SWIG to see | |
412 | class wxPyScrolledWindow : public wxScrolledWindow | |
413 | { | |
414 | public: | |
415 | %pythonAppend wxPyScrolledWindow "self._setOORInfo(self); self._setCallbackInfo(self, PyPanel)" | |
416 | %pythonAppend wxPyScrolledWindow() "" | |
417 | ||
418 | wxPyScrolledWindow(wxWindow* parent, const wxWindowID id, | |
419 | const wxPoint& pos = wxDefaultPosition, | |
420 | const wxSize& size = wxDefaultSize, | |
421 | long style = 0, | |
422 | const wxString& name = wxPyPanelNameStr); | |
423 | ||
424 | %name(PrePyScrolledWindow) wxPyScrolledWindow(); | |
425 | ||
d14a1e28 | 426 | void _setCallbackInfo(PyObject* self, PyObject* _class); |
d14a1e28 | 427 | |
1a10485f | 428 | void SetBestSize(const wxSize& size); |
d14a1e28 RD |
429 | |
430 | void base_DoMoveWindow(int x, int y, int width, int height); | |
431 | void base_DoSetSize(int x, int y, int width, int height, | |
432 | int sizeFlags = wxSIZE_AUTO); | |
433 | void base_DoSetClientSize(int width, int height); | |
434 | void base_DoSetVirtualSize( int x, int y ); | |
435 | ||
322913ce RD |
436 | DocDeclA( |
437 | void, base_DoGetSize( int *OUTPUT, int *OUTPUT ) const, | |
438 | "base_DoGetSize() -> (width, height)"); | |
439 | DocDeclA( | |
440 | void, base_DoGetClientSize( int *OUTPUT, int *OUTPUT ) const, | |
441 | "base_DoGetClientSize() -> (width, height)"); | |
442 | DocDeclA( | |
443 | void, base_DoGetPosition( int *OUTPUT, int *OUTPUT ) const, | |
444 | "base_DoGetPosition() -> (x,y)"); | |
d14a1e28 RD |
445 | |
446 | wxSize base_DoGetVirtualSize() const; | |
447 | wxSize base_DoGetBestSize() const; | |
448 | ||
449 | void base_InitDialog(); | |
450 | bool base_TransferDataToWindow(); | |
451 | bool base_TransferDataFromWindow(); | |
452 | bool base_Validate(); | |
453 | ||
454 | bool base_AcceptsFocus() const; | |
455 | bool base_AcceptsFocusFromKeyboard() const; | |
456 | wxSize base_GetMaxSize() const; | |
457 | ||
458 | void base_AddChild(wxWindow* child); | |
459 | void base_RemoveChild(wxWindow* child); | |
d43da706 | 460 | |
1a10485f | 461 | bool base_ShouldInheritColours() const; |
d43da706 | 462 | void base_ApplyParentThemeBackground(const wxColour& c); |
1a10485f | 463 | wxVisualAttributes base_GetDefaultAttributes(); |
d14a1e28 RD |
464 | }; |
465 | ||
466 | ||
467 | //--------------------------------------------------------------------------- | |
468 | //--------------------------------------------------------------------------- |