From f0972d1ea490345c090c21c47acbbc9b8ef5bc97 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 7 Mar 2002 20:36:54 +0000 Subject: [PATCH] SWIGged updates for wxGTK git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14483 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/gtk/controls2.py | 10 ++ wxPython/src/gtk/gdi.cpp | 4 +- wxPython/src/gtk/help.cpp | 1 - wxPython/src/gtk/help.py | 4 - wxPython/src/gtk/html.cpp | 117 +++++++++++++++- wxPython/src/gtk/html.py | 6 + wxPython/src/gtk/stattool.cpp | 246 +++++++++++++++++++++++++++------- wxPython/src/gtk/stattool.py | 38 ++++-- wxPython/src/gtk/windows3.cpp | 2 + wxPython/src/gtk/wx.cpp | 1 + wxPython/src/gtk/wx.py | 14 +- 11 files changed, 367 insertions(+), 76 deletions(-) diff --git a/wxPython/src/gtk/controls2.py b/wxPython/src/gtk/controls2.py index c23d04975b..fa6cd756e7 100644 --- a/wxPython/src/gtk/controls2.py +++ b/wxPython/src/gtk/controls2.py @@ -653,6 +653,16 @@ class wxListCtrlPtr(wxControlPtr): def ClearColumnImage(self, col): self.SetColumnImage(col, -1) + + def Append(self, entry): + '''Append an item to the list control. The entry parameter should be a + sequence with an item for each column''' + if len(entry): + pos = self.GetItemCount() + self.InsertStringItem(pos, str(entry[0])) + for i in range(1, len(entry)): + self.SetStringItem(pos, i, str(entry[i])) + return pos class wxListCtrl(wxListCtrlPtr): def __init__(self,*_args,**_kwargs): diff --git a/wxPython/src/gtk/gdi.cpp b/wxPython/src/gtk/gdi.cpp index a8c99b144c..dc5908d062 100644 --- a/wxPython/src/gtk/gdi.cpp +++ b/wxPython/src/gtk/gdi.cpp @@ -1455,7 +1455,7 @@ static PyObject *_wrap_new_wxBitmap(PyObject *self, PyObject *args, PyObject *kw PyObject * _resultobj; wxBitmap * _result; wxString * _arg0; - wxBitmapType _arg1 = (wxBitmapType ) wxBITMAP_TYPE_BMP; + wxBitmapType _arg1 = (wxBitmapType ) wxBITMAP_TYPE_ANY; PyObject * _obj0 = 0; char *_kwnames[] = { "name","type", NULL }; char _ptemp[128]; @@ -1605,7 +1605,7 @@ static PyObject *_wrap_wxBitmap_LoadFile(PyObject *self, PyObject *args, PyObjec bool _result; wxBitmap * _arg0; wxString * _arg1; - wxBitmapType _arg2 = (wxBitmapType ) wxBITMAP_TYPE_BMP; + wxBitmapType _arg2 = (wxBitmapType ) wxBITMAP_TYPE_ANY; PyObject * _argo0 = 0; PyObject * _obj1 = 0; char *_kwnames[] = { "self","name","type", NULL }; diff --git a/wxPython/src/gtk/help.cpp b/wxPython/src/gtk/help.cpp index 9331f273a5..dbf86856e6 100644 --- a/wxPython/src/gtk/help.cpp +++ b/wxPython/src/gtk/help.cpp @@ -1238,7 +1238,6 @@ SWIGEXPORT(void) inithelpc() { PyDict_SetItemString(d,"wxID_CONTEXT_HELP", PyInt_FromLong((long) wxID_CONTEXT_HELP)); PyDict_SetItemString(d,"wxEVT_HELP", PyInt_FromLong((long) wxEVT_HELP)); PyDict_SetItemString(d,"wxEVT_DETAILED_HELP", PyInt_FromLong((long) wxEVT_DETAILED_HELP)); - PyDict_SetItemString(d,"wxEVT_CONTEXT_MENU", PyInt_FromLong((long) wxEVT_CONTEXT_MENU)); { int i; for (i = 0; _swig_mapping[i].n1; i++) diff --git a/wxPython/src/gtk/help.py b/wxPython/src/gtk/help.py index 9da1a4e532..570421d35d 100644 --- a/wxPython/src/gtk/help.py +++ b/wxPython/src/gtk/help.py @@ -26,9 +26,6 @@ def EVT_DETAILED_HELP(win, id, func): def EVT_DETAILED_HELP_RANGE(win, id, id2, func): win.Connect(id, id2, wxEVT_DETAILED_HELP, func) -def EVT_CONTEXT_MENU(win, func): - win.Connect(-1, -1, wxEVT_CONTEXT_MENU, func) - class wxHelpEventPtr(wxCommandEventPtr): def __init__(self,this): self.this = this @@ -186,7 +183,6 @@ wxDIALOG_EX_CONTEXTHELP = helpc.wxDIALOG_EX_CONTEXTHELP wxID_CONTEXT_HELP = helpc.wxID_CONTEXT_HELP wxEVT_HELP = helpc.wxEVT_HELP wxEVT_DETAILED_HELP = helpc.wxEVT_DETAILED_HELP -wxEVT_CONTEXT_MENU = helpc.wxEVT_CONTEXT_MENU #-------------- USER INCLUDE ----------------------- diff --git a/wxPython/src/gtk/html.cpp b/wxPython/src/gtk/html.cpp index b1014b8dbb..4ba47fc52b 100644 --- a/wxPython/src/gtk/html.cpp +++ b/wxPython/src/gtk/html.cpp @@ -203,10 +203,19 @@ public: : wxHtmlWindow(parent, id, pos, size, style, name) {}; wxPyHtmlWindow() : wxHtmlWindow() {}; + bool ScrollToAnchor(const wxString& anchor) { + return wxHtmlWindow::ScrollToAnchor(anchor); + } + + bool HasAnchor(const wxString& anchor) { + const wxHtmlCell *c = m_Cell->Find(wxHTML_COND_ISANCHOR, &anchor); + return c!=NULL; + } + void OnLinkClicked(const wxHtmlLinkInfo& link); void base_OnLinkClicked(const wxHtmlLinkInfo& link); - wxHtmlOpeningStatus OnOpeningURL(wxHtmlURLType type, + wxHtmlOpeningStatus OnOpeningURL(wxHtmlURLType type, const wxString& url, wxString *redirect) const; @@ -5186,6 +5195,110 @@ static PyObject *_wrap_wxHtmlWindow_GetParser(PyObject *self, PyObject *args, Py return _resultobj; } +#define wxHtmlWindow_ScrollToAnchor(_swigobj,_swigarg0) (_swigobj->ScrollToAnchor(_swigarg0)) +static PyObject *_wrap_wxHtmlWindow_ScrollToAnchor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyHtmlWindow * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","anchor", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlWindow_ScrollToAnchor",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyHtmlWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWindow_ScrollToAnchor. Expected _wxPyHtmlWindow_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxHtmlWindow_ScrollToAnchor(_arg0,*_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxHtmlWindow_HasAnchor(_swigobj,_swigarg0) (_swigobj->HasAnchor(_swigarg0)) +static PyObject *_wrap_wxHtmlWindow_HasAnchor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyHtmlWindow * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","anchor", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxHtmlWindow_HasAnchor",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyHtmlWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWindow_HasAnchor. Expected _wxPyHtmlWindow_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxHtmlWindow_HasAnchor(_arg0,*_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + #define wxHtmlWindow_base_OnLinkClicked(_swigobj,_swigarg0) (_swigobj->base_OnLinkClicked(_swigarg0)) static PyObject *_wrap_wxHtmlWindow_base_OnLinkClicked(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -6515,6 +6628,8 @@ static PyMethodDef htmlcMethods[] = { { "wxHtmlWindow_base_OnCellMouseHover", (PyCFunction) _wrap_wxHtmlWindow_base_OnCellMouseHover, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlWindow_base_OnSetTitle", (PyCFunction) _wrap_wxHtmlWindow_base_OnSetTitle, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlWindow_base_OnLinkClicked", (PyCFunction) _wrap_wxHtmlWindow_base_OnLinkClicked, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWindow_HasAnchor", (PyCFunction) _wrap_wxHtmlWindow_HasAnchor, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWindow_ScrollToAnchor", (PyCFunction) _wrap_wxHtmlWindow_ScrollToAnchor, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlWindow_GetParser", (PyCFunction) _wrap_wxHtmlWindow_GetParser, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlWindow_GetInternalRepresentation", (PyCFunction) _wrap_wxHtmlWindow_GetInternalRepresentation, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlWindow_HistoryClear", (PyCFunction) _wrap_wxHtmlWindow_HistoryClear, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/gtk/html.py b/wxPython/src/gtk/html.py index 1f0283d745..594810351f 100644 --- a/wxPython/src/gtk/html.py +++ b/wxPython/src/gtk/html.py @@ -582,6 +582,12 @@ class wxHtmlWindowPtr(wxScrolledWindowPtr): val = apply(htmlc.wxHtmlWindow_GetParser,(self,) + _args, _kwargs) if val: val = wxHtmlWinParserPtr(val) return val + def ScrollToAnchor(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWindow_ScrollToAnchor,(self,) + _args, _kwargs) + return val + def HasAnchor(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlWindow_HasAnchor,(self,) + _args, _kwargs) + return val def base_OnLinkClicked(self, *_args, **_kwargs): val = apply(htmlc.wxHtmlWindow_base_OnLinkClicked,(self,) + _args, _kwargs) return val diff --git a/wxPython/src/gtk/stattool.cpp b/wxPython/src/gtk/stattool.cpp index 2741e4382a..980d797c28 100644 --- a/wxPython/src/gtk/stattool.cpp +++ b/wxPython/src/gtk/stattool.cpp @@ -856,8 +856,8 @@ static PyObject *_wrap_wxToolBarToolBase_CanBeToggled(PyObject *self, PyObject * return _resultobj; } -#define wxToolBarToolBase_GetBitmap1(_swigobj) (_swigobj->GetBitmap1()) -static PyObject *_wrap_wxToolBarToolBase_GetBitmap1(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxToolBarToolBase_GetNormalBitmap(_swigobj) (_swigobj->GetNormalBitmap()) +static PyObject *_wrap_wxToolBarToolBase_GetNormalBitmap(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxBitmap * _result; wxToolBarToolBase * _arg0; @@ -866,28 +866,34 @@ static PyObject *_wrap_wxToolBarToolBase_GetBitmap1(PyObject *self, PyObject *ar char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxToolBarToolBase_GetBitmap1",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxToolBarToolBase_GetNormalBitmap",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxToolBarToolBase_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolBarToolBase_GetBitmap1. Expected _wxToolBarToolBase_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolBarToolBase_GetNormalBitmap. Expected _wxToolBarToolBase_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxBitmap (wxToolBarToolBase_GetBitmap1(_arg0)); + const wxBitmap & _result_ref = wxToolBarToolBase_GetNormalBitmap(_arg0); + _result = (wxBitmap *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} SWIG_MakePtr(_ptemp, (void *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } return _resultobj; } -#define wxToolBarToolBase_GetBitmap2(_swigobj) (_swigobj->GetBitmap2()) -static PyObject *_wrap_wxToolBarToolBase_GetBitmap2(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxToolBarToolBase_GetDisabledBitmap(_swigobj) (_swigobj->GetDisabledBitmap()) +static PyObject *_wrap_wxToolBarToolBase_GetDisabledBitmap(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxBitmap * _result; wxToolBarToolBase * _arg0; @@ -896,23 +902,29 @@ static PyObject *_wrap_wxToolBarToolBase_GetBitmap2(PyObject *self, PyObject *ar char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxToolBarToolBase_GetBitmap2",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxToolBarToolBase_GetDisabledBitmap",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxToolBarToolBase_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolBarToolBase_GetBitmap2. Expected _wxToolBarToolBase_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolBarToolBase_GetDisabledBitmap. Expected _wxToolBarToolBase_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxBitmap (wxToolBarToolBase_GetBitmap2(_arg0)); + const wxBitmap & _result_ref = wxToolBarToolBase_GetDisabledBitmap(_arg0); + _result = (wxBitmap *) &_result_ref; wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} SWIG_MakePtr(_ptemp, (void *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmap_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } return _resultobj; } @@ -946,6 +958,39 @@ static PyObject *_wrap_wxToolBarToolBase_GetBitmap(PyObject *self, PyObject *arg return _resultobj; } +#define wxToolBarToolBase_GetLabel(_swigobj) (_swigobj->GetLabel()) +static PyObject *_wrap_wxToolBarToolBase_GetLabel(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxToolBarToolBase * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxToolBarToolBase_GetLabel",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxToolBarToolBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolBarToolBase_GetLabel. Expected _wxToolBarToolBase_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxString (wxToolBarToolBase_GetLabel(_arg0)); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + #define wxToolBarToolBase_GetShortHelp(_swigobj) (_swigobj->GetShortHelp()) static PyObject *_wrap_wxToolBarToolBase_GetShortHelp(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1043,18 +1088,15 @@ static PyObject *_wrap_wxToolBarToolBase_Enable(PyObject *self, PyObject *args, return _resultobj; } -#define wxToolBarToolBase_Toggle(_swigobj,_swigarg0) (_swigobj->Toggle(_swigarg0)) +#define wxToolBarToolBase_Toggle(_swigobj) (_swigobj->Toggle()) static PyObject *_wrap_wxToolBarToolBase_Toggle(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - bool _result; wxToolBarToolBase * _arg0; - bool _arg1; PyObject * _argo0 = 0; - int tempbool1; - char *_kwnames[] = { "self","toggle", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxToolBarToolBase_Toggle",_kwnames,&_argo0,&tempbool1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxToolBarToolBase_Toggle",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -1063,14 +1105,14 @@ static PyObject *_wrap_wxToolBarToolBase_Toggle(PyObject *self, PyObject *args, return NULL; } } - _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxToolBarToolBase_Toggle(_arg0,_arg1); + wxToolBarToolBase_Toggle(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); +} Py_INCREF(Py_None); + _resultobj = Py_None; return _resultobj; } @@ -1209,8 +1251,8 @@ static PyObject *_wrap_wxToolBarToolBase_SetLongHelp(PyObject *self, PyObject *a return _resultobj; } -#define wxToolBarToolBase_SetBitmap1(_swigobj,_swigarg0) (_swigobj->SetBitmap1(_swigarg0)) -static PyObject *_wrap_wxToolBarToolBase_SetBitmap1(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxToolBarToolBase_SetNormalBitmap(_swigobj,_swigarg0) (_swigobj->SetNormalBitmap(_swigarg0)) +static PyObject *_wrap_wxToolBarToolBase_SetNormalBitmap(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxToolBarToolBase * _arg0; wxBitmap * _arg1; @@ -1219,25 +1261,25 @@ static PyObject *_wrap_wxToolBarToolBase_SetBitmap1(PyObject *self, PyObject *ar char *_kwnames[] = { "self","bmp", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxToolBarToolBase_SetBitmap1",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxToolBarToolBase_SetNormalBitmap",_kwnames,&_argo0,&_argo1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxToolBarToolBase_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolBarToolBase_SetBitmap1. Expected _wxToolBarToolBase_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolBarToolBase_SetNormalBitmap. Expected _wxToolBarToolBase_p."); return NULL; } } if (_argo1) { if (_argo1 == Py_None) { _arg1 = NULL; } else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxToolBarToolBase_SetBitmap1. Expected _wxBitmap_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxToolBarToolBase_SetNormalBitmap. Expected _wxBitmap_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolBarToolBase_SetBitmap1(_arg0,*_arg1); + wxToolBarToolBase_SetNormalBitmap(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1246,8 +1288,8 @@ static PyObject *_wrap_wxToolBarToolBase_SetBitmap1(PyObject *self, PyObject *ar return _resultobj; } -#define wxToolBarToolBase_SetBitmap2(_swigobj,_swigarg0) (_swigobj->SetBitmap2(_swigarg0)) -static PyObject *_wrap_wxToolBarToolBase_SetBitmap2(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxToolBarToolBase_SetDisabledBitmap(_swigobj,_swigarg0) (_swigobj->SetDisabledBitmap(_swigarg0)) +static PyObject *_wrap_wxToolBarToolBase_SetDisabledBitmap(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxToolBarToolBase * _arg0; wxBitmap * _arg1; @@ -1256,30 +1298,82 @@ static PyObject *_wrap_wxToolBarToolBase_SetBitmap2(PyObject *self, PyObject *ar char *_kwnames[] = { "self","bmp", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxToolBarToolBase_SetBitmap2",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxToolBarToolBase_SetDisabledBitmap",_kwnames,&_argo0,&_argo1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxToolBarToolBase_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolBarToolBase_SetBitmap2. Expected _wxToolBarToolBase_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolBarToolBase_SetDisabledBitmap. Expected _wxToolBarToolBase_p."); return NULL; } } if (_argo1) { if (_argo1 == Py_None) { _arg1 = NULL; } else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxToolBarToolBase_SetBitmap2. Expected _wxBitmap_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxToolBarToolBase_SetDisabledBitmap. Expected _wxBitmap_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxToolBarToolBase_SetDisabledBitmap(_arg0,*_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxToolBarToolBase_SetLabel(_swigobj,_swigarg0) (_swigobj->SetLabel(_swigarg0)) +static PyObject *_wrap_wxToolBarToolBase_SetLabel(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxToolBarToolBase * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","label", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxToolBarToolBase_SetLabel",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxToolBarToolBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolBarToolBase_SetLabel. Expected _wxToolBarToolBase_p."); return NULL; } } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxToolBarToolBase_SetBitmap2(_arg0,*_arg1); + wxToolBarToolBase_SetLabel(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} return _resultobj; } @@ -2231,8 +2325,8 @@ static PyObject *_wrap_wxToolBarBase_SetToggle(PyObject *self, PyObject *args, P return _resultobj; } -static PyObject * wxToolBarBase_GetToolClientData(wxToolBarBase *self,int index) { - wxPyUserData* udata = (wxPyUserData*)self->GetToolClientData(index); +static PyObject * wxToolBarBase_GetToolClientData(wxToolBarBase *self,int id) { + wxPyUserData* udata = (wxPyUserData*)self->GetToolClientData(id); if (udata) { Py_INCREF(udata->m_obj); return udata->m_obj; @@ -2247,7 +2341,7 @@ static PyObject *_wrap_wxToolBarBase_GetToolClientData(PyObject *self, PyObject wxToolBarBase * _arg0; int _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self","index", NULL }; + char *_kwnames[] = { "self","id", NULL }; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxToolBarBase_GetToolClientData",_kwnames,&_argo0,&_arg1)) @@ -2271,8 +2365,8 @@ static PyObject *_wrap_wxToolBarBase_GetToolClientData(PyObject *self, PyObject return _resultobj; } -static void wxToolBarBase_SetToolClientData(wxToolBarBase *self,int index,PyObject * clientData) { - self->SetToolClientData(index, new wxPyUserData(clientData)); +static void wxToolBarBase_SetToolClientData(wxToolBarBase *self,int id,PyObject * clientData) { + self->SetToolClientData(id, new wxPyUserData(clientData)); } static PyObject *_wrap_wxToolBarBase_SetToolClientData(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2281,7 +2375,7 @@ static PyObject *_wrap_wxToolBarBase_SetToolClientData(PyObject *self, PyObject PyObject * _arg2; PyObject * _argo0 = 0; PyObject * _obj2 = 0; - char *_kwnames[] = { "self","index","clientData", NULL }; + char *_kwnames[] = { "self","id","clientData", NULL }; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxToolBarBase_SetToolClientData",_kwnames,&_argo0,&_arg1,&_obj2)) @@ -2990,6 +3084,64 @@ static PyObject *_wrap_wxToolBarBase_GetToolSize(PyObject *self, PyObject *args, return _resultobj; } +#define wxToolBarBase_FindToolForPosition(_swigobj,_swigarg0,_swigarg1) (_swigobj->FindToolForPosition(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxToolBarBase_FindToolForPosition(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxToolBarToolBase * _result; + wxToolBarBase * _arg0; + wxCoord _arg1; + wxCoord _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","x","y", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxToolBarBase_FindToolForPosition",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxToolBarBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolBarBase_FindToolForPosition. Expected _wxToolBarBase_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxToolBarToolBase *)wxToolBarBase_FindToolForPosition(_arg0,_arg1,_arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ _resultobj = wxPyMake_wxObject(_result); } + return _resultobj; +} + +#define wxToolBarBase_IsVertical(_swigobj) (_swigobj->IsVertical()) +static PyObject *_wrap_wxToolBarBase_IsVertical(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxToolBarBase * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxToolBarBase_IsVertical",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxToolBarBase_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolBarBase_IsVertical. Expected _wxToolBarBase_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxToolBarBase_IsVertical(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + static void *SwigwxToolBarTowxToolBarBase(void *ptr) { wxToolBar *src; wxToolBarBase *dest; @@ -3419,6 +3571,8 @@ static PyMethodDef stattoolcMethods[] = { { "wxToolBar_Create", (PyCFunction) _wrap_wxToolBar_Create, METH_VARARGS | METH_KEYWORDS }, { "new_wxPreToolBar", (PyCFunction) _wrap_new_wxPreToolBar, METH_VARARGS | METH_KEYWORDS }, { "new_wxToolBar", (PyCFunction) _wrap_new_wxToolBar, METH_VARARGS | METH_KEYWORDS }, + { "wxToolBarBase_IsVertical", (PyCFunction) _wrap_wxToolBarBase_IsVertical, METH_VARARGS | METH_KEYWORDS }, + { "wxToolBarBase_FindToolForPosition", (PyCFunction) _wrap_wxToolBarBase_FindToolForPosition, METH_VARARGS | METH_KEYWORDS }, { "wxToolBarBase_GetToolSize", (PyCFunction) _wrap_wxToolBarBase_GetToolSize, METH_VARARGS | METH_KEYWORDS }, { "wxToolBarBase_GetToolBitmapSize", (PyCFunction) _wrap_wxToolBarBase_GetToolBitmapSize, METH_VARARGS | METH_KEYWORDS }, { "wxToolBarBase_SetToolBitmapSize", (PyCFunction) _wrap_wxToolBarBase_SetToolBitmapSize, METH_VARARGS | METH_KEYWORDS }, @@ -3462,8 +3616,9 @@ static PyMethodDef stattoolcMethods[] = { { "wxToolBarToolBase_GetClientData", (PyCFunction) _wrap_wxToolBarToolBase_GetClientData, METH_VARARGS | METH_KEYWORDS }, { "wxToolBarToolBase_Attach", (PyCFunction) _wrap_wxToolBarToolBase_Attach, METH_VARARGS | METH_KEYWORDS }, { "wxToolBarToolBase_Detach", (PyCFunction) _wrap_wxToolBarToolBase_Detach, METH_VARARGS | METH_KEYWORDS }, - { "wxToolBarToolBase_SetBitmap2", (PyCFunction) _wrap_wxToolBarToolBase_SetBitmap2, METH_VARARGS | METH_KEYWORDS }, - { "wxToolBarToolBase_SetBitmap1", (PyCFunction) _wrap_wxToolBarToolBase_SetBitmap1, METH_VARARGS | METH_KEYWORDS }, + { "wxToolBarToolBase_SetLabel", (PyCFunction) _wrap_wxToolBarToolBase_SetLabel, METH_VARARGS | METH_KEYWORDS }, + { "wxToolBarToolBase_SetDisabledBitmap", (PyCFunction) _wrap_wxToolBarToolBase_SetDisabledBitmap, METH_VARARGS | METH_KEYWORDS }, + { "wxToolBarToolBase_SetNormalBitmap", (PyCFunction) _wrap_wxToolBarToolBase_SetNormalBitmap, METH_VARARGS | METH_KEYWORDS }, { "wxToolBarToolBase_SetLongHelp", (PyCFunction) _wrap_wxToolBarToolBase_SetLongHelp, METH_VARARGS | METH_KEYWORDS }, { "wxToolBarToolBase_SetShortHelp", (PyCFunction) _wrap_wxToolBarToolBase_SetShortHelp, METH_VARARGS | METH_KEYWORDS }, { "wxToolBarToolBase_SetToggle", (PyCFunction) _wrap_wxToolBarToolBase_SetToggle, METH_VARARGS | METH_KEYWORDS }, @@ -3471,9 +3626,10 @@ static PyMethodDef stattoolcMethods[] = { { "wxToolBarToolBase_Enable", (PyCFunction) _wrap_wxToolBarToolBase_Enable, METH_VARARGS | METH_KEYWORDS }, { "wxToolBarToolBase_GetLongHelp", (PyCFunction) _wrap_wxToolBarToolBase_GetLongHelp, METH_VARARGS | METH_KEYWORDS }, { "wxToolBarToolBase_GetShortHelp", (PyCFunction) _wrap_wxToolBarToolBase_GetShortHelp, METH_VARARGS | METH_KEYWORDS }, + { "wxToolBarToolBase_GetLabel", (PyCFunction) _wrap_wxToolBarToolBase_GetLabel, METH_VARARGS | METH_KEYWORDS }, { "wxToolBarToolBase_GetBitmap", (PyCFunction) _wrap_wxToolBarToolBase_GetBitmap, METH_VARARGS | METH_KEYWORDS }, - { "wxToolBarToolBase_GetBitmap2", (PyCFunction) _wrap_wxToolBarToolBase_GetBitmap2, METH_VARARGS | METH_KEYWORDS }, - { "wxToolBarToolBase_GetBitmap1", (PyCFunction) _wrap_wxToolBarToolBase_GetBitmap1, METH_VARARGS | METH_KEYWORDS }, + { "wxToolBarToolBase_GetDisabledBitmap", (PyCFunction) _wrap_wxToolBarToolBase_GetDisabledBitmap, METH_VARARGS | METH_KEYWORDS }, + { "wxToolBarToolBase_GetNormalBitmap", (PyCFunction) _wrap_wxToolBarToolBase_GetNormalBitmap, METH_VARARGS | METH_KEYWORDS }, { "wxToolBarToolBase_CanBeToggled", (PyCFunction) _wrap_wxToolBarToolBase_CanBeToggled, METH_VARARGS | METH_KEYWORDS }, { "wxToolBarToolBase_IsToggled", (PyCFunction) _wrap_wxToolBarToolBase_IsToggled, METH_VARARGS | METH_KEYWORDS }, { "wxToolBarToolBase_IsEnabled", (PyCFunction) _wrap_wxToolBarToolBase_IsEnabled, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/gtk/stattool.py b/wxPython/src/gtk/stattool.py index 59f27eec6b..4e8be2301b 100644 --- a/wxPython/src/gtk/stattool.py +++ b/wxPython/src/gtk/stattool.py @@ -102,18 +102,21 @@ class wxToolBarToolBasePtr(wxObjectPtr): def CanBeToggled(self, *_args, **_kwargs): val = apply(stattoolc.wxToolBarToolBase_CanBeToggled,(self,) + _args, _kwargs) return val - def GetBitmap1(self, *_args, **_kwargs): - val = apply(stattoolc.wxToolBarToolBase_GetBitmap1,(self,) + _args, _kwargs) - if val: val = wxBitmapPtr(val) ; val.thisown = 1 + def GetNormalBitmap(self, *_args, **_kwargs): + val = apply(stattoolc.wxToolBarToolBase_GetNormalBitmap,(self,) + _args, _kwargs) + if val: val = wxBitmapPtr(val) return val - def GetBitmap2(self, *_args, **_kwargs): - val = apply(stattoolc.wxToolBarToolBase_GetBitmap2,(self,) + _args, _kwargs) - if val: val = wxBitmapPtr(val) ; val.thisown = 1 + def GetDisabledBitmap(self, *_args, **_kwargs): + val = apply(stattoolc.wxToolBarToolBase_GetDisabledBitmap,(self,) + _args, _kwargs) + if val: val = wxBitmapPtr(val) return val def GetBitmap(self, *_args, **_kwargs): val = apply(stattoolc.wxToolBarToolBase_GetBitmap,(self,) + _args, _kwargs) if val: val = wxBitmapPtr(val) ; val.thisown = 1 return val + def GetLabel(self, *_args, **_kwargs): + val = apply(stattoolc.wxToolBarToolBase_GetLabel,(self,) + _args, _kwargs) + return val def GetShortHelp(self, *_args, **_kwargs): val = apply(stattoolc.wxToolBarToolBase_GetShortHelp,(self,) + _args, _kwargs) return val @@ -135,11 +138,14 @@ class wxToolBarToolBasePtr(wxObjectPtr): def SetLongHelp(self, *_args, **_kwargs): val = apply(stattoolc.wxToolBarToolBase_SetLongHelp,(self,) + _args, _kwargs) return val - def SetBitmap1(self, *_args, **_kwargs): - val = apply(stattoolc.wxToolBarToolBase_SetBitmap1,(self,) + _args, _kwargs) + def SetNormalBitmap(self, *_args, **_kwargs): + val = apply(stattoolc.wxToolBarToolBase_SetNormalBitmap,(self,) + _args, _kwargs) + return val + def SetDisabledBitmap(self, *_args, **_kwargs): + val = apply(stattoolc.wxToolBarToolBase_SetDisabledBitmap,(self,) + _args, _kwargs) return val - def SetBitmap2(self, *_args, **_kwargs): - val = apply(stattoolc.wxToolBarToolBase_SetBitmap2,(self,) + _args, _kwargs) + def SetLabel(self, *_args, **_kwargs): + val = apply(stattoolc.wxToolBarToolBase_SetLabel,(self,) + _args, _kwargs) return val def Detach(self, *_args, **_kwargs): val = apply(stattoolc.wxToolBarToolBase_Detach,(self,) + _args, _kwargs) @@ -155,6 +161,12 @@ class wxToolBarToolBasePtr(wxObjectPtr): return val def __repr__(self): return "" % (self.this,) + + GetBitmap1 = GetNormalBitmap + GetBitmap2 = GetDisabledBitmap + SetBitmap1 = SetNormalBitmap + SetBitmap2 = SetDisabledBitmap + class wxToolBarToolBase(wxToolBarToolBasePtr): def __init__(self,this): self.this = this @@ -287,6 +299,12 @@ class wxToolBarBasePtr(wxControlPtr): val = apply(stattoolc.wxToolBarBase_GetToolSize,(self,) + _args, _kwargs) if val: val = wxSizePtr(val) ; val.thisown = 1 return val + def FindToolForPosition(self, *_args, **_kwargs): + val = apply(stattoolc.wxToolBarBase_FindToolForPosition,(self,) + _args, _kwargs) + return val + def IsVertical(self, *_args, **_kwargs): + val = apply(stattoolc.wxToolBarBase_IsVertical,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxToolBarBase(wxToolBarBasePtr): diff --git a/wxPython/src/gtk/windows3.cpp b/wxPython/src/gtk/windows3.cpp index ebafbd5f33..c485933a06 100644 --- a/wxPython/src/gtk/windows3.cpp +++ b/wxPython/src/gtk/windows3.cpp @@ -105,11 +105,13 @@ public: DEC_PYCALLBACK_BOOL_ME(ProcessLeftDown); DEC_PYCALLBACK__(OnDismiss); + DEC_PYCALLBACK_BOOL_(CanDismiss); PYPRIVATE; }; IMP_PYCALLBACK_BOOL_ME(wxPyPopupTransientWindow, wxPopupTransientWindow, ProcessLeftDown); IMP_PYCALLBACK__(wxPyPopupTransientWindow, wxPopupTransientWindow, OnDismiss); +IMP_PYCALLBACK_BOOL_(wxPyPopupTransientWindow, wxPopupTransientWindow, CanDismiss); #ifdef __cplusplus extern "C" { #endif diff --git a/wxPython/src/gtk/wx.cpp b/wxPython/src/gtk/wx.cpp index e10bc1d09d..294413c808 100644 --- a/wxPython/src/gtk/wx.cpp +++ b/wxPython/src/gtk/wx.cpp @@ -2564,6 +2564,7 @@ SWIGEXPORT(void) initwxc() { PyDict_SetItemString(d,"wxEVT_MENU_OPEN", PyInt_FromLong((long) wxEVT_MENU_OPEN)); PyDict_SetItemString(d,"wxEVT_MENU_CLOSE", PyInt_FromLong((long) wxEVT_MENU_CLOSE)); PyDict_SetItemString(d,"wxEVT_MENU_HIGHLIGHT", PyInt_FromLong((long) wxEVT_MENU_HIGHLIGHT)); + PyDict_SetItemString(d,"wxEVT_CONTEXT_MENU", PyInt_FromLong((long) wxEVT_CONTEXT_MENU)); PyDict_SetItemString(d,"wxEVT_SYS_COLOUR_CHANGED", PyInt_FromLong((long) wxEVT_SYS_COLOUR_CHANGED)); PyDict_SetItemString(d,"wxEVT_DISPLAY_CHANGED", PyInt_FromLong((long) wxEVT_DISPLAY_CHANGED)); PyDict_SetItemString(d,"wxEVT_SETTING_CHANGED", PyInt_FromLong((long) wxEVT_SETTING_CHANGED)); diff --git a/wxPython/src/gtk/wx.py b/wxPython/src/gtk/wx.py index 679823cd89..b213f84dfd 100644 --- a/wxPython/src/gtk/wx.py +++ b/wxPython/src/gtk/wx.py @@ -851,6 +851,7 @@ wxEVT_PAINT_ICON = wxc.wxEVT_PAINT_ICON wxEVT_MENU_OPEN = wxc.wxEVT_MENU_OPEN wxEVT_MENU_CLOSE = wxc.wxEVT_MENU_CLOSE wxEVT_MENU_HIGHLIGHT = wxc.wxEVT_MENU_HIGHLIGHT +wxEVT_CONTEXT_MENU = wxc.wxEVT_CONTEXT_MENU wxEVT_SYS_COLOUR_CHANGED = wxc.wxEVT_SYS_COLOUR_CHANGED wxEVT_DISPLAY_CHANGED = wxc.wxEVT_DISPLAY_CHANGED wxEVT_SETTING_CHANGED = wxc.wxEVT_SETTING_CHANGED @@ -1437,19 +1438,6 @@ def EVT_TOGGLEBUTTON(win, id, func): -# Help events -def EVT_HELP(win, id, func): - win.Connect(id, -1, wxEVT_HELP, func) - -def EVT_HELP_RANGE(win, id, id2, func): - win.Connect(id, id2, wxEVT_HELP, func) - -def EVT_DETAILED_HELP(win, id, func): - win.Connect(id, -1, wxEVT_DETAILED_HELP, func) - -def EVT_DETAILED_HELP_RANGE(win, id, id2, func): - win.Connect(id, id2, wxEVT_DETAILED_HELP, func) - def EVT_CONTEXT_MENU(win, func): win.Connect(-1, -1, wxEVT_CONTEXT_MENU, func) -- 2.45.2