From 8381e4cdd3afb82e4a77038b5f9abae7404b500c Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Mon, 29 Apr 2002 23:21:15 +0000 Subject: [PATCH] swigged updates for wxGTK git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15312 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/gtk/clip_dnd.cpp | 7 +- wxPython/src/gtk/clip_dnd.py | 3 + wxPython/src/gtk/controls2.cpp | 140 ++++++++++++++ wxPython/src/gtk/controls2.py | 14 ++ wxPython/src/gtk/image.cpp | 35 ++++ wxPython/src/gtk/image.py | 3 + wxPython/src/gtk/misc2.cpp | 28 +++ wxPython/src/gtk/misc2.py | 4 + wxPython/src/gtk/sizers.cpp | 76 ++++++++ wxPython/src/gtk/sizers.py | 6 + wxPython/src/gtk/utils.cpp | 2 +- wxPython/src/gtk/windows.cpp | 337 ++++++++++++++++++++++++++++----- wxPython/src/gtk/windows.py | 28 ++- wxPython/src/gtk/windows2.cpp | 90 +++++++++ wxPython/src/gtk/windows2.py | 9 + 15 files changed, 724 insertions(+), 58 deletions(-) diff --git a/wxPython/src/gtk/clip_dnd.cpp b/wxPython/src/gtk/clip_dnd.cpp index 91f1826fb4..8353eb308f 100644 --- a/wxPython/src/gtk/clip_dnd.cpp +++ b/wxPython/src/gtk/clip_dnd.cpp @@ -2582,9 +2582,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)) @@ -3677,6 +3677,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/gtk/clip_dnd.py b/wxPython/src/gtk/clip_dnd.py index 2b864141f4..b909a3028f 100644 --- a/wxPython/src/gtk/clip_dnd.py +++ b/wxPython/src/gtk/clip_dnd.py @@ -522,6 +522,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/gtk/controls2.cpp b/wxPython/src/gtk/controls2.cpp index 8a62eaa726..330f426071 100644 --- a/wxPython/src/gtk/controls2.cpp +++ b/wxPython/src/gtk/controls2.cpp @@ -4962,6 +4962,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; @@ -10740,6 +10876,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/gtk/controls2.py b/wxPython/src/gtk/controls2.py index 8d1113d6fd..4e4e200003 100644 --- a/wxPython/src/gtk/controls2.py +++ b/wxPython/src/gtk/controls2.py @@ -608,6 +608,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/gtk/image.cpp b/wxPython/src/gtk/image.cpp index 78f187e6cd..e20a4634dd 100644 --- a/wxPython/src/gtk/image.cpp +++ b/wxPython/src/gtk/image.cpp @@ -2268,6 +2268,40 @@ static PyObject *_wrap_wxImage_Paste(PyObject *self, PyObject *args, PyObject *k return _resultobj; } +static PyObject * wxImage_GetDataBuffer(wxImage *self) { + unsigned char* data = self->GetData(); + int len = self->GetWidth() * self->GetHeight() * 3; + return PyBuffer_FromReadWriteMemory(data, len); + } +static PyObject *_wrap_wxImage_GetDataBuffer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + PyObject * _result; + wxImage * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxImage_GetDataBuffer",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_GetDataBuffer. Expected _wxImage_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (PyObject *)wxImage_GetDataBuffer(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ + _resultobj = _result; +} + return _resultobj; +} + static PyObject * wxImage_GetData(wxImage *self) { unsigned char* data = self->GetData(); int len = self->GetWidth() * self->GetHeight() * 3; @@ -3128,6 +3162,7 @@ static PyMethodDef imagecMethods[] = { { "wxImage_SetMaskColour", (PyCFunction) _wrap_wxImage_SetMaskColour, METH_VARARGS | METH_KEYWORDS }, { "wxImage_SetData", (PyCFunction) _wrap_wxImage_SetData, METH_VARARGS | METH_KEYWORDS }, { "wxImage_GetData", (PyCFunction) _wrap_wxImage_GetData, METH_VARARGS | METH_KEYWORDS }, + { "wxImage_GetDataBuffer", (PyCFunction) _wrap_wxImage_GetDataBuffer, METH_VARARGS | METH_KEYWORDS }, { "wxImage_Paste", (PyCFunction) _wrap_wxImage_Paste, METH_VARARGS | METH_KEYWORDS }, { "wxImage_Copy", (PyCFunction) _wrap_wxImage_Copy, METH_VARARGS | METH_KEYWORDS }, { "wxImage_GetSubImage", (PyCFunction) _wrap_wxImage_GetSubImage, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/gtk/image.py b/wxPython/src/gtk/image.py index 844a22e954..51a559ae51 100644 --- a/wxPython/src/gtk/image.py +++ b/wxPython/src/gtk/image.py @@ -265,6 +265,9 @@ class wxImagePtr(wxObjectPtr): def Paste(self, *_args, **_kwargs): val = apply(imagec.wxImage_Paste,(self,) + _args, _kwargs) return val + def GetDataBuffer(self, *_args, **_kwargs): + val = apply(imagec.wxImage_GetDataBuffer,(self,) + _args, _kwargs) + return val def GetData(self, *_args, **_kwargs): val = apply(imagec.wxImage_GetData,(self,) + _args, _kwargs) return val diff --git a/wxPython/src/gtk/misc2.cpp b/wxPython/src/gtk/misc2.cpp index 99cf644df8..18dce395bd 100644 --- a/wxPython/src/gtk/misc2.cpp +++ b/wxPython/src/gtk/misc2.cpp @@ -1468,6 +1468,33 @@ static PyObject *_wrap_wxFindWindowAtPoint(PyObject *self, PyObject *args, PyObj return _resultobj; } +static PyObject *_wrap_wxGetTopLevelParent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _result; + wxWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "win", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGetTopLevelParent",_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 wxGetTopLevelParent. Expected _wxWindow_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxWindow *)wxGetTopLevelParent(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ _resultobj = wxPyMake_wxObject(_result); } + return _resultobj; +} + static PyObject *_wrap_wxResourceAddIdentifier(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _result; @@ -10038,6 +10065,7 @@ static PyMethodDef misc2cMethods[] = { { "wxResourceCreateBitmap", (PyCFunction) _wrap_wxResourceCreateBitmap, METH_VARARGS | METH_KEYWORDS }, { "wxResourceClear", (PyCFunction) _wrap_wxResourceClear, METH_VARARGS | METH_KEYWORDS }, { "wxResourceAddIdentifier", (PyCFunction) _wrap_wxResourceAddIdentifier, METH_VARARGS | METH_KEYWORDS }, + { "wxGetTopLevelParent", (PyCFunction) _wrap_wxGetTopLevelParent, METH_VARARGS | METH_KEYWORDS }, { "wxFindWindowAtPoint", (PyCFunction) _wrap_wxFindWindowAtPoint, METH_VARARGS | METH_KEYWORDS }, { "wxGenericFindWindowAtPoint", (PyCFunction) _wrap_wxGenericFindWindowAtPoint, METH_VARARGS | METH_KEYWORDS }, { "wxGetActiveWindow", (PyCFunction) _wrap_wxGetActiveWindow, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/gtk/misc2.py b/wxPython/src/gtk/misc2.py index bffc12d8f4..1475eefeb4 100644 --- a/wxPython/src/gtk/misc2.py +++ b/wxPython/src/gtk/misc2.py @@ -1028,6 +1028,10 @@ def wxFindWindowAtPoint(*_args, **_kwargs): val = apply(misc2c.wxFindWindowAtPoint,_args,_kwargs) return val +def wxGetTopLevelParent(*_args, **_kwargs): + val = apply(misc2c.wxGetTopLevelParent,_args,_kwargs) + return val + wxResourceAddIdentifier = misc2c.wxResourceAddIdentifier wxResourceClear = misc2c.wxResourceClear diff --git a/wxPython/src/gtk/sizers.cpp b/wxPython/src/gtk/sizers.cpp index 14b85b2724..3491daa21e 100644 --- a/wxPython/src/gtk/sizers.cpp +++ b/wxPython/src/gtk/sizers.cpp @@ -1789,6 +1789,43 @@ static PyObject *_wrap_wxSizer_Fit(PyObject *self, PyObject *args, PyObject *kwa return _resultobj; } +#define wxSizer_FitInside(_swigobj,_swigarg0) (_swigobj->FitInside(_swigarg0)) +static PyObject *_wrap_wxSizer_FitInside(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSizer * _arg0; + wxWindow * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","window", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSizer_FitInside",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_FitInside. Expected _wxSizer_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSizer_FitInside. Expected _wxWindow_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSizer_FitInside(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxSizer_SetSizeHints(_swigobj,_swigarg0) (_swigobj->SetSizeHints(_swigarg0)) static PyObject *_wrap_wxSizer_SetSizeHints(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1826,6 +1863,43 @@ static PyObject *_wrap_wxSizer_SetSizeHints(PyObject *self, PyObject *args, PyOb return _resultobj; } +#define wxSizer_SetVirtualSizeHints(_swigobj,_swigarg0) (_swigobj->SetVirtualSizeHints(_swigarg0)) +static PyObject *_wrap_wxSizer_SetVirtualSizeHints(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSizer * _arg0; + wxWindow * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","window", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSizer_SetVirtualSizeHints",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_SetVirtualSizeHints. Expected _wxSizer_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSizer_SetVirtualSizeHints. Expected _wxWindow_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSizer_SetVirtualSizeHints(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxSizer_Clear(_swigobj,_swigarg0) (_swigobj->Clear(_swigarg0)) static PyObject *_wrap_wxSizer_Clear(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -3006,7 +3080,9 @@ static PyMethodDef sizerscMethods[] = { { "wxSizer_GetChildren", (PyCFunction) _wrap_wxSizer_GetChildren, METH_VARARGS | METH_KEYWORDS }, { "wxSizer_DeleteWindows", (PyCFunction) _wrap_wxSizer_DeleteWindows, METH_VARARGS | METH_KEYWORDS }, { "wxSizer_Clear", (PyCFunction) _wrap_wxSizer_Clear, METH_VARARGS | METH_KEYWORDS }, + { "wxSizer_SetVirtualSizeHints", (PyCFunction) _wrap_wxSizer_SetVirtualSizeHints, METH_VARARGS | METH_KEYWORDS }, { "wxSizer_SetSizeHints", (PyCFunction) _wrap_wxSizer_SetSizeHints, METH_VARARGS | METH_KEYWORDS }, + { "wxSizer_FitInside", (PyCFunction) _wrap_wxSizer_FitInside, METH_VARARGS | METH_KEYWORDS }, { "wxSizer_Fit", (PyCFunction) _wrap_wxSizer_Fit, METH_VARARGS | METH_KEYWORDS }, { "wxSizer_Layout", (PyCFunction) _wrap_wxSizer_Layout, METH_VARARGS | METH_KEYWORDS }, { "wxSizer_GetMinSize", (PyCFunction) _wrap_wxSizer_GetMinSize, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/gtk/sizers.py b/wxPython/src/gtk/sizers.py index 5ec6b397d9..f3f88dd460 100644 --- a/wxPython/src/gtk/sizers.py +++ b/wxPython/src/gtk/sizers.py @@ -183,9 +183,15 @@ class wxSizerPtr(wxObjectPtr): def Fit(self, *_args, **_kwargs): val = apply(sizersc.wxSizer_Fit,(self,) + _args, _kwargs) return val + def FitInside(self, *_args, **_kwargs): + val = apply(sizersc.wxSizer_FitInside,(self,) + _args, _kwargs) + return val def SetSizeHints(self, *_args, **_kwargs): val = apply(sizersc.wxSizer_SetSizeHints,(self,) + _args, _kwargs) return val + def SetVirtualSizeHints(self, *_args, **_kwargs): + val = apply(sizersc.wxSizer_SetVirtualSizeHints,(self,) + _args, _kwargs) + return val def Clear(self, *_args, **_kwargs): val = apply(sizersc.wxSizer_Clear,(self,) + _args, _kwargs) return val diff --git a/wxPython/src/gtk/utils.cpp b/wxPython/src/gtk/utils.cpp index 847a5fd1ee..b4920a86fe 100644 --- a/wxPython/src/gtk/utils.cpp +++ b/wxPython/src/gtk/utils.cpp @@ -61,7 +61,7 @@ extern PyObject *SWIG_newvarlink(void); #include // Put some wx default wxChar* values into wxStrings. - DECLARE_DEF_STRING2(DateFormatStr, wxT("sashWindow")); + DECLARE_DEF_STRING2(DateFormatStr, wxT("%c")); static const wxString wxPyEmptyString(wxT("")); diff --git a/wxPython/src/gtk/windows.cpp b/wxPython/src/gtk/windows.cpp index 020b1dd8d8..0888f82b7b 100644 --- a/wxPython/src/gtk/windows.cpp +++ b/wxPython/src/gtk/windows.cpp @@ -3977,6 +3977,34 @@ static PyObject *_wrap_wxWindow_SetFocus(PyObject *self, PyObject *args, PyObjec return _resultobj; } +#define wxWindow_SetFocusFromKbd(_swigobj) (_swigobj->SetFocusFromKbd()) +static PyObject *_wrap_wxWindow_SetFocusFromKbd(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxWindow_SetFocusFromKbd",_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_SetFocusFromKbd. Expected _wxWindow_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxWindow_SetFocusFromKbd(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxWindow_AcceptsFocus(_swigobj) (_swigobj->AcceptsFocus()) static PyObject *_wrap_wxWindow_AcceptsFocus(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -4365,8 +4393,8 @@ static PyObject *_wrap_wxWindow_SetRect(PyObject *self, PyObject *args, PyObject static PyObject *_wrap_wxWindow_SetSizeHints(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxWindow * _arg0; - int _arg1 = (int ) -1; - int _arg2 = (int ) -1; + int _arg1; + int _arg2; int _arg3 = (int ) -1; int _arg4 = (int ) -1; int _arg5 = (int ) -1; @@ -4375,7 +4403,7 @@ static PyObject *_wrap_wxWindow_SetSizeHints(PyObject *self, PyObject *args, PyO char *_kwnames[] = { "self","minW","minH","maxW","maxH","incW","incH", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iiiiii:wxWindow_SetSizeHints",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_arg6)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii|iiii:wxWindow_SetSizeHints",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_arg6)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -4395,6 +4423,182 @@ static PyObject *_wrap_wxWindow_SetSizeHints(PyObject *self, PyObject *args, PyO return _resultobj; } +#define wxWindow_SetVirtualSizeHints(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->SetVirtualSizeHints(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_wxWindow_SetVirtualSizeHints(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _arg0; + int _arg1; + int _arg2; + int _arg3 = (int ) -1; + int _arg4 = (int ) -1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","minW","minH","maxW","maxH", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii|ii:wxWindow_SetVirtualSizeHints",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) + 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_SetVirtualSizeHints. Expected _wxWindow_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxWindow_SetVirtualSizeHints(_arg0,_arg1,_arg2,_arg3,_arg4); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxWindow_SetVirtualSize(_swigobj,_swigarg0) (_swigobj->SetVirtualSize(_swigarg0)) +static PyObject *_wrap_wxWindow_SetVirtualSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _arg0; + wxSize * _arg1; + PyObject * _argo0 = 0; + wxSize temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","size", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxWindow_SetVirtualSize",_kwnames,&_argo0,&_obj1)) + 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_SetVirtualSize. Expected _wxWindow_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxSize_helper(_obj1, &_arg1)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxWindow_SetVirtualSize(_arg0,*_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxWindow_SetVirtualSizeWH(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetVirtualSize(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxWindow_SetVirtualSizeWH(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","x","y", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxWindow_SetVirtualSizeWH",_kwnames,&_argo0,&_arg1,&_arg2)) + 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_SetVirtualSizeWH. Expected _wxWindow_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxWindow_SetVirtualSizeWH(_arg0,_arg1,_arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxWindow_GetVirtualSize(_swigobj) (_swigobj->GetVirtualSize()) +static PyObject *_wrap_wxWindow_GetVirtualSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSize * _result; + wxWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxWindow_GetVirtualSize",_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_GetVirtualSize. Expected _wxWindow_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxSize (wxWindow_GetVirtualSize(_arg0)); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxWindow_GetVirtualSizeTuple(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetVirtualSize(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxWindow_GetVirtualSizeTuple(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _arg0; + int * _arg1; + int temp; + int * _arg2; + int temp0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; +{ + _arg1 = &temp; +} +{ + _arg2 = &temp0; +} + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxWindow_GetVirtualSizeTuple",_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_GetVirtualSizeTuple. Expected _wxWindow_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxWindow_GetVirtualSizeTuple(_arg0,_arg1,_arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg1)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg2)); + _resultobj = t_output_helper(_resultobj, o); +} + return _resultobj; +} + #define wxWindow_SetClientSizeWH(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetClientSize(_swigarg0,_swigarg1)) static PyObject *_wrap_wxWindow_SetClientSizeWH(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -5042,6 +5246,46 @@ static PyObject *_wrap_wxWindow_SetSizer(PyObject *self, PyObject *args, PyObjec return _resultobj; } +#define wxWindow_SetSizerAndFit(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetSizerAndFit(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxWindow_SetSizerAndFit(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _arg0; + wxSizer * _arg1; + bool _arg2 = (bool ) TRUE; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + int tempbool2 = (int) TRUE; + char *_kwnames[] = { "self","sizer","deleteOld", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxWindow_SetSizerAndFit",_kwnames,&_argo0,&_argo1,&tempbool2)) + 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_SetSizerAndFit. Expected _wxWindow_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWindow_SetSizerAndFit. Expected _wxSizer_p."); + return NULL; + } + } + _arg2 = (bool ) tempbool2; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxWindow_SetSizerAndFit(_arg0,_arg1,_arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxWindow_GetSizer(_swigobj) (_swigobj->GetSizer()) static PyObject *_wrap_wxWindow_GetSizer(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -6663,54 +6907,6 @@ static PyObject *_wrap_wxScrolledWindow_GetTargetWindow(PyObject *self, PyObject return _resultobj; } -#define wxScrolledWindow_GetVirtualSize(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetVirtualSize(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxScrolledWindow_GetVirtualSize(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxScrolledWindow * _arg0; - int * _arg1; - int temp; - int * _arg2; - int temp0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; -{ - _arg1 = &temp; -} -{ - _arg2 = &temp0; -} - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxScrolledWindow_GetVirtualSize",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxScrolledWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrolledWindow_GetVirtualSize. Expected _wxScrolledWindow_p."); - return NULL; - } - } -{ - PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxScrolledWindow_GetVirtualSize(_arg0,_arg1,_arg2); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg1)); - _resultobj = t_output_helper(_resultobj, o); -} -{ - PyObject *o; - o = PyInt_FromLong((long) (*_arg2)); - _resultobj = t_output_helper(_resultobj, o); -} - return _resultobj; -} - #define wxScrolledWindow_IsRetained(_swigobj) (_swigobj->IsRetained()) static PyObject *_wrap_wxScrolledWindow_IsRetained(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -7274,6 +7470,36 @@ static PyObject *_wrap_wxScrolledWindow_Layout(PyObject *self, PyObject *args, P return _resultobj; } +#define wxScrolledWindow_SetScrollRate(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetScrollRate(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxScrolledWindow_SetScrollRate(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxScrolledWindow * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","xstep","ystep", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxScrolledWindow_SetScrollRate",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxScrolledWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxScrolledWindow_SetScrollRate. Expected _wxScrolledWindow_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxScrolledWindow_SetScrollRate(_arg0,_arg1,_arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + static void *SwigwxMenuTowxEvtHandler(void *ptr) { wxMenu *src; wxEvtHandler *dest; @@ -10906,6 +11132,7 @@ static PyMethodDef windowscMethods[] = { { "wxMenu_AppendMenu", (PyCFunction) _wrap_wxMenu_AppendMenu, METH_VARARGS | METH_KEYWORDS }, { "wxMenu_Append", (PyCFunction) _wrap_wxMenu_Append, METH_VARARGS | METH_KEYWORDS }, { "new_wxMenu", (PyCFunction) _wrap_new_wxMenu, METH_VARARGS | METH_KEYWORDS }, + { "wxScrolledWindow_SetScrollRate", (PyCFunction) _wrap_wxScrolledWindow_SetScrollRate, METH_VARARGS | METH_KEYWORDS }, { "wxScrolledWindow_Layout", (PyCFunction) _wrap_wxScrolledWindow_Layout, METH_VARARGS | METH_KEYWORDS }, { "wxScrolledWindow_AdjustScrollbars", (PyCFunction) _wrap_wxScrolledWindow_AdjustScrollbars, METH_VARARGS | METH_KEYWORDS }, { "wxScrolledWindow_GetScaleY", (PyCFunction) _wrap_wxScrolledWindow_GetScaleY, METH_VARARGS | METH_KEYWORDS }, @@ -10922,7 +11149,6 @@ static PyMethodDef windowscMethods[] = { { "wxScrolledWindow_Scroll", (PyCFunction) _wrap_wxScrolledWindow_Scroll, METH_VARARGS | METH_KEYWORDS }, { "wxScrolledWindow_PrepareDC", (PyCFunction) _wrap_wxScrolledWindow_PrepareDC, METH_VARARGS | METH_KEYWORDS }, { "wxScrolledWindow_IsRetained", (PyCFunction) _wrap_wxScrolledWindow_IsRetained, METH_VARARGS | METH_KEYWORDS }, - { "wxScrolledWindow_GetVirtualSize", (PyCFunction) _wrap_wxScrolledWindow_GetVirtualSize, METH_VARARGS | METH_KEYWORDS }, { "wxScrolledWindow_GetTargetWindow", (PyCFunction) _wrap_wxScrolledWindow_GetTargetWindow, METH_VARARGS | METH_KEYWORDS }, { "wxScrolledWindow_GetScrollPixelsPerUnit", (PyCFunction) _wrap_wxScrolledWindow_GetScrollPixelsPerUnit, METH_VARARGS | METH_KEYWORDS }, { "wxScrolledWindow_GetScrollPageSize", (PyCFunction) _wrap_wxScrolledWindow_GetScrollPageSize, METH_VARARGS | METH_KEYWORDS }, @@ -10970,6 +11196,7 @@ static PyMethodDef windowscMethods[] = { { "wxWindow_GetContainingSizer", (PyCFunction) _wrap_wxWindow_GetContainingSizer, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_SetContainingSizer", (PyCFunction) _wrap_wxWindow_SetContainingSizer, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_GetSizer", (PyCFunction) _wrap_wxWindow_GetSizer, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_SetSizerAndFit", (PyCFunction) _wrap_wxWindow_SetSizerAndFit, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_SetSizer", (PyCFunction) _wrap_wxWindow_SetSizer, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_GetToolTip", (PyCFunction) _wrap_wxWindow_GetToolTip, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_SetToolTip", (PyCFunction) _wrap_wxWindow_SetToolTip, METH_VARARGS | METH_KEYWORDS }, @@ -10991,6 +11218,11 @@ static PyMethodDef windowscMethods[] = { { "wxWindow_SetCursor", (PyCFunction) _wrap_wxWindow_SetCursor, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_SetClientSize", (PyCFunction) _wrap_wxWindow_SetClientSize, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_SetClientSizeWH", (PyCFunction) _wrap_wxWindow_SetClientSizeWH, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_GetVirtualSizeTuple", (PyCFunction) _wrap_wxWindow_GetVirtualSizeTuple, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_GetVirtualSize", (PyCFunction) _wrap_wxWindow_GetVirtualSize, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_SetVirtualSizeWH", (PyCFunction) _wrap_wxWindow_SetVirtualSizeWH, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_SetVirtualSize", (PyCFunction) _wrap_wxWindow_SetVirtualSize, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_SetVirtualSizeHints", (PyCFunction) _wrap_wxWindow_SetVirtualSizeHints, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_SetSizeHints", (PyCFunction) _wrap_wxWindow_SetSizeHints, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_SetRect", (PyCFunction) _wrap_wxWindow_SetRect, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_SetPosition", (PyCFunction) _wrap_wxWindow_SetPosition, METH_VARARGS | METH_KEYWORDS }, @@ -11003,6 +11235,7 @@ static PyMethodDef windowscMethods[] = { { "wxWindow_SetForegroundColour", (PyCFunction) _wrap_wxWindow_SetForegroundColour, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_SetFont", (PyCFunction) _wrap_wxWindow_SetFont, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_AcceptsFocus", (PyCFunction) _wrap_wxWindow_AcceptsFocus, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_SetFocusFromKbd", (PyCFunction) _wrap_wxWindow_SetFocusFromKbd, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_SetFocus", (PyCFunction) _wrap_wxWindow_SetFocus, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_UnsetConstraints", (PyCFunction) _wrap_wxWindow_UnsetConstraints, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_SetConstraints", (PyCFunction) _wrap_wxWindow_SetConstraints, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/gtk/windows.py b/wxPython/src/gtk/windows.py index e6e01d10fc..085d8947bf 100644 --- a/wxPython/src/gtk/windows.py +++ b/wxPython/src/gtk/windows.py @@ -396,6 +396,9 @@ class wxWindowPtr(wxEvtHandlerPtr): def SetFocus(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_SetFocus,(self,) + _args, _kwargs) return val + def SetFocusFromKbd(self, *_args, **_kwargs): + val = apply(windowsc.wxWindow_SetFocusFromKbd,(self,) + _args, _kwargs) + return val def AcceptsFocus(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_AcceptsFocus,(self,) + _args, _kwargs) return val @@ -432,6 +435,22 @@ class wxWindowPtr(wxEvtHandlerPtr): def SetSizeHints(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_SetSizeHints,(self,) + _args, _kwargs) return val + def SetVirtualSizeHints(self, *_args, **_kwargs): + val = apply(windowsc.wxWindow_SetVirtualSizeHints,(self,) + _args, _kwargs) + return val + def SetVirtualSize(self, *_args, **_kwargs): + val = apply(windowsc.wxWindow_SetVirtualSize,(self,) + _args, _kwargs) + return val + def SetVirtualSizeWH(self, *_args, **_kwargs): + val = apply(windowsc.wxWindow_SetVirtualSizeWH,(self,) + _args, _kwargs) + return val + def GetVirtualSize(self, *_args, **_kwargs): + val = apply(windowsc.wxWindow_GetVirtualSize,(self,) + _args, _kwargs) + if val: val = wxSizePtr(val) ; val.thisown = 1 + return val + def GetVirtualSizeTuple(self, *_args, **_kwargs): + val = apply(windowsc.wxWindow_GetVirtualSizeTuple,(self,) + _args, _kwargs) + return val def SetClientSizeWH(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_SetClientSizeWH,(self,) + _args, _kwargs) return val @@ -501,6 +520,9 @@ class wxWindowPtr(wxEvtHandlerPtr): def SetSizer(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_SetSizer,(self,) + _args, _kwargs) return val + def SetSizerAndFit(self, *_args, **_kwargs): + val = apply(windowsc.wxWindow_SetSizerAndFit,(self,) + _args, _kwargs) + return val def GetSizer(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_GetSizer,(self,) + _args, _kwargs) return val @@ -670,9 +692,6 @@ class wxScrolledWindowPtr(wxPanelPtr): def GetTargetWindow(self, *_args, **_kwargs): val = apply(windowsc.wxScrolledWindow_GetTargetWindow,(self,) + _args, _kwargs) return val - def GetVirtualSize(self, *_args, **_kwargs): - val = apply(windowsc.wxScrolledWindow_GetVirtualSize,(self,) + _args, _kwargs) - return val def IsRetained(self, *_args, **_kwargs): val = apply(windowsc.wxScrolledWindow_IsRetained,(self,) + _args, _kwargs) return val @@ -723,6 +742,9 @@ class wxScrolledWindowPtr(wxPanelPtr): def Layout(self, *_args, **_kwargs): val = apply(windowsc.wxScrolledWindow_Layout,(self,) + _args, _kwargs) return val + def SetScrollRate(self, *_args, **_kwargs): + val = apply(windowsc.wxScrolledWindow_SetScrollRate,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) ViewStart = GetViewStart diff --git a/wxPython/src/gtk/windows2.cpp b/wxPython/src/gtk/windows2.cpp index 6bc0b0addf..2e6c97a6ff 100644 --- a/wxPython/src/gtk/windows2.cpp +++ b/wxPython/src/gtk/windows2.cpp @@ -2149,7 +2149,97 @@ 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 PyMethodDef windows2cMethods[] = { + { "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/gtk/windows2.py b/wxPython/src/gtk/windows2.py index 52d6f111f1..66c94cadc6 100644 --- a/wxPython/src/gtk/windows2.py +++ b/wxPython/src/gtk/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): -- 2.45.2