1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: SWIG interface for wxPyControl, See also _pywindows.i
7 // Created: 2-June-1998
9 // Copyright: (c) 2003 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
16 //---------------------------------------------------------------------------
21 //---------------------------------------------------------------------------
23 %{ // C++ version of Python aware wxControl
24 class wxPyControl : public wxControl
26 DECLARE_DYNAMIC_CLASS(wxPyControl)
28 wxPyControl() : wxControl() {}
29 wxPyControl(wxWindow* parent, const wxWindowID id,
30 const wxPoint& pos = wxDefaultPosition,
31 const wxSize& size = wxDefaultSize,
33 const wxValidator& validator=wxDefaultValidator,
34 const wxString& name = wxPyControlNameStr)
35 : wxControl(parent, id, pos, size, style, validator, name) {}
37 void SetBestSize(const wxSize& size) { wxControl::SetBestSize(size); }
39 DEC_PYCALLBACK_VOID_INT4(DoMoveWindow);
40 DEC_PYCALLBACK_VOID_INT5(DoSetSize);
41 DEC_PYCALLBACK_VOID_INTINT(DoSetClientSize);
42 DEC_PYCALLBACK_VOID_INTINT(DoSetVirtualSize);
44 DEC_PYCALLBACK_VOID_INTPINTP_const(DoGetSize);
45 DEC_PYCALLBACK_VOID_INTPINTP_const(DoGetClientSize);
46 DEC_PYCALLBACK_VOID_INTPINTP_const(DoGetPosition);
48 DEC_PYCALLBACK_SIZE_const(DoGetVirtualSize);
49 DEC_PYCALLBACK_SIZE_const(DoGetBestSize);
51 DEC_PYCALLBACK__(InitDialog);
52 DEC_PYCALLBACK_BOOL_(TransferDataFromWindow);
53 DEC_PYCALLBACK_BOOL_(TransferDataToWindow);
54 DEC_PYCALLBACK_BOOL_(Validate);
56 DEC_PYCALLBACK_BOOL_const(AcceptsFocus);
57 DEC_PYCALLBACK_BOOL_const(AcceptsFocusFromKeyboard);
58 DEC_PYCALLBACK_SIZE_const(GetMaxSize);
60 DEC_PYCALLBACK_VOID_WXWINBASE(AddChild);
61 DEC_PYCALLBACK_VOID_WXWINBASE(RemoveChild);
63 DEC_PYCALLBACK_BOOL_const(ShouldInheritColours);
64 DEC_PYCALLBACK_VIZATTR_(GetDefaultAttributes);
66 DEC_PYCALLBACK_BOOL_(HasTransparentBackground);
71 IMPLEMENT_DYNAMIC_CLASS(wxPyControl, wxControl);
73 IMP_PYCALLBACK_VOID_INT4(wxPyControl, wxControl, DoMoveWindow);
74 IMP_PYCALLBACK_VOID_INT5(wxPyControl, wxControl, DoSetSize);
75 IMP_PYCALLBACK_VOID_INTINT(wxPyControl, wxControl, DoSetClientSize);
76 IMP_PYCALLBACK_VOID_INTINT(wxPyControl, wxControl, DoSetVirtualSize);
78 IMP_PYCALLBACK_VOID_INTPINTP_const(wxPyControl, wxControl, DoGetSize);
79 IMP_PYCALLBACK_VOID_INTPINTP_const(wxPyControl, wxControl, DoGetClientSize);
80 IMP_PYCALLBACK_VOID_INTPINTP_const(wxPyControl, wxControl, DoGetPosition);
82 IMP_PYCALLBACK_SIZE_const(wxPyControl, wxControl, DoGetVirtualSize);
83 IMP_PYCALLBACK_SIZE_const(wxPyControl, wxControl, DoGetBestSize);
85 IMP_PYCALLBACK__(wxPyControl, wxControl, InitDialog);
86 IMP_PYCALLBACK_BOOL_(wxPyControl, wxControl, TransferDataFromWindow);
87 IMP_PYCALLBACK_BOOL_(wxPyControl, wxControl, TransferDataToWindow);
88 IMP_PYCALLBACK_BOOL_(wxPyControl, wxControl, Validate);
90 IMP_PYCALLBACK_BOOL_const(wxPyControl, wxControl, AcceptsFocus);
91 IMP_PYCALLBACK_BOOL_const(wxPyControl, wxControl, AcceptsFocusFromKeyboard);
92 IMP_PYCALLBACK_SIZE_const(wxPyControl, wxControl, GetMaxSize);
94 IMP_PYCALLBACK_VOID_WXWINBASE(wxPyControl, wxControl, AddChild);
95 IMP_PYCALLBACK_VOID_WXWINBASE(wxPyControl, wxControl, RemoveChild);
97 IMP_PYCALLBACK_BOOL_const(wxPyControl, wxControl, ShouldInheritColours);
98 IMP_PYCALLBACK_VIZATTR_(wxPyControl, wxControl, GetDefaultAttributes);
100 IMP_PYCALLBACK_BOOL_(wxPyControl, wxControl, HasTransparentBackground);
103 // And now the one for SWIG to see
104 MustHaveApp(wxPyControl);
105 class wxPyControl : public wxControl
108 %pythonAppend wxPyControl "self._setOORInfo(self); self._setCallbackInfo(self, PyControl)"
109 %pythonAppend wxPyControl() ""
111 wxPyControl(wxWindow* parent, const wxWindowID id=-1,
112 const wxPoint& pos = wxDefaultPosition,
113 const wxSize& size = wxDefaultSize,
115 const wxValidator& validator=wxDefaultValidator,
116 const wxString& name = wxPyControlNameStr);
118 %RenameCtor(PrePyControl, wxPyControl());
120 void _setCallbackInfo(PyObject* self, PyObject* _class);
122 void SetBestSize(const wxSize& size);
124 void base_DoMoveWindow(int x, int y, int width, int height);
125 void base_DoSetSize(int x, int y, int width, int height,
126 int sizeFlags = wxSIZE_AUTO);
127 void base_DoSetClientSize(int width, int height);
128 void base_DoSetVirtualSize( int x, int y );
131 void, base_DoGetSize( int *OUTPUT, int *OUTPUT ) const,
132 "base_DoGetSize() -> (width, height)");
134 void, base_DoGetClientSize( int *OUTPUT, int *OUTPUT ) const,
135 "base_DoGetClientSize() -> (width, height)");
137 void, base_DoGetPosition( int *OUTPUT, int *OUTPUT ) const,
138 "base_DoGetPosition() -> (x,y)");
140 wxSize base_DoGetVirtualSize() const;
141 wxSize base_DoGetBestSize() const;
143 void base_InitDialog();
144 bool base_TransferDataToWindow();
145 bool base_TransferDataFromWindow();
146 bool base_Validate();
148 bool base_AcceptsFocus() const;
149 bool base_AcceptsFocusFromKeyboard() const;
150 wxSize base_GetMaxSize() const;
152 void base_AddChild(wxWindow* child);
153 void base_RemoveChild(wxWindow* child);
155 bool base_ShouldInheritColours() const;
156 wxVisualAttributes base_GetDefaultAttributes();
160 //---------------------------------------------------------------------------
161 //---------------------------------------------------------------------------