]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/contrib/ogl/msw/ogl_wrap.cpp
reSWIGged for new runtime, etc.
[wxWidgets.git] / wxPython / contrib / ogl / msw / ogl_wrap.cpp
index 5457033f2c453a15b7836bafc1f2ef7bbe5dfa57..d3fa2c8cba1d6ddc2636d12cbf90bd83643d8aed 100644 (file)
@@ -1,6 +1,6 @@
 /* ----------------------------------------------------------------------------
  * This file was automatically generated by SWIG (http://www.swig.org).
- * Version 1.3.20
+ * Version 1.3.22
  * 
  * This file is not intended to be easily readable and contains a number of 
  * coding conventions designed to improve portability and efficiency. Do not make
@@ -137,6 +137,178 @@ SWIGIMPORT(char *)           SWIG_UnpackData(char *, void *, int);
 
 #include "Python.h"
 
+#include <limits.h>
+#include <float.h>
+
+#ifdef __cplusplus
+#define SWIG_STATIC_INLINE static inline 
+#else
+#define SWIG_STATIC_INLINE static 
+#endif 
+
+SWIG_STATIC_INLINE long
+SPyObj_AsLong(PyObject * obj)
+{
+  return PyInt_Check(obj) ?  PyInt_AsLong(obj) : PyLong_AsLong(obj);
+}
+
+SWIG_STATIC_INLINE unsigned long
+SPyObj_AsUnsignedLong(PyObject * obj) 
+{
+  if (PyLong_Check(obj)) {
+    return PyLong_AsUnsignedLong(obj);
+  } else {
+    long i = PyInt_AsLong(obj);
+    if ( !PyErr_Occurred() && (i < 0)) {
+      PyErr_SetString(PyExc_TypeError, "negative value for unsigned type");
+    }
+    return i;
+  }
+}
+
+#if !defined(_MSC_VER)
+SWIG_STATIC_INLINE PyObject* 
+SPyObj_FromLongLong(long long value)
+{
+  return (value > (long)(LONG_MAX)) ?
+    PyLong_FromLongLong(value) : PyInt_FromLong((long)value); 
+}
+#endif
+
+SWIG_STATIC_INLINE PyObject* 
+SPyObj_FromUnsignedLong(unsigned long value)
+{
+  return (value > (unsigned long)(LONG_MAX)) ?
+    PyLong_FromUnsignedLong(value) : PyInt_FromLong((long)value); 
+}
+
+#if !defined(_MSC_VER)
+SWIG_STATIC_INLINE PyObject* 
+SPyObj_FromUnsignedLongLong(unsigned long long value)
+{
+  return (value > (unsigned long long)(LONG_MAX)) ?
+    PyLong_FromUnsignedLongLong(value) : PyInt_FromLong((long)value); 
+}
+#endif
+
+SWIG_STATIC_INLINE long
+SPyObj_AsLongInRange(PyObject * obj, long min_value, long max_value)
+{
+  long value = SPyObj_AsLong(obj);
+  if (!PyErr_Occurred()) {
+    if (value < min_value) {
+      PyErr_SetString(PyExc_OverflowError,"value is smaller than type minimum");
+    } else if (value > max_value) {
+      PyErr_SetString(PyExc_OverflowError,"value is greater than type maximum");
+    }
+  }
+  return value;
+}
+
+SWIG_STATIC_INLINE unsigned long
+SPyObj_AsUnsignedLongInRange(PyObject *obj, unsigned long max_value) 
+{
+  unsigned long value = SPyObj_AsUnsignedLong(obj);
+  if (!PyErr_Occurred()) {
+    if (value > max_value) {     
+      PyErr_SetString(PyExc_OverflowError,"value is greater than type maximum");
+    }
+  }
+  return value;
+}
+
+SWIG_STATIC_INLINE signed char
+SPyObj_AsSignedChar(PyObject *obj) { 
+  return (signed char)SPyObj_AsLongInRange(obj, SCHAR_MIN, SCHAR_MAX);
+}
+
+SWIG_STATIC_INLINE short
+SPyObj_AsShort(PyObject *obj) { 
+  return (short)SPyObj_AsLongInRange(obj, SHRT_MIN, SHRT_MAX);
+}
+
+SWIG_STATIC_INLINE int
+SPyObj_AsInt(PyObject *obj) { 
+  return SPyObj_AsLongInRange(obj, INT_MIN, INT_MAX);
+}
+
+SWIG_STATIC_INLINE unsigned char
+SPyObj_AsUnsignedChar(PyObject *obj) { 
+  return (unsigned char)SPyObj_AsUnsignedLongInRange(obj, UCHAR_MAX);
+}
+
+SWIG_STATIC_INLINE unsigned short 
+SPyObj_AsUnsignedShort(PyObject *obj) { 
+  return (unsigned short)SPyObj_AsUnsignedLongInRange(obj, USHRT_MAX);
+}
+
+SWIG_STATIC_INLINE unsigned int
+SPyObj_AsUnsignedInt(PyObject *obj) { 
+  return SPyObj_AsUnsignedLongInRange(obj, UINT_MAX);
+}
+
+#if !defined(_MSC_VER)
+SWIG_STATIC_INLINE long long
+SPyObj_AsLongLong(PyObject *obj) {
+  return PyInt_Check(obj) ?
+    PyInt_AsLong(obj) : PyLong_AsLongLong(obj);
+}
+
+SWIG_STATIC_INLINE unsigned long long
+SPyObj_AsUnsignedLongLong(PyObject *obj) {
+  return PyLong_Check(obj) ?
+    PyLong_AsUnsignedLongLong(obj) : SPyObj_AsUnsignedLong(obj);
+}
+#endif
+
+SWIG_STATIC_INLINE double
+SPyObj_AsDouble(PyObject *obj) {
+  return (PyFloat_Check(obj)) ? PyFloat_AsDouble(obj) :
+    (double)((PyInt_Check(obj)) ? PyInt_AsLong(obj) : PyLong_AsLongLong(obj));
+}
+
+SWIG_STATIC_INLINE float
+SPyObj_AsFloat(PyObject *obj) {
+  double value = SPyObj_AsDouble(obj);
+  if (!PyErr_Occurred()) {
+    if (value < FLT_MIN) {
+      PyErr_SetString(PyExc_OverflowError,"float is smaller than flt_min");
+    } else if (value > FLT_MAX) {     
+      PyErr_SetString(PyExc_OverflowError,"float is greater than flt_max");
+    }
+  }
+  return (float) value;
+}
+
+SWIG_STATIC_INLINE char
+SPyObj_AsChar(PyObject *obj) { 
+  char c = (PyString_Check(obj) && PyString_Size(obj) == 1) ?
+    PyString_AsString(obj)[0] 
+    : (char) SPyObj_AsLongInRange(obj, CHAR_MIN, CHAR_MAX);
+  if (PyErr_Occurred()) {
+    PyErr_Clear();
+    PyErr_SetString(PyExc_TypeError, "a char is required");
+  }
+  return c;
+}
+
+SWIG_STATIC_INLINE PyObject *
+SPyObj_FromChar(char c) { 
+  return PyString_FromStringAndSize(&c,1);
+}
+
+SWIG_STATIC_INLINE PyObject *
+SPyObj_FromCharPtr(const char* cptr) { 
+  return cptr ? PyString_FromString(cptr) : Py_BuildValue((char*)"");
+}
+SWIG_STATIC_INLINE int
+SPyObj_AsBool(PyObject *obj) {
+    return SPyObj_AsLong/*Long*/(obj) ?  1 : 0;
+}
+
+
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -172,7 +344,7 @@ typedef struct swig_const_info {
   SWIG_Python_NewPointerObj(p, type, flags)
 #define SWIG_MustGetPtr(p, type, argnum, flags) \
   SWIG_Python_MustGetPtr(p, type, argnum, flags)
-
 /* Python-specific SWIG API */
 #define SWIG_newvarlink() \
   SWIG_Python_newvarlink()
@@ -2018,8 +2190,10 @@ static PyObject *_wrap_PyShapeEvtHandler_base_OnDrawBranches(PyObject *self, PyO
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -2289,8 +2463,10 @@ static PyObject *_wrap_PyShapeEvtHandler_base_OnMovePre(PyObject *self, PyObject
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj6) {
-        arg7 = PyInt_AsLong(obj6) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg7 = (bool) SPyObj_AsBool(obj6);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -2329,8 +2505,10 @@ static PyObject *_wrap_PyShapeEvtHandler_base_OnMovePost(PyObject *self, PyObjec
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj6) {
-        arg7 = PyInt_AsLong(obj6) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg7 = (bool) SPyObj_AsBool(obj6);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -2362,8 +2540,10 @@ static PyObject *_wrap_PyShapeEvtHandler_base_OnDragLeft(PyObject *self, PyObjec
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyShapeEvtHandler_base_OnDragLeft",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShapeEvtHandler,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->base_OnDragLeft(arg2,arg3,arg4,arg5,arg6);
@@ -2450,8 +2630,10 @@ static PyObject *_wrap_PyShapeEvtHandler_base_OnDragRight(PyObject *self, PyObje
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyShapeEvtHandler_base_OnDragRight",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShapeEvtHandler,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->base_OnDragRight(arg2,arg3,arg4,arg5,arg6);
@@ -2635,8 +2817,10 @@ static PyObject *_wrap_PyShapeEvtHandler_base_OnMoveLink(PyObject *self, PyObjec
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -2671,8 +2855,10 @@ static PyObject *_wrap_PyShapeEvtHandler_base_OnSizingDragLeft(PyObject *self, P
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOdd|ii:PyShapeEvtHandler_base_OnSizingDragLeft",kwnames,&obj0,&obj1,&obj2,&arg4,&arg5,&arg6,&arg7)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShapeEvtHandler,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
     if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxPyControlPoint,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg3 = PyInt_AsLong(obj2) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg3 = (bool) SPyObj_AsBool(obj2);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->base_OnSizingDragLeft(arg2,arg3,arg4,arg5,arg6,arg7);
@@ -3368,8 +3554,10 @@ static PyObject *_wrap_PyShape_SetDrawHandles(PyObject *self, PyObject *args, Py
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PyShape_SetDrawHandles",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->SetDrawHandles(arg2);
@@ -3652,8 +3840,10 @@ static PyObject *_wrap_PyShape_Select(PyObject *self, PyObject *args, PyObject *
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:PyShape_Select",kwnames,&obj0,&obj1,&obj2)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
     if (obj1) {
-        arg2 = PyInt_AsLong(obj1) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg2 = (bool) SPyObj_AsBool(obj1);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     if (obj2) {
         if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_wxDC,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
@@ -3687,12 +3877,16 @@ static PyObject *_wrap_PyShape_SetHighlight(PyObject *self, PyObject *args, PyOb
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:PyShape_SetHighlight",kwnames,&obj0,&obj1,&obj2)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
     if (obj1) {
-        arg2 = PyInt_AsLong(obj1) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg2 = (bool) SPyObj_AsBool(obj1);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -3797,8 +3991,10 @@ static PyObject *_wrap_PyShape_SetSensitivityFilter(PyObject *self, PyObject *ar
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|iO:PyShape_SetSensitivityFilter",kwnames,&obj0,&arg2,&obj2)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
     if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -3853,12 +4049,16 @@ static PyObject *_wrap_PyShape_SetDraggable(PyObject *self, PyObject *args, PyOb
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:PyShape_SetDraggable",kwnames,&obj0,&obj1,&obj2)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
-    if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
         if (PyErr_Occurred()) SWIG_fail;
     }
+    if (obj2) {
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->SetDraggable(arg2,arg3);
@@ -3887,10 +4087,14 @@ static PyObject *_wrap_PyShape_SetFixedSize(PyObject *self, PyObject *args, PyOb
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:PyShape_SetFixedSize",kwnames,&obj0,&obj1,&obj2)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
-    arg3 = PyInt_AsLong(obj2) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
+    {
+        arg3 = (bool) SPyObj_AsBool(obj2);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->SetFixedSize(arg2,arg3);
@@ -4005,8 +4209,10 @@ static PyObject *_wrap_PyShape_SetSpaceAttachments(PyObject *self, PyObject *arg
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PyShape_SetSpaceAttachments",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->SetSpaceAttachments(arg2);
@@ -4060,8 +4266,10 @@ static PyObject *_wrap_PyShape_SetShadowMode(PyObject *self, PyObject *args, PyO
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oi|O:PyShape_SetShadowMode",kwnames,&obj0,&arg2,&obj2)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
     if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -4155,8 +4363,10 @@ static PyObject *_wrap_PyShape_SetCentreResize(PyObject *self, PyObject *args, P
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PyShape_SetCentreResize",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->SetCentreResize(arg2);
@@ -4208,8 +4418,10 @@ static PyObject *_wrap_PyShape_SetMaintainAspectRatio(PyObject *self, PyObject *
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PyShape_SetMaintainAspectRatio",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->SetMaintainAspectRatio(arg2);
@@ -4286,8 +4498,10 @@ static PyObject *_wrap_PyShape_SetDisableLabel(PyObject *self, PyObject *args, P
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PyShape_SetDisableLabel",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->SetDisableLabel(arg2);
@@ -4525,8 +4739,10 @@ static PyObject *_wrap_PyShape_Show(PyObject *self, PyObject *args, PyObject *kw
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PyShape_Show",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->Show(arg2);
@@ -4587,8 +4803,10 @@ static PyObject *_wrap_PyShape_Move(PyObject *self, PyObject *args, PyObject *kw
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj4) {
-        arg5 = PyInt_AsLong(obj4) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg5 = (bool) SPyObj_AsBool(obj4);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -4793,8 +5011,10 @@ static PyObject *_wrap_PyShape_SetSize(PyObject *self, PyObject *args, PyObject
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Odd|O:PyShape_SetSize",kwnames,&obj0,&arg2,&arg3,&obj3)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
     if (obj3) {
-        arg4 = PyInt_AsLong(obj3) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg4 = (bool) SPyObj_AsBool(obj3);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -6027,8 +6247,10 @@ static PyObject *_wrap_PyShape_EraseLinks(PyObject *self, PyObject *args, PyObje
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj3) {
-        arg4 = PyInt_AsLong(obj3) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg4 = (bool) SPyObj_AsBool(obj3);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -6064,8 +6286,10 @@ static PyObject *_wrap_PyShape_DrawLinks(PyObject *self, PyObject *args, PyObjec
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj3) {
-        arg4 = PyInt_AsLong(obj3) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg4 = (bool) SPyObj_AsBool(obj3);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -6616,12 +6840,16 @@ static PyObject *_wrap_PyShape_CreateNewCopy(PyObject *self, PyObject *args, PyO
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:PyShape_CreateNewCopy",kwnames,&obj0,&obj1,&obj2)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
     if (obj1) {
-        arg2 = PyInt_AsLong(obj1) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg2 = (bool) SPyObj_AsBool(obj1);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -7021,8 +7249,10 @@ static PyObject *_wrap_PyShape_base_OnDrawBranches(PyObject *self, PyObject *arg
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -7292,8 +7522,10 @@ static PyObject *_wrap_PyShape_base_OnMovePre(PyObject *self, PyObject *args, Py
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj6) {
-        arg7 = PyInt_AsLong(obj6) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg7 = (bool) SPyObj_AsBool(obj6);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -7332,8 +7564,10 @@ static PyObject *_wrap_PyShape_base_OnMovePost(PyObject *self, PyObject *args, P
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj6) {
-        arg7 = PyInt_AsLong(obj6) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg7 = (bool) SPyObj_AsBool(obj6);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -7365,8 +7599,10 @@ static PyObject *_wrap_PyShape_base_OnDragLeft(PyObject *self, PyObject *args, P
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyShape_base_OnDragLeft",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->base_OnDragLeft(arg2,arg3,arg4,arg5,arg6);
@@ -7453,8 +7689,10 @@ static PyObject *_wrap_PyShape_base_OnDragRight(PyObject *self, PyObject *args,
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyShape_base_OnDragRight",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->base_OnDragRight(arg2,arg3,arg4,arg5,arg6);
@@ -7638,8 +7876,10 @@ static PyObject *_wrap_PyShape_base_OnMoveLink(PyObject *self, PyObject *args, P
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -7674,8 +7914,10 @@ static PyObject *_wrap_PyShape_base_OnSizingDragLeft(PyObject *self, PyObject *a
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOdd|ii:PyShape_base_OnSizingDragLeft",kwnames,&obj0,&obj1,&obj2,&arg4,&arg5,&arg6,&arg7)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
     if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxPyControlPoint,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg3 = PyInt_AsLong(obj2) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg3 = (bool) SPyObj_AsBool(obj2);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->base_OnSizingDragLeft(arg2,arg3,arg4,arg5,arg6,arg7);
@@ -8172,8 +8414,10 @@ static PyObject *_wrap_PseudoMetaFile_SetRotateable(PyObject *self, PyObject *ar
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PseudoMetaFile_SetRotateable",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPseudoMetaFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->SetRotateable(arg2);
@@ -8911,8 +9155,10 @@ static PyObject *_wrap_PseudoMetaFile_SetPen(PyObject *self, PyObject *args, PyO
         arg2 = NULL;
     }
     if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -8959,8 +9205,10 @@ static PyObject *_wrap_PseudoMetaFile_SetBrush(PyObject *self, PyObject *args, P
         arg2 = NULL;
     }
     if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -9325,8 +9573,10 @@ static PyObject *_wrap_PyRectangleShape_base_OnDrawBranches(PyObject *self, PyOb
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -9596,8 +9846,10 @@ static PyObject *_wrap_PyRectangleShape_base_OnMovePre(PyObject *self, PyObject
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj6) {
-        arg7 = PyInt_AsLong(obj6) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg7 = (bool) SPyObj_AsBool(obj6);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -9636,8 +9888,10 @@ static PyObject *_wrap_PyRectangleShape_base_OnMovePost(PyObject *self, PyObject
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj6) {
-        arg7 = PyInt_AsLong(obj6) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg7 = (bool) SPyObj_AsBool(obj6);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -9669,8 +9923,10 @@ static PyObject *_wrap_PyRectangleShape_base_OnDragLeft(PyObject *self, PyObject
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyRectangleShape_base_OnDragLeft",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyRectangleShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->base_OnDragLeft(arg2,arg3,arg4,arg5,arg6);
@@ -9757,8 +10013,10 @@ static PyObject *_wrap_PyRectangleShape_base_OnDragRight(PyObject *self, PyObjec
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyRectangleShape_base_OnDragRight",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyRectangleShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->base_OnDragRight(arg2,arg3,arg4,arg5,arg6);
@@ -9942,8 +10200,10 @@ static PyObject *_wrap_PyRectangleShape_base_OnMoveLink(PyObject *self, PyObject
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -9978,8 +10238,10 @@ static PyObject *_wrap_PyRectangleShape_base_OnSizingDragLeft(PyObject *self, Py
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOdd|ii:PyRectangleShape_base_OnSizingDragLeft",kwnames,&obj0,&obj1,&obj2,&arg4,&arg5,&arg6,&arg7)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyRectangleShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
     if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxPyControlPoint,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg3 = PyInt_AsLong(obj2) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg3 = (bool) SPyObj_AsBool(obj2);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->base_OnSizingDragLeft(arg2,arg3,arg4,arg5,arg6,arg7);
@@ -10309,8 +10571,10 @@ static PyObject *_wrap_PyControlPoint_base_OnDrawBranches(PyObject *self, PyObje
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -10580,8 +10844,10 @@ static PyObject *_wrap_PyControlPoint_base_OnMovePre(PyObject *self, PyObject *a
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj6) {
-        arg7 = PyInt_AsLong(obj6) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg7 = (bool) SPyObj_AsBool(obj6);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -10620,8 +10886,10 @@ static PyObject *_wrap_PyControlPoint_base_OnMovePost(PyObject *self, PyObject *
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj6) {
-        arg7 = PyInt_AsLong(obj6) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg7 = (bool) SPyObj_AsBool(obj6);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -10653,8 +10921,10 @@ static PyObject *_wrap_PyControlPoint_base_OnDragLeft(PyObject *self, PyObject *
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyControlPoint_base_OnDragLeft",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyControlPoint,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->base_OnDragLeft(arg2,arg3,arg4,arg5,arg6);
@@ -10741,8 +11011,10 @@ static PyObject *_wrap_PyControlPoint_base_OnDragRight(PyObject *self, PyObject
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyControlPoint_base_OnDragRight",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyControlPoint,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->base_OnDragRight(arg2,arg3,arg4,arg5,arg6);
@@ -10926,8 +11198,10 @@ static PyObject *_wrap_PyControlPoint_base_OnMoveLink(PyObject *self, PyObject *
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -10962,8 +11236,10 @@ static PyObject *_wrap_PyControlPoint_base_OnSizingDragLeft(PyObject *self, PyOb
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOdd|ii:PyControlPoint_base_OnSizingDragLeft",kwnames,&obj0,&obj1,&obj2,&arg4,&arg5,&arg6,&arg7)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyControlPoint,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
     if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxPyControlPoint,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg3 = PyInt_AsLong(obj2) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg3 = (bool) SPyObj_AsBool(obj2);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->base_OnSizingDragLeft(arg2,arg3,arg4,arg5,arg6,arg7);
@@ -11383,8 +11659,10 @@ static PyObject *_wrap_PyBitmapShape_base_OnDrawBranches(PyObject *self, PyObjec
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -11654,8 +11932,10 @@ static PyObject *_wrap_PyBitmapShape_base_OnMovePre(PyObject *self, PyObject *ar
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj6) {
-        arg7 = PyInt_AsLong(obj6) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg7 = (bool) SPyObj_AsBool(obj6);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -11694,8 +11974,10 @@ static PyObject *_wrap_PyBitmapShape_base_OnMovePost(PyObject *self, PyObject *a
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj6) {
-        arg7 = PyInt_AsLong(obj6) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg7 = (bool) SPyObj_AsBool(obj6);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -11727,8 +12009,10 @@ static PyObject *_wrap_PyBitmapShape_base_OnDragLeft(PyObject *self, PyObject *a
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyBitmapShape_base_OnDragLeft",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyBitmapShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->base_OnDragLeft(arg2,arg3,arg4,arg5,arg6);
@@ -11815,8 +12099,10 @@ static PyObject *_wrap_PyBitmapShape_base_OnDragRight(PyObject *self, PyObject *
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyBitmapShape_base_OnDragRight",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyBitmapShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->base_OnDragRight(arg2,arg3,arg4,arg5,arg6);
@@ -12000,8 +12286,10 @@ static PyObject *_wrap_PyBitmapShape_base_OnMoveLink(PyObject *self, PyObject *a
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -12036,8 +12324,10 @@ static PyObject *_wrap_PyBitmapShape_base_OnSizingDragLeft(PyObject *self, PyObj
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOdd|ii:PyBitmapShape_base_OnSizingDragLeft",kwnames,&obj0,&obj1,&obj2,&arg4,&arg5,&arg6,&arg7)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyBitmapShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
     if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxPyControlPoint,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg3 = PyInt_AsLong(obj2) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg3 = (bool) SPyObj_AsBool(obj2);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->base_OnSizingDragLeft(arg2,arg3,arg4,arg5,arg6,arg7);
@@ -12904,8 +13194,10 @@ static PyObject *_wrap_PyDrawnShape_SetDrawnBrush(PyObject *self, PyObject *args
         arg2 = NULL;
     }
     if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -13002,8 +13294,10 @@ static PyObject *_wrap_PyDrawnShape_SetDrawnPen(PyObject *self, PyObject *args,
         arg2 = NULL;
     }
     if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -13088,8 +13382,10 @@ static PyObject *_wrap_PyDrawnShape_SetSaveToFile(PyObject *self, PyObject *args
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PyDrawnShape_SetSaveToFile",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyDrawnShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->SetSaveToFile(arg2);
@@ -13233,8 +13529,10 @@ static PyObject *_wrap_PyDrawnShape_base_OnDrawBranches(PyObject *self, PyObject
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -13504,8 +13802,10 @@ static PyObject *_wrap_PyDrawnShape_base_OnMovePre(PyObject *self, PyObject *arg
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj6) {
-        arg7 = PyInt_AsLong(obj6) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg7 = (bool) SPyObj_AsBool(obj6);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -13544,8 +13844,10 @@ static PyObject *_wrap_PyDrawnShape_base_OnMovePost(PyObject *self, PyObject *ar
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj6) {
-        arg7 = PyInt_AsLong(obj6) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg7 = (bool) SPyObj_AsBool(obj6);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -13577,8 +13879,10 @@ static PyObject *_wrap_PyDrawnShape_base_OnDragLeft(PyObject *self, PyObject *ar
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyDrawnShape_base_OnDragLeft",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyDrawnShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->base_OnDragLeft(arg2,arg3,arg4,arg5,arg6);
@@ -13665,8 +13969,10 @@ static PyObject *_wrap_PyDrawnShape_base_OnDragRight(PyObject *self, PyObject *a
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyDrawnShape_base_OnDragRight",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyDrawnShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->base_OnDragRight(arg2,arg3,arg4,arg5,arg6);
@@ -13850,8 +14156,10 @@ static PyObject *_wrap_PyDrawnShape_base_OnMoveLink(PyObject *self, PyObject *ar
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -13886,8 +14194,10 @@ static PyObject *_wrap_PyDrawnShape_base_OnSizingDragLeft(PyObject *self, PyObje
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOdd|ii:PyDrawnShape_base_OnSizingDragLeft",kwnames,&obj0,&obj1,&obj2,&arg4,&arg5,&arg6,&arg7)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyDrawnShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
     if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxPyControlPoint,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg3 = PyInt_AsLong(obj2) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg3 = (bool) SPyObj_AsBool(obj2);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->base_OnSizingDragLeft(arg2,arg3,arg4,arg5,arg6,arg7);
@@ -14683,8 +14993,10 @@ static PyObject *_wrap_PyCompositeShape_base_OnDrawBranches(PyObject *self, PyOb
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -14954,8 +15266,10 @@ static PyObject *_wrap_PyCompositeShape_base_OnMovePre(PyObject *self, PyObject
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj6) {
-        arg7 = PyInt_AsLong(obj6) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg7 = (bool) SPyObj_AsBool(obj6);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -14994,8 +15308,10 @@ static PyObject *_wrap_PyCompositeShape_base_OnMovePost(PyObject *self, PyObject
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj6) {
-        arg7 = PyInt_AsLong(obj6) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg7 = (bool) SPyObj_AsBool(obj6);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -15027,8 +15343,10 @@ static PyObject *_wrap_PyCompositeShape_base_OnDragLeft(PyObject *self, PyObject
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyCompositeShape_base_OnDragLeft",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyCompositeShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->base_OnDragLeft(arg2,arg3,arg4,arg5,arg6);
@@ -15115,8 +15433,10 @@ static PyObject *_wrap_PyCompositeShape_base_OnDragRight(PyObject *self, PyObjec
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyCompositeShape_base_OnDragRight",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyCompositeShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->base_OnDragRight(arg2,arg3,arg4,arg5,arg6);
@@ -15300,8 +15620,10 @@ static PyObject *_wrap_PyCompositeShape_base_OnMoveLink(PyObject *self, PyObject
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -15336,8 +15658,10 @@ static PyObject *_wrap_PyCompositeShape_base_OnSizingDragLeft(PyObject *self, Py
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOdd|ii:PyCompositeShape_base_OnSizingDragLeft",kwnames,&obj0,&obj1,&obj2,&arg4,&arg5,&arg6,&arg7)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyCompositeShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
     if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxPyControlPoint,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg3 = PyInt_AsLong(obj2) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg3 = (bool) SPyObj_AsBool(obj2);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->base_OnSizingDragLeft(arg2,arg3,arg4,arg5,arg6,arg7);
@@ -15678,8 +16002,10 @@ static PyObject *_wrap_PyDividedShape_base_OnDrawBranches(PyObject *self, PyObje
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -15949,8 +16275,10 @@ static PyObject *_wrap_PyDividedShape_base_OnMovePre(PyObject *self, PyObject *a
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj6) {
-        arg7 = PyInt_AsLong(obj6) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg7 = (bool) SPyObj_AsBool(obj6);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -15989,8 +16317,10 @@ static PyObject *_wrap_PyDividedShape_base_OnMovePost(PyObject *self, PyObject *
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj6) {
-        arg7 = PyInt_AsLong(obj6) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg7 = (bool) SPyObj_AsBool(obj6);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -16022,8 +16352,10 @@ static PyObject *_wrap_PyDividedShape_base_OnDragLeft(PyObject *self, PyObject *
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyDividedShape_base_OnDragLeft",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyDividedShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->base_OnDragLeft(arg2,arg3,arg4,arg5,arg6);
@@ -16110,8 +16442,10 @@ static PyObject *_wrap_PyDividedShape_base_OnDragRight(PyObject *self, PyObject
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyDividedShape_base_OnDragRight",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyDividedShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->base_OnDragRight(arg2,arg3,arg4,arg5,arg6);
@@ -16295,8 +16629,10 @@ static PyObject *_wrap_PyDividedShape_base_OnMoveLink(PyObject *self, PyObject *
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -16331,8 +16667,10 @@ static PyObject *_wrap_PyDividedShape_base_OnSizingDragLeft(PyObject *self, PyOb
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOdd|ii:PyDividedShape_base_OnSizingDragLeft",kwnames,&obj0,&obj1,&obj2,&arg4,&arg5,&arg6,&arg7)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyDividedShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
     if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxPyControlPoint,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg3 = PyInt_AsLong(obj2) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg3 = (bool) SPyObj_AsBool(obj2);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->base_OnSizingDragLeft(arg2,arg3,arg4,arg5,arg6,arg7);
@@ -16535,8 +16873,10 @@ static PyObject *_wrap_PyDivisionShape_AdjustBottom(PyObject *self, PyObject *ar
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OdO:PyDivisionShape_AdjustBottom",kwnames,&obj0,&arg2,&obj2)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyDivisionShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg3 = PyInt_AsLong(obj2) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg3 = (bool) SPyObj_AsBool(obj2);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->AdjustBottom(arg2,arg3);
@@ -16564,8 +16904,10 @@ static PyObject *_wrap_PyDivisionShape_AdjustLeft(PyObject *self, PyObject *args
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OdO:PyDivisionShape_AdjustLeft",kwnames,&obj0,&arg2,&obj2)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyDivisionShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg3 = PyInt_AsLong(obj2) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg3 = (bool) SPyObj_AsBool(obj2);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->AdjustLeft(arg2,arg3);
@@ -16593,8 +16935,10 @@ static PyObject *_wrap_PyDivisionShape_AdjustRight(PyObject *self, PyObject *arg
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OdO:PyDivisionShape_AdjustRight",kwnames,&obj0,&arg2,&obj2)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyDivisionShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg3 = PyInt_AsLong(obj2) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg3 = (bool) SPyObj_AsBool(obj2);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->AdjustRight(arg2,arg3);
@@ -16622,8 +16966,10 @@ static PyObject *_wrap_PyDivisionShape_AdjustTop(PyObject *self, PyObject *args,
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OdO:PyDivisionShape_AdjustTop",kwnames,&obj0,&arg2,&obj2)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyDivisionShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg3 = PyInt_AsLong(obj2) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg3 = (bool) SPyObj_AsBool(obj2);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->AdjustTop(arg2,arg3);
@@ -16916,8 +17262,10 @@ static PyObject *_wrap_PyDivisionShape_ResizeAdjoining(PyObject *self, PyObject
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OidO:PyDivisionShape_ResizeAdjoining",kwnames,&obj0,&arg2,&arg3,&obj3)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyDivisionShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg4 = PyInt_AsLong(obj3) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg4 = (bool) SPyObj_AsBool(obj3);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->ResizeAdjoining(arg2,arg3,arg4);
@@ -17362,8 +17710,10 @@ static PyObject *_wrap_PyDivisionShape_base_OnDrawBranches(PyObject *self, PyObj
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -17633,8 +17983,10 @@ static PyObject *_wrap_PyDivisionShape_base_OnMovePre(PyObject *self, PyObject *
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj6) {
-        arg7 = PyInt_AsLong(obj6) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg7 = (bool) SPyObj_AsBool(obj6);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -17673,8 +18025,10 @@ static PyObject *_wrap_PyDivisionShape_base_OnMovePost(PyObject *self, PyObject
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj6) {
-        arg7 = PyInt_AsLong(obj6) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg7 = (bool) SPyObj_AsBool(obj6);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -17706,8 +18060,10 @@ static PyObject *_wrap_PyDivisionShape_base_OnDragLeft(PyObject *self, PyObject
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyDivisionShape_base_OnDragLeft",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyDivisionShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->base_OnDragLeft(arg2,arg3,arg4,arg5,arg6);
@@ -17794,8 +18150,10 @@ static PyObject *_wrap_PyDivisionShape_base_OnDragRight(PyObject *self, PyObject
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyDivisionShape_base_OnDragRight",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyDivisionShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->base_OnDragRight(arg2,arg3,arg4,arg5,arg6);
@@ -17979,8 +18337,10 @@ static PyObject *_wrap_PyDivisionShape_base_OnMoveLink(PyObject *self, PyObject
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -18015,8 +18375,10 @@ static PyObject *_wrap_PyDivisionShape_base_OnSizingDragLeft(PyObject *self, PyO
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOdd|ii:PyDivisionShape_base_OnSizingDragLeft",kwnames,&obj0,&obj1,&obj2,&arg4,&arg5,&arg6,&arg7)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyDivisionShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
     if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxPyControlPoint,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg3 = PyInt_AsLong(obj2) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg3 = (bool) SPyObj_AsBool(obj2);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->base_OnSizingDragLeft(arg2,arg3,arg4,arg5,arg6,arg7);
@@ -18285,8 +18647,10 @@ static PyObject *_wrap_PyEllipseShape_base_OnDrawBranches(PyObject *self, PyObje
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -18556,8 +18920,10 @@ static PyObject *_wrap_PyEllipseShape_base_OnMovePre(PyObject *self, PyObject *a
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj6) {
-        arg7 = PyInt_AsLong(obj6) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg7 = (bool) SPyObj_AsBool(obj6);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -18596,8 +18962,10 @@ static PyObject *_wrap_PyEllipseShape_base_OnMovePost(PyObject *self, PyObject *
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj6) {
-        arg7 = PyInt_AsLong(obj6) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg7 = (bool) SPyObj_AsBool(obj6);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -18629,8 +18997,10 @@ static PyObject *_wrap_PyEllipseShape_base_OnDragLeft(PyObject *self, PyObject *
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyEllipseShape_base_OnDragLeft",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyEllipseShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->base_OnDragLeft(arg2,arg3,arg4,arg5,arg6);
@@ -18717,8 +19087,10 @@ static PyObject *_wrap_PyEllipseShape_base_OnDragRight(PyObject *self, PyObject
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyEllipseShape_base_OnDragRight",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyEllipseShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->base_OnDragRight(arg2,arg3,arg4,arg5,arg6);
@@ -18902,8 +19274,10 @@ static PyObject *_wrap_PyEllipseShape_base_OnMoveLink(PyObject *self, PyObject *
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -18938,8 +19312,10 @@ static PyObject *_wrap_PyEllipseShape_base_OnSizingDragLeft(PyObject *self, PyOb
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOdd|ii:PyEllipseShape_base_OnSizingDragLeft",kwnames,&obj0,&obj1,&obj2,&arg4,&arg5,&arg6,&arg7)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyEllipseShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
     if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxPyControlPoint,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg3 = PyInt_AsLong(obj2) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg3 = (bool) SPyObj_AsBool(obj2);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->base_OnSizingDragLeft(arg2,arg3,arg4,arg5,arg6,arg7);
@@ -19207,8 +19583,10 @@ static PyObject *_wrap_PyCircleShape_base_OnDrawBranches(PyObject *self, PyObjec
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -19478,8 +19856,10 @@ static PyObject *_wrap_PyCircleShape_base_OnMovePre(PyObject *self, PyObject *ar
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj6) {
-        arg7 = PyInt_AsLong(obj6) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg7 = (bool) SPyObj_AsBool(obj6);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -19518,8 +19898,10 @@ static PyObject *_wrap_PyCircleShape_base_OnMovePost(PyObject *self, PyObject *a
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj6) {
-        arg7 = PyInt_AsLong(obj6) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg7 = (bool) SPyObj_AsBool(obj6);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -19551,8 +19933,10 @@ static PyObject *_wrap_PyCircleShape_base_OnDragLeft(PyObject *self, PyObject *a
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyCircleShape_base_OnDragLeft",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyCircleShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->base_OnDragLeft(arg2,arg3,arg4,arg5,arg6);
@@ -19639,8 +20023,10 @@ static PyObject *_wrap_PyCircleShape_base_OnDragRight(PyObject *self, PyObject *
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyCircleShape_base_OnDragRight",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyCircleShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->base_OnDragRight(arg2,arg3,arg4,arg5,arg6);
@@ -19824,8 +20210,10 @@ static PyObject *_wrap_PyCircleShape_base_OnMoveLink(PyObject *self, PyObject *a
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -19860,8 +20248,10 @@ static PyObject *_wrap_PyCircleShape_base_OnSizingDragLeft(PyObject *self, PyObj
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOdd|ii:PyCircleShape_base_OnSizingDragLeft",kwnames,&obj0,&obj1,&obj2,&arg4,&arg5,&arg6,&arg7)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyCircleShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
     if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxPyControlPoint,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg3 = PyInt_AsLong(obj2) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg3 = (bool) SPyObj_AsBool(obj2);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->base_OnSizingDragLeft(arg2,arg3,arg4,arg5,arg6,arg7);
@@ -20713,8 +21103,10 @@ static PyObject *_wrap_PyLineShape_DrawArrow(PyObject *self, PyObject *args, PyO
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_wxArrowHead,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg5 = PyInt_AsLong(obj4) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg5 = (bool) SPyObj_AsBool(obj4);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->DrawArrow(*arg2,arg3,arg4,arg5);
@@ -21119,8 +21511,10 @@ static PyObject *_wrap_PyLineShape_FindNth(PyObject *self, PyObject *args, PyObj
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:PyLineShape_FindNth",kwnames,&obj0,&obj1,&obj2)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyLineShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
     if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxPyShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg5 = PyInt_AsLong(obj2) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg5 = (bool) SPyObj_AsBool(obj2);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->FindNth(arg2,arg3,arg4,arg5);
@@ -21663,8 +22057,10 @@ static PyObject *_wrap_PyLineShape_SetIgnoreOffsets(PyObject *self, PyObject *ar
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PyLineShape_SetIgnoreOffsets",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyLineShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->SetIgnoreOffsets(arg2);
@@ -21691,8 +22087,10 @@ static PyObject *_wrap_PyLineShape_SetSpline(PyObject *self, PyObject *args, PyO
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PyLineShape_SetSpline",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyLineShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->SetSpline(arg2);
@@ -21801,10 +22199,14 @@ static PyObject *_wrap_PyLineShape_SetAlignmentOrientation(PyObject *self, PyObj
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:PyLineShape_SetAlignmentOrientation",kwnames,&obj0,&obj1,&obj2)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyLineShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
-    arg3 = PyInt_AsLong(obj2) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
+    {
+        arg3 = (bool) SPyObj_AsBool(obj2);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->SetAlignmentOrientation(arg2,arg3);
@@ -21832,8 +22234,10 @@ static PyObject *_wrap_PyLineShape_SetAlignmentType(PyObject *self, PyObject *ar
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOi:PyLineShape_SetAlignmentType",kwnames,&obj0,&obj1,&arg3)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyLineShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->SetAlignmentType(arg2,arg3);
@@ -21861,8 +22265,10 @@ static PyObject *_wrap_PyLineShape_GetAlignmentOrientation(PyObject *self, PyObj
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PyLineShape_GetAlignmentOrientation",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyLineShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (bool)(arg1)->GetAlignmentOrientation(arg2);
@@ -21890,8 +22296,10 @@ static PyObject *_wrap_PyLineShape_GetAlignmentType(PyObject *self, PyObject *ar
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PyLineShape_GetAlignmentType",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyLineShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = (int)(arg1)->GetAlignmentType(arg2);
@@ -22035,8 +22443,10 @@ static PyObject *_wrap_PyLineShape_base_OnDrawBranches(PyObject *self, PyObject
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -22306,8 +22716,10 @@ static PyObject *_wrap_PyLineShape_base_OnMovePre(PyObject *self, PyObject *args
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj6) {
-        arg7 = PyInt_AsLong(obj6) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg7 = (bool) SPyObj_AsBool(obj6);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -22346,8 +22758,10 @@ static PyObject *_wrap_PyLineShape_base_OnMovePost(PyObject *self, PyObject *arg
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj6) {
-        arg7 = PyInt_AsLong(obj6) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg7 = (bool) SPyObj_AsBool(obj6);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -22379,8 +22793,10 @@ static PyObject *_wrap_PyLineShape_base_OnDragLeft(PyObject *self, PyObject *arg
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyLineShape_base_OnDragLeft",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyLineShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->base_OnDragLeft(arg2,arg3,arg4,arg5,arg6);
@@ -22467,8 +22883,10 @@ static PyObject *_wrap_PyLineShape_base_OnDragRight(PyObject *self, PyObject *ar
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyLineShape_base_OnDragRight",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyLineShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->base_OnDragRight(arg2,arg3,arg4,arg5,arg6);
@@ -22652,8 +23070,10 @@ static PyObject *_wrap_PyLineShape_base_OnMoveLink(PyObject *self, PyObject *arg
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -22688,8 +23108,10 @@ static PyObject *_wrap_PyLineShape_base_OnSizingDragLeft(PyObject *self, PyObjec
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOdd|ii:PyLineShape_base_OnSizingDragLeft",kwnames,&obj0,&obj1,&obj2,&arg4,&arg5,&arg6,&arg7)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyLineShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
     if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxPyControlPoint,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg3 = PyInt_AsLong(obj2) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg3 = (bool) SPyObj_AsBool(obj2);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->base_OnSizingDragLeft(arg2,arg3,arg4,arg5,arg6,arg7);
@@ -23232,8 +23654,10 @@ static PyObject *_wrap_PyPolygonShape_base_OnDrawBranches(PyObject *self, PyObje
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -23503,8 +23927,10 @@ static PyObject *_wrap_PyPolygonShape_base_OnMovePre(PyObject *self, PyObject *a
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj6) {
-        arg7 = PyInt_AsLong(obj6) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg7 = (bool) SPyObj_AsBool(obj6);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -23543,8 +23969,10 @@ static PyObject *_wrap_PyPolygonShape_base_OnMovePost(PyObject *self, PyObject *
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj6) {
-        arg7 = PyInt_AsLong(obj6) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg7 = (bool) SPyObj_AsBool(obj6);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -23576,8 +24004,10 @@ static PyObject *_wrap_PyPolygonShape_base_OnDragLeft(PyObject *self, PyObject *
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyPolygonShape_base_OnDragLeft",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyPolygonShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->base_OnDragLeft(arg2,arg3,arg4,arg5,arg6);
@@ -23664,8 +24094,10 @@ static PyObject *_wrap_PyPolygonShape_base_OnDragRight(PyObject *self, PyObject
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyPolygonShape_base_OnDragRight",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyPolygonShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->base_OnDragRight(arg2,arg3,arg4,arg5,arg6);
@@ -23849,8 +24281,10 @@ static PyObject *_wrap_PyPolygonShape_base_OnMoveLink(PyObject *self, PyObject *
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -23885,8 +24319,10 @@ static PyObject *_wrap_PyPolygonShape_base_OnSizingDragLeft(PyObject *self, PyOb
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOdd|ii:PyPolygonShape_base_OnSizingDragLeft",kwnames,&obj0,&obj1,&obj2,&arg4,&arg5,&arg6,&arg7)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyPolygonShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
     if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxPyControlPoint,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg3 = PyInt_AsLong(obj2) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg3 = (bool) SPyObj_AsBool(obj2);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->base_OnSizingDragLeft(arg2,arg3,arg4,arg5,arg6,arg7);
@@ -24179,8 +24615,10 @@ static PyObject *_wrap_PyTextShape_base_OnDrawBranches(PyObject *self, PyObject
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -24450,8 +24888,10 @@ static PyObject *_wrap_PyTextShape_base_OnMovePre(PyObject *self, PyObject *args
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj6) {
-        arg7 = PyInt_AsLong(obj6) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg7 = (bool) SPyObj_AsBool(obj6);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -24490,8 +24930,10 @@ static PyObject *_wrap_PyTextShape_base_OnMovePost(PyObject *self, PyObject *arg
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj6) {
-        arg7 = PyInt_AsLong(obj6) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg7 = (bool) SPyObj_AsBool(obj6);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -24523,8 +24965,10 @@ static PyObject *_wrap_PyTextShape_base_OnDragLeft(PyObject *self, PyObject *arg
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyTextShape_base_OnDragLeft",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTextShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->base_OnDragLeft(arg2,arg3,arg4,arg5,arg6);
@@ -24611,8 +25055,10 @@ static PyObject *_wrap_PyTextShape_base_OnDragRight(PyObject *self, PyObject *ar
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|ii:PyTextShape_base_OnDragRight",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5,&arg6)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTextShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->base_OnDragRight(arg2,arg3,arg4,arg5,arg6);
@@ -24796,8 +25242,10 @@ static PyObject *_wrap_PyTextShape_base_OnMoveLink(PyObject *self, PyObject *arg
         PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; 
     }
     if (obj2) {
-        arg3 = PyInt_AsLong(obj2) ? true : false;
-        if (PyErr_Occurred()) SWIG_fail;
+        {
+            arg3 = (bool) SPyObj_AsBool(obj2);  
+            if (PyErr_Occurred()) SWIG_fail;
+        }
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
@@ -24832,8 +25280,10 @@ static PyObject *_wrap_PyTextShape_base_OnSizingDragLeft(PyObject *self, PyObjec
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOdd|ii:PyTextShape_base_OnSizingDragLeft",kwnames,&obj0,&obj1,&obj2,&arg4,&arg5,&arg6,&arg7)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyTextShape,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
     if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxPyControlPoint,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg3 = PyInt_AsLong(obj2) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg3 = (bool) SPyObj_AsBool(obj2);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->base_OnSizingDragLeft(arg2,arg3,arg4,arg5,arg6,arg7);
@@ -25545,8 +25995,10 @@ static PyObject *_wrap_Diagram_SetQuickEditMode(PyObject *self, PyObject *args,
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Diagram_SetQuickEditMode",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxDiagram,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->SetQuickEditMode(arg2);
@@ -25573,8 +26025,10 @@ static PyObject *_wrap_Diagram_SetSnapToGrid(PyObject *self, PyObject *args, PyO
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Diagram_SetSnapToGrid",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxDiagram,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->SetSnapToGrid(arg2);
@@ -25601,8 +26055,10 @@ static PyObject *_wrap_Diagram_ShowAll(PyObject *self, PyObject *args, PyObject
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Diagram_ShowAll",kwnames,&obj0,&obj1)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxDiagram,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->ShowAll(arg2);
@@ -26089,8 +26545,10 @@ static PyObject *_wrap_PyShapeCanvas_base_OnDragLeft(PyObject *self, PyObject *a
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|i:PyShapeCanvas_base_OnDragLeft",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShapeCanvas,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->base_OnDragLeft(arg2,arg3,arg4,arg5);
@@ -26120,8 +26578,10 @@ static PyObject *_wrap_PyShapeCanvas_base_OnDragRight(PyObject *self, PyObject *
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOdd|i:PyShapeCanvas_base_OnDragRight",kwnames,&obj0,&obj1,&arg3,&arg4,&arg5)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyShapeCanvas,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    arg2 = PyInt_AsLong(obj1) ? true : false;
-    if (PyErr_Occurred()) SWIG_fail;
+    {
+        arg2 = (bool) SPyObj_AsBool(obj1);  
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         (arg1)->base_OnDragRight(arg2,arg3,arg4,arg5);