bool found;
bool blocked = wxPyBeginBlockThreads();
if ((found = wxPyCBH_findCallback(m_myInst, "DrawItem"))) {
- PyObject* dcobj = wxPyMake_wxObject(&dc);
+ PyObject* dcobj = wxPyMake_wxObject(&dc,false);
PyObject* idobj = wxPyConstructObject((void*)&id, wxT("wxTreeItemId"), False);
PyObject* recobj= wxPyConstructObject((void*)&rect, wxT("wxRect"), False);
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OOO)", dcobj, idobj, recobj));
wxTreeItemId FindItem (const wxTreeItemId& item, const wxString& str, int flags = 0);
wxWindow* GetHeaderWindow() const;
- wxWindow* GetMainWindow() const;
+ wxScrolledWindow* GetMainWindow() const;
};
// OOR Support
-%typemap(out) wxPyShape* { $result = wxPyMake_wxShapeEvtHandler($1); }
-%typemap(out) wxPyShapeEvtHandler* { $result = wxPyMake_wxShapeEvtHandler($1); }
-%typemap(out) wxPyDivisionShape* { $result = wxPyMake_wxShapeEvtHandler($1); }
-
-%typemap(out) wxPyShapeCanvas* { $result = wxPyMake_wxObject($1); }
-%typemap(out) wxDiagram* { $result = wxPyMake_wxObject($1); }
-%typemap(out) wxOGLConstraint* { $result = wxPyMake_wxObject($1); }
-%typemap(out) wxPseudoMetaFile* { $result = wxPyMake_wxObject($1); }
-%typemap(out) wxArrowHead* { $result = wxPyMake_wxObject($1); }
+%typemap(out) wxPyShape* { $result = wxPyMake_wxShapeEvtHandler($1, $owner); }
+%typemap(out) wxPyShapeEvtHandler* { $result = wxPyMake_wxShapeEvtHandler($1, $owner); }
+%typemap(out) wxPyDivisionShape* { $result = wxPyMake_wxShapeEvtHandler($1, $owner); }
+
+%typemap(out) wxPyShapeCanvas* { $result = wxPyMake_wxObject($1, $owner); }
+%typemap(out) wxDiagram* { $result = wxPyMake_wxObject($1, $owner); }
+%typemap(out) wxOGLConstraint* { $result = wxPyMake_wxObject($1, $owner); }
+%typemap(out) wxPseudoMetaFile* { $result = wxPyMake_wxObject($1, $owner); }
+%typemap(out) wxArrowHead* { $result = wxPyMake_wxObject($1, $owner); }
//---------------------------------------------------------------------------
-PyObject* wxPyMake_wxShapeEvtHandler(wxShapeEvtHandler* source) {
+PyObject* wxPyMake_wxShapeEvtHandler(wxShapeEvtHandler* source, bool setThisOwn) {
PyObject* target = NULL;
if (source && wxIsKindOf(source, wxShapeEvtHandler)) {
}
}
if (! target) {
- target = wxPyMake_wxObject2(source, FALSE);
+ target = wxPyMake_wxObject2(source, setThisOwn, false);
if (target != Py_None)
((wxShapeEvtHandler*)source)->SetClientObject(new wxPyOORClientData(target));
}
pyList = PyList_New(0);
while (node) {
wxObj = node->GetData();
- pyObj = wxPyMake_wxShapeEvtHandler((wxShapeEvtHandler*)wxObj);
+ pyObj = wxPyMake_wxShapeEvtHandler((wxShapeEvtHandler*)wxObj, false);
PyList_Append(pyList, pyObj);
node = node->GetNext();
}
#define wxPyCBH_callCallbackObj(a, b) (wxPyGetCoreAPIPtr()->p_wxPyCBH_callCallbackObj(a, b))
#define wxPyCBH_delete(a) (wxPyGetCoreAPIPtr()->p_wxPyCBH_delete(a))
-#define wxPyMake_wxObject(a) (wxPyGetCoreAPIPtr()->p_wxPyMake_wxObject(a,True))
-#define wxPyMake_wxObject2(a,b) (wxPyGetCoreAPIPtr()->p_wxPyMake_wxObject(a,b))
-#define wxPyMake_wxSizer(a) (wxPyGetCoreAPIPtr()->p_wxPyMake_wxSizer(a))
+#define wxPyMake_wxObject(a,b) (wxPyGetCoreAPIPtr()->p_wxPyMake_wxObject(a,b,True))
+#define wxPyMake_wxObject2(a,b,c) (wxPyGetCoreAPIPtr()->p_wxPyMake_wxObject(a,b,c))
+#define wxPyMake_wxSizer(a,b) (wxPyGetCoreAPIPtr()->p_wxPyMake_wxSizer(a,b))
#define wxPyPtrTypeMap_Add(a, b) (wxPyGetCoreAPIPtr()->p_wxPyPtrTypeMap_Add(a, b))
#define wxPy2int_seq_helper(a, b, c) (wxPyGetCoreAPIPtr()->p_wxPy2int_seq_helper(a, b, c))
#define wxPy4int_seq_helper(a, b, c, d, e) (wxPyGetCoreAPIPtr()->p_wxPy4int_seq_helper(a, b, c, d, e))
PyObject* wx2PyString(const wxString& src);
wxString Py2wxString(PyObject* source);
-PyObject* wxPyMake_wxObject(wxObject* source, bool checkEvtHandler=True);
-PyObject* wxPyMake_wxSizer(wxSizer* source);
+PyObject* wxPyMake_wxObject(wxObject* source, bool setThisOwn, bool checkEvtHandler=True);
+PyObject* wxPyMake_wxSizer(wxSizer* source, bool setThisOwn);
void wxPyPtrTypeMap_Add(const char* commonName, const char* ptrName);
PyObject* wxPy_ConvertList(wxListBase* list);
PyObject* (*p_wxPyCBH_callCallbackObj)(const wxPyCallbackHelper& cbh, PyObject* argTuple);
void (*p_wxPyCBH_delete)(wxPyCallbackHelper* cbh);
- PyObject* (*p_wxPyMake_wxObject)(wxObject* source, bool checkEvtHandler);
- PyObject* (*p_wxPyMake_wxSizer)(wxSizer* source);
+ PyObject* (*p_wxPyMake_wxObject)(wxObject* source, bool setThisOwn, bool checkEvtHandler);
+ PyObject* (*p_wxPyMake_wxSizer)(wxSizer* source, bool setThisOwn);
void (*p_wxPyPtrTypeMap_Add)(const char* commonName, const char* ptrName);
bool (*p_wxPy2int_seq_helper)(PyObject* source, int* i1, int* i2);
bool (*p_wxPy4int_seq_helper)(PyObject* source, int* i1, int* i2, int* i3, int* i4);
bool found; \
bool blocked = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
- PyObject* obj = wxPyMake_wxObject(&a); \
+ PyObject* obj = wxPyMake_wxObject(&a,false); \
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(O)", obj)); \
Py_DECREF(obj); \
} \
bool found; \
bool blocked = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
- PyObject* obj = wxPyMake_wxObject(&a); \
+ PyObject* obj = wxPyMake_wxObject(&a,false); \
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oi)", obj, (int)b)); \
Py_DECREF(obj); \
} \
bool found; \
bool blocked = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
- PyObject* obj = wxPyMake_wxObject(&a); \
+ PyObject* obj = wxPyMake_wxObject(&a,false); \
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oi)", obj, (int)b)); \
Py_DECREF(obj); \
} \
bool found; \
bool blocked = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
- PyObject* obj = wxPyMake_wxObject(&a); \
+ PyObject* obj = wxPyMake_wxObject(&a,false); \
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oddddi)", obj, b, c, d, e, (int)f)); \
Py_DECREF(obj); \
} \
bool blocked = wxPyBeginBlockThreads(); \
bool rval=False; \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
- PyObject* obj = wxPyMake_wxObject(&a); \
+ PyObject* obj = wxPyMake_wxObject(&a,false); \
rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oddddi)", obj, b, c, d, e, (int)f));\
Py_DECREF(obj); \
} \
bool found; \
bool blocked = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
- PyObject* obj = wxPyMake_wxObject(&a); \
+ PyObject* obj = wxPyMake_wxObject(&a,false); \
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Odddd)", obj, b, c, d, e)); \
Py_DECREF(obj); \
} \
bool found; \
bool blocked = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
- PyObject* obj = wxPyMake_wxObject(&a); \
+ PyObject* obj = wxPyMake_wxObject(&a,false); \
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oi)", obj, (int)b)); \
Py_DECREF(obj); \
} \
bool found; \
bool blocked = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
- PyObject* obj = wxPyMake_wxObject(a); \
+ PyObject* obj = wxPyMake_wxObject(a,false); \
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oiddii)", obj, (int)b, c, d, e, f));\
Py_DECREF(obj); \
} \
bool found; \
bool blocked = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
- PyObject* obj = wxPyMake_wxObject(a); \
+ PyObject* obj = wxPyMake_wxObject(a,false); \
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oddii)", obj, b, c, d, e)); \
Py_DECREF(obj); \
} \
bool found; \
bool blocked = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
- PyObject* obj = wxPyMake_wxObject(a); \
+ PyObject* obj = wxPyMake_wxObject(a,false); \
rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(O)", obj)); \
Py_DECREF(obj); \
} \
bool found; \
bool blocked = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
- PyObject* win = wxPyMake_wxObject(a); \
- PyObject* dc = wxPyMake_wxObject(&b); \
+ PyObject* win = wxPyMake_wxObject(a,false); \
+ PyObject* dc = wxPyMake_wxObject(&b,false); \
rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OO)", win, dc));\
Py_DECREF(win); \
Py_DECREF(dc); \
bool found; \
bool blocked = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
- PyObject* obj = wxPyMake_wxObject(a); \
+ PyObject* obj = wxPyMake_wxObject(a,false); \
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(O)", obj)); \
Py_DECREF(obj); \
} \
wxFSFile* rval=0; \
if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \
PyObject* ro; \
- PyObject* obj = wxPyMake_wxObject(&a); \
+ PyObject* obj = wxPyMake_wxObject(&a,false); \
PyObject* s = wx2PyString(b); \
ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(OO)", \
obj, s)); \
bool found; \
bool blocked = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
- PyObject* obj = wxPyMake_wxObject(&a); \
+ PyObject* obj = wxPyMake_wxObject(&a,false); \
PyObject* ro = wxPyConstructObject((void*)&b, wxT("wxRect"), 0); \
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OOi)", obj, ro, (int)c)); \
Py_DECREF(obj); \
bool found; \
bool blocked = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
- PyObject* obj = wxPyMake_wxObject(&a); \
+ PyObject* obj = wxPyMake_wxObject(&a,false); \
PyObject* ro = wxPyConstructObject((void*)&b, wxT("wxRect"), 0); \
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OOi)", obj, ro, (int)c)); \
Py_DECREF(obj); \
bool found; \
bool blocked = wxPyBeginBlockThreads(); \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
- PyObject* win = wxPyMake_wxObject(a); \
- PyObject* dc = wxPyMake_wxObject(&b); \
+ PyObject* win = wxPyMake_wxObject(a,false); \
+ PyObject* dc = wxPyMake_wxObject(&b,false); \
rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OO)", win, dc));\
Py_DECREF(win); \
Py_DECREF(dc); \
%extend {
wxVisualAttributes() { return new wxVisualAttributes; }
~wxVisualAttributes() { delete self; }
- }
+ }
// the font used for control label/text inside it
wxFont font;
applications on the system.", "");
DocDeclStr(
- void , SetOwnBackroundColour(const wxColour& colour),
+ void , SetOwnBackgroundColour(const wxColour& colour),
"", "");
//---------------------------------------------------------------------------
// OOR related typemaps and helper functions
-%typemap(out) wxGridCellRenderer* { $result = wxPyMake_wxGridCellRenderer($1); }
-%typemap(out) wxGridCellEditor* { $result = wxPyMake_wxGridCellEditor($1); }
-%typemap(out) wxGridCellAttr* { $result = wxPyMake_wxGridCellAttr($1); }
-%typemap(out) wxGridCellAttrProvider* { $result = wxPyMake_wxGridCellAttrProvider($1); }
-%typemap(out) wxGridTableBase* { $result = wxPyMake_wxGridTableBase($1); }
+%typemap(out) wxGridCellRenderer* { $result = wxPyMake_wxGridCellRenderer($1, $owner); }
+%typemap(out) wxGridCellEditor* { $result = wxPyMake_wxGridCellEditor($1, $owner); }
+%typemap(out) wxGridCellAttr* { $result = wxPyMake_wxGridCellAttr($1, $owner); }
+%typemap(out) wxGridCellAttrProvider* { $result = wxPyMake_wxGridCellAttrProvider($1, $owner); }
+%typemap(out) wxGridTableBase* { $result = wxPyMake_wxGridTableBase($1, $owner); }
%{
#define wxPyMake_TEMPLATE(TYPE) \
-PyObject* wxPyMake_##TYPE(TYPE* source) { \
+PyObject* wxPyMake_##TYPE(TYPE* source, bool setThisOwn) { \
PyObject* target = NULL; \
if (source) { \
/* Check if there is already a pointer to a Python object in the \
/* Otherwise make a new wrapper for it the old fashioned way and \
give it the OOR treatment */ \
if (! target) { \
- target = wxPyConstructObject(source, wxT(#TYPE), False); \
+ target = wxPyConstructObject(source, wxT(#TYPE), setThisOwn); \
if (target) \
source->SetClientObject(new wxPyOORClientData(target)); \
} \
bool blocked = wxPyBeginBlockThreads(); \
bool found; \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
- PyObject* obj = wxPyMake_wxGridCellAttr(attr); \
+ PyObject* obj = wxPyMake_wxGridCellAttr(attr,false); \
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oii)", obj, a, b)); \
Py_DECREF(obj); \
} \
bool blocked = wxPyBeginBlockThreads(); \
bool found; \
if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \
- PyObject* obj = wxPyMake_wxGridCellAttr(attr); \
+ PyObject* obj = wxPyMake_wxGridCellAttr(attr,false); \
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oi)", obj, val)); \
Py_DECREF(obj); \
} \
int row, int col, bool isSelected) {
bool blocked = wxPyBeginBlockThreads();
if (wxPyCBH_findCallback(m_myInst, "Draw")) {
- PyObject* go = wxPyMake_wxObject(&grid);
- PyObject* dco = wxPyMake_wxObject(&dc);
- PyObject* ao = wxPyMake_wxGridCellAttr(&attr);
+ PyObject* go = wxPyMake_wxObject(&grid,false);
+ PyObject* dco = wxPyMake_wxObject(&dc,false);
+ PyObject* ao = wxPyMake_wxGridCellAttr(&attr,false);
PyObject* ro = wxPyConstructObject((void*)&rect, wxT("wxRect"), 0);
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OOOOiii)", go, ao, dco, ro,
if (wxPyCBH_findCallback(m_myInst, "GetBestSize")) {
PyObject* ro;
wxSize* ptr;
- PyObject* go = wxPyMake_wxObject(&grid);
- PyObject* dco = wxPyMake_wxObject(&dc);
- PyObject* ao = wxPyMake_wxGridCellAttr(&attr);
+ PyObject* go = wxPyMake_wxObject(&grid,false);
+ PyObject* dco = wxPyMake_wxObject(&dc,false);
+ PyObject* ao = wxPyMake_wxGridCellAttr(&attr,false);
ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(OOOii)",
go, ao, dco,
void Create(wxWindow* parent, wxWindowID id, wxEvtHandler* evtHandler) {
bool blocked = wxPyBeginBlockThreads();
if (wxPyCBH_findCallback(m_myInst, "Create")) {
- PyObject* po = wxPyMake_wxObject(parent);
- PyObject* eo = wxPyMake_wxObject(evtHandler);
+ PyObject* po = wxPyMake_wxObject(parent,false);
+ PyObject* eo = wxPyMake_wxObject(evtHandler,false);
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OiO)", po, id, eo));
Py_DECREF(po);
void BeginEdit(int row, int col, wxGrid* grid) {
bool blocked = wxPyBeginBlockThreads();
if (wxPyCBH_findCallback(m_myInst, "BeginEdit")) {
- PyObject* go = wxPyMake_wxObject(grid);
+ PyObject* go = wxPyMake_wxObject(grid,false);
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iiO)", row, col, go));
Py_DECREF(go);
}
bool rv = False;
bool blocked = wxPyBeginBlockThreads();
if (wxPyCBH_findCallback(m_myInst, "EndEdit")) {
- PyObject* go = wxPyMake_wxObject(grid);
+ PyObject* go = wxPyMake_wxObject(grid,false);
rv = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iiO)", row, col, go));
Py_DECREF(go);
}
bool found;
bool blocked = wxPyBeginBlockThreads();
if ((found = wxPyCBH_findCallback(m_myInst, "Show"))) {
- PyObject* ao = wxPyMake_wxGridCellAttr(attr);
+ PyObject* ao = wxPyMake_wxGridCellAttr(attr,false);
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iO)", show, ao));
Py_DECREF(ao);
}
bool found;
bool blocked = wxPyBeginBlockThreads();
if ((found = wxPyCBH_findCallback(m_myInst, "PaintBackground)"))) {
- PyObject* ao = wxPyMake_wxGridCellAttr(attr);
+ PyObject* ao = wxPyMake_wxGridCellAttr(attr,false);
PyObject* ro = wxPyConstructObject((void*)&rectCell, wxT("wxRect"), 0);
wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OO)", ro, ao));
-PyObject* wxPyMake_wxObject(wxObject* source, bool checkEvtHandler) {
+PyObject* wxPyMake_wxObject(wxObject* source, bool setThisOwn, bool checkEvtHandler) {
PyObject* target = NULL;
bool isEvtHandler = False;
exists = wxPyCheckSwigType(name);
}
if (info) {
- target = wxPyConstructObject((void*)source, name, False);
+ target = wxPyConstructObject((void*)source, name, setThisOwn);
if (target && isEvtHandler)
((wxEvtHandler*)source)->SetClientObject(new wxPyOORClientData(target));
} else {
}
-PyObject* wxPyMake_wxSizer(wxSizer* source) {
+PyObject* wxPyMake_wxSizer(wxSizer* source, bool setThisOwn) {
PyObject* target = NULL;
if (source && wxIsKindOf(source, wxSizer)) {
}
}
if (! target) {
- target = wxPyMake_wxObject(source, False);
+ target = wxPyMake_wxObject(source, setThisOwn, False);
if (target != Py_None)
((wxSizer*)source)->SetClientObject(new wxPyOORClientData(target));
}
pyList = PyList_New(0);
while (node) {
wxObj = node->GetData();
- pyObj = wxPyMake_wxObject(wxObj);
+ pyObj = wxPyMake_wxObject(wxObj,false);
PyList_Append(pyList, pyObj);
node = node->GetNext();
}
bool found;
bool blocked = wxPyBeginBlockThreads();
if ((found = wxPyCBH_findCallback(m_myInst, "CanRead"))) {
- PyObject* obj = wxPyMake_wxObject((wxFSFile*)&file); // cast away const
+ PyObject* obj = wxPyMake_wxObject((wxFSFile*)&file,false); // cast away const
rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(O)", obj));
Py_DECREF(obj);
}
bool found;
bool blocked = wxPyBeginBlockThreads();
if ((found = wxPyCBH_findCallback(m_myInst, "ReadFile"))) {
- PyObject* obj = wxPyMake_wxObject((wxFSFile*)&file); // cast away const
+ PyObject* obj = wxPyMake_wxObject((wxFSFile*)&file,false); // cast away const
PyObject* ro;
ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(O)", obj));
Py_DECREF(obj);
-// Typemaps to convert an array of ints to a list for return values
+// Typemaps to convert an array of strings to a list for return values
%typemap(out) wxArrayString& {
$result = wxArrayString2PyList_helper(*$1);
}
// to the real derived type, if possible. See wxPyMake_wxObject in
// helpers.cpp
-%typemap(out) wxEvtHandler* { $result = wxPyMake_wxObject($1); }
-%typemap(out) wxMenu* { $result = wxPyMake_wxObject($1); }
-%typemap(out) wxValidator* { $result = wxPyMake_wxObject($1); }
-
-%typemap(out) wxApp* { $result = wxPyMake_wxObject($1); }
-%typemap(out) wxPyApp* { $result = wxPyMake_wxObject($1); }
-%typemap(out) wxDC* { $result = wxPyMake_wxObject($1); }
-%typemap(out) wxFSFile* { $result = wxPyMake_wxObject($1); }
-%typemap(out) wxFileSystem* { $result = wxPyMake_wxObject($1); }
-%typemap(out) wxGridTableBase* { $result = wxPyMake_wxObject($1); }
-%typemap(out) wxImageList* { $result = wxPyMake_wxObject($1); }
-%typemap(out) wxListItem* { $result = wxPyMake_wxObject($1); }
-%typemap(out) wxMenuItem* { $result = wxPyMake_wxObject($1); }
-%typemap(out) wxMouseEvent* { $result = wxPyMake_wxObject($1); }
-%typemap(out) wxObject* { $result = wxPyMake_wxObject($1); }
-%typemap(out) wxPyPrintout* { $result = wxPyMake_wxObject($1); }
-%typemap(out) wxToolBarToolBase* { $result = wxPyMake_wxObject($1); }
-%typemap(out) wxToolTip* { $result = wxPyMake_wxObject($1); }
-
-
-%typemap(out) wxBitmapButton* { $result = wxPyMake_wxObject($1); }
-%typemap(out) wxButton* { $result = wxPyMake_wxObject($1); }
-%typemap(out) wxControl* { $result = wxPyMake_wxObject($1); }
-%typemap(out) wxFrame* { $result = wxPyMake_wxObject($1); }
-%typemap(out) wxGrid* { $result = wxPyMake_wxObject($1); }
-%typemap(out) wxListCtrl* { $result = wxPyMake_wxObject($1); }
-%typemap(out) wxMDIChildFrame* { $result = wxPyMake_wxObject($1); }
-%typemap(out) wxMDIClientWindow* { $result = wxPyMake_wxObject($1); }
-%typemap(out) wxMenuBar* { $result = wxPyMake_wxObject($1); }
-%typemap(out) wxNotebook* { $result = wxPyMake_wxObject($1); }
-%typemap(out) wxStaticBox* { $result = wxPyMake_wxObject($1); }
-%typemap(out) wxStatusBar* { $result = wxPyMake_wxObject($1); }
-%typemap(out) wxTextCtrl* { $result = wxPyMake_wxObject($1); }
-%typemap(out) wxToolBar* { $result = wxPyMake_wxObject($1); }
-%typemap(out) wxToolBarBase* { $result = wxPyMake_wxObject($1); }
-%typemap(out) wxTreeCtrl* { $result = wxPyMake_wxObject($1); }
-%typemap(out) wxPyTreeCtrl* { $result = wxPyMake_wxObject($1); }
-%typemap(out) wxWindow* { $result = wxPyMake_wxObject($1); }
-%typemap(out) wxHtmlWindow* { $result = wxPyMake_wxObject($1); }
-%typemap(out) wxPyHtmlWindow* { $result = wxPyMake_wxObject($1); }
-%typemap(out) wxWizardPage* { $result = wxPyMake_wxObject($1); }
-%typemap(out) wxPanel* { $result = wxPyMake_wxObject($1); }
-%typemap(out) wxDialog* { $result = wxPyMake_wxObject($1); }
-
-%typemap(out) wxSizer* { $result = wxPyMake_wxSizer($1); }
-
-
-//%typemap(python, out) wxHtmlCell* { $target = wxPyMake_wxObject($source); }
-//%typemap(python, out) wxHtmlContainerCell* { $target = wxPyMake_wxObject($source); }
-//%typemap(python, out) wxHtmlParser* { $target = wxPyMake_wxObject($source); }
-//%typemap(python, out) wxHtmlWinParser* { $target = wxPyMake_wxObject($source); }
+%typemap(out) wxEvtHandler* { $result = wxPyMake_wxObject($1, $owner); }
+%typemap(out) wxMenu* { $result = wxPyMake_wxObject($1, $owner); }
+%typemap(out) wxValidator* { $result = wxPyMake_wxObject($1, $owner); }
+
+%typemap(out) wxApp* { $result = wxPyMake_wxObject($1, $owner); }
+%typemap(out) wxPyApp* { $result = wxPyMake_wxObject($1, $owner); }
+%typemap(out) wxDC* { $result = wxPyMake_wxObject($1, $owner); }
+%typemap(out) wxFSFile* { $result = wxPyMake_wxObject($1, $owner); }
+%typemap(out) wxFileSystem* { $result = wxPyMake_wxObject($1, $owner); }
+%typemap(out) wxGridTableBase* { $result = wxPyMake_wxObject($1, $owner); }
+%typemap(out) wxImageList* { $result = wxPyMake_wxObject($1, $owner); }
+%typemap(out) wxListItem* { $result = wxPyMake_wxObject($1, $owner); }
+%typemap(out) wxMenuItem* { $result = wxPyMake_wxObject($1, $owner); }
+%typemap(out) wxMouseEvent* { $result = wxPyMake_wxObject($1, $owner); }
+%typemap(out) wxObject* { $result = wxPyMake_wxObject($1, $owner); }
+%typemap(out) wxPyPrintout* { $result = wxPyMake_wxObject($1, $owner); }
+%typemap(out) wxToolBarToolBase* { $result = wxPyMake_wxObject($1, $owner); }
+%typemap(out) wxToolTip* { $result = wxPyMake_wxObject($1, $owner); }
+
+
+%typemap(out) wxBitmapButton* { $result = wxPyMake_wxObject($1, $owner); }
+%typemap(out) wxButton* { $result = wxPyMake_wxObject($1, $owner); }
+%typemap(out) wxControl* { $result = wxPyMake_wxObject($1, $owner); }
+%typemap(out) wxFrame* { $result = wxPyMake_wxObject($1, $owner); }
+%typemap(out) wxGrid* { $result = wxPyMake_wxObject($1, $owner); }
+%typemap(out) wxListCtrl* { $result = wxPyMake_wxObject($1, $owner); }
+%typemap(out) wxMDIChildFrame* { $result = wxPyMake_wxObject($1, $owner); }
+%typemap(out) wxMDIClientWindow* { $result = wxPyMake_wxObject($1, $owner); }
+%typemap(out) wxMenuBar* { $result = wxPyMake_wxObject($1, $owner); }
+%typemap(out) wxNotebook* { $result = wxPyMake_wxObject($1, $owner); }
+%typemap(out) wxStaticBox* { $result = wxPyMake_wxObject($1, $owner); }
+%typemap(out) wxStatusBar* { $result = wxPyMake_wxObject($1, $owner); }
+%typemap(out) wxTextCtrl* { $result = wxPyMake_wxObject($1, $owner); }
+%typemap(out) wxToolBar* { $result = wxPyMake_wxObject($1, $owner); }
+%typemap(out) wxToolBarBase* { $result = wxPyMake_wxObject($1, $owner); }
+%typemap(out) wxTreeCtrl* { $result = wxPyMake_wxObject($1, $owner); }
+%typemap(out) wxPyTreeCtrl* { $result = wxPyMake_wxObject($1, $owner); }
+%typemap(out) wxWindow* { $result = wxPyMake_wxObject($1, $owner); }
+%typemap(out) wxHtmlWindow* { $result = wxPyMake_wxObject($1, $owner); }
+%typemap(out) wxPyHtmlWindow* { $result = wxPyMake_wxObject($1, $owner); }
+%typemap(out) wxWizardPage* { $result = wxPyMake_wxObject($1, $owner); }
+%typemap(out) wxPanel* { $result = wxPyMake_wxObject($1, $owner); }
+%typemap(out) wxDialog* { $result = wxPyMake_wxObject($1, $owner); }
+%typemap(out) wxScrolledWindow* { $result = wxPyMake_wxObject($1, $owner); }
+
+%typemap(out) wxSizer* { $result = wxPyMake_wxSizer($1, $owner); }
+
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------