From 366d7bd615a6ec455632e6f04453c37e995f6599 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Mon, 24 Jun 2002 21:51:06 +0000 Subject: [PATCH] Added component control accessors to wxEditableListBox git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15946 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/include/wx/gizmos/editlbox.h | 7 + wxPython/contrib/gizmos/gizmos.cpp | 216 +++++++++++++++++++++++++++ wxPython/contrib/gizmos/gizmos.i | 7 + wxPython/contrib/gizmos/gizmos.py | 24 +++ 4 files changed, 254 insertions(+) diff --git a/contrib/include/wx/gizmos/editlbox.h b/contrib/include/wx/gizmos/editlbox.h index b73e17f94a..435a286fa9 100644 --- a/contrib/include/wx/gizmos/editlbox.h +++ b/contrib/include/wx/gizmos/editlbox.h @@ -50,6 +50,13 @@ public: void SetStrings(const wxArrayString& strings); void GetStrings(wxArrayString& strings); + wxListCtrl* GetListCtrl() { return m_listCtrl; } + wxBitmapButton* GetDelButton() { return m_bDel; } + wxBitmapButton* GetNewButton() { return m_bNew; } + wxBitmapButton* GetUpButton() { return m_bUp; } + wxBitmapButton* GetDownButton() { return m_bDown; } + wxBitmapButton* GetEditButton() { return m_bEdit; } + protected: wxBitmapButton *m_bDel, *m_bNew, *m_bUp, *m_bDown, *m_bEdit; wxListCtrl *m_listCtrl; diff --git a/wxPython/contrib/gizmos/gizmos.cpp b/wxPython/contrib/gizmos/gizmos.cpp index 75b392e578..7e94899268 100644 --- a/wxPython/contrib/gizmos/gizmos.cpp +++ b/wxPython/contrib/gizmos/gizmos.cpp @@ -716,6 +716,216 @@ static PyObject *_wrap_wxEditableListBox_GetStrings(PyObject *self, PyObject *ar return _resultobj; } +#define wxEditableListBox_GetListCtrl(_swigobj) (_swigobj->GetListCtrl()) +static PyObject *_wrap_wxEditableListBox_GetListCtrl(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxListCtrl * _result; + wxEditableListBox * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxEditableListBox_GetListCtrl",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxEditableListBox_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxEditableListBox_GetListCtrl. Expected _wxEditableListBox_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxListCtrl *)wxEditableListBox_GetListCtrl(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxListCtrl_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxEditableListBox_GetDelButton(_swigobj) (_swigobj->GetDelButton()) +static PyObject *_wrap_wxEditableListBox_GetDelButton(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxBitmapButton * _result; + wxEditableListBox * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxEditableListBox_GetDelButton",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxEditableListBox_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxEditableListBox_GetDelButton. Expected _wxEditableListBox_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxBitmapButton *)wxEditableListBox_GetDelButton(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmapButton_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxEditableListBox_GetNewButton(_swigobj) (_swigobj->GetNewButton()) +static PyObject *_wrap_wxEditableListBox_GetNewButton(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxBitmapButton * _result; + wxEditableListBox * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxEditableListBox_GetNewButton",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxEditableListBox_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxEditableListBox_GetNewButton. Expected _wxEditableListBox_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxBitmapButton *)wxEditableListBox_GetNewButton(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmapButton_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxEditableListBox_GetUpButton(_swigobj) (_swigobj->GetUpButton()) +static PyObject *_wrap_wxEditableListBox_GetUpButton(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxBitmapButton * _result; + wxEditableListBox * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxEditableListBox_GetUpButton",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxEditableListBox_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxEditableListBox_GetUpButton. Expected _wxEditableListBox_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxBitmapButton *)wxEditableListBox_GetUpButton(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmapButton_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxEditableListBox_GetDownButton(_swigobj) (_swigobj->GetDownButton()) +static PyObject *_wrap_wxEditableListBox_GetDownButton(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxBitmapButton * _result; + wxEditableListBox * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxEditableListBox_GetDownButton",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxEditableListBox_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxEditableListBox_GetDownButton. Expected _wxEditableListBox_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxBitmapButton *)wxEditableListBox_GetDownButton(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmapButton_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxEditableListBox_GetEditButton(_swigobj) (_swigobj->GetEditButton()) +static PyObject *_wrap_wxEditableListBox_GetEditButton(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxBitmapButton * _result; + wxEditableListBox * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxEditableListBox_GetEditButton",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxEditableListBox_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxEditableListBox_GetEditButton. Expected _wxEditableListBox_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxBitmapButton *)wxEditableListBox_GetEditButton(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxBitmapButton_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + static void *SwigwxRemotelyScrolledTreeCtrlTowxPyTreeCtrl(void *ptr) { wxRemotelyScrolledTreeCtrl *src; wxPyTreeCtrl *dest; @@ -1760,6 +1970,12 @@ static PyMethodDef gizmoscMethods[] = { { "wxRemotelyScrolledTreeCtrl_AdjustRemoteScrollbars", (PyCFunction) _wrap_wxRemotelyScrolledTreeCtrl_AdjustRemoteScrollbars, METH_VARARGS | METH_KEYWORDS }, { "wxRemotelyScrolledTreeCtrl_HideVScrollbar", (PyCFunction) _wrap_wxRemotelyScrolledTreeCtrl_HideVScrollbar, METH_VARARGS | METH_KEYWORDS }, { "new_wxRemotelyScrolledTreeCtrl", (PyCFunction) _wrap_new_wxRemotelyScrolledTreeCtrl, METH_VARARGS | METH_KEYWORDS }, + { "wxEditableListBox_GetEditButton", (PyCFunction) _wrap_wxEditableListBox_GetEditButton, METH_VARARGS | METH_KEYWORDS }, + { "wxEditableListBox_GetDownButton", (PyCFunction) _wrap_wxEditableListBox_GetDownButton, METH_VARARGS | METH_KEYWORDS }, + { "wxEditableListBox_GetUpButton", (PyCFunction) _wrap_wxEditableListBox_GetUpButton, METH_VARARGS | METH_KEYWORDS }, + { "wxEditableListBox_GetNewButton", (PyCFunction) _wrap_wxEditableListBox_GetNewButton, METH_VARARGS | METH_KEYWORDS }, + { "wxEditableListBox_GetDelButton", (PyCFunction) _wrap_wxEditableListBox_GetDelButton, METH_VARARGS | METH_KEYWORDS }, + { "wxEditableListBox_GetListCtrl", (PyCFunction) _wrap_wxEditableListBox_GetListCtrl, METH_VARARGS | METH_KEYWORDS }, { "wxEditableListBox_GetStrings", (PyCFunction) _wrap_wxEditableListBox_GetStrings, METH_VARARGS | METH_KEYWORDS }, { "wxEditableListBox_SetStrings", (PyCFunction) _wrap_wxEditableListBox_SetStrings, METH_VARARGS | METH_KEYWORDS }, { "new_wxEditableListBox", (PyCFunction) _wrap_new_wxEditableListBox, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/contrib/gizmos/gizmos.i b/wxPython/contrib/gizmos/gizmos.i index b5348751cc..466d181c47 100644 --- a/wxPython/contrib/gizmos/gizmos.i +++ b/wxPython/contrib/gizmos/gizmos.i @@ -193,6 +193,13 @@ public: return wxArrayString2PyList_helper(strings); } } + + wxListCtrl* GetListCtrl() { return m_listCtrl; } + wxBitmapButton* GetDelButton() { return m_bDel; } + wxBitmapButton* GetNewButton() { return m_bNew; } + wxBitmapButton* GetUpButton() { return m_bUp; } + wxBitmapButton* GetDownButton() { return m_bDown; } + wxBitmapButton* GetEditButton() { return m_bEdit; } }; diff --git a/wxPython/contrib/gizmos/gizmos.py b/wxPython/contrib/gizmos/gizmos.py index 7aef9baf01..c96190872e 100644 --- a/wxPython/contrib/gizmos/gizmos.py +++ b/wxPython/contrib/gizmos/gizmos.py @@ -119,6 +119,30 @@ class wxEditableListBoxPtr(wxPanelPtr): def GetStrings(self, *_args, **_kwargs): val = apply(gizmosc.wxEditableListBox_GetStrings,(self,) + _args, _kwargs) return val + def GetListCtrl(self, *_args, **_kwargs): + val = apply(gizmosc.wxEditableListBox_GetListCtrl,(self,) + _args, _kwargs) + if val: val = wxListCtrlPtr(val) + return val + def GetDelButton(self, *_args, **_kwargs): + val = apply(gizmosc.wxEditableListBox_GetDelButton,(self,) + _args, _kwargs) + if val: val = wxBitmapButtonPtr(val) + return val + def GetNewButton(self, *_args, **_kwargs): + val = apply(gizmosc.wxEditableListBox_GetNewButton,(self,) + _args, _kwargs) + if val: val = wxBitmapButtonPtr(val) + return val + def GetUpButton(self, *_args, **_kwargs): + val = apply(gizmosc.wxEditableListBox_GetUpButton,(self,) + _args, _kwargs) + if val: val = wxBitmapButtonPtr(val) + return val + def GetDownButton(self, *_args, **_kwargs): + val = apply(gizmosc.wxEditableListBox_GetDownButton,(self,) + _args, _kwargs) + if val: val = wxBitmapButtonPtr(val) + return val + def GetEditButton(self, *_args, **_kwargs): + val = apply(gizmosc.wxEditableListBox_GetEditButton,(self,) + _args, _kwargs) + if val: val = wxBitmapButtonPtr(val) + return val def __repr__(self): return "" % (self.this,) class wxEditableListBox(wxEditableListBoxPtr):