diff --git a/wxPython/src/gtk/_controls.py b/wxPython/src/gtk/_controls.py index 0a9a508d29..fd68c24458 100644 --- a/wxPython/src/gtk/_controls.py +++ b/wxPython/src/gtk/_controls.py @@ -2324,7 +2324,7 @@ class RadioBox(_core.Control): return _controls_.RadioBox_SetStringSelection(*args, **kwargs) def GetCount(*args, **kwargs): - """GetCount(self) -> int""" + """GetCount(self) -> size_t""" return _controls_.RadioBox_GetCount(*args, **kwargs) def FindString(*args, **kwargs): @@ -2796,11 +2796,11 @@ class BookCtrlBase(_core.Control): return _controls_.BookCtrlBase_CalcSizeFromPage(*args, **kwargs) def GetInternalBorder(*args, **kwargs): - """GetInternalBorder(self) -> unsigned int""" + """GetInternalBorder(self) -> size_t""" return _controls_.BookCtrlBase_GetInternalBorder(*args, **kwargs) def SetInternalBorder(*args, **kwargs): - """SetInternalBorder(self, unsigned int internalBorder)""" + """SetInternalBorder(self, size_t internalBorder)""" return _controls_.BookCtrlBase_SetInternalBorder(*args, **kwargs) def IsVertical(*args, **kwargs): diff --git a/wxPython/src/gtk/_controls_wrap.cpp b/wxPython/src/gtk/_controls_wrap.cpp index c28a7bcd84..bc17d73580 100644 --- a/wxPython/src/gtk/_controls_wrap.cpp +++ b/wxPython/src/gtk/_controls_wrap.cpp @@ -2869,6 +2869,21 @@ SWIGINTERN wxString wxTextCtrl_GetString(wxTextCtrl *self,long from,long to){ static const wxString wxPySpinCtrlNameStr(_T("wxSpinCtrl")); static const wxString wxPyRadioBoxNameStr(wxRadioBoxNameStr); static const wxString wxPyRadioButtonNameStr(wxRadioButtonNameStr); + +SWIGINTERNINLINE PyObject* +SWIG_From_unsigned_SS_long (unsigned long value) +{ + return (value > LONG_MAX) ? + PyLong_FromUnsignedLong(value) : PyInt_FromLong(static_cast< long >(value)); +} + + +SWIGINTERNINLINE PyObject * +SWIG_From_size_t (size_t value) +{ + return SWIG_From_unsigned_SS_long (static_cast< unsigned long >(value)); +} + SWIGINTERN int wxRadioBox_GetColumnCount(wxRadioBox const *self){ return -1; } SWIGINTERN int wxRadioBox_GetRowCount(wxRadioBox const *self){ return -1; } SWIGINTERN int wxRadioBox_GetNextItem(wxRadioBox const *self,int item,wxDirection dir,long style){ return -1; } @@ -2899,21 +2914,6 @@ public: static const wxString wxPyNotebookNameStr(wxNotebookNameStr); -SWIGINTERNINLINE PyObject* -SWIG_From_unsigned_SS_long (unsigned long value) -{ - return (value > LONG_MAX) ? - PyLong_FromUnsignedLong(value) : PyInt_FromLong(static_cast< long >(value)); -} - - -SWIGINTERNINLINE PyObject * -SWIG_From_size_t (size_t value) -{ - return SWIG_From_unsigned_SS_long (static_cast< unsigned long >(value)); -} - - SWIGINTERNINLINE int SWIG_AsVal_size_t (PyObject * obj, size_t *val) { @@ -2923,29 +2923,6 @@ SWIG_AsVal_size_t (PyObject * obj, size_t *val) return res; } - -SWIGINTERNINLINE PyObject * -SWIG_From_unsigned_SS_int (unsigned int value) -{ - return SWIG_From_unsigned_SS_long (value); -} - - -SWIGINTERN int -SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val) -{ - unsigned long v; - int res = SWIG_AsVal_unsigned_SS_long (obj, &v); - if (SWIG_IsOK(res)) { - if ((v > UINT_MAX)) { - return SWIG_OverflowError; - } else { - if (val) *val = static_cast< unsigned int >(v); - } - } - return res; -} - static const wxString wxPyToolBarNameStr(wxToolBarNameStr); SWIGINTERN PyObject *wxToolBarToolBase_GetClientData(wxToolBarToolBase *self){ wxPyUserData* udata = (wxPyUserData*)self->GetClientData(); @@ -3149,6 +3126,29 @@ public: IMPLEMENT_ABSTRACT_CLASS(wxPyTreeCtrl, wxTreeCtrl); + +SWIGINTERNINLINE PyObject * +SWIG_From_unsigned_SS_int (unsigned int value) +{ + return SWIG_From_unsigned_SS_long (value); +} + + +SWIGINTERN int +SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val) +{ + unsigned long v; + int res = SWIG_AsVal_unsigned_SS_long (obj, &v); + if (SWIG_IsOK(res)) { + if ((v > UINT_MAX)) { + return SWIG_OverflowError; + } else { + if (val) *val = static_cast< unsigned int >(v); + } + } + return res; +} + SWIGINTERN wxPyTreeItemData *wxPyTreeCtrl_GetItemData(wxPyTreeCtrl *self,wxTreeItemId const &item){ wxPyTreeItemData* data = (wxPyTreeItemData*)self->GetItemData(item); if (data == NULL) { @@ -16249,7 +16249,7 @@ fail: SWIGINTERN PyObject *_wrap_RadioBox_GetCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxRadioBox *arg1 = (wxRadioBox *) 0 ; - int result; + size_t result; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; @@ -16263,11 +16263,11 @@ SWIGINTERN PyObject *_wrap_RadioBox_GetCount(PyObject *SWIGUNUSEDPARM(self), PyO arg1 = reinterpret_cast< wxRadioBox * >(argp1); { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (int)((wxRadioBox const *)arg1)->GetCount(); + result = (size_t)((wxRadioBox const *)arg1)->GetCount(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_From_int(static_cast< int >(result)); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: return NULL; @@ -19086,7 +19086,7 @@ fail: SWIGINTERN PyObject *_wrap_BookCtrlBase_GetInternalBorder(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxBookCtrlBase *arg1 = (wxBookCtrlBase *) 0 ; - unsigned int result; + size_t result; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; @@ -19100,11 +19100,11 @@ SWIGINTERN PyObject *_wrap_BookCtrlBase_GetInternalBorder(PyObject *SWIGUNUSEDPA arg1 = reinterpret_cast< wxBookCtrlBase * >(argp1); { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (unsigned int)((wxBookCtrlBase const *)arg1)->GetInternalBorder(); + result = (size_t)((wxBookCtrlBase const *)arg1)->GetInternalBorder(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: return NULL; @@ -19114,10 +19114,10 @@ fail: SWIGINTERN PyObject *_wrap_BookCtrlBase_SetInternalBorder(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxBookCtrlBase *arg1 = (wxBookCtrlBase *) 0 ; - unsigned int arg2 ; + size_t arg2 ; void *argp1 = 0 ; int res1 = 0 ; - unsigned int val2 ; + size_t val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -19131,11 +19131,11 @@ SWIGINTERN PyObject *_wrap_BookCtrlBase_SetInternalBorder(PyObject *SWIGUNUSEDPA SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BookCtrlBase_SetInternalBorder" "', expected argument " "1"" of type '" "wxBookCtrlBase *""'"); } arg1 = reinterpret_cast< wxBookCtrlBase * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + ecode2 = SWIG_AsVal_size_t(obj1, &val2); if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BookCtrlBase_SetInternalBorder" "', expected argument " "2"" of type '" "unsigned int""'"); + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BookCtrlBase_SetInternalBorder" "', expected argument " "2"" of type '" "size_t""'"); } - arg2 = static_cast< unsigned int >(val2); + arg2 = static_cast< size_t >(val2); { PyThreadState* __tstate = wxPyBeginAllowThreads(); (arg1)->SetInternalBorder(arg2); diff --git a/wxPython/src/gtk/_core.py b/wxPython/src/gtk/_core.py index 94a9352223..2020f24639 100644 --- a/wxPython/src/gtk/_core.py +++ b/wxPython/src/gtk/_core.py @@ -7754,7 +7754,10 @@ class Window(EvtHandler): """ GetPosition(self) -> Point - Get the window's position. + Get the window's position. Notice that the position is in client + coordinates for child windows and screen coordinates for the top level + ones, use `GetScreenPosition` if you need screen coordinates for all + kinds of windows. """ return _core_.Window_GetPosition(*args, **kwargs) @@ -7762,10 +7765,38 @@ class Window(EvtHandler): """ GetPositionTuple() -> (x,y) - Get the window's position. + Get the window's position. Notice that the position is in client + coordinates for child windows and screen coordinates for the top level + ones, use `GetScreenPosition` if you need screen coordinates for all + kinds of windows. """ return _core_.Window_GetPositionTuple(*args, **kwargs) + def GetScreenPosition(*args, **kwargs): + """ + GetScreenPosition(self) -> Point + + Get the position of the window in screen coordinantes. + """ + return _core_.Window_GetScreenPosition(*args, **kwargs) + + def GetScreenPositionTuple(*args, **kwargs): + """ + GetScreenPositionTuple() -> (x,y) + + Get the position of the window in screen coordinantes. + """ + return _core_.Window_GetScreenPositionTuple(*args, **kwargs) + + def GetScreenRect(*args, **kwargs): + """ + GetScreenRect(self) -> Rect + + Returns the size and position of the window in screen coordinantes as + a `wx.Rect` object. + """ + return _core_.Window_GetScreenRect(*args, **kwargs) + def GetSize(*args, **kwargs): """ GetSize(self) -> Size @@ -7786,7 +7817,7 @@ class Window(EvtHandler): """ GetRect(self) -> Rect - Returns the size and position of the window as a wx.Rect object. + Returns the size and position of the window as a `wx.Rect` object. """ return _core_.Window_GetRect(*args, **kwargs) @@ -10531,7 +10562,7 @@ class ItemContainer(object): def GetCount(*args, **kwargs): """ - GetCount(self) -> int + GetCount(self) -> size_t Returns the number of items in the control. """ diff --git a/wxPython/src/gtk/_core_wrap.cpp b/wxPython/src/gtk/_core_wrap.cpp index 00d5de9287..b1618916d9 100644 --- a/wxPython/src/gtk/_core_wrap.cpp +++ b/wxPython/src/gtk/_core_wrap.cpp @@ -30519,12 +30519,12 @@ SWIGINTERN PyObject *_wrap_Window_GetPosition(PyObject *SWIGUNUSEDPARM(self), Py swig_obj[0] = args; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxWindow, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Window_GetPosition" "', expected argument " "1"" of type '" "wxWindow *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Window_GetPosition" "', expected argument " "1"" of type '" "wxWindow const *""'"); } arg1 = reinterpret_cast< wxWindow * >(argp1); { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (arg1)->GetPosition(); + result = ((wxWindow const *)arg1)->GetPosition(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } @@ -30554,12 +30554,12 @@ SWIGINTERN PyObject *_wrap_Window_GetPositionTuple(PyObject *SWIGUNUSEDPARM(self swig_obj[0] = args; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxWindow, 0 | 0 ); if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Window_GetPositionTuple" "', expected argument " "1"" of type '" "wxWindow *""'"); + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Window_GetPositionTuple" "', expected argument " "1"" of type '" "wxWindow const *""'"); } arg1 = reinterpret_cast< wxWindow * >(argp1); { PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->GetPosition(arg2,arg3); + ((wxWindow const *)arg1)->GetPosition(arg2,arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } @@ -30582,6 +30582,109 @@ fail: } +SWIGINTERN PyObject *_wrap_Window_GetScreenPosition(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxWindow *arg1 = (wxWindow *) 0 ; + wxPoint result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxWindow, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Window_GetScreenPosition" "', expected argument " "1"" of type '" "wxWindow const *""'"); + } + arg1 = reinterpret_cast< wxWindow * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = ((wxWindow const *)arg1)->GetScreenPosition(); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_NewPointerObj((new wxPoint(static_cast< const wxPoint& >(result))), SWIGTYPE_p_wxPoint, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Window_GetScreenPositionTuple(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxWindow *arg1 = (wxWindow *) 0 ; + int *arg2 = (int *) 0 ; + int *arg3 = (int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int temp2 ; + int res2 = SWIG_TMPOBJ ; + int temp3 ; + int res3 = SWIG_TMPOBJ ; + PyObject *swig_obj[1] ; + + arg2 = &temp2; + arg3 = &temp3; + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxWindow, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Window_GetScreenPositionTuple" "', expected argument " "1"" of type '" "wxWindow const *""'"); + } + arg1 = reinterpret_cast< wxWindow * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + ((wxWindow const *)arg1)->GetScreenPosition(arg2,arg3); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_Py_Void(); + if (SWIG_IsTmpObj(res2)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags)); + } + if (SWIG_IsTmpObj(res3)) { + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + } + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Window_GetScreenRect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxWindow *arg1 = (wxWindow *) 0 ; + wxRect result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxWindow, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Window_GetScreenRect" "', expected argument " "1"" of type '" "wxWindow const *""'"); + } + arg1 = reinterpret_cast< wxWindow * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = ((wxWindow const *)arg1)->GetScreenRect(); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_NewPointerObj((new wxRect(static_cast< const wxRect& >(result))), SWIGTYPE_p_wxRect, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_Window_GetSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxWindow *arg1 = (wxWindow *) 0 ; @@ -43965,7 +44068,7 @@ fail: SWIGINTERN PyObject *_wrap_ItemContainer_GetCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxItemContainer *arg1 = (wxItemContainer *) 0 ; - int result; + size_t result; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; @@ -43979,11 +44082,11 @@ SWIGINTERN PyObject *_wrap_ItemContainer_GetCount(PyObject *SWIGUNUSEDPARM(self) arg1 = reinterpret_cast< wxItemContainer * >(argp1); { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (int)((wxItemContainer const *)arg1)->GetCount(); + result = (size_t)((wxItemContainer const *)arg1)->GetCount(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_From_int(static_cast< int >(result)); + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); return resultobj; fail: return NULL; @@ -53086,6 +53189,9 @@ static PyMethodDef SwigMethods[] = { { (char *)"Window_SetClientRect", (PyCFunction) _wrap_Window_SetClientRect, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Window_GetPosition", (PyCFunction)_wrap_Window_GetPosition, METH_O, NULL}, { (char *)"Window_GetPositionTuple", (PyCFunction)_wrap_Window_GetPositionTuple, METH_O, NULL}, + { (char *)"Window_GetScreenPosition", (PyCFunction)_wrap_Window_GetScreenPosition, METH_O, NULL}, + { (char *)"Window_GetScreenPositionTuple", (PyCFunction)_wrap_Window_GetScreenPositionTuple, METH_O, NULL}, + { (char *)"Window_GetScreenRect", (PyCFunction)_wrap_Window_GetScreenRect, METH_O, NULL}, { (char *)"Window_GetSize", (PyCFunction)_wrap_Window_GetSize, METH_O, NULL}, { (char *)"Window_GetSizeTuple", (PyCFunction)_wrap_Window_GetSizeTuple, METH_O, NULL}, { (char *)"Window_GetRect", (PyCFunction)_wrap_Window_GetRect, METH_O, NULL}, diff --git a/wxPython/src/gtk/_gdi.py b/wxPython/src/gtk/_gdi.py index b94349c727..ddee135fe8 100644 --- a/wxPython/src/gtk/_gdi.py +++ b/wxPython/src/gtk/_gdi.py @@ -4674,7 +4674,7 @@ class RendererNative(object): """ DrawHeaderButton(self, Window win, DC dc, Rect rect, int flags=0) - Draw the header control button (such as whar is used by `wx.ListCtrl` + Draw the header control button (such as what is used by `wx.ListCtrl` in report mode.) """ return _gdi_.RendererNative_DrawHeaderButton(*args, **kwargs) diff --git a/wxPython/src/gtk/_windows.py b/wxPython/src/gtk/_windows.py index 61c9373f57..26b0fe466b 100644 --- a/wxPython/src/gtk/_windows.py +++ b/wxPython/src/gtk/_windows.py @@ -1909,6 +1909,14 @@ class VListBox(VScrolledWindow): """SetSelectionBackground(self, Colour col)""" return _windows_.VListBox_SetSelectionBackground(*args, **kwargs) + def OnDrawSeparator(*args, **kwargs): + """OnDrawSeparator(self, DC dc, Rect rect, size_t n)""" + return _windows_.VListBox_OnDrawSeparator(*args, **kwargs) + + def OnDrawBackground(*args, **kwargs): + """OnDrawBackground(self, DC dc, Rect rect, size_t n)""" + return _windows_.VListBox_OnDrawBackground(*args, **kwargs) + VListBox_swigregister = _windows_.VListBox_swigregister VListBox_swigregister(VListBox) VListBoxNameStr = cvar.VListBoxNameStr diff --git a/wxPython/src/gtk/_windows_wrap.cpp b/wxPython/src/gtk/_windows_wrap.cpp index e10050abea..3df5d585d1 100644 --- a/wxPython/src/gtk/_windows_wrap.cpp +++ b/wxPython/src/gtk/_windows_wrap.cpp @@ -3008,7 +3008,7 @@ public: // // the base class version doesn't do anything // virtual void OnDrawSeparator(wxDC& dc, wxRect& rect, size_t n) const; - DEC_PYCALLBACK__DCRECTSIZET_constpure(OnDrawSeparator); + DEC_PYCALLBACK__DCRECTSIZET2_const(OnDrawSeparator); // this method is used to draw the items background and, maybe, a border @@ -3029,7 +3029,7 @@ IMPLEMENT_ABSTRACT_CLASS(wxPyVListBox, wxVListBox); IMP_PYCALLBACK__DCRECTSIZET_constpure(wxPyVListBox, wxVListBox, OnDrawItem); IMP_PYCALLBACK_COORD_SIZET_constpure (wxPyVListBox, wxVListBox, OnMeasureItem); -IMP_PYCALLBACK__DCRECTSIZET_constpure(wxPyVListBox, wxVListBox, OnDrawSeparator); +IMP_PYCALLBACK__DCRECTSIZET2_const (wxPyVListBox, wxVListBox, OnDrawSeparator); IMP_PYCALLBACK__DCRECTSIZET_const (wxPyVListBox, wxVListBox, OnDrawBackground); @@ -3080,6 +3080,10 @@ public: // this function may be overridden to decorate HTML returned by OnGetItem() DEC_PYCALLBACK_STRING_SIZET(OnGetItemMarkup); + // These are from wxVListBox + DEC_PYCALLBACK__DCRECTSIZET2_const(OnDrawSeparator); + DEC_PYCALLBACK__DCRECTSIZET_const(OnDrawBackground); + // TODO: // // this method allows to customize the selection appearance: it may be used // // to specify the colour of the text which normally has the given colour @@ -3103,6 +3107,8 @@ IMPLEMENT_ABSTRACT_CLASS(wxPyHtmlListBox, wxHtmlListBox) IMP_PYCALLBACK_STRING_SIZET_pure(wxPyHtmlListBox, wxHtmlListBox, OnGetItem); IMP_PYCALLBACK_STRING_SIZET (wxPyHtmlListBox, wxHtmlListBox, OnGetItemMarkup); +IMP_PYCALLBACK__DCRECTSIZET2_const (wxPyHtmlListBox, wxHtmlListBox, OnDrawSeparator); +IMP_PYCALLBACK__DCRECTSIZET_const (wxPyHtmlListBox, wxHtmlListBox, OnDrawBackground); @@ -15144,6 +15150,120 @@ fail: } +SWIGINTERN PyObject *_wrap_VListBox_OnDrawSeparator(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxPyVListBox *arg1 = (wxPyVListBox *) 0 ; + wxDC *arg2 = 0 ; + wxRect *arg3 = 0 ; + size_t arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + wxRect temp3 ; + size_t val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "dc",(char *) "rect",(char *) "n", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:VListBox_OnDrawSeparator",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxPyVListBox, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VListBox_OnDrawSeparator" "', expected argument " "1"" of type '" "wxPyVListBox const *""'"); + } + arg1 = reinterpret_cast< wxPyVListBox * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_wxDC, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VListBox_OnDrawSeparator" "', expected argument " "2"" of type '" "wxDC &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VListBox_OnDrawSeparator" "', expected argument " "2"" of type '" "wxDC &""'"); + } + arg2 = reinterpret_cast< wxDC * >(argp2); + { + arg3 = &temp3; + if ( ! wxRect_helper(obj2, &arg3)) SWIG_fail; + } + ecode4 = SWIG_AsVal_size_t(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VListBox_OnDrawSeparator" "', expected argument " "4"" of type '" "size_t""'"); + } + arg4 = static_cast< size_t >(val4); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + ((wxPyVListBox const *)arg1)->OnDrawSeparator(*arg2,*arg3,arg4); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_VListBox_OnDrawBackground(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxPyVListBox *arg1 = (wxPyVListBox *) 0 ; + wxDC *arg2 = 0 ; + wxRect *arg3 = 0 ; + size_t arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + wxRect temp3 ; + size_t val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "dc",(char *) "rect",(char *) "n", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:VListBox_OnDrawBackground",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxPyVListBox, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VListBox_OnDrawBackground" "', expected argument " "1"" of type '" "wxPyVListBox const *""'"); + } + arg1 = reinterpret_cast< wxPyVListBox * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_wxDC, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VListBox_OnDrawBackground" "', expected argument " "2"" of type '" "wxDC &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VListBox_OnDrawBackground" "', expected argument " "2"" of type '" "wxDC &""'"); + } + arg2 = reinterpret_cast< wxDC * >(argp2); + { + arg3 = &temp3; + if ( ! wxRect_helper(obj2, &arg3)) SWIG_fail; + } + ecode4 = SWIG_AsVal_size_t(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VListBox_OnDrawBackground" "', expected argument " "4"" of type '" "size_t""'"); + } + arg4 = static_cast< size_t >(val4); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + ((wxPyVListBox const *)arg1)->OnDrawBackground(*arg2,(wxRect const &)*arg3,arg4); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *VListBox_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; @@ -30633,6 +30753,8 @@ static PyMethodDef SwigMethods[] = { { (char *)"VListBox_SetMargins", (PyCFunction) _wrap_VListBox_SetMargins, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"VListBox_SetMarginsXY", (PyCFunction) _wrap_VListBox_SetMarginsXY, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"VListBox_SetSelectionBackground", (PyCFunction) _wrap_VListBox_SetSelectionBackground, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"VListBox_OnDrawSeparator", (PyCFunction) _wrap_VListBox_OnDrawSeparator, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"VListBox_OnDrawBackground", (PyCFunction) _wrap_VListBox_OnDrawBackground, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"VListBox_swigregister", VListBox_swigregister, METH_VARARGS, NULL}, { (char *)"VListBox_swiginit", VListBox_swiginit, METH_VARARGS, NULL}, { (char *)"new_HtmlListBox", (PyCFunction) _wrap_new_HtmlListBox, METH_VARARGS | METH_KEYWORDS, NULL},