]> git.saurik.com Git - wxWidgets.git/blob - wxPython/src/windows2.i
find available samples, demos and contribs at runtime
[wxWidgets.git] / wxPython / src / windows2.i
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: windows2.i
3 // Purpose: SWIG definitions of MORE window classes
4 //
5 // Author: Robin Dunn
6 //
7 // Created: 6/2/98
8 // RCS-ID: $Id$
9 // Copyright: (c) 1998 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
12
13 %module windows2
14
15 %{
16 #include "helpers.h"
17 #include <wx/notebook.h>
18 #include <wx/splitter.h>
19 #include <wx/imaglist.h>
20 #ifdef __WXMSW__
21 #include <wx/msw/taskbar.h>
22 #endif
23 %}
24
25 //----------------------------------------------------------------------
26
27 %{
28 // Put some wx default wxChar* values into wxStrings.
29 DECLARE_DEF_STRING(NOTEBOOK_NAME);
30 DECLARE_DEF_STRING(PanelNameStr);
31 DECLARE_DEF_STRING(ControlNameStr);
32
33 static const wxChar* wxSplitterNameStr = wxT("splitter");
34 DECLARE_DEF_STRING(SplitterNameStr);
35 static const wxString wxPyEmptyString(wxT(""));
36 %}
37
38 //----------------------------------------------------------------------
39
40 %include typemaps.i
41 %include my_typemaps.i
42
43 // Import some definitions of other classes, etc.
44 %import _defs.i
45 %import misc.i
46 %import gdi.i
47 %import windows.i
48 %import controls.i
49 %import events.i
50
51 %pragma(python) code = "import wx"
52
53 //---------------------------------------------------------------------------
54
55 enum {
56 /* notebook control event types */
57 wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED,
58 wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING,
59 };
60
61
62 class wxNotebookEvent : public wxNotifyEvent {
63 public:
64 wxNotebookEvent(wxEventType commandType = wxEVT_NULL, int id = 0,
65 int sel = -1, int oldSel = -1);
66
67 int GetSelection();
68 int GetOldSelection();
69 void SetOldSelection(int page);
70 void SetSelection(int page);
71 };
72
73
74
75 class wxNotebook : public wxControl {
76 public:
77 wxNotebook(wxWindow *parent,
78 wxWindowID id,
79 const wxPoint& pos = wxDefaultPosition,
80 const wxSize& size = wxDefaultSize,
81 long style = 0,
82 const wxString& name = wxPyNOTEBOOK_NAME);
83 %name(wxPreNotebook)wxNotebook();
84
85 bool Create(wxWindow *parent,
86 wxWindowID id,
87 const wxPoint& pos = wxDefaultPosition,
88 const wxSize& size = wxDefaultSize,
89 long style = 0,
90 const wxString& name = wxPyNOTEBOOK_NAME);
91
92 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
93 %pragma(python) addtomethod = "wxPreNotebook:val._setOORInfo(val)"
94
95 int GetPageCount();
96 int SetSelection(int page);
97 void AdvanceSelection(bool forward = TRUE);
98 int GetSelection();
99 bool SetPageText(int page, const wxString& text);
100 wxString GetPageText(int page) const;
101
102 void SetImageList(wxImageList* imageList);
103 void AssignImageList(wxImageList *imageList) ;
104 %pragma(python) addtomethod = "AssignImageList:_args[0].thisown = 0"
105
106 wxImageList* GetImageList();
107 int GetPageImage(int page);
108 bool SetPageImage(int page, int image);
109 int GetRowCount();
110
111 void SetPageSize(const wxSize& size);
112 void SetPadding(const wxSize& padding);
113 bool DeletePage(int page);
114 bool RemovePage(int page);
115 bool DeleteAllPages();
116 bool AddPage(/*wxNotebookPage*/ wxWindow *page,
117 const wxString& text,
118 int select = FALSE,
119 int imageId = -1);
120 bool InsertPage(int page,
121 /*wxNotebookPage*/ wxWindow *page,
122 const wxString& text,
123 bool select = FALSE,
124 int imageId = -1);
125 /*wxNotebookPage*/ wxWindow *GetPage(int page);
126
127 %addmethods {
128 void ResizeChildren() {
129 wxSizeEvent evt(self->GetClientSize());
130 self->GetEventHandler()->ProcessEvent(evt);
131 }
132 }
133
134
135 };
136
137 //---------------------------------------------------------------------------
138
139
140 enum {
141 /* splitter window events */
142 wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING,
143 wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED,
144 wxEVT_COMMAND_SPLITTER_UNSPLIT,
145 wxEVT_COMMAND_SPLITTER_DOUBLECLICKED,
146 };
147
148
149 enum
150 {
151 wxSPLIT_HORIZONTAL,
152 wxSPLIT_VERTICAL,
153 wxSPLIT_DRAG_NONE,
154 wxSPLIT_DRAG_DRAGGING,
155 wxSPLIT_DRAG_LEFT_DOWN
156 };
157
158
159 class wxSplitterEvent : public wxNotifyEvent {
160 public:
161 wxSplitterEvent(wxEventType type = wxEVT_NULL,
162 wxSplitterWindow *splitter = NULL);
163
164 int GetSashPosition();
165 int GetX();
166 int GetY();
167 wxWindow* GetWindowBeingRemoved();
168 void SetSashPosition(int pos);
169 }
170
171
172
173
174 class wxSplitterWindow : public wxWindow {
175 public:
176 wxSplitterWindow(wxWindow* parent, wxWindowID id,
177 const wxPoint& point = wxDefaultPosition,
178 const wxSize& size = wxDefaultSize,
179 long style=wxSP_3D|wxCLIP_CHILDREN,
180 const wxString& name = wxPySplitterNameStr);
181 %name(wxPreSplitterWindow)wxSplitterWindow();
182
183 bool Create(wxWindow* parent, wxWindowID id,
184 const wxPoint& point = wxDefaultPosition,
185 const wxSize& size = wxDefaultSize,
186 long style=wxSP_3D|wxCLIP_CHILDREN,
187 const wxString& name = wxPySplitterNameStr);
188
189 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
190 %pragma(python) addtomethod = "wxPreSplitterWindow:val._setOORInfo(val)"
191
192 // Gets the only or left/top pane
193 wxWindow *GetWindow1();
194
195 // Gets the right/bottom pane
196 wxWindow *GetWindow2();
197
198 // Sets the split mode
199 void SetSplitMode(int mode);
200
201 // Gets the split mode
202 int GetSplitMode();
203
204 // Initialize with one window
205 void Initialize(wxWindow *window);
206
207 // Associates the given window with window 2, drawing the appropriate sash
208 // and changing the split mode.
209 // Does nothing and returns FALSE if the window is already split.
210 // A sashPosition of 0 means choose a default sash position,
211 // negative sashPosition specifies the size of right/lower pane as it's
212 // absolute value rather than the size of left/upper pane.
213 virtual bool SplitVertically(wxWindow *window1,
214 wxWindow *window2,
215 int sashPosition = 0);
216 virtual bool SplitHorizontally(wxWindow *window1,
217 wxWindow *window2,
218 int sashPosition = 0);
219
220 // Removes the specified (or second) window from the view
221 // Doesn't actually delete the window.
222 bool Unsplit(wxWindow *toRemove = NULL);
223
224 // Replaces one of the windows with another one (neither old nor new
225 // parameter should be NULL)
226 bool ReplaceWindow(wxWindow *winOld, wxWindow *winNew);
227
228 // Is the window split?
229 bool IsSplit();
230
231 // Sets the sash size
232 void SetSashSize(int width);
233
234 // Sets the border size
235 void SetBorderSize(int width);
236
237 // Gets the sash size
238 int GetSashSize();
239
240 // Gets the border size
241 int GetBorderSize();
242
243 // Set the sash position
244 void SetSashPosition(int position, bool redraw = TRUE);
245
246 // Gets the sash position
247 int GetSashPosition();
248
249 // If this is zero, we can remove panes by dragging the sash.
250 void SetMinimumPaneSize(int min);
251 int GetMinimumPaneSize();
252
253 // Resizes subwindows
254 virtual void SizeWindows();
255
256 void SetNeedUpdating(bool needUpdating) { m_needUpdating = needUpdating; }
257 bool GetNeedUpdating() const { return m_needUpdating ; }
258
259 };
260
261 //---------------------------------------------------------------------------
262
263 #ifdef __WXMSW__
264
265 enum {
266 wxEVT_TASKBAR_MOVE,
267 wxEVT_TASKBAR_LEFT_DOWN,
268 wxEVT_TASKBAR_LEFT_UP,
269 wxEVT_TASKBAR_RIGHT_DOWN,
270 wxEVT_TASKBAR_RIGHT_UP,
271 wxEVT_TASKBAR_LEFT_DCLICK,
272 wxEVT_TASKBAR_RIGHT_DCLICK
273 };
274
275
276 class wxTaskBarIcon : public wxEvtHandler {
277 public:
278 wxTaskBarIcon();
279 ~wxTaskBarIcon();
280
281 //%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
282
283 // We still use the magic methods here since that is the way it is documented...
284 %pragma(python) addtomethod = "__init__:wx._checkForCallback(self, 'OnMouseMove', wxEVT_TASKBAR_MOVE)"
285 %pragma(python) addtomethod = "__init__:wx._checkForCallback(self, 'OnLButtonDown', wxEVT_TASKBAR_LEFT_DOWN)"
286 %pragma(python) addtomethod = "__init__:wx._checkForCallback(self, 'OnLButtonUp', wxEVT_TASKBAR_LEFT_UP)"
287 %pragma(python) addtomethod = "__init__:wx._checkForCallback(self, 'OnRButtonDown', wxEVT_TASKBAR_RIGHT_DOWN)"
288 %pragma(python) addtomethod = "__init__:wx._checkForCallback(self, 'OnRButtonUp', wxEVT_TASKBAR_RIGHT_UP)"
289 %pragma(python) addtomethod = "__init__:wx._checkForCallback(self, 'OnLButtonDClick',wxEVT_TASKBAR_LEFT_DCLICK)"
290 %pragma(python) addtomethod = "__init__:wx._checkForCallback(self, 'OnRButtonDClick',wxEVT_TASKBAR_RIGHT_DCLICK)"
291
292 bool SetIcon(const wxIcon& icon, const wxString& tooltip = wxPyEmptyString);
293 bool RemoveIcon(void);
294 bool PopupMenu(wxMenu *menu);
295 bool IsIconInstalled();
296 bool IsOK();
297 };
298 #endif
299
300 //---------------------------------------------------------------------------
301 //---------------------------------------------------------------------------
302 // wxPyWindow derives from wxWindow and adds support for overriding many of
303 // the virtual methods in Python derived classes.
304
305 // Which (any?) of these should be done also???
306 // Destroy
307 // DoCaptureMouse
308 // DoClientToScreen
309 // DoHitTest
310 // DoMoveWindow
311 // DoPopupMenu
312 // DoReleaseMouse
313 // DoScreenToClient
314 // DoSetToolTip
315 // Enable
316 // Fit
317 // GetCharHeight
318 // GetCharWidth
319 // GetClientAreaOrigin
320 // GetDefaultItem
321 // IsTopLevel
322 // SetBackgroundColour
323 // SetDefaultItem
324 // SetFocus
325 // SetFocusFromKbd
326 // SetForegroundColour
327 // SetSizeHints
328 // SetVirtualSizeHints
329 // Show
330
331
332 %{ // C++ version of Python aware wxWindow
333 class wxPyWindow : public wxWindow
334 {
335 DECLARE_DYNAMIC_CLASS(wxPyWindow)
336 public:
337 wxPyWindow() : wxWindow() {}
338 wxPyWindow(wxWindow* parent, const wxWindowID id,
339 const wxPoint& pos = wxDefaultPosition,
340 const wxSize& size = wxDefaultSize,
341 long style = 0,
342 const wxString& name = wxPyPanelNameStr)
343 : wxWindow(parent, id, pos, size, style, name) {}
344
345
346 DEC_PYCALLBACK_VOID_INT4(DoMoveWindow);
347 DEC_PYCALLBACK_VOID_INT5(DoSetSize);
348 DEC_PYCALLBACK_VOID_INTINT(DoSetClientSize);
349 DEC_PYCALLBACK_VOID_INTINT(DoSetVirtualSize);
350
351 DEC_PYCALLBACK_VOID_INTPINTP_const(DoGetSize);
352 DEC_PYCALLBACK_VOID_INTPINTP_const(DoGetClientSize);
353 DEC_PYCALLBACK_VOID_INTPINTP_const(DoGetPosition);
354
355 DEC_PYCALLBACK_SIZE_const(DoGetVirtualSize);
356 DEC_PYCALLBACK_SIZE_const(DoGetBestSize);
357
358 DEC_PYCALLBACK__(InitDialog);
359 DEC_PYCALLBACK_BOOL_(TransferDataFromWindow);
360 DEC_PYCALLBACK_BOOL_(TransferDataToWindow);
361 DEC_PYCALLBACK_BOOL_(Validate);
362
363 DEC_PYCALLBACK_BOOL_const(AcceptsFocus);
364 DEC_PYCALLBACK_BOOL_const(AcceptsFocusFromKeyboard);
365 DEC_PYCALLBACK_SIZE_const(GetMaxSize);
366
367 DEC_PYCALLBACK_VOID_WXWINBASE(AddChild);
368 DEC_PYCALLBACK_VOID_WXWINBASE(RemoveChild);
369
370 PYPRIVATE;
371 };
372
373 IMPLEMENT_DYNAMIC_CLASS(wxPyWindow, wxWindow);
374
375 IMP_PYCALLBACK_VOID_INT4(wxPyWindow, wxWindow, DoMoveWindow);
376 IMP_PYCALLBACK_VOID_INT5(wxPyWindow, wxWindow, DoSetSize);
377 IMP_PYCALLBACK_VOID_INTINT(wxPyWindow, wxWindow, DoSetClientSize);
378 IMP_PYCALLBACK_VOID_INTINT(wxPyWindow, wxWindow, DoSetVirtualSize);
379
380 IMP_PYCALLBACK_VOID_INTPINTP_const(wxPyWindow, wxWindow, DoGetSize);
381 IMP_PYCALLBACK_VOID_INTPINTP_const(wxPyWindow, wxWindow, DoGetClientSize);
382 IMP_PYCALLBACK_VOID_INTPINTP_const(wxPyWindow, wxWindow, DoGetPosition);
383
384 IMP_PYCALLBACK_SIZE_const(wxPyWindow, wxWindow, DoGetVirtualSize);
385 IMP_PYCALLBACK_SIZE_const(wxPyWindow, wxWindow, DoGetBestSize);
386
387 IMP_PYCALLBACK__(wxPyWindow, wxWindow, InitDialog);
388 IMP_PYCALLBACK_BOOL_(wxPyWindow, wxWindow, TransferDataFromWindow);
389 IMP_PYCALLBACK_BOOL_(wxPyWindow, wxWindow, TransferDataToWindow);
390 IMP_PYCALLBACK_BOOL_(wxPyWindow, wxWindow, Validate);
391
392 IMP_PYCALLBACK_BOOL_const(wxPyWindow, wxWindow, AcceptsFocus);
393 IMP_PYCALLBACK_BOOL_const(wxPyWindow, wxWindow, AcceptsFocusFromKeyboard);
394 IMP_PYCALLBACK_SIZE_const(wxPyWindow, wxWindow, GetMaxSize);
395
396 IMP_PYCALLBACK_VOID_WXWINBASE(wxPyWindow, wxWindow, AddChild);
397 IMP_PYCALLBACK_VOID_WXWINBASE(wxPyWindow, wxWindow, RemoveChild);
398
399 %}
400
401 // And now the one for SWIG to see
402 class wxPyWindow : public wxWindow
403 {
404 public:
405 wxPyWindow(wxWindow* parent, const wxWindowID id,
406 const wxPoint& pos = wxDefaultPosition,
407 const wxSize& size = wxDefaultSize,
408 long style = 0,
409 const wxString& name = wxPyPanelNameStr);
410
411 void _setCallbackInfo(PyObject* self, PyObject* _class);
412 %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyWindow)"
413 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
414
415
416 void base_DoMoveWindow(int x, int y, int width, int height);
417 void base_DoSetSize(int x, int y, int width, int height,
418 int sizeFlags = wxSIZE_AUTO);
419 void base_DoSetClientSize(int width, int height);
420 void base_DoSetVirtualSize( int x, int y );
421
422 void base_DoGetSize( int *OUTPUT, int *OUTPUT ) const;
423 void base_DoGetClientSize( int *OUTPUT, int *OUTPUT ) const;
424 void base_DoGetPosition( int *OUTPUT, int *OUTPUT ) const;
425
426 wxSize base_DoGetVirtualSize() const;
427 wxSize base_DoGetBestSize() const;
428
429 void base_InitDialog();
430 bool base_TransferDataToWindow();
431 bool base_TransferDataFromWindow();
432 bool base_Validate();
433
434 bool base_AcceptsFocus() const;
435 bool base_AcceptsFocusFromKeyboard() const;
436 wxSize base_GetMaxSize() const;
437
438 void base_AddChild(wxWindow* child);
439 void base_RemoveChild(wxWindow* child);
440 }
441
442 //---------------------------------------------------------------------------
443 // Do the same thing for wxControl
444
445
446 %{ // C++ version of Python aware wxControl
447 class wxPyControl : public wxControl
448 {
449 DECLARE_DYNAMIC_CLASS(wxPyControl)
450 public:
451 wxPyControl() : wxControl() {}
452 wxPyControl(wxWindow* parent, const wxWindowID id,
453 const wxPoint& pos = wxDefaultPosition,
454 const wxSize& size = wxDefaultSize,
455 long style = 0,
456 const wxValidator& validator=wxDefaultValidator,
457 const wxString& name = wxPyControlNameStr)
458 : wxControl(parent, id, pos, size, style, validator, name) {}
459
460
461 DEC_PYCALLBACK_VOID_INT4(DoMoveWindow);
462 DEC_PYCALLBACK_VOID_INT5(DoSetSize);
463 DEC_PYCALLBACK_VOID_INTINT(DoSetClientSize);
464 DEC_PYCALLBACK_VOID_INTINT(DoSetVirtualSize);
465
466 DEC_PYCALLBACK_VOID_INTPINTP_const(DoGetSize);
467 DEC_PYCALLBACK_VOID_INTPINTP_const(DoGetClientSize);
468 DEC_PYCALLBACK_VOID_INTPINTP_const(DoGetPosition);
469
470 DEC_PYCALLBACK_SIZE_const(DoGetVirtualSize);
471 DEC_PYCALLBACK_SIZE_const(DoGetBestSize);
472
473 DEC_PYCALLBACK__(InitDialog);
474 DEC_PYCALLBACK_BOOL_(TransferDataFromWindow);
475 DEC_PYCALLBACK_BOOL_(TransferDataToWindow);
476 DEC_PYCALLBACK_BOOL_(Validate);
477
478 DEC_PYCALLBACK_BOOL_const(AcceptsFocus);
479 DEC_PYCALLBACK_BOOL_const(AcceptsFocusFromKeyboard);
480 DEC_PYCALLBACK_SIZE_const(GetMaxSize);
481
482 DEC_PYCALLBACK_VOID_WXWINBASE(AddChild);
483 DEC_PYCALLBACK_VOID_WXWINBASE(RemoveChild);
484
485 PYPRIVATE;
486 };
487
488 IMPLEMENT_DYNAMIC_CLASS(wxPyControl, wxControl);
489
490 IMP_PYCALLBACK_VOID_INT4(wxPyControl, wxControl, DoMoveWindow);
491 IMP_PYCALLBACK_VOID_INT5(wxPyControl, wxControl, DoSetSize);
492 IMP_PYCALLBACK_VOID_INTINT(wxPyControl, wxControl, DoSetClientSize);
493 IMP_PYCALLBACK_VOID_INTINT(wxPyControl, wxControl, DoSetVirtualSize);
494
495 IMP_PYCALLBACK_VOID_INTPINTP_const(wxPyControl, wxControl, DoGetSize);
496 IMP_PYCALLBACK_VOID_INTPINTP_const(wxPyControl, wxControl, DoGetClientSize);
497 IMP_PYCALLBACK_VOID_INTPINTP_const(wxPyControl, wxControl, DoGetPosition);
498
499 IMP_PYCALLBACK_SIZE_const(wxPyControl, wxControl, DoGetVirtualSize);
500 IMP_PYCALLBACK_SIZE_const(wxPyControl, wxControl, DoGetBestSize);
501
502 IMP_PYCALLBACK__(wxPyControl, wxControl, InitDialog);
503 IMP_PYCALLBACK_BOOL_(wxPyControl, wxControl, TransferDataFromWindow);
504 IMP_PYCALLBACK_BOOL_(wxPyControl, wxControl, TransferDataToWindow);
505 IMP_PYCALLBACK_BOOL_(wxPyControl, wxControl, Validate);
506
507 IMP_PYCALLBACK_BOOL_const(wxPyControl, wxControl, AcceptsFocus);
508 IMP_PYCALLBACK_BOOL_const(wxPyControl, wxControl, AcceptsFocusFromKeyboard);
509 IMP_PYCALLBACK_SIZE_const(wxPyControl, wxControl, GetMaxSize);
510
511 IMP_PYCALLBACK_VOID_WXWINBASE(wxPyControl, wxControl, AddChild);
512 IMP_PYCALLBACK_VOID_WXWINBASE(wxPyControl, wxControl, RemoveChild);
513
514 %}
515
516 // And now the one for SWIG to see
517 class wxPyControl : public wxControl
518 {
519 public:
520 wxPyControl(wxWindow* parent, const wxWindowID id,
521 const wxPoint& pos = wxDefaultPosition,
522 const wxSize& size = wxDefaultSize,
523 long style = 0,
524 const wxValidator& validator=wxDefaultValidator,
525 const wxString& name = wxPyControlNameStr);
526
527 void _setCallbackInfo(PyObject* self, PyObject* _class);
528 %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyControl)"
529 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
530
531
532 void base_DoMoveWindow(int x, int y, int width, int height);
533 void base_DoSetSize(int x, int y, int width, int height,
534 int sizeFlags = wxSIZE_AUTO);
535 void base_DoSetClientSize(int width, int height);
536 void base_DoSetVirtualSize( int x, int y );
537
538 void base_DoGetSize( int *OUTPUT, int *OUTPUT ) const;
539 void base_DoGetClientSize( int *OUTPUT, int *OUTPUT ) const;
540 void base_DoGetPosition( int *OUTPUT, int *OUTPUT ) const;
541
542 wxSize base_DoGetVirtualSize() const;
543 wxSize base_DoGetBestSize() const;
544
545 void base_InitDialog();
546 bool base_TransferDataToWindow();
547 bool base_TransferDataFromWindow();
548 bool base_Validate();
549
550 bool base_AcceptsFocus() const;
551 bool base_AcceptsFocusFromKeyboard() const;
552 wxSize base_GetMaxSize() const;
553
554 void base_AddChild(wxWindow* child);
555 void base_RemoveChild(wxWindow* child);
556 }
557
558 //---------------------------------------------------------------------------
559 // and for wxPanel
560
561 %{ // C++ version of Python aware wxPanel
562 class wxPyPanel : public wxPanel
563 {
564 DECLARE_DYNAMIC_CLASS(wxPyPanel)
565 public:
566 wxPyPanel() : wxPanel() {}
567 wxPyPanel(wxWindow* parent, const wxWindowID id,
568 const wxPoint& pos = wxDefaultPosition,
569 const wxSize& size = wxDefaultSize,
570 long style = 0,
571 const wxString& name = wxPyPanelNameStr)
572 : wxPanel(parent, id, pos, size, style, name) {}
573
574
575 DEC_PYCALLBACK_VOID_INT4(DoMoveWindow);
576 DEC_PYCALLBACK_VOID_INT5(DoSetSize);
577 DEC_PYCALLBACK_VOID_INTINT(DoSetClientSize);
578 DEC_PYCALLBACK_VOID_INTINT(DoSetVirtualSize);
579
580 DEC_PYCALLBACK_VOID_INTPINTP_const(DoGetSize);
581 DEC_PYCALLBACK_VOID_INTPINTP_const(DoGetClientSize);
582 DEC_PYCALLBACK_VOID_INTPINTP_const(DoGetPosition);
583
584 DEC_PYCALLBACK_SIZE_const(DoGetVirtualSize);
585 DEC_PYCALLBACK_SIZE_const(DoGetBestSize);
586
587 DEC_PYCALLBACK__(InitDialog);
588 DEC_PYCALLBACK_BOOL_(TransferDataFromWindow);
589 DEC_PYCALLBACK_BOOL_(TransferDataToWindow);
590 DEC_PYCALLBACK_BOOL_(Validate);
591
592 DEC_PYCALLBACK_BOOL_const(AcceptsFocus);
593 DEC_PYCALLBACK_BOOL_const(AcceptsFocusFromKeyboard);
594 DEC_PYCALLBACK_SIZE_const(GetMaxSize);
595
596 DEC_PYCALLBACK_VOID_WXWINBASE(AddChild);
597 DEC_PYCALLBACK_VOID_WXWINBASE(RemoveChild);
598
599 PYPRIVATE;
600 };
601
602 IMPLEMENT_DYNAMIC_CLASS(wxPyPanel, wxPanel);
603
604 IMP_PYCALLBACK_VOID_INT4(wxPyPanel, wxPanel, DoMoveWindow);
605 IMP_PYCALLBACK_VOID_INT5(wxPyPanel, wxPanel, DoSetSize);
606 IMP_PYCALLBACK_VOID_INTINT(wxPyPanel, wxPanel, DoSetClientSize);
607 IMP_PYCALLBACK_VOID_INTINT(wxPyPanel, wxPanel, DoSetVirtualSize);
608
609 IMP_PYCALLBACK_VOID_INTPINTP_const(wxPyPanel, wxPanel, DoGetSize);
610 IMP_PYCALLBACK_VOID_INTPINTP_const(wxPyPanel, wxPanel, DoGetClientSize);
611 IMP_PYCALLBACK_VOID_INTPINTP_const(wxPyPanel, wxPanel, DoGetPosition);
612
613 IMP_PYCALLBACK_SIZE_const(wxPyPanel, wxPanel, DoGetVirtualSize);
614 IMP_PYCALLBACK_SIZE_const(wxPyPanel, wxPanel, DoGetBestSize);
615
616 IMP_PYCALLBACK__(wxPyPanel, wxPanel, InitDialog);
617 IMP_PYCALLBACK_BOOL_(wxPyPanel, wxPanel, TransferDataFromWindow);
618 IMP_PYCALLBACK_BOOL_(wxPyPanel, wxPanel, TransferDataToWindow);
619 IMP_PYCALLBACK_BOOL_(wxPyPanel, wxPanel, Validate);
620
621 IMP_PYCALLBACK_BOOL_const(wxPyPanel, wxPanel, AcceptsFocus);
622 IMP_PYCALLBACK_BOOL_const(wxPyPanel, wxPanel, AcceptsFocusFromKeyboard);
623 IMP_PYCALLBACK_SIZE_const(wxPyPanel, wxPanel, GetMaxSize);
624
625 IMP_PYCALLBACK_VOID_WXWINBASE(wxPyPanel, wxPanel, AddChild);
626 IMP_PYCALLBACK_VOID_WXWINBASE(wxPyPanel, wxPanel, RemoveChild);
627
628 %}
629
630 // And now the one for SWIG to see
631 class wxPyPanel : public wxPanel
632 {
633 public:
634 wxPyPanel(wxWindow* parent, const wxWindowID id,
635 const wxPoint& pos = wxDefaultPosition,
636 const wxSize& size = wxDefaultSize,
637 long style = 0,
638 const wxString& name = wxPyPanelNameStr);
639
640 void _setCallbackInfo(PyObject* self, PyObject* _class);
641 %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyPanel)"
642 %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
643
644
645 void base_DoMoveWindow(int x, int y, int width, int height);
646 void base_DoSetSize(int x, int y, int width, int height,
647 int sizeFlags = wxSIZE_AUTO);
648 void base_DoSetClientSize(int width, int height);
649 void base_DoSetVirtualSize( int x, int y );
650
651 void base_DoGetSize( int *OUTPUT, int *OUTPUT ) const;
652 void base_DoGetClientSize( int *OUTPUT, int *OUTPUT ) const;
653 void base_DoGetPosition( int *OUTPUT, int *OUTPUT ) const;
654
655 wxSize base_DoGetVirtualSize() const;
656 wxSize base_DoGetBestSize() const;
657
658 void base_InitDialog();
659 bool base_TransferDataToWindow();
660 bool base_TransferDataFromWindow();
661 bool base_Validate();
662
663 bool base_AcceptsFocus() const;
664 bool base_AcceptsFocusFromKeyboard() const;
665 wxSize base_GetMaxSize() const;
666
667 void base_AddChild(wxWindow* child);
668 void base_RemoveChild(wxWindow* child);
669 };
670
671
672 //---------------------------------------------------------------------------