]> git.saurik.com Git - wxWidgets.git/blame_incremental - wxPython/src/_pycontrol.i
typos fixed
[wxWidgets.git] / wxPython / src / _pycontrol.i
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: _pywindows.i
3// Purpose: SWIG interface for wxPyControl, See also _pywindows.i
4//
5// Author: Robin Dunn
6//
7// Created: 2-June-1998
8// RCS-ID: $Id$
9// Copyright: (c) 2003 by Total Control Software
10// Licence: wxWindows license
11/////////////////////////////////////////////////////////////////////////////
12
13// Not a %module
14
15
16//---------------------------------------------------------------------------
17%newgroup
18
19
20// TODO: Virtualize ShouldInheritColours
21
22//---------------------------------------------------------------------------
23
24%{ // C++ version of Python aware wxControl
25class wxPyControl : public wxControl
26{
27 DECLARE_DYNAMIC_CLASS(wxPyControl)
28public:
29 wxPyControl() : wxControl() {}
30 wxPyControl(wxWindow* parent, const wxWindowID id,
31 const wxPoint& pos = wxDefaultPosition,
32 const wxSize& size = wxDefaultSize,
33 long style = 0,
34 const wxValidator& validator=wxDefaultValidator,
35 const wxString& name = wxPyControlNameStr)
36 : wxControl(parent, id, pos, size, style, validator, name) {}
37
38
39 DEC_PYCALLBACK_VOID_INT4(DoMoveWindow);
40 DEC_PYCALLBACK_VOID_INT5(DoSetSize);
41 DEC_PYCALLBACK_VOID_INTINT(DoSetClientSize);
42 DEC_PYCALLBACK_VOID_INTINT(DoSetVirtualSize);
43
44 DEC_PYCALLBACK_VOID_INTPINTP_const(DoGetSize);
45 DEC_PYCALLBACK_VOID_INTPINTP_const(DoGetClientSize);
46 DEC_PYCALLBACK_VOID_INTPINTP_const(DoGetPosition);
47
48 DEC_PYCALLBACK_SIZE_const(DoGetVirtualSize);
49 DEC_PYCALLBACK_SIZE_const(DoGetBestSize);
50
51 DEC_PYCALLBACK__(InitDialog);
52 DEC_PYCALLBACK_BOOL_(TransferDataFromWindow);
53 DEC_PYCALLBACK_BOOL_(TransferDataToWindow);
54 DEC_PYCALLBACK_BOOL_(Validate);
55
56 DEC_PYCALLBACK_BOOL_const(AcceptsFocus);
57 DEC_PYCALLBACK_BOOL_const(AcceptsFocusFromKeyboard);
58 DEC_PYCALLBACK_SIZE_const(GetMaxSize);
59
60 DEC_PYCALLBACK_VOID_WXWINBASE(AddChild);
61 DEC_PYCALLBACK_VOID_WXWINBASE(RemoveChild);
62
63 DEC_PYCALLBACK_BOOL_(ShouldInheritColours);
64 DEC_PYCALLBACK__COLOUR(ApplyParentThemeBackground);
65
66 PYPRIVATE;
67};
68
69IMPLEMENT_DYNAMIC_CLASS(wxPyControl, wxControl);
70
71IMP_PYCALLBACK_VOID_INT4(wxPyControl, wxControl, DoMoveWindow);
72IMP_PYCALLBACK_VOID_INT5(wxPyControl, wxControl, DoSetSize);
73IMP_PYCALLBACK_VOID_INTINT(wxPyControl, wxControl, DoSetClientSize);
74IMP_PYCALLBACK_VOID_INTINT(wxPyControl, wxControl, DoSetVirtualSize);
75
76IMP_PYCALLBACK_VOID_INTPINTP_const(wxPyControl, wxControl, DoGetSize);
77IMP_PYCALLBACK_VOID_INTPINTP_const(wxPyControl, wxControl, DoGetClientSize);
78IMP_PYCALLBACK_VOID_INTPINTP_const(wxPyControl, wxControl, DoGetPosition);
79
80IMP_PYCALLBACK_SIZE_const(wxPyControl, wxControl, DoGetVirtualSize);
81IMP_PYCALLBACK_SIZE_const(wxPyControl, wxControl, DoGetBestSize);
82
83IMP_PYCALLBACK__(wxPyControl, wxControl, InitDialog);
84IMP_PYCALLBACK_BOOL_(wxPyControl, wxControl, TransferDataFromWindow);
85IMP_PYCALLBACK_BOOL_(wxPyControl, wxControl, TransferDataToWindow);
86IMP_PYCALLBACK_BOOL_(wxPyControl, wxControl, Validate);
87
88IMP_PYCALLBACK_BOOL_const(wxPyControl, wxControl, AcceptsFocus);
89IMP_PYCALLBACK_BOOL_const(wxPyControl, wxControl, AcceptsFocusFromKeyboard);
90IMP_PYCALLBACK_SIZE_const(wxPyControl, wxControl, GetMaxSize);
91
92IMP_PYCALLBACK_VOID_WXWINBASE(wxPyControl, wxControl, AddChild);
93IMP_PYCALLBACK_VOID_WXWINBASE(wxPyControl, wxControl, RemoveChild);
94
95IMP_PYCALLBACK_BOOL_(wxPyControl, wxControl, ShouldInheritColours);
96IMP_PYCALLBACK__COLOUR(wxPyControl, wxControl, ApplyParentThemeBackground);
97%}
98
99// And now the one for SWIG to see
100class wxPyControl : public wxControl
101{
102public:
103 %pythonAppend wxPyControl "self._setOORInfo(self); self._setCallbackInfo(self, PyControl)"
104 %pythonAppend wxPyControl() ""
105
106 wxPyControl(wxWindow* parent, const wxWindowID id,
107 const wxPoint& pos = wxDefaultPosition,
108 const wxSize& size = wxDefaultSize,
109 long style = 0,
110 const wxValidator& validator=wxDefaultValidator,
111 const wxString& name = wxPyControlNameStr);
112
113 %name(PrePyControl) wxPyControl();
114
115 void _setCallbackInfo(PyObject* self, PyObject* _class);
116
117
118 void base_DoMoveWindow(int x, int y, int width, int height);
119 void base_DoSetSize(int x, int y, int width, int height,
120 int sizeFlags = wxSIZE_AUTO);
121 void base_DoSetClientSize(int width, int height);
122 void base_DoSetVirtualSize( int x, int y );
123
124 DocDeclA(
125 void, base_DoGetSize( int *OUTPUT, int *OUTPUT ) const,
126 "base_DoGetSize() -> (width, height)");
127 DocDeclA(
128 void, base_DoGetClientSize( int *OUTPUT, int *OUTPUT ) const,
129 "base_DoGetClientSize() -> (width, height)");
130 DocDeclA(
131 void, base_DoGetPosition( int *OUTPUT, int *OUTPUT ) const,
132 "base_DoGetPosition() -> (x,y)");
133
134 wxSize base_DoGetVirtualSize() const;
135 wxSize base_DoGetBestSize() const;
136
137 void base_InitDialog();
138 bool base_TransferDataToWindow();
139 bool base_TransferDataFromWindow();
140 bool base_Validate();
141
142 bool base_AcceptsFocus() const;
143 bool base_AcceptsFocusFromKeyboard() const;
144 wxSize base_GetMaxSize() const;
145
146 void base_AddChild(wxWindow* child);
147 void base_RemoveChild(wxWindow* child);
148
149 bool base_ShouldInheritColours();
150 void base_ApplyParentThemeBackground(const wxColour& c);
151};
152
153
154//---------------------------------------------------------------------------
155//---------------------------------------------------------------------------