]> git.saurik.com Git - wxWidgets.git/commitdiff
Changes needed to solve wxPython's OOR problem for the wxOGL shapes.
authorRobin Dunn <robin@alldunn.com>
Tue, 27 Nov 2001 02:56:59 +0000 (02:56 +0000)
committerRobin Dunn <robin@alldunn.com>
Tue, 27 Nov 2001 02:56:59 +0000 (02:56 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12717 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

33 files changed:
wxPython/contrib/ogl/_ogldefs.i
wxPython/contrib/ogl/ogl.cpp
wxPython/contrib/ogl/ogl.i
wxPython/contrib/ogl/oglbasic.cpp
wxPython/contrib/ogl/oglbasic.i
wxPython/contrib/ogl/oglbasic.py
wxPython/contrib/ogl/oglcanvas.cpp
wxPython/contrib/ogl/oglhelpers.h
wxPython/contrib/ogl/oglshapes.cpp
wxPython/contrib/ogl/oglshapes.i
wxPython/contrib/ogl/oglshapes.py
wxPython/contrib/ogl/oglshapes2.cpp
wxPython/contrib/ogl/oglshapes2.i
wxPython/contrib/ogl/oglshapes2.py
wxPython/demo/wxOGL.py
wxPython/setup.py
wxPython/src/_defs.i
wxPython/src/controls.i
wxPython/src/export.h
wxPython/src/gdi.i
wxPython/src/helpers.cpp
wxPython/src/helpers.h
wxPython/src/msw/controls.cpp
wxPython/src/msw/controls.py
wxPython/src/msw/frames.cpp
wxPython/src/msw/gdi.cpp
wxPython/src/msw/gdi.py
wxPython/src/msw/sizers.cpp
wxPython/src/msw/windows.cpp
wxPython/src/msw/wx.cpp
wxPython/src/msw/wx.py
wxPython/src/my_typemaps.i
wxPython/src/wx.i

index 1241092a2e5155df7339f25bf7f1433ef83da33f..0660991cd3ca134a7b67ee55d2b80e4015fc6280 100644 (file)
@@ -58,12 +58,13 @@ class wxPyControlPoint;
 
 
 // OOR Support
-%typemap(python, out) wxPyShape*                { $target = wxPyMake_wxObject($source); }
-%typemap(python, out) wxPyShapeEvtHandler*      { $target = wxPyMake_wxObject($source); }
+%typemap(python, out) wxPyShape*                { $target = wxPyMake_wxShapeEvtHandler($source); }
+%typemap(python, out) wxPyShapeEvtHandler*      { $target = wxPyMake_wxShapeEvtHandler($source); }
+%typemap(python, out) wxPyDivisionShape*        { $target = wxPyMake_wxShapeEvtHandler($source); }
+
 %typemap(python, out) wxPyShapeCanvas*          { $target = wxPyMake_wxObject($source); }
 %typemap(python, out) wxDiagram*                { $target = wxPyMake_wxObject($source); }
 %typemap(python, out) wxOGLConstraint*          { $target = wxPyMake_wxObject($source); }
-%typemap(python, out) wxPyDivisionShape*        { $target = wxPyMake_wxObject($source); }
 %typemap(python, out) wxPseudoMetaFile*         { $target = wxPyMake_wxObject($source); }
 %typemap(python, out) wxArrowHead*              { $target = wxPyMake_wxObject($source); }
 
index cb08d0efd0e3c6f4e9a18ea871f7b3f9dbcfffd2..6b22bfbe16fa96063c4d3f28085417060b61e784 100644 (file)
@@ -117,7 +117,7 @@ wxList* wxPy_wxListHelper(PyObject* pyList, char* className) {
             char errmsg[1024];
             sprintf(errmsg, "Type error, expected list of %s objects", className);
             PyErr_SetString(PyExc_TypeError, errmsg);
-             wxPyEndBlockThreads(state);
+            wxPyEndBlockThreads(state);
             return NULL;
         }
         list->Append(wxo);
@@ -168,6 +168,31 @@ wxList* wxPy_wxRealPoint_ListHelper(PyObject* pyList) {
     return list;
 }
 
+//---------------------------------------------------------------------------
+
+PyObject*  wxPyMake_wxShapeEvtHandler(wxShapeEvtHandler* source) {
+    PyObject* target = NULL;
+
+    if (source && wxIsKindOf(source, wxShapeEvtHandler)) {
+        // If it's derived from wxShapeEvtHandler then there may
+        // already be a pointer to a Python object that we can use
+        // in the OOR data.
+        wxShapeEvtHandler* seh = (wxShapeEvtHandler*)source;
+        wxPyClientData* data = (wxPyClientData*)seh->GetClientObject();
+        if (data) {
+            target = data->m_obj;
+            Py_INCREF(target);
+        }
+    }
+    if (! target) {
+        target = wxPyMake_wxObject2(source, FALSE);
+        if (target != Py_None)
+            ((wxShapeEvtHandler*)source)->SetClientObject(new wxPyClientData(target));
+    }
+    return target;
+}
+
+
 
 //---------------------------------------------------------------------------
 
index 41f78d72fc2c309e08f70f29560370d6cf172d5d..6bc29d196f88c450b3d941f14153b11a7d39d94f 100644 (file)
@@ -160,7 +160,7 @@ wxList* wxPy_wxListHelper(PyObject* pyList, char* className) {
             char errmsg[1024];
             sprintf(errmsg, "Type error, expected list of %s objects", className);
             PyErr_SetString(PyExc_TypeError, errmsg);
-             wxPyEndBlockThreads(state);
+            wxPyEndBlockThreads(state);
             return NULL;
         }
         list->Append(wxo);
@@ -211,6 +211,31 @@ wxList* wxPy_wxRealPoint_ListHelper(PyObject* pyList) {
     return list;
 }
 
+//---------------------------------------------------------------------------
+
+PyObject*  wxPyMake_wxShapeEvtHandler(wxShapeEvtHandler* source) {
+    PyObject* target = NULL;
+
+    if (source && wxIsKindOf(source, wxShapeEvtHandler)) {
+        // If it's derived from wxShapeEvtHandler then there may
+        // already be a pointer to a Python object that we can use
+        // in the OOR data.
+        wxShapeEvtHandler* seh = (wxShapeEvtHandler*)source;
+        wxPyClientData* data = (wxPyClientData*)seh->GetClientObject();
+        if (data) {
+            target = data->m_obj;
+            Py_INCREF(target);
+        }
+    }
+    if (! target) {
+        target = wxPyMake_wxObject2(source, FALSE);
+        if (target != Py_None)
+            ((wxShapeEvtHandler*)source)->SetClientObject(new wxPyClientData(target));
+    }
+    return target;
+}
+
+
 
 //---------------------------------------------------------------------------
 
index 9d4ab21462c7b8cea45e112f03c25e3fa43c5f77..24965a42aeb60c1b8e5a43cbc9629aeff5a0572b 100644 (file)
@@ -1258,6 +1258,40 @@ static PyObject *_wrap_wxPyShapeEvtHandler_Destroy(PyObject *self, PyObject *arg
     return _resultobj;
 }
 
+static void  wxPyShapeEvtHandler__setOORInfo(wxPyShapeEvtHandler *self,PyObject * _self) {
+            self->SetClientObject(new wxPyClientData(_self));
+        }
+static PyObject *_wrap_wxPyShapeEvtHandler__setOORInfo(PyObject *self, PyObject *args, PyObject *kwargs) {
+    PyObject * _resultobj;
+    wxPyShapeEvtHandler * _arg0;
+    PyObject * _arg1;
+    PyObject * _argo0 = 0;
+    PyObject * _obj1 = 0;
+    char *_kwnames[] = { "self","_self", NULL };
+
+    self = self;
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyShapeEvtHandler__setOORInfo",_kwnames,&_argo0,&_obj1)) 
+        return NULL;
+    if (_argo0) {
+        if (_argo0 == Py_None) { _arg0 = NULL; }
+        else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyShapeEvtHandler_p")) {
+            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyShapeEvtHandler__setOORInfo. Expected _wxPyShapeEvtHandler_p.");
+        return NULL;
+        }
+    }
+{
+  _arg1 = _obj1;
+}
+{
+    wxPy_BEGIN_ALLOW_THREADS;
+        wxPyShapeEvtHandler__setOORInfo(_arg0,_arg1);
+
+    wxPy_END_ALLOW_THREADS;
+}    Py_INCREF(Py_None);
+    _resultobj = Py_None;
+    return _resultobj;
+}
+
 #define wxPyShapeEvtHandler_SetShape(_swigobj,_swigarg0)  (_swigobj->SetShape(_swigarg0))
 static PyObject *_wrap_wxPyShapeEvtHandler_SetShape(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
@@ -1317,7 +1351,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_GetShape(PyObject *self, PyObject *ar
         _result = (wxPyShape *)wxPyShapeEvtHandler_GetShape(_arg0);
 
     wxPy_END_ALLOW_THREADS;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); }
     return _resultobj;
 }
 
@@ -1380,7 +1414,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_GetPreviousHandler(PyObject *self, Py
         _result = (wxPyShapeEvtHandler *)wxPyShapeEvtHandler_GetPreviousHandler(_arg0);
 
     wxPy_END_ALLOW_THREADS;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); }
     return _resultobj;
 }
 
@@ -1407,7 +1441,7 @@ static PyObject *_wrap_wxPyShapeEvtHandler_CreateNewCopy(PyObject *self, PyObjec
         _result = (wxPyShapeEvtHandler *)wxPyShapeEvtHandler_CreateNewCopy(_arg0);
 
     wxPy_END_ALLOW_THREADS;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); }
     return _resultobj;
 }
 
@@ -2478,33 +2512,6 @@ static PyObject *_wrap_wxPyShape__setCallbackInfo(PyObject *self, PyObject *args
     return _resultobj;
 }
 
-static void  wxPyShape_Destroy(wxPyShape *self) { delete self; }
-static PyObject *_wrap_wxPyShape_Destroy(PyObject *self, PyObject *args, PyObject *kwargs) {
-    PyObject * _resultobj;
-    wxPyShape * _arg0;
-    PyObject * _argo0 = 0;
-    char *_kwnames[] = { "self", NULL };
-
-    self = self;
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyShape_Destroy",_kwnames,&_argo0)) 
-        return NULL;
-    if (_argo0) {
-        if (_argo0 == Py_None) { _arg0 = NULL; }
-        else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyShape_p")) {
-            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyShape_Destroy. Expected _wxPyShape_p.");
-        return NULL;
-        }
-    }
-{
-    wxPy_BEGIN_ALLOW_THREADS;
-        wxPyShape_Destroy(_arg0);
-
-    wxPy_END_ALLOW_THREADS;
-}    Py_INCREF(Py_None);
-    _resultobj = Py_None;
-    return _resultobj;
-}
-
 #define wxPyShape_GetBoundingBoxMax(_swigobj,_swigarg0,_swigarg1)  (_swigobj->GetBoundingBoxMax(_swigarg0,_swigarg1))
 static PyObject *_wrap_wxPyShape_GetBoundingBoxMax(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
@@ -2963,7 +2970,7 @@ static PyObject *_wrap_wxPyShape_GetParent(PyObject *self, PyObject *args, PyObj
         _result = (wxPyShape *)wxPyShape_GetParent(_arg0);
 
     wxPy_END_ALLOW_THREADS;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); }
     return _resultobj;
 }
 
@@ -3026,7 +3033,7 @@ static PyObject *_wrap_wxPyShape_GetTopAncestor(PyObject *self, PyObject *args,
         _result = (wxPyShape *)wxPyShape_GetTopAncestor(_arg0);
 
     wxPy_END_ALLOW_THREADS;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); }
     return _resultobj;
 }
 
@@ -3259,7 +3266,7 @@ static PyObject *_wrap_wxPyShape_GetEventHandler(PyObject *self, PyObject *args,
         _result = (wxPyShapeEvtHandler *)wxPyShape_GetEventHandler(_arg0);
 
     wxPy_END_ALLOW_THREADS;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); }
     return _resultobj;
 }
 
@@ -5783,7 +5790,7 @@ static PyObject *_wrap_wxPyShape_FindRegion(PyObject *self, PyObject *args, PyOb
         _result = (wxPyShape *)wxPyShape_FindRegion(_arg0,*_arg1,_arg2);
 
     wxPy_END_ALLOW_THREADS;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); }
 {
     PyObject *o;
     o = PyInt_FromLong((long) (*_arg2));
@@ -6863,7 +6870,7 @@ static PyObject *_wrap_wxPyShape_CreateNewCopy(PyObject *self, PyObject *args, P
         _result = (wxPyShape *)wxPyShape_CreateNewCopy(_arg0,_arg1,_arg2);
 
     wxPy_END_ALLOW_THREADS;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); }
     return _resultobj;
 }
 
@@ -7095,6 +7102,64 @@ static PyObject *_wrap_wxPyShape_ClearPointList(PyObject *self, PyObject *args,
     return _resultobj;
 }
 
+#define wxPyShape_GetBackgroundPen(_swigobj)  (_swigobj->GetBackgroundPen())
+static PyObject *_wrap_wxPyShape_GetBackgroundPen(PyObject *self, PyObject *args, PyObject *kwargs) {
+    PyObject * _resultobj;
+    wxPen * _result;
+    wxPyShape * _arg0;
+    PyObject * _argo0 = 0;
+    char *_kwnames[] = { "self", NULL };
+    char _ptemp[128];
+
+    self = self;
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyShape_GetBackgroundPen",_kwnames,&_argo0)) 
+        return NULL;
+    if (_argo0) {
+        if (_argo0 == Py_None) { _arg0 = NULL; }
+        else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyShape_p")) {
+            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyShape_GetBackgroundPen. Expected _wxPyShape_p.");
+        return NULL;
+        }
+    }
+{
+    wxPy_BEGIN_ALLOW_THREADS;
+        _result = new wxPen (wxPyShape_GetBackgroundPen(_arg0));
+
+    wxPy_END_ALLOW_THREADS;
+}    SWIG_MakePtr(_ptemp, (void *) _result,"_wxPen_p");
+    _resultobj = Py_BuildValue("s",_ptemp);
+    return _resultobj;
+}
+
+#define wxPyShape_GetBackgroundBrush(_swigobj)  (_swigobj->GetBackgroundBrush())
+static PyObject *_wrap_wxPyShape_GetBackgroundBrush(PyObject *self, PyObject *args, PyObject *kwargs) {
+    PyObject * _resultobj;
+    wxBrush * _result;
+    wxPyShape * _arg0;
+    PyObject * _argo0 = 0;
+    char *_kwnames[] = { "self", NULL };
+    char _ptemp[128];
+
+    self = self;
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyShape_GetBackgroundBrush",_kwnames,&_argo0)) 
+        return NULL;
+    if (_argo0) {
+        if (_argo0 == Py_None) { _arg0 = NULL; }
+        else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyShape_p")) {
+            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyShape_GetBackgroundBrush. Expected _wxPyShape_p.");
+        return NULL;
+        }
+    }
+{
+    wxPy_BEGIN_ALLOW_THREADS;
+        _result = new wxBrush (wxPyShape_GetBackgroundBrush(_arg0));
+
+    wxPy_END_ALLOW_THREADS;
+}    SWIG_MakePtr(_ptemp, (void *) _result,"_wxBrush_p");
+    _resultobj = Py_BuildValue("s",_ptemp);
+    return _resultobj;
+}
+
 #define wxPyShape_base_OnDelete(_swigobj)  (_swigobj->base_OnDelete())
 static PyObject *_wrap_wxPyShape_base_OnDelete(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
@@ -8139,6 +8204,8 @@ static PyMethodDef oglbasiccMethods[] = {
         { "wxPyShape_base_OnDrawContents", (PyCFunction) _wrap_wxPyShape_base_OnDrawContents, METH_VARARGS | METH_KEYWORDS },
         { "wxPyShape_base_OnDraw", (PyCFunction) _wrap_wxPyShape_base_OnDraw, METH_VARARGS | METH_KEYWORDS },
         { "wxPyShape_base_OnDelete", (PyCFunction) _wrap_wxPyShape_base_OnDelete, METH_VARARGS | METH_KEYWORDS },
+        { "wxPyShape_GetBackgroundBrush", (PyCFunction) _wrap_wxPyShape_GetBackgroundBrush, METH_VARARGS | METH_KEYWORDS },
+        { "wxPyShape_GetBackgroundPen", (PyCFunction) _wrap_wxPyShape_GetBackgroundPen, METH_VARARGS | METH_KEYWORDS },
         { "wxPyShape_ClearPointList", (PyCFunction) _wrap_wxPyShape_ClearPointList, METH_VARARGS | METH_KEYWORDS },
         { "wxPyShape_Recentre", (PyCFunction) _wrap_wxPyShape_Recentre, METH_VARARGS | METH_KEYWORDS },
         { "wxPyShape_ClearAttachments", (PyCFunction) _wrap_wxPyShape_ClearAttachments, METH_VARARGS | METH_KEYWORDS },
@@ -8273,7 +8340,6 @@ static PyMethodDef oglbasiccMethods[] = {
         { "wxPyShape_GetPerimeterPoint", (PyCFunction) _wrap_wxPyShape_GetPerimeterPoint, METH_VARARGS | METH_KEYWORDS },
         { "wxPyShape_GetBoundingBoxMin", (PyCFunction) _wrap_wxPyShape_GetBoundingBoxMin, METH_VARARGS | METH_KEYWORDS },
         { "wxPyShape_GetBoundingBoxMax", (PyCFunction) _wrap_wxPyShape_GetBoundingBoxMax, METH_VARARGS | METH_KEYWORDS },
-        { "wxPyShape_Destroy", (PyCFunction) _wrap_wxPyShape_Destroy, METH_VARARGS | METH_KEYWORDS },
         { "wxPyShape__setCallbackInfo", (PyCFunction) _wrap_wxPyShape__setCallbackInfo, METH_VARARGS | METH_KEYWORDS },
         { "wxPyShapeEvtHandler_base_OnEndSize", (PyCFunction) _wrap_wxPyShapeEvtHandler_base_OnEndSize, METH_VARARGS | METH_KEYWORDS },
         { "wxPyShapeEvtHandler_base_OnBeginSize", (PyCFunction) _wrap_wxPyShapeEvtHandler_base_OnBeginSize, METH_VARARGS | METH_KEYWORDS },
@@ -8309,6 +8375,7 @@ static PyMethodDef oglbasiccMethods[] = {
         { "wxPyShapeEvtHandler_SetPreviousHandler", (PyCFunction) _wrap_wxPyShapeEvtHandler_SetPreviousHandler, METH_VARARGS | METH_KEYWORDS },
         { "wxPyShapeEvtHandler_GetShape", (PyCFunction) _wrap_wxPyShapeEvtHandler_GetShape, METH_VARARGS | METH_KEYWORDS },
         { "wxPyShapeEvtHandler_SetShape", (PyCFunction) _wrap_wxPyShapeEvtHandler_SetShape, METH_VARARGS | METH_KEYWORDS },
+        { "wxPyShapeEvtHandler__setOORInfo", (PyCFunction) _wrap_wxPyShapeEvtHandler__setOORInfo, METH_VARARGS | METH_KEYWORDS },
         { "wxPyShapeEvtHandler_Destroy", (PyCFunction) _wrap_wxPyShapeEvtHandler_Destroy, METH_VARARGS | METH_KEYWORDS },
         { "wxPyShapeEvtHandler__setCallbackInfo", (PyCFunction) _wrap_wxPyShapeEvtHandler__setCallbackInfo, METH_VARARGS | METH_KEYWORDS },
         { "new_wxPyShapeEvtHandler", (PyCFunction) _wrap_new_wxPyShapeEvtHandler, METH_VARARGS | METH_KEYWORDS },
index 6d66e15caa713423a0bdda8f8dcc28564f1227c5..7e982eeb31f768da0b22557bc411c04897dd1d95 100644 (file)
@@ -94,8 +94,15 @@ public:
 
     void _setCallbackInfo(PyObject* self, PyObject* _class);
     %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyShapeEvtHandler)"
+    %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
 
     %addmethods { void Destroy() { delete self; } }
+    %addmethods {
+        void _setOORInfo(PyObject* _self) {
+            self->SetClientObject(new wxPyClientData(_self));
+        }
+    }
+
 
     void SetShape(wxPyShape *sh);
     wxPyShape *GetShape();
@@ -147,10 +154,7 @@ public:
 
     void _setCallbackInfo(PyObject* self, PyObject* _class);
     %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyShape)"
-
-    %addmethods {
-        void Destroy() { delete self; }
-    }
+    %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
 
     void GetBoundingBoxMax(double *OUTPUT, double *OUTPUT);
     void GetBoundingBoxMin(double *OUTPUT, double *OUTPUT);
@@ -364,6 +368,8 @@ public:
     void ClearAttachments();
     void Recentre(wxDC& dc);
     void ClearPointList(wxList& list);
+    wxPen GetBackgroundPen();
+    wxBrush GetBackgroundBrush();
 
     void base_OnDelete();
     void base_OnDraw(wxDC& dc);
index 9a6e352b2580b35abd02b7e9d97806cd4396db54..7e23386ead90ce29f1dfc6c12e48befa33533624 100644 (file)
@@ -153,6 +153,9 @@ class wxPyShapeEvtHandlerPtr(wxObjectPtr):
     def Destroy(self, *_args, **_kwargs):
         val = apply(oglbasicc.wxPyShapeEvtHandler_Destroy,(self,) + _args, _kwargs)
         return val
+    def _setOORInfo(self, *_args, **_kwargs):
+        val = apply(oglbasicc.wxPyShapeEvtHandler__setOORInfo,(self,) + _args, _kwargs)
+        return val
     def SetShape(self, *_args, **_kwargs):
         val = apply(oglbasicc.wxPyShapeEvtHandler_SetShape,(self,) + _args, _kwargs)
         return val
@@ -262,6 +265,7 @@ class wxPyShapeEvtHandler(wxPyShapeEvtHandlerPtr):
         self.this = apply(oglbasicc.new_wxPyShapeEvtHandler,_args,_kwargs)
         self.thisown = 1
         self._setCallbackInfo(self, wxPyShapeEvtHandler)
+        self._setOORInfo(self)
 
 
 
@@ -273,9 +277,6 @@ class wxPyShapePtr(wxPyShapeEvtHandlerPtr):
     def _setCallbackInfo(self, *_args, **_kwargs):
         val = apply(oglbasicc.wxPyShape__setCallbackInfo,(self,) + _args, _kwargs)
         return val
-    def Destroy(self, *_args, **_kwargs):
-        val = apply(oglbasicc.wxPyShape_Destroy,(self,) + _args, _kwargs)
-        return val
     def GetBoundingBoxMax(self, *_args, **_kwargs):
         val = apply(oglbasicc.wxPyShape_GetBoundingBoxMax,(self,) + _args, _kwargs)
         return val
@@ -683,6 +684,14 @@ class wxPyShapePtr(wxPyShapeEvtHandlerPtr):
     def ClearPointList(self, *_args, **_kwargs):
         val = apply(oglbasicc.wxPyShape_ClearPointList,(self,) + _args, _kwargs)
         return val
+    def GetBackgroundPen(self, *_args, **_kwargs):
+        val = apply(oglbasicc.wxPyShape_GetBackgroundPen,(self,) + _args, _kwargs)
+        if val: val = wxPenPtr(val) ; val.thisown = 1
+        return val
+    def GetBackgroundBrush(self, *_args, **_kwargs):
+        val = apply(oglbasicc.wxPyShape_GetBackgroundBrush,(self,) + _args, _kwargs)
+        if val: val = wxBrushPtr(val) ; val.thisown = 1
+        return val
     def base_OnDelete(self, *_args, **_kwargs):
         val = apply(oglbasicc.wxPyShape_base_OnDelete,(self,) + _args, _kwargs)
         return val
index 8f4fc959439bfeb792a9c344073c8a667ad9c168..a9821d727fbb283dea41e3683f91262d9fdf4fb4 100644 (file)
@@ -307,7 +307,7 @@ static PyObject *_wrap_wxDiagram_FindShape(PyObject *self, PyObject *args, PyObj
         _result = (wxPyShape *)wxDiagram_FindShape(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); }
     return _resultobj;
 }
 
@@ -1343,7 +1343,7 @@ static PyObject *_wrap_wxPyShapeCanvas_FindShape(PyObject *self, PyObject *args,
         _result = (wxPyShape *)wxPyShapeCanvas_FindShape(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
 
     wxPy_END_ALLOW_THREADS;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); }
 {
     PyObject *o;
     o = PyInt_FromLong((long) (*_arg3));
@@ -1383,7 +1383,7 @@ static PyObject *_wrap_wxPyShapeCanvas_FindFirstSensitiveShape(PyObject *self, P
         _result = (wxPyShape *)wxPyShapeCanvas_FindFirstSensitiveShape(_arg0,_arg1,_arg2,_arg3,_arg4);
 
     wxPy_END_ALLOW_THREADS;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); }
 {
     PyObject *o;
     o = PyInt_FromLong((long) (*_arg3));
index 532e7d68e4d6103d65bc7da883bafb9f8b9dd893..ef4be52d3d0ee7e755c429241758c4ed8f480f65 100644 (file)
 
 
 //---------------------------------------------------------------------------
-// These are prototypes of some helper functions found in oglhelpers.cpp
+// These are prototypes of some helper functions found in ogl.i
 
 wxList* wxPy_wxListHelper(PyObject* pyList, char* className);
 wxList* wxPy_wxRealPoint_ListHelper(PyObject* pyList);
+PyObject* wxPyMake_wxShapeEvtHandler(wxShapeEvtHandler* source);
 
 
 
index 6cc14359f0ec8ba687c317fd4292f58744091a11..811e844ac3b15ad1e0ff1ceb82e94fcaf2d7ad87 100644 (file)
@@ -7933,7 +7933,7 @@ static PyObject *_wrap_wxPyCompositeShape_FindContainerImage(PyObject *self, PyO
         _result = (wxPyShape *)wxPyCompositeShape_FindContainerImage(_arg0);
 
     wxPy_END_ALLOW_THREADS;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); }
     return _resultobj;
 }
 
@@ -10574,7 +10574,7 @@ static PyObject *_wrap_wxPyDivisionShape_GetBottomSide(PyObject *self, PyObject
         _result = (wxPyDivisionShape *)wxPyDivisionShape_GetBottomSide(_arg0);
 
     wxPy_END_ALLOW_THREADS;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); }
     return _resultobj;
 }
 
@@ -10628,7 +10628,7 @@ static PyObject *_wrap_wxPyDivisionShape_GetLeftSide(PyObject *self, PyObject *a
         _result = (wxPyDivisionShape *)wxPyDivisionShape_GetLeftSide(_arg0);
 
     wxPy_END_ALLOW_THREADS;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); }
     return _resultobj;
 }
 
@@ -10721,7 +10721,7 @@ static PyObject *_wrap_wxPyDivisionShape_GetRightSide(PyObject *self, PyObject *
         _result = (wxPyDivisionShape *)wxPyDivisionShape_GetRightSide(_arg0);
 
     wxPy_END_ALLOW_THREADS;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); }
     return _resultobj;
 }
 
@@ -10748,7 +10748,7 @@ static PyObject *_wrap_wxPyDivisionShape_GetTopSide(PyObject *self, PyObject *ar
         _result = (wxPyDivisionShape *)wxPyDivisionShape_GetTopSide(_arg0);
 
     wxPy_END_ALLOW_THREADS;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); }
     return _resultobj;
 }
 
index d29501a05572358b6ad8714d91f8701ce5cc4711..6f1ebc26b4c7891cd252e372e9fb1146206a73ed 100644 (file)
@@ -110,6 +110,7 @@ public:
 
     void _setCallbackInfo(PyObject* self, PyObject* _class);
     %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyRectangleShape)"
+    %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
 
     void SetCornerRadius(double radius);
 
@@ -160,6 +161,7 @@ public:
 
     void _setCallbackInfo(PyObject* self, PyObject* _class);
     %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyControlPoint)"
+    %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
 
     void SetCornerRadius(double radius);
 
@@ -207,6 +209,7 @@ public:
 
     void _setCallbackInfo(PyObject* self, PyObject* _class);
     %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyBitmapShape)"
+    %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
 
     wxBitmap& GetBitmap();
     wxString GetFilename();
@@ -256,6 +259,7 @@ public:
 
     void _setCallbackInfo(PyObject* self, PyObject* _class);
     %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyDrawnShape)"
+    %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
 
     void CalculateSize();
     void DestroyClippingRect();
@@ -360,6 +364,7 @@ public:
 
     void _setCallbackInfo(PyObject* self, PyObject* _class);
     %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyCompositeShape)"
+    %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
 
     void AddChild(wxPyShape *child, wxPyShape *addAfter = NULL);
 
@@ -458,6 +463,7 @@ public:
 
     void _setCallbackInfo(PyObject* self, PyObject* _class);
     %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyDividedShape)"
+    %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
 
     void EditRegions();
     void SetRegionSizes();
@@ -507,6 +513,7 @@ public:
 
     void _setCallbackInfo(PyObject* self, PyObject* _class);
     %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyDivisionShape)"
+    %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
 
     void AdjustBottom(double bottom, bool test);
     void AdjustLeft(double left, bool test);
index bce43eeda94ae1928b14d1f2333155140ebb4abd..8732f72cadeefaf1dd5bef821596113784e73ce2 100644 (file)
@@ -289,6 +289,7 @@ class wxPyRectangleShape(wxPyRectangleShapePtr):
         self.this = apply(oglshapesc.new_wxPyRectangleShape,_args,_kwargs)
         self.thisown = 1
         self._setCallbackInfo(self, wxPyRectangleShape)
+        self._setOORInfo(self)
 
 
 
@@ -397,6 +398,7 @@ class wxPyControlPoint(wxPyControlPointPtr):
         self.this = apply(oglshapesc.new_wxPyControlPoint,_args,_kwargs)
         self.thisown = 1
         self._setCallbackInfo(self, wxPyControlPoint)
+        self._setOORInfo(self)
 
 
 
@@ -515,6 +517,7 @@ class wxPyBitmapShape(wxPyBitmapShapePtr):
         self.this = apply(oglshapesc.new_wxPyBitmapShape,_args,_kwargs)
         self.thisown = 1
         self._setCallbackInfo(self, wxPyBitmapShape)
+        self._setOORInfo(self)
 
 
 
@@ -704,6 +707,7 @@ class wxPyDrawnShape(wxPyDrawnShapePtr):
         self.this = apply(oglshapesc.new_wxPyDrawnShape,_args,_kwargs)
         self.thisown = 1
         self._setCallbackInfo(self, wxPyDrawnShape)
+        self._setOORInfo(self)
 
 
 
@@ -874,6 +878,7 @@ class wxPyCompositeShape(wxPyCompositeShapePtr):
         self.this = apply(oglshapesc.new_wxPyCompositeShape,_args,_kwargs)
         self.thisown = 1
         self._setCallbackInfo(self, wxPyCompositeShape)
+        self._setOORInfo(self)
 
 
 
@@ -985,6 +990,7 @@ class wxPyDividedShape(wxPyDividedShapePtr):
         self.this = apply(oglshapesc.new_wxPyDividedShape,_args,_kwargs)
         self.thisown = 1
         self._setCallbackInfo(self, wxPyDividedShape)
+        self._setOORInfo(self)
 
 
 
@@ -1167,6 +1173,7 @@ class wxPyDivisionShape(wxPyDivisionShapePtr):
         self.this = apply(oglshapesc.new_wxPyDivisionShape,_args,_kwargs)
         self.thisown = 1
         self._setCallbackInfo(self, wxPyDivisionShape)
+        self._setOORInfo(self)
 
 
 
index 72c0f233153b6ac8b068a6bef682ff074cd025e2..72fcdbb747cf5e085404fc2a109514848048f319 100644 (file)
@@ -3722,7 +3722,7 @@ static PyObject *_wrap_wxPyLineShape_GetFrom(PyObject *self, PyObject *args, PyO
         _result = (wxPyShape *)wxPyLineShape_GetFrom(_arg0);
 
     wxPy_END_ALLOW_THREADS;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); }
     return _resultobj;
 }
 
@@ -3840,7 +3840,7 @@ static PyObject *_wrap_wxPyLineShape_GetTo(PyObject *self, PyObject *args, PyObj
         _result = (wxPyShape *)wxPyLineShape_GetTo(_arg0);
 
     wxPy_END_ALLOW_THREADS;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxShapeEvtHandler(_result); }
     return _resultobj;
 }
 
index e47480420cc22c2877740a7639c605490cae4289..89d4ee8f069fb06fd63d0c0a0e482b8baf69c91b 100644 (file)
@@ -49,6 +49,7 @@ public:
 
     void _setCallbackInfo(PyObject* self, PyObject* _class);
     %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyEllipseShape)"
+    %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
 
     void base_OnDraw(wxDC& dc);
     void base_OnDrawContents(wxDC& dc);
@@ -92,6 +93,7 @@ public:
 
     void _setCallbackInfo(PyObject* self, PyObject* _class);
     %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyCircleShape)"
+    %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
 
     void base_OnDraw(wxDC& dc);
     void base_OnDrawContents(wxDC& dc);
@@ -164,6 +166,7 @@ public:
 
     void _setCallbackInfo(PyObject* self, PyObject* _class);
     %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyLineShape)"
+    %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
 
     void AddArrow(int type, int end = ARROW_POSITION_END,
                   double arrowSize = 10.0, double xOffset = 0.0,
@@ -269,6 +272,7 @@ public:
 
     void _setCallbackInfo(PyObject* self, PyObject* _class);
     %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyPolygonShape)"
+    %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
 
 
     // void Create(wxList* points);
@@ -340,6 +344,7 @@ public:
 
     void _setCallbackInfo(PyObject* self, PyObject* _class);
     %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyTextShape)"
+    %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
 
 
     void base_OnDelete();
index 2c60be0fc3401ba1202b60a23c7b80ccc89519e0..a3c053c580c4006afb66ed3e4cfe904d801c88bc 100644 (file)
@@ -143,6 +143,7 @@ class wxPyEllipseShape(wxPyEllipseShapePtr):
         self.this = apply(oglshapes2c.new_wxPyEllipseShape,_args,_kwargs)
         self.thisown = 1
         self._setCallbackInfo(self, wxPyEllipseShape)
+        self._setOORInfo(self)
 
 
 
@@ -245,6 +246,7 @@ class wxPyCircleShape(wxPyCircleShapePtr):
         self.this = apply(oglshapes2c.new_wxPyCircleShape,_args,_kwargs)
         self.thisown = 1
         self._setCallbackInfo(self, wxPyCircleShape)
+        self._setOORInfo(self)
 
 
 
@@ -533,6 +535,7 @@ class wxPyLineShape(wxPyLineShapePtr):
         self.this = apply(oglshapes2c.new_wxPyLineShape,_args,_kwargs)
         self.thisown = 1
         self._setCallbackInfo(self, wxPyLineShape)
+        self._setOORInfo(self)
 
 
 
@@ -653,6 +656,7 @@ class wxPyPolygonShape(wxPyPolygonShapePtr):
         self.this = apply(oglshapes2c.new_wxPyPolygonShape,_args,_kwargs)
         self.thisown = 1
         self._setCallbackInfo(self, wxPyPolygonShape)
+        self._setOORInfo(self)
 
 
 
@@ -758,6 +762,7 @@ class wxPyTextShape(wxPyTextShapePtr):
         self.this = apply(oglshapes2c.new_wxPyTextShape,_args,_kwargs)
         self.thisown = 1
         self._setCallbackInfo(self, wxPyTextShape)
+        self._setOORInfo(self)
 
 
 
index c9e5f699171f7273b644213717a669d6e3f94dd1..32b0676cfaf1cac2e2bfc28fbe23e71dd0ceee05 100644 (file)
@@ -60,6 +60,7 @@ class MyEvtHandler(wxShapeEvtHandler):
 
     def OnLeftClick(self, x, y, keys = 0, attachment = 0):
         shape = self.GetShape()
+        print shape.__class__
         canvas = shape.GetCanvas()
         dc = wxClientDC(canvas)
         canvas.PrepareDC(dc)
@@ -122,7 +123,7 @@ class TestWindow(wxShapeCanvas):
 
         self.log = log
         self.frame = frame
-        self.SetBackgroundColour(wxWHITE)
+        self.SetBackgroundColour("LIGHT BLUE") #wxWHITE)
         self.diagram = wxDiagram()
         self.SetDiagram(self.diagram)
         self.diagram.SetCanvas(self)
@@ -165,6 +166,11 @@ class TestWindow(wxShapeCanvas):
             # for some reason, the shapes have to be moved for the line to show up...
             fromShape.Move(dc, fromShape.GetX(), fromShape.GetY())
 
+##         EVT_PAINT(self, self.OnPaint)
+
+##     def OnPaint(self, evt):
+##         evt.Skip()
+##         print "TheLists:", wxThePenList.GetCount(), wxTheBrushList.GetCount(), wxTheFontList.GetCount()
 
 
     def MyAddShape(self, shape, x, y, pen, brush, text):
index 4a9e0fa8d2f91ff3ac0a7367402a3161aa52cc57..43f84a5c105da7793f876d9224c929c949632227 100755 (executable)
@@ -773,8 +773,8 @@ if not GL_ONLY and BUILD_GIZMOS:
 
     ext = Extension('gizmosc', [
                                 '%s/dynamicsash.cpp' % GIZMOLOC,
-                                #'%s/editlbox.cpp' % GIZMOLOC,
-                                #'%s/multicell.cpp' % GIZMOLOC,
+                                '%s/editlbox.cpp' % GIZMOLOC,
+                                '%s/multicell.cpp' % GIZMOLOC,
                                 '%s/splittree.cpp' % GIZMOLOC,
                              ] + swig_sources,
 
index e56b6292161201c4fc23a333072a960194b02b94..41f9c3e94da523030b57f3515a7800ad03733532 100644 (file)
@@ -264,16 +264,19 @@ enum {
     wxPROCESS_ENTER,
     wxPASSWORD,
 
-    wxTE_PROCESS_ENTER,
-    wxTE_PROCESS_TAB,
-    wxTE_PASSWORD,
     wxTE_READONLY,
-    wxTE_RICH,
     wxTE_MULTILINE,
-    wxTE_AUTO_SCROLL,
+    wxTE_PROCESS_TAB,
+    wxTE_RICH,
     wxTE_NO_VSCROLL,
+    wxTE_AUTO_SCROLL,
+    wxTE_PROCESS_ENTER,
+    wxTE_PASSWORD,
     wxTE_AUTO_URL,
     wxTE_NOHIDESEL,
+    wxTE_DONTWRAP,
+    wxTE_LINEWRAP,
+    wxTE_WORDWRAP,
 
     wxCB_SIMPLE,
     wxCB_DROPDOWN,
index e5824e6db89f81245b044a88a9d27d7c361dff25..5b17e9785901c4c00e22ad0d3adb9d9b398cae30 100644 (file)
@@ -622,6 +622,13 @@ public:
 
     // returns false if we have any attributes set, true otherwise
     bool IsDefault();
+
+    // return the attribute having the valid font and colours: it uses the
+    // attributes set in attr and falls back first to attrDefault and then to
+    // the text control font/colours for those attributes which are not set
+    static wxTextAttr Combine(const wxTextAttr& attr,
+                              const wxTextAttr& attrDef,
+                              const wxTextCtrl *text);
 };
 
 
@@ -727,6 +734,13 @@ public:
             self->AppendText(text);
         }
     }
+
+    // TODO: replace this when the method is really added to wxTextCtrl
+    %addmethods {
+        wxString GetString(long from, long to) {
+            return self->GetValue().Mid(from, to-from);
+        }
+    }
 };
 
 //----------------------------------------------------------------------
index f1219c075f8deabd8100ed1c234b8a25be84742f..a1b172ebba5e701f7a3cb830c4ce468cdb6d4814 100644 (file)
@@ -60,7 +60,9 @@ static void wxPyCoreAPI_IMPORT() {
 #define wxPyCBH_delete(a)               (wxPyCoreAPIPtr->p_wxPyCBH_delete(a))
 
 #define wxPyClassExists(a)              (wxPyCoreAPIPtr->p_wxPyClassExists(a))
-#define wxPyMake_wxObject(a)            (wxPyCoreAPIPtr->p_wxPyMake_wxObject(a))
+#define wxPyMake_wxObject(a)            (wxPyCoreAPIPtr->p_wxPyMake_wxObject(a,TRUE))
+#define wxPyMake_wxObject2(a,b)         (wxPyCoreAPIPtr->p_wxPyMake_wxObject(a,b))
+#define wxPyMake_wxSizer(a)             (wxPyCoreAPIPtr->p_wxPyMake_wxSizer(a))
 #define wxPyPtrTypeMap_Add(a, b)        (wxPyCoreAPIPtr->p_wxPyPtrTypeMap_Add(a, b))
 
 
index e7c4ff61901b92ac983ff7a514bf834c7e6422f5..5d0cdaf57e6edf1247cf438ab04a4532665acf36 100644 (file)
@@ -543,6 +543,8 @@ public:
                               bool underline = FALSE, const char* facename = NULL,
                               wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
     void RemoveFont(wxFont *font);
+
+    int GetCount();
 };
 
 
@@ -677,6 +679,8 @@ public:
     void AddPen(wxPen* pen);
     wxPen* FindOrCreatePen(const wxColour& colour, int width, int style);
     void RemovePen(wxPen* pen);
+
+    int GetCount();
 };
 
 
@@ -704,6 +708,8 @@ public:
     void AddBrush(wxBrush *brush);
     wxBrush * FindOrCreateBrush(const wxColour& colour, int style);
     void RemoveBrush(wxBrush *brush);
+
+    int GetCount();
 };
 
 //----------------------------------------------------------------------
index 9c4cb6ecdaacf3ef43843ffe41a52664a51e4601..28f0621eedbacb91ccf8d38f9fd1f4c7edd819a5 100644 (file)
@@ -287,14 +287,16 @@ PyObject* wxPyClassExists(const char* className) {
 }
 
 
-PyObject*  wxPyMake_wxObject(wxObject* source) {
+PyObject*  wxPyMake_wxObject(wxObject* source, bool checkEvtHandler) {
     PyObject* target = NULL;
     bool      isEvtHandler = FALSE;
 
     if (source) {
         // If it's derived from wxEvtHandler then there may
-        // already be a pointer to a Python objec that we can use.
-        if (wxIsKindOf(source, wxEvtHandler)) {
+        // already be a pointer to a Python object that we can use
+        // in the OOR data.
+        if (checkEvtHandler && wxIsKindOf(source, wxEvtHandler)) {
+            isEvtHandler = TRUE;
             wxEvtHandler* eh = (wxEvtHandler*)source;
             wxPyClientData* data = (wxPyClientData*)eh->GetClientObject();
             if (data) {
@@ -302,15 +304,6 @@ PyObject*  wxPyMake_wxObject(wxObject* source) {
                 Py_INCREF(target);
             }
         }
-        else if (wxIsKindOf(source, wxSizer)) {
-            // wxSizers also track the original object
-            wxSizer* sz = (wxSizer*)source;
-            wxPyClientData* data = (wxPyClientData*)sz->GetClientObject();
-            if (data) {
-                target = data->m_obj;
-                Py_INCREF(target);
-            }
-        }
 
         if (! target) {
             // Otherwise make it the old fashioned way by making a
@@ -341,6 +334,30 @@ PyObject*  wxPyMake_wxObject(wxObject* source) {
 }
 
 
+PyObject*  wxPyMake_wxSizer(wxSizer* source) {
+    PyObject* target = NULL;
+
+    if (source && wxIsKindOf(source, wxSizer)) {
+        // If it's derived from wxSizer then there may
+        // already be a pointer to a Python object that we can use
+        // in the OOR data.
+        wxSizer* sz = (wxSizer*)source;
+        wxPyClientData* data = (wxPyClientData*)sz->GetClientObject();
+        if (data) {
+            target = data->m_obj;
+            Py_INCREF(target);
+        }
+    }
+    if (! target) {
+        target = wxPyMake_wxObject(source, FALSE);
+        if (target != Py_None)
+            ((wxSizer*)source)->SetClientObject(new wxPyClientData(target));
+    }
+    return target;
+}
+
+
+
 //---------------------------------------------------------------------------
 
 PyObject* wxPyConstructObject(void* ptr,
index e31bed8bc25b6ebf12050147b490b1d9ad384b37..318d202842d2603b3b229fbecc7e7a505a832bb3 100644 (file)
@@ -65,7 +65,8 @@ PyObject* wxPyConstructObject(void* ptr,
                               PyObject* klass,
                               int setThisOwn=0);
 PyObject*  wxPyClassExists(const char* className);
-PyObject*  wxPyMake_wxObject(wxObject* source);
+PyObject*  wxPyMake_wxObject(wxObject* source, bool checkEvtHandler=TRUE);
+PyObject*  wxPyMake_wxSizer(wxSizer* source);
 void       wxPyPtrTypeMap_Add(const char* commonName, const char* ptrName);
 
 PyObject* wxPy_ConvertList(wxListBase* list, const char* className);
@@ -284,7 +285,8 @@ struct wxPyCoreAPI {
     void        (*p_wxPyCBH_delete)(wxPyCallbackHelper* cbh);
 
     PyObject*   (*p_wxPyClassExists)(const char* className);
-    PyObject*   (*p_wxPyMake_wxObject)(wxObject* source);
+    PyObject*   (*p_wxPyMake_wxObject)(wxObject* source, bool checkEvtHandler);
+    PyObject*   (*p_wxPyMake_wxSizer)(wxSizer* source);
     void        (*p_wxPyPtrTypeMap_Add)(const char* commonName, const char* ptrName);
 
 };
index 586953d24aa903a2101667e74de8d87b6b273f04..e6fec6467d9b86daf06bce82d9cce3bca01a52d1 100644 (file)
@@ -5991,6 +5991,53 @@ static PyObject *_wrap_wxTextAttr_IsDefault(PyObject *self, PyObject *args, PyOb
     return _resultobj;
 }
 
+static PyObject *_wrap_wxTextAttr_Combine(PyObject *self, PyObject *args, PyObject *kwargs) {
+    PyObject * _resultobj;
+    wxTextAttr * _result;
+    wxTextAttr * _arg0;
+    wxTextAttr * _arg1;
+    wxTextCtrl * _arg2;
+    PyObject * _argo0 = 0;
+    PyObject * _argo1 = 0;
+    PyObject * _argo2 = 0;
+    char *_kwnames[] = { "attr","attrDef","text", NULL };
+    char _ptemp[128];
+
+    self = self;
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxTextAttr_Combine",_kwnames,&_argo0,&_argo1,&_argo2)) 
+        return NULL;
+    if (_argo0) {
+        if (_argo0 == Py_None) { _arg0 = NULL; }
+        else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTextAttr_p")) {
+            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextAttr_Combine. Expected _wxTextAttr_p.");
+        return NULL;
+        }
+    }
+    if (_argo1) {
+        if (_argo1 == Py_None) { _arg1 = NULL; }
+        else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTextAttr_p")) {
+            PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTextAttr_Combine. Expected _wxTextAttr_p.");
+        return NULL;
+        }
+    }
+    if (_argo2) {
+        if (_argo2 == Py_None) { _arg2 = NULL; }
+        else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxTextCtrl_p")) {
+            PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxTextAttr_Combine. Expected _wxTextCtrl_p.");
+        return NULL;
+        }
+    }
+{
+    wxPy_BEGIN_ALLOW_THREADS;
+        _result = new wxTextAttr (wxTextAttr::Combine(*_arg0,*_arg1,_arg2));
+
+    wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
+}    SWIG_MakePtr(_ptemp, (void *) _result,"_wxTextAttr_p");
+    _resultobj = Py_BuildValue("s",_ptemp);
+    return _resultobj;
+}
+
 static void *SwigwxTextCtrlTowxControl(void *ptr) {
     wxTextCtrl *src;
     wxControl *dest;
@@ -7630,6 +7677,43 @@ static PyObject *_wrap_wxTextCtrl_write(PyObject *self, PyObject *args, PyObject
     return _resultobj;
 }
 
+static wxString  wxTextCtrl_GetString(wxTextCtrl *self,long  from,long  to) {
+            return self->GetValue().Mid(from, to-from);
+        }
+static PyObject *_wrap_wxTextCtrl_GetString(PyObject *self, PyObject *args, PyObject *kwargs) {
+    PyObject * _resultobj;
+    wxString * _result;
+    wxTextCtrl * _arg0;
+    long  _arg1;
+    long  _arg2;
+    PyObject * _argo0 = 0;
+    char *_kwnames[] = { "self","from","to", NULL };
+
+    self = self;
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oll:wxTextCtrl_GetString",_kwnames,&_argo0,&_arg1,&_arg2)) 
+        return NULL;
+    if (_argo0) {
+        if (_argo0 == Py_None) { _arg0 = NULL; }
+        else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTextCtrl_p")) {
+            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_GetString. Expected _wxTextCtrl_p.");
+        return NULL;
+        }
+    }
+{
+    wxPy_BEGIN_ALLOW_THREADS;
+        _result = new wxString (wxTextCtrl_GetString(_arg0,_arg1,_arg2));
+
+    wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
+}{
+    _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
+}
+{
+    delete _result;
+}
+    return _resultobj;
+}
+
 static void *SwigwxScrollBarTowxControl(void *ptr) {
     wxScrollBar *src;
     wxControl *dest;
@@ -11212,6 +11296,7 @@ static PyMethodDef controlscMethods[] = {
         { "wxScrollBar_Create", (PyCFunction) _wrap_wxScrollBar_Create, METH_VARARGS | METH_KEYWORDS },
         { "new_wxPreScrollBar", (PyCFunction) _wrap_new_wxPreScrollBar, METH_VARARGS | METH_KEYWORDS },
         { "new_wxScrollBar", (PyCFunction) _wrap_new_wxScrollBar, METH_VARARGS | METH_KEYWORDS },
+        { "wxTextCtrl_GetString", (PyCFunction) _wrap_wxTextCtrl_GetString, METH_VARARGS | METH_KEYWORDS },
         { "wxTextCtrl_write", (PyCFunction) _wrap_wxTextCtrl_write, METH_VARARGS | METH_KEYWORDS },
         { "wxTextCtrl_SetEditable", (PyCFunction) _wrap_wxTextCtrl_SetEditable, METH_VARARGS | METH_KEYWORDS },
         { "wxTextCtrl_SelectAll", (PyCFunction) _wrap_wxTextCtrl_SelectAll, METH_VARARGS | METH_KEYWORDS },
@@ -11257,6 +11342,7 @@ static PyMethodDef controlscMethods[] = {
         { "wxTextCtrl_Create", (PyCFunction) _wrap_wxTextCtrl_Create, METH_VARARGS | METH_KEYWORDS },
         { "new_wxPreTextCtrl", (PyCFunction) _wrap_new_wxPreTextCtrl, METH_VARARGS | METH_KEYWORDS },
         { "new_wxTextCtrl", (PyCFunction) _wrap_new_wxTextCtrl, METH_VARARGS | METH_KEYWORDS },
+        { "wxTextAttr_Combine", (PyCFunction) _wrap_wxTextAttr_Combine, METH_VARARGS | METH_KEYWORDS },
         { "wxTextAttr_IsDefault", (PyCFunction) _wrap_wxTextAttr_IsDefault, METH_VARARGS | METH_KEYWORDS },
         { "wxTextAttr_GetFont", (PyCFunction) _wrap_wxTextAttr_GetFont, METH_VARARGS | METH_KEYWORDS },
         { "wxTextAttr_GetBackgroundColour", (PyCFunction) _wrap_wxTextAttr_GetBackgroundColour, METH_VARARGS | METH_KEYWORDS },
index 38059600b44a41120625c0a13a6d4dca98a4170d..7cebb7b1b41acf257020d7865bc085e21042b305 100644 (file)
@@ -738,6 +738,9 @@ class wxTextCtrlPtr(wxControlPtr):
     def write(self, *_args, **_kwargs):
         val = apply(controlsc.wxTextCtrl_write,(self,) + _args, _kwargs)
         return val
+    def GetString(self, *_args, **_kwargs):
+        val = apply(controlsc.wxTextCtrl_GetString,(self,) + _args, _kwargs)
+        return val
     def __repr__(self):
         return "<C wxTextCtrl instance at %s>" % (self.this,)
 class wxTextCtrl(wxTextCtrlPtr):
@@ -1139,6 +1142,11 @@ def wxButton_GetDefaultSize(*_args, **_kwargs):
     if val: val = wxSizePtr(val); val.thisown = 1
     return val
 
+def wxTextAttr_Combine(*_args, **_kwargs):
+    val = apply(controlsc.wxTextAttr_Combine,_args,_kwargs)
+    if val: val = wxTextAttrPtr(val); val.thisown = 1
+    return val
+
 
 
 #-------------- VARIABLE WRAPPERS ------------------
index 5d3e2c9c05fc88bf860fa378abdf64caddb83f5f..c51123fdb1b6b4f6fefc6950583fa68daa902afe 100644 (file)
@@ -1804,7 +1804,7 @@ static PyObject *_wrap_wxDialog_CreateTextSizer(PyObject *self, PyObject *args,
 
     wxPy_END_ALLOW_THREADS;
     if (PyErr_Occurred()) return NULL;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxSizer(_result); }
 {
     if (_obj1)
         delete _arg1;
@@ -1837,7 +1837,7 @@ static PyObject *_wrap_wxDialog_CreateButtonSizer(PyObject *self, PyObject *args
 
     wxPy_END_ALLOW_THREADS;
     if (PyErr_Occurred()) return NULL;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxSizer(_result); }
     return _resultobj;
 }
 
index cda64768c944780b15069a53decf8b1310609573..46a16a1df089198e3952ab54c9cf64cb6710d12b 100644 (file)
@@ -4689,6 +4689,34 @@ static PyObject *_wrap_wxFontList_RemoveFont(PyObject *self, PyObject *args, PyO
     return _resultobj;
 }
 
+#define wxFontList_GetCount(_swigobj)  (_swigobj->GetCount())
+static PyObject *_wrap_wxFontList_GetCount(PyObject *self, PyObject *args, PyObject *kwargs) {
+    PyObject * _resultobj;
+    int  _result;
+    wxFontList * _arg0;
+    PyObject * _argo0 = 0;
+    char *_kwnames[] = { "self", NULL };
+
+    self = self;
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFontList_GetCount",_kwnames,&_argo0)) 
+        return NULL;
+    if (_argo0) {
+        if (_argo0 == Py_None) { _arg0 = NULL; }
+        else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFontList_p")) {
+            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFontList_GetCount. Expected _wxFontList_p.");
+        return NULL;
+        }
+    }
+{
+    wxPy_BEGIN_ALLOW_THREADS;
+        _result = (int )wxFontList_GetCount(_arg0);
+
+    wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
+}    _resultobj = Py_BuildValue("i",_result);
+    return _resultobj;
+}
+
 static void *SwigwxColourTowxObject(void *ptr) {
     wxColour *src;
     wxObject *dest;
@@ -5878,6 +5906,34 @@ static PyObject *_wrap_wxPenList_RemovePen(PyObject *self, PyObject *args, PyObj
     return _resultobj;
 }
 
+#define wxPenList_GetCount(_swigobj)  (_swigobj->GetCount())
+static PyObject *_wrap_wxPenList_GetCount(PyObject *self, PyObject *args, PyObject *kwargs) {
+    PyObject * _resultobj;
+    int  _result;
+    wxPenList * _arg0;
+    PyObject * _argo0 = 0;
+    char *_kwnames[] = { "self", NULL };
+
+    self = self;
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPenList_GetCount",_kwnames,&_argo0)) 
+        return NULL;
+    if (_argo0) {
+        if (_argo0 == Py_None) { _arg0 = NULL; }
+        else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPenList_p")) {
+            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPenList_GetCount. Expected _wxPenList_p.");
+        return NULL;
+        }
+    }
+{
+    wxPy_BEGIN_ALLOW_THREADS;
+        _result = (int )wxPenList_GetCount(_arg0);
+
+    wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
+}    _resultobj = Py_BuildValue("i",_result);
+    return _resultobj;
+}
+
 static void *SwigwxBrushTowxGDIObject(void *ptr) {
     wxBrush *src;
     wxGDIObject *dest;
@@ -6306,6 +6362,34 @@ static PyObject *_wrap_wxBrushList_RemoveBrush(PyObject *self, PyObject *args, P
     return _resultobj;
 }
 
+#define wxBrushList_GetCount(_swigobj)  (_swigobj->GetCount())
+static PyObject *_wrap_wxBrushList_GetCount(PyObject *self, PyObject *args, PyObject *kwargs) {
+    PyObject * _resultobj;
+    int  _result;
+    wxBrushList * _arg0;
+    PyObject * _argo0 = 0;
+    char *_kwnames[] = { "self", NULL };
+
+    self = self;
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxBrushList_GetCount",_kwnames,&_argo0)) 
+        return NULL;
+    if (_argo0) {
+        if (_argo0 == Py_None) { _arg0 = NULL; }
+        else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBrushList_p")) {
+            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBrushList_GetCount. Expected _wxBrushList_p.");
+        return NULL;
+        }
+    }
+{
+    wxPy_BEGIN_ALLOW_THREADS;
+        _result = (int )wxBrushList_GetCount(_arg0);
+
+    wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
+}    _resultobj = Py_BuildValue("i",_result);
+    return _resultobj;
+}
+
 static void *SwigwxDCTowxObject(void *ptr) {
     wxDC *src;
     wxObject *dest;
@@ -12311,6 +12395,7 @@ static PyMethodDef gdicMethods[] = {
         { "wxDC_Blit", (PyCFunction) _wrap_wxDC_Blit, METH_VARARGS | METH_KEYWORDS },
         { "wxDC_BeginDrawing", (PyCFunction) _wrap_wxDC_BeginDrawing, METH_VARARGS | METH_KEYWORDS },
         { "delete_wxDC", (PyCFunction) _wrap_delete_wxDC, METH_VARARGS | METH_KEYWORDS },
+        { "wxBrushList_GetCount", (PyCFunction) _wrap_wxBrushList_GetCount, METH_VARARGS | METH_KEYWORDS },
         { "wxBrushList_RemoveBrush", (PyCFunction) _wrap_wxBrushList_RemoveBrush, METH_VARARGS | METH_KEYWORDS },
         { "wxBrushList_FindOrCreateBrush", (PyCFunction) _wrap_wxBrushList_FindOrCreateBrush, METH_VARARGS | METH_KEYWORDS },
         { "wxBrushList_AddBrush", (PyCFunction) _wrap_wxBrushList_AddBrush, METH_VARARGS | METH_KEYWORDS },
@@ -12323,6 +12408,7 @@ static PyMethodDef gdicMethods[] = {
         { "wxBrush_GetColour", (PyCFunction) _wrap_wxBrush_GetColour, METH_VARARGS | METH_KEYWORDS },
         { "delete_wxBrush", (PyCFunction) _wrap_delete_wxBrush, METH_VARARGS | METH_KEYWORDS },
         { "new_wxBrush", (PyCFunction) _wrap_new_wxBrush, METH_VARARGS | METH_KEYWORDS },
+        { "wxPenList_GetCount", (PyCFunction) _wrap_wxPenList_GetCount, METH_VARARGS | METH_KEYWORDS },
         { "wxPenList_RemovePen", (PyCFunction) _wrap_wxPenList_RemovePen, METH_VARARGS | METH_KEYWORDS },
         { "wxPenList_FindOrCreatePen", (PyCFunction) _wrap_wxPenList_FindOrCreatePen, METH_VARARGS | METH_KEYWORDS },
         { "wxPenList_AddPen", (PyCFunction) _wrap_wxPenList_AddPen, METH_VARARGS | METH_KEYWORDS },
@@ -12356,6 +12442,7 @@ static PyMethodDef gdicMethods[] = {
         { "wxColour_Red", (PyCFunction) _wrap_wxColour_Red, METH_VARARGS | METH_KEYWORDS },
         { "delete_wxColour", (PyCFunction) _wrap_delete_wxColour, METH_VARARGS | METH_KEYWORDS },
         { "new_wxColour", (PyCFunction) _wrap_new_wxColour, METH_VARARGS | METH_KEYWORDS },
+        { "wxFontList_GetCount", (PyCFunction) _wrap_wxFontList_GetCount, METH_VARARGS | METH_KEYWORDS },
         { "wxFontList_RemoveFont", (PyCFunction) _wrap_wxFontList_RemoveFont, METH_VARARGS | METH_KEYWORDS },
         { "wxFontList_FindOrCreateFont", (PyCFunction) _wrap_wxFontList_FindOrCreateFont, METH_VARARGS | METH_KEYWORDS },
         { "wxFontList_AddFont", (PyCFunction) _wrap_wxFontList_AddFont, METH_VARARGS | METH_KEYWORDS },
index d872897b39e884e6571cb77eeb1023e23f64d208..43ade8a86ab893880b5148f556abff9d583aa73d 100644 (file)
@@ -401,6 +401,9 @@ class wxFontListPtr(wxObjectPtr):
     def RemoveFont(self, *_args, **_kwargs):
         val = apply(gdic.wxFontList_RemoveFont,(self,) + _args, _kwargs)
         return val
+    def GetCount(self, *_args, **_kwargs):
+        val = apply(gdic.wxFontList_GetCount,(self,) + _args, _kwargs)
+        return val
     def __repr__(self):
         return "<C wxFontList instance at %s>" % (self.this,)
 class wxFontList(wxFontListPtr):
@@ -566,6 +569,9 @@ class wxPenListPtr(wxObjectPtr):
     def RemovePen(self, *_args, **_kwargs):
         val = apply(gdic.wxPenList_RemovePen,(self,) + _args, _kwargs)
         return val
+    def GetCount(self, *_args, **_kwargs):
+        val = apply(gdic.wxPenList_GetCount,(self,) + _args, _kwargs)
+        return val
     def __repr__(self):
         return "<C wxPenList instance at %s>" % (self.this,)
 class wxPenList(wxPenListPtr):
@@ -629,6 +635,9 @@ class wxBrushListPtr(wxObjectPtr):
     def RemoveBrush(self, *_args, **_kwargs):
         val = apply(gdic.wxBrushList_RemoveBrush,(self,) + _args, _kwargs)
         return val
+    def GetCount(self, *_args, **_kwargs):
+        val = apply(gdic.wxBrushList_GetCount,(self,) + _args, _kwargs)
+        return val
     def __repr__(self):
         return "<C wxBrushList instance at %s>" % (self.this,)
 class wxBrushList(wxBrushListPtr):
index 09e871ec70af23687ecc84bd2dfda437278e01ab..ef86f1d7be4833f0043f3d520fe0c4a9dd4c434d 100644 (file)
@@ -576,7 +576,7 @@ static PyObject *_wrap_wxSizerItem_GetSizer(PyObject *self, PyObject *args, PyOb
 
     wxPy_END_ALLOW_THREADS;
     if (PyErr_Occurred()) return NULL;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxSizer(_result); }
     return _resultobj;
 }
 
index 63dd54c338039e635ffd2bf964947c9b09367537..817c0970c80aa187f6ee5d6ba8b9f67afdfbfda1 100644 (file)
@@ -5065,7 +5065,7 @@ static PyObject *_wrap_wxWindow_GetSizer(PyObject *self, PyObject *args, PyObjec
 
     wxPy_END_ALLOW_THREADS;
     if (PyErr_Occurred()) return NULL;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxSizer(_result); }
     return _resultobj;
 }
 
index 85cdce44322d626fe5c2dc6fb44990f954a5f195..d180d84759914a3210c9a446ccc03a6191d749de 100644 (file)
@@ -672,6 +672,7 @@ static wxPyCoreAPI API = {
 
     wxPyClassExists,
     wxPyMake_wxObject,
+    wxPyMake_wxSizer,
     wxPyPtrTypeMap_Add,
 };
 
@@ -1980,16 +1981,19 @@ SWIGEXPORT(void) initwxc() {
         PyDict_SetItemString(d,"wxLB_HSCROLL", PyInt_FromLong((long) wxLB_HSCROLL));
         PyDict_SetItemString(d,"wxPROCESS_ENTER", PyInt_FromLong((long) wxPROCESS_ENTER));
         PyDict_SetItemString(d,"wxPASSWORD", PyInt_FromLong((long) wxPASSWORD));
-        PyDict_SetItemString(d,"wxTE_PROCESS_ENTER", PyInt_FromLong((long) wxTE_PROCESS_ENTER));
-        PyDict_SetItemString(d,"wxTE_PROCESS_TAB", PyInt_FromLong((long) wxTE_PROCESS_TAB));
-        PyDict_SetItemString(d,"wxTE_PASSWORD", PyInt_FromLong((long) wxTE_PASSWORD));
         PyDict_SetItemString(d,"wxTE_READONLY", PyInt_FromLong((long) wxTE_READONLY));
-        PyDict_SetItemString(d,"wxTE_RICH", PyInt_FromLong((long) wxTE_RICH));
         PyDict_SetItemString(d,"wxTE_MULTILINE", PyInt_FromLong((long) wxTE_MULTILINE));
-        PyDict_SetItemString(d,"wxTE_AUTO_SCROLL", PyInt_FromLong((long) wxTE_AUTO_SCROLL));
+        PyDict_SetItemString(d,"wxTE_PROCESS_TAB", PyInt_FromLong((long) wxTE_PROCESS_TAB));
+        PyDict_SetItemString(d,"wxTE_RICH", PyInt_FromLong((long) wxTE_RICH));
         PyDict_SetItemString(d,"wxTE_NO_VSCROLL", PyInt_FromLong((long) wxTE_NO_VSCROLL));
+        PyDict_SetItemString(d,"wxTE_AUTO_SCROLL", PyInt_FromLong((long) wxTE_AUTO_SCROLL));
+        PyDict_SetItemString(d,"wxTE_PROCESS_ENTER", PyInt_FromLong((long) wxTE_PROCESS_ENTER));
+        PyDict_SetItemString(d,"wxTE_PASSWORD", PyInt_FromLong((long) wxTE_PASSWORD));
         PyDict_SetItemString(d,"wxTE_AUTO_URL", PyInt_FromLong((long) wxTE_AUTO_URL));
         PyDict_SetItemString(d,"wxTE_NOHIDESEL", PyInt_FromLong((long) wxTE_NOHIDESEL));
+        PyDict_SetItemString(d,"wxTE_DONTWRAP", PyInt_FromLong((long) wxTE_DONTWRAP));
+        PyDict_SetItemString(d,"wxTE_LINEWRAP", PyInt_FromLong((long) wxTE_LINEWRAP));
+        PyDict_SetItemString(d,"wxTE_WORDWRAP", PyInt_FromLong((long) wxTE_WORDWRAP));
         PyDict_SetItemString(d,"wxCB_SIMPLE", PyInt_FromLong((long) wxCB_SIMPLE));
         PyDict_SetItemString(d,"wxCB_DROPDOWN", PyInt_FromLong((long) wxCB_DROPDOWN));
         PyDict_SetItemString(d,"wxCB_SORT", PyInt_FromLong((long) wxCB_SORT));
index 1d084f8148481b2e8bc3d1db97d25946c204dc79..120679b4803c193f8f8038e151801365ee4d01b2 100644 (file)
@@ -245,16 +245,19 @@ wxLB_OWNERDRAW = wxc.wxLB_OWNERDRAW
 wxLB_HSCROLL = wxc.wxLB_HSCROLL
 wxPROCESS_ENTER = wxc.wxPROCESS_ENTER
 wxPASSWORD = wxc.wxPASSWORD
-wxTE_PROCESS_ENTER = wxc.wxTE_PROCESS_ENTER
-wxTE_PROCESS_TAB = wxc.wxTE_PROCESS_TAB
-wxTE_PASSWORD = wxc.wxTE_PASSWORD
 wxTE_READONLY = wxc.wxTE_READONLY
-wxTE_RICH = wxc.wxTE_RICH
 wxTE_MULTILINE = wxc.wxTE_MULTILINE
-wxTE_AUTO_SCROLL = wxc.wxTE_AUTO_SCROLL
+wxTE_PROCESS_TAB = wxc.wxTE_PROCESS_TAB
+wxTE_RICH = wxc.wxTE_RICH
 wxTE_NO_VSCROLL = wxc.wxTE_NO_VSCROLL
+wxTE_AUTO_SCROLL = wxc.wxTE_AUTO_SCROLL
+wxTE_PROCESS_ENTER = wxc.wxTE_PROCESS_ENTER
+wxTE_PASSWORD = wxc.wxTE_PASSWORD
 wxTE_AUTO_URL = wxc.wxTE_AUTO_URL
 wxTE_NOHIDESEL = wxc.wxTE_NOHIDESEL
+wxTE_DONTWRAP = wxc.wxTE_DONTWRAP
+wxTE_LINEWRAP = wxc.wxTE_LINEWRAP
+wxTE_WORDWRAP = wxc.wxTE_WORDWRAP
 wxCB_SIMPLE = wxc.wxCB_SIMPLE
 wxCB_DROPDOWN = wxc.wxCB_DROPDOWN
 wxCB_SORT = wxc.wxCB_SORT
index 6be6572f4cfbffa42d5746b48780651d0bbdc8ca..249881280c6f2442da7f361c2d655484e0eb9511 100644 (file)
 %typemap(python, out) wxMouseEvent*             { $target = wxPyMake_wxObject($source); }
 %typemap(python, out) wxObject*                 { $target = wxPyMake_wxObject($source); }
 %typemap(python, out) wxPyPrintout*             { $target = wxPyMake_wxObject($source); }
-%typemap(python, out) wxSizer*                  { $target = wxPyMake_wxObject($source); }
 %typemap(python, out) wxToolBarToolBase*        { $target = wxPyMake_wxObject($source); }
 %typemap(python, out) wxToolTip*                { $target = wxPyMake_wxObject($source); }
 
 %typemap(python, out) wxToolBarBase*            { $target = wxPyMake_wxObject($source); }
 %typemap(python, out) wxWindow*                 { $target = wxPyMake_wxObject($source); }
 
+%typemap(python, out) wxSizer*                  { $target = wxPyMake_wxSizer($source); }
+
 
 //%typemap(python, out) wxHtmlCell*               { $target = wxPyMake_wxObject($source); }
 //%typemap(python, out) wxHtmlContainerCell*      { $target = wxPyMake_wxObject($source); }
index 1228022e2cd472856ec7dcdd852eaf57126c7f87..4fdfa903e93dff567b5ee108ba4db2bac59b10b6 100644 (file)
@@ -190,6 +190,7 @@ static wxPyCoreAPI API = {
 
     wxPyClassExists,
     wxPyMake_wxObject,
+    wxPyMake_wxSizer,
     wxPyPtrTypeMap_Add,
 };