From 3bd1e033857b8dd6f4dea024d3f18fcc7682e09d Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Mon, 29 Apr 2002 18:55:23 +0000 Subject: [PATCH] Various minor updates git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15306 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/CHANGES.txt | 1 + wxPython/b.bat | 2 +- wxPython/contrib/ogl/oglshapes.cpp | 6 +- wxPython/contrib/ogl/oglshapes.i | 2 +- wxPython/demo/wxNotebook.py | 11 ++- wxPython/src/clip_dnd.i | 11 ++- wxPython/src/controls2.i | 37 ++++---- wxPython/src/msw/clip_dnd.cpp | 7 +- wxPython/src/msw/clip_dnd.py | 3 + wxPython/src/msw/controls2.cpp | 140 +++++++++++++++++++++++++++++ wxPython/src/msw/controls2.py | 14 +++ wxPython/src/msw/windows2.cpp | 90 +++++++++++++++++++ wxPython/src/msw/windows2.py | 9 ++ wxPython/src/windows2.i | 6 ++ 14 files changed, 315 insertions(+), 24 deletions(-) diff --git a/wxPython/CHANGES.txt b/wxPython/CHANGES.txt index 60b82af4f9..a9c230ed8d 100644 --- a/wxPython/CHANGES.txt +++ b/wxPython/CHANGES.txt @@ -93,6 +93,7 @@ the image data. (Patch #546009) + 2.3.2.1 ------- Changed (again) how the Python global interpreter lock is handled as diff --git a/wxPython/b.bat b/wxPython/b.bat index 2fd5dedc5c..23fe76963a 100755 --- a/wxPython/b.bat +++ b/wxPython/b.bat @@ -10,7 +10,7 @@ set FLAGS=USE_SWIG=1 IN_CVS_TREE=1 rem Use non-default python? iff "%1" == "15" .or. "%1" == "20" .or. "%1" == "21" .or. "%1" == "22" then set VER=%1 - set PYTHON=c:\tools\python%1%\python.exe + set PYTHON=d:\tools\python%1%\python.exe shift else beep diff --git a/wxPython/contrib/ogl/oglshapes.cpp b/wxPython/contrib/ogl/oglshapes.cpp index 0335330a47..7291643ace 100644 --- a/wxPython/contrib/ogl/oglshapes.cpp +++ b/wxPython/contrib/ogl/oglshapes.cpp @@ -579,7 +579,7 @@ static PyObject *_wrap_wxPseudoMetaFile_GetBounds(PyObject *self, PyObject *args static PyObject *_wrap_wxPseudoMetaFile_CalculateSize(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPseudoMetaFile * _arg0; - wxDrawnShape * _arg1; + wxPyDrawnShape * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; char *_kwnames[] = { "self","shape", NULL }; @@ -596,8 +596,8 @@ static PyObject *_wrap_wxPseudoMetaFile_CalculateSize(PyObject *self, PyObject * } if (_argo1) { if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDrawnShape_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPseudoMetaFile_CalculateSize. Expected _wxDrawnShape_p."); + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPyDrawnShape_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPseudoMetaFile_CalculateSize. Expected _wxPyDrawnShape_p."); return NULL; } } diff --git a/wxPython/contrib/ogl/oglshapes.i b/wxPython/contrib/ogl/oglshapes.i index 57d32dae49..84e2376787 100644 --- a/wxPython/contrib/ogl/oglshapes.i +++ b/wxPython/contrib/ogl/oglshapes.i @@ -57,7 +57,7 @@ public: void Rotate(double x, double y, double theta); bool LoadFromMetaFile(char* filename, double *width, double *height); void GetBounds(double *minX, double *minY, double *maxX, double *maxY); - void CalculateSize(wxDrawnShape* shape); + void CalculateSize(wxPyDrawnShape* shape); // **** fix these... is it even possible? these are lists of various GDI opperations (not the objects...) // wxList& GetOutlineColours(); diff --git a/wxPython/demo/wxNotebook.py b/wxPython/demo/wxNotebook.py index 745b40c13c..87aa2b14b9 100644 --- a/wxPython/demo/wxNotebook.py +++ b/wxPython/demo/wxNotebook.py @@ -55,10 +55,19 @@ class TestNB(wxNotebook): self.AddPage(win, "INDIAN RED") EVT_NOTEBOOK_PAGE_CHANGED(self, self.GetId(), self.OnPageChanged) + EVT_NOTEBOOK_PAGE_CHANGING(self, self.GetId(), self.OnPageChanging) def OnPageChanged(self, event): - self.log.write('OnPageChanged\n') + old = event.GetOldSelection() + new = event.GetSelection() + self.log.write('OnPageChanged, old:%d, new:%d\n' % (old, new)) + event.Skip() + + def OnPageChanging(self, event): + old = event.GetOldSelection() + new = event.GetSelection() + self.log.write('OnPageChanging, old:%d, new:%d\n' % (old, new)) event.Skip() diff --git a/wxPython/src/clip_dnd.i b/wxPython/src/clip_dnd.i index bf4acd7712..a1d9058763 100644 --- a/wxPython/src/clip_dnd.i +++ b/wxPython/src/clip_dnd.i @@ -427,6 +427,15 @@ public: //---------------------------------------------------------------------- //---------------------------------------------------------------------- +// flags for wxDropSource::DoDragDrop() +// +enum +{ + wxDrag_CopyOnly = 0, // allow only copying + wxDrag_AllowMove = 1, // allow moving (copying is always allowed) + wxDrag_DefaultMove = 3 // the default operation is move, not copy +}; + enum wxDragResult { wxDragError, // error prevented the d&d operation from completing @@ -484,7 +493,7 @@ public: void SetData(wxDataObject& data); wxDataObject *GetDataObject(); void SetCursor(wxDragResult res, const wxCursor& cursor); - wxDragResult DoDragDrop(int bAllowMove = FALSE); + wxDragResult DoDragDrop(int flags = wxDrag_CopyOnly); bool base_GiveFeedback(wxDragResult effect); }; diff --git a/wxPython/src/controls2.i b/wxPython/src/controls2.i index 6b8b0c031d..43591b6f94 100644 --- a/wxPython/src/controls2.i +++ b/wxPython/src/controls2.i @@ -667,21 +667,11 @@ public: // to scroll. If in report view mode, y specifies the number of lines to scroll. bool ScrollList(int dx, int dy); - // bool SortItems(wxListCtrlCompare fn, long data); - %addmethods { - // Sort items. - // func is a function which takes 2 long arguments: item1, item2. - // item1 is the long data associated with a first item (NOT the index). - // item2 is the long data associated with a second item (NOT the index). - // The return value is a negative number if the first item should precede the second - // item, a positive number of the second item should precede the first, - // or zero if the two items are equivalent. - bool SortItems(PyObject* func) { - if (!PyCallable_Check(func)) - return FALSE; - return self->SortItems(wxPyListCtrl_SortItems, (long)func); - } - } + void SetItemTextColour( long item, const wxColour& col); + wxColour GetItemTextColour( long item ) const; + void SetItemBackgroundColour( long item, const wxColour &col); + wxColour GetItemBackgroundColour( long item ) const; + %pragma(python) addtoclass = " # Some helpers... @@ -724,6 +714,23 @@ public: self.SetStringItem(pos, i, str(entry[i])) return pos " + + + // bool SortItems(wxListCtrlCompare fn, long data); + %addmethods { + // Sort items. + // func is a function which takes 2 long arguments: item1, item2. + // item1 is the long data associated with a first item (NOT the index). + // item2 is the long data associated with a second item (NOT the index). + // The return value is a negative number if the first item should precede the second + // item, a positive number of the second item should precede the first, + // or zero if the two items are equivalent. + bool SortItems(PyObject* func) { + if (!PyCallable_Check(func)) + return FALSE; + return self->SortItems(wxPyListCtrl_SortItems, (long)func); + } + } }; diff --git a/wxPython/src/msw/clip_dnd.cpp b/wxPython/src/msw/clip_dnd.cpp index 5b0ccdc5ad..e9a9f19cc1 100644 --- a/wxPython/src/msw/clip_dnd.cpp +++ b/wxPython/src/msw/clip_dnd.cpp @@ -2750,9 +2750,9 @@ static PyObject *_wrap_wxDropSource_DoDragDrop(PyObject *self, PyObject *args, P PyObject * _resultobj; wxDragResult _result; wxPyDropSource * _arg0; - int _arg1 = (int ) FALSE; + int _arg1 = (int ) (wxDrag_CopyOnly); PyObject * _argo0 = 0; - char *_kwnames[] = { "self","bAllowMove", NULL }; + char *_kwnames[] = { "self","flags", NULL }; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxDropSource_DoDragDrop",_kwnames,&_argo0,&_arg1)) @@ -3851,6 +3851,9 @@ SWIGEXPORT(void) initclip_dndc() { PyDict_SetItemString(d,"cvar", SWIG_globals); SWIG_addvarlink(SWIG_globals,"wxFormatInvalid",_wrap_wxPyFormatInvalid_get, _wrap_wxPyFormatInvalid_set); SWIG_addvarlink(SWIG_globals,"wxTheClipboard",_wrap_wxPyTheClipboard_get, _wrap_wxPyTheClipboard_set); + PyDict_SetItemString(d,"wxDrag_CopyOnly", PyInt_FromLong((long) wxDrag_CopyOnly)); + PyDict_SetItemString(d,"wxDrag_AllowMove", PyInt_FromLong((long) wxDrag_AllowMove)); + PyDict_SetItemString(d,"wxDrag_DefaultMove", PyInt_FromLong((long) wxDrag_DefaultMove)); PyDict_SetItemString(d,"wxDragError", PyInt_FromLong((long) wxDragError)); PyDict_SetItemString(d,"wxDragNone", PyInt_FromLong((long) wxDragNone)); PyDict_SetItemString(d,"wxDragCopy", PyInt_FromLong((long) wxDragCopy)); diff --git a/wxPython/src/msw/clip_dnd.py b/wxPython/src/msw/clip_dnd.py index 33c10e5899..2743257032 100644 --- a/wxPython/src/msw/clip_dnd.py +++ b/wxPython/src/msw/clip_dnd.py @@ -545,6 +545,9 @@ wxDF_MAX = clip_dndc.wxDF_MAX cvar = clip_dndc.cvar wxFormatInvalid = wxDataFormatPtr(clip_dndc.cvar.wxFormatInvalid) wxTheClipboard = wxClipboardPtr(clip_dndc.cvar.wxTheClipboard) +wxDrag_CopyOnly = clip_dndc.wxDrag_CopyOnly +wxDrag_AllowMove = clip_dndc.wxDrag_AllowMove +wxDrag_DefaultMove = clip_dndc.wxDrag_DefaultMove wxDragError = clip_dndc.wxDragError wxDragNone = clip_dndc.wxDragNone wxDragCopy = clip_dndc.wxDragCopy diff --git a/wxPython/src/msw/controls2.cpp b/wxPython/src/msw/controls2.cpp index c93d7be842..4eb34f6238 100644 --- a/wxPython/src/msw/controls2.cpp +++ b/wxPython/src/msw/controls2.cpp @@ -5050,6 +5050,142 @@ static PyObject *_wrap_wxListCtrl_ScrollList(PyObject *self, PyObject *args, PyO return _resultobj; } +#define wxListCtrl_SetItemTextColour(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetItemTextColour(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxListCtrl_SetItemTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyListCtrl * _arg0; + long _arg1; + wxColour * _arg2; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","item","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OlO:wxListCtrl_SetItemTextColour",_kwnames,&_argo0,&_arg1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyListCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_SetItemTextColour. Expected _wxPyListCtrl_p."); + return NULL; + } + } +{ + _arg2 = &temp; + if (! wxColour_helper(_obj2, &_arg2)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxListCtrl_SetItemTextColour(_arg0,_arg1,*_arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxListCtrl_GetItemTextColour(_swigobj,_swigarg0) (_swigobj->GetItemTextColour(_swigarg0)) +static PyObject *_wrap_wxListCtrl_GetItemTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxPyListCtrl * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","item", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxListCtrl_GetItemTextColour",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyListCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_GetItemTextColour. Expected _wxPyListCtrl_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxColour (wxListCtrl_GetItemTextColour(_arg0,_arg1)); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxListCtrl_SetItemBackgroundColour(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetItemBackgroundColour(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxListCtrl_SetItemBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyListCtrl * _arg0; + long _arg1; + wxColour * _arg2; + PyObject * _argo0 = 0; + wxColour temp; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","item","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OlO:wxListCtrl_SetItemBackgroundColour",_kwnames,&_argo0,&_arg1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyListCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_SetItemBackgroundColour. Expected _wxPyListCtrl_p."); + return NULL; + } + } +{ + _arg2 = &temp; + if (! wxColour_helper(_obj2, &_arg2)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxListCtrl_SetItemBackgroundColour(_arg0,_arg1,*_arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxListCtrl_GetItemBackgroundColour(_swigobj,_swigarg0) (_swigobj->GetItemBackgroundColour(_swigarg0)) +static PyObject *_wrap_wxListCtrl_GetItemBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxPyListCtrl * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","item", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxListCtrl_GetItemBackgroundColour",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyListCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_GetItemBackgroundColour. Expected _wxPyListCtrl_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxColour (wxListCtrl_GetItemBackgroundColour(_arg0,_arg1)); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + static bool wxPyListCtrl_SortItems(wxPyListCtrl *self,PyObject * func) { if (!PyCallable_Check(func)) return FALSE; @@ -10935,6 +11071,10 @@ static PyMethodDef controls2cMethods[] = { { "new_wxPreListView", (PyCFunction) _wrap_new_wxPreListView, METH_VARARGS | METH_KEYWORDS }, { "new_wxListView", (PyCFunction) _wrap_new_wxListView, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_SortItems", (PyCFunction) _wrap_wxListCtrl_SortItems, METH_VARARGS | METH_KEYWORDS }, + { "wxListCtrl_GetItemBackgroundColour", (PyCFunction) _wrap_wxListCtrl_GetItemBackgroundColour, METH_VARARGS | METH_KEYWORDS }, + { "wxListCtrl_SetItemBackgroundColour", (PyCFunction) _wrap_wxListCtrl_SetItemBackgroundColour, METH_VARARGS | METH_KEYWORDS }, + { "wxListCtrl_GetItemTextColour", (PyCFunction) _wrap_wxListCtrl_GetItemTextColour, METH_VARARGS | METH_KEYWORDS }, + { "wxListCtrl_SetItemTextColour", (PyCFunction) _wrap_wxListCtrl_SetItemTextColour, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_ScrollList", (PyCFunction) _wrap_wxListCtrl_ScrollList, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_SetItemCount", (PyCFunction) _wrap_wxListCtrl_SetItemCount, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_InsertColumn", (PyCFunction) _wrap_wxListCtrl_InsertColumn, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/msw/controls2.py b/wxPython/src/msw/controls2.py index a972112caa..4e0d8638e8 100644 --- a/wxPython/src/msw/controls2.py +++ b/wxPython/src/msw/controls2.py @@ -617,6 +617,20 @@ class wxListCtrlPtr(wxControlPtr): def ScrollList(self, *_args, **_kwargs): val = apply(controls2c.wxListCtrl_ScrollList,(self,) + _args, _kwargs) return val + def SetItemTextColour(self, *_args, **_kwargs): + val = apply(controls2c.wxListCtrl_SetItemTextColour,(self,) + _args, _kwargs) + return val + def GetItemTextColour(self, *_args, **_kwargs): + val = apply(controls2c.wxListCtrl_GetItemTextColour,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) ; val.thisown = 1 + return val + def SetItemBackgroundColour(self, *_args, **_kwargs): + val = apply(controls2c.wxListCtrl_SetItemBackgroundColour,(self,) + _args, _kwargs) + return val + def GetItemBackgroundColour(self, *_args, **_kwargs): + val = apply(controls2c.wxListCtrl_GetItemBackgroundColour,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) ; val.thisown = 1 + return val def SortItems(self, *_args, **_kwargs): val = apply(controls2c.wxListCtrl_SortItems,(self,) + _args, _kwargs) return val diff --git a/wxPython/src/msw/windows2.cpp b/wxPython/src/msw/windows2.cpp index 0d84f02bdc..bd34654764 100644 --- a/wxPython/src/msw/windows2.cpp +++ b/wxPython/src/msw/windows2.cpp @@ -2149,6 +2149,93 @@ static PyObject *_wrap_wxSplitterWindow_GetMinimumPaneSize(PyObject *self, PyObj return _resultobj; } +#define wxSplitterWindow_SizeWindows(_swigobj) (_swigobj->SizeWindows()) +static PyObject *_wrap_wxSplitterWindow_SizeWindows(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSplitterWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSplitterWindow_SizeWindows",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_SizeWindows. Expected _wxSplitterWindow_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSplitterWindow_SizeWindows(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxSplitterWindow_SetNeedUpdating(_swigobj,_swigarg0) (_swigobj->SetNeedUpdating(_swigarg0)) +static PyObject *_wrap_wxSplitterWindow_SetNeedUpdating(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSplitterWindow * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","needUpdating", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxSplitterWindow_SetNeedUpdating",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_SetNeedUpdating. Expected _wxSplitterWindow_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSplitterWindow_SetNeedUpdating(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxSplitterWindow_GetNeedUpdating(_swigobj) (_swigobj->GetNeedUpdating()) +static PyObject *_wrap_wxSplitterWindow_GetNeedUpdating(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxSplitterWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSplitterWindow_GetNeedUpdating",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSplitterWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSplitterWindow_GetNeedUpdating. Expected _wxSplitterWindow_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxSplitterWindow_GetNeedUpdating(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + static void *SwigwxTaskBarIconTowxEvtHandler(void *ptr) { wxTaskBarIcon *src; wxEvtHandler *dest; @@ -2397,6 +2484,9 @@ static PyMethodDef windows2cMethods[] = { { "wxTaskBarIcon_SetIcon", (PyCFunction) _wrap_wxTaskBarIcon_SetIcon, METH_VARARGS | METH_KEYWORDS }, { "delete_wxTaskBarIcon", (PyCFunction) _wrap_delete_wxTaskBarIcon, METH_VARARGS | METH_KEYWORDS }, { "new_wxTaskBarIcon", (PyCFunction) _wrap_new_wxTaskBarIcon, METH_VARARGS | METH_KEYWORDS }, + { "wxSplitterWindow_GetNeedUpdating", (PyCFunction) _wrap_wxSplitterWindow_GetNeedUpdating, METH_VARARGS | METH_KEYWORDS }, + { "wxSplitterWindow_SetNeedUpdating", (PyCFunction) _wrap_wxSplitterWindow_SetNeedUpdating, METH_VARARGS | METH_KEYWORDS }, + { "wxSplitterWindow_SizeWindows", (PyCFunction) _wrap_wxSplitterWindow_SizeWindows, METH_VARARGS | METH_KEYWORDS }, { "wxSplitterWindow_GetMinimumPaneSize", (PyCFunction) _wrap_wxSplitterWindow_GetMinimumPaneSize, METH_VARARGS | METH_KEYWORDS }, { "wxSplitterWindow_SetMinimumPaneSize", (PyCFunction) _wrap_wxSplitterWindow_SetMinimumPaneSize, METH_VARARGS | METH_KEYWORDS }, { "wxSplitterWindow_GetSashPosition", (PyCFunction) _wrap_wxSplitterWindow_GetSashPosition, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/msw/windows2.py b/wxPython/src/msw/windows2.py index 1714c136c2..7d9bbd105f 100644 --- a/wxPython/src/msw/windows2.py +++ b/wxPython/src/msw/windows2.py @@ -219,6 +219,15 @@ class wxSplitterWindowPtr(wxWindowPtr): def GetMinimumPaneSize(self, *_args, **_kwargs): val = apply(windows2c.wxSplitterWindow_GetMinimumPaneSize,(self,) + _args, _kwargs) return val + def SizeWindows(self, *_args, **_kwargs): + val = apply(windows2c.wxSplitterWindow_SizeWindows,(self,) + _args, _kwargs) + return val + def SetNeedUpdating(self, *_args, **_kwargs): + val = apply(windows2c.wxSplitterWindow_SetNeedUpdating,(self,) + _args, _kwargs) + return val + def GetNeedUpdating(self, *_args, **_kwargs): + val = apply(windows2c.wxSplitterWindow_GetNeedUpdating,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxSplitterWindow(wxSplitterWindowPtr): diff --git a/wxPython/src/windows2.i b/wxPython/src/windows2.i index 8965938e88..e838ba28a2 100644 --- a/wxPython/src/windows2.i +++ b/wxPython/src/windows2.i @@ -251,6 +251,12 @@ public: void SetMinimumPaneSize(int min); int GetMinimumPaneSize(); + // Resizes subwindows + virtual void SizeWindows(); + + void SetNeedUpdating(bool needUpdating) { m_needUpdating = needUpdating; } + bool GetNeedUpdating() const { return m_needUpdating ; } + }; //--------------------------------------------------------------------------- -- 2.45.2