From 1dec68aa52ae5434af33dbac001a5b48d341b100 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Sat, 16 Oct 1999 06:09:13 +0000 Subject: [PATCH] Added some definitions, a missing method, and fixed a compile error git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4018 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- utils/wxPython/src/_defs.i | 2 ++ utils/wxPython/src/gtk/image.cpp | 26 -------------------------- utils/wxPython/src/gtk/image.py | 5 ++--- utils/wxPython/src/gtk/windows.cpp | 28 ++++++++++++++++++++++++++++ utils/wxPython/src/gtk/windows.py | 3 +++ utils/wxPython/src/image.i | 2 +- utils/wxPython/src/windows.i | 1 + 7 files changed, 37 insertions(+), 30 deletions(-) diff --git a/utils/wxPython/src/_defs.i b/utils/wxPython/src/_defs.i index 670d6796c7..478dd3e5de 100644 --- a/utils/wxPython/src/_defs.i +++ b/utils/wxPython/src/_defs.i @@ -310,6 +310,8 @@ enum { wxSP_NOBORDER, wxSP_3D, wxSP_BORDER, + wxSP_LIVE_UPDATE, + wxSP_PERMIT_UNSPLIT, wxFLOOD_SURFACE, wxFLOOD_BORDER, wxODDEVEN_RULE, diff --git a/utils/wxPython/src/gtk/image.cpp b/utils/wxPython/src/gtk/image.cpp index e7d9cd8fdd..daa4bc887d 100644 --- a/utils/wxPython/src/gtk/image.cpp +++ b/utils/wxPython/src/gtk/image.cpp @@ -303,31 +303,6 @@ static PyObject *_wrap_wxInitAllImageHandlers(PyObject *self, PyObject *args, Py return _resultobj; } -#define new_wxImageHandler() (new wxImageHandler()) -static PyObject *_wrap_new_wxImageHandler(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxImageHandler * _result; - char *_kwnames[] = { NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxImageHandler",_kwnames)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxImageHandler *)new_wxImageHandler(); - - wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxImageHandler_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - #define wxImageHandler_GetName(_swigobj) (_swigobj->GetName()) static PyObject *_wrap_wxImageHandler_GetName(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1679,7 +1654,6 @@ static PyMethodDef imagecMethods[] = { { "wxImageHandler_GetType", (PyCFunction) _wrap_wxImageHandler_GetType, METH_VARARGS | METH_KEYWORDS }, { "wxImageHandler_GetExtension", (PyCFunction) _wrap_wxImageHandler_GetExtension, METH_VARARGS | METH_KEYWORDS }, { "wxImageHandler_GetName", (PyCFunction) _wrap_wxImageHandler_GetName, METH_VARARGS | METH_KEYWORDS }, - { "new_wxImageHandler", (PyCFunction) _wrap_new_wxImageHandler, METH_VARARGS | METH_KEYWORDS }, { "wxInitAllImageHandlers", (PyCFunction) _wrap_wxInitAllImageHandlers, METH_VARARGS | METH_KEYWORDS }, { "wxImage_AddHandler", (PyCFunction) _wrap_wxImage_AddHandler, METH_VARARGS | METH_KEYWORDS }, { "wxImageFromBitmap", (PyCFunction) _wrap_wxImageFromBitmap, METH_VARARGS | METH_KEYWORDS }, diff --git a/utils/wxPython/src/gtk/image.py b/utils/wxPython/src/gtk/image.py index 15ad9c368b..e76564c391 100644 --- a/utils/wxPython/src/gtk/image.py +++ b/utils/wxPython/src/gtk/image.py @@ -35,9 +35,8 @@ class wxImageHandlerPtr : def __repr__(self): return "" % (self.this,) class wxImageHandler(wxImageHandlerPtr): - def __init__(self,*_args,**_kwargs): - self.this = apply(imagec.new_wxImageHandler,_args,_kwargs) - self.thisown = 1 + def __init__(self,this): + self.this = this diff --git a/utils/wxPython/src/gtk/windows.cpp b/utils/wxPython/src/gtk/windows.cpp index f1a7d01902..ffdf56455f 100644 --- a/utils/wxPython/src/gtk/windows.cpp +++ b/utils/wxPython/src/gtk/windows.cpp @@ -3087,6 +3087,33 @@ static PyObject *_wrap_wxWindow_SetAutoLayout(PyObject *self, PyObject *args, Py return _resultobj; } +#define wxWindow_GetAutoLayout(_swigobj) (_swigobj->GetAutoLayout()) +static PyObject *_wrap_wxWindow_GetAutoLayout(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxWindow_GetAutoLayout",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetAutoLayout. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxWindow_GetAutoLayout(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxWindow_SetBackgroundColour(_swigobj,_swigarg0) (_swigobj->SetBackgroundColour(_swigarg0)) static PyObject *_wrap_wxWindow_SetBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -7145,6 +7172,7 @@ static PyMethodDef windowscMethods[] = { { "wxWindow_UnsetConstraints", (PyCFunction) _wrap_wxWindow_UnsetConstraints, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_SetConstraints", (PyCFunction) _wrap_wxWindow_SetConstraints, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_SetBackgroundColour", (PyCFunction) _wrap_wxWindow_SetBackgroundColour, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_GetAutoLayout", (PyCFunction) _wrap_wxWindow_GetAutoLayout, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_SetAutoLayout", (PyCFunction) _wrap_wxWindow_SetAutoLayout, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_SetAcceleratorTable", (PyCFunction) _wrap_wxWindow_SetAcceleratorTable, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_ScrollWindow", (PyCFunction) _wrap_wxWindow_ScrollWindow, METH_VARARGS | METH_KEYWORDS }, diff --git a/utils/wxPython/src/gtk/windows.py b/utils/wxPython/src/gtk/windows.py index bdaebf5896..d9933c5fe5 100644 --- a/utils/wxPython/src/gtk/windows.py +++ b/utils/wxPython/src/gtk/windows.py @@ -328,6 +328,9 @@ class wxWindowPtr(wxEvtHandlerPtr): def SetAutoLayout(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_SetAutoLayout,(self,) + _args, _kwargs) return val + def GetAutoLayout(self, *_args, **_kwargs): + val = apply(windowsc.wxWindow_GetAutoLayout,(self,) + _args, _kwargs) + return val def SetBackgroundColour(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_SetBackgroundColour,(self,) + _args, _kwargs) return val diff --git a/utils/wxPython/src/image.i b/utils/wxPython/src/image.i index 10050a975b..039a5d9cc9 100644 --- a/utils/wxPython/src/image.i +++ b/utils/wxPython/src/image.i @@ -32,7 +32,7 @@ class wxImageHandler { public: - wxImageHandler(); + // wxImageHandler(); Abstract Base Class wxString GetName(); wxString GetExtension(); long GetType(); diff --git a/utils/wxPython/src/windows.i b/utils/wxPython/src/windows.i index 3368348e92..d378ccbba7 100644 --- a/utils/wxPython/src/windows.i +++ b/utils/wxPython/src/windows.i @@ -252,6 +252,7 @@ public: void ScrollWindow(int dx, int dy, const wxRect* rect = NULL); void SetAcceleratorTable(const wxAcceleratorTable& accel); void SetAutoLayout(bool autoLayout); + bool GetAutoLayout(); void SetBackgroundColour(const wxColour& colour); void SetConstraints(wxLayoutConstraints *constraints); void UnsetConstraints(wxLayoutConstraints *constraints); -- 2.45.2