Added wxTextCtrl.GetStringSelection
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12413 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
f0db4f3850
commit
b78b83ecb4
@ -560,6 +560,7 @@ public:
|
||||
|
||||
// If the return values from and to are the same, there is no selection.
|
||||
void GetSelection(long* OUTPUT, long* OUTPUT) const;
|
||||
wxString GetStringSelection();
|
||||
|
||||
void Clear();
|
||||
void Replace(long from, long to, const wxString& value);
|
||||
|
@ -6463,6 +6463,39 @@ static PyObject *_wrap_wxTextCtrl_GetSelection(PyObject *self, PyObject *args, P
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxTextCtrl_GetStringSelection(_swigobj) (_swigobj->GetStringSelection())
|
||||
static PyObject *_wrap_wxTextCtrl_GetStringSelection(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxString * _result;
|
||||
wxTextCtrl * _arg0;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTextCtrl_GetStringSelection",_kwnames,&_argo0))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTextCtrl_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextCtrl_GetStringSelection. Expected _wxTextCtrl_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
_result = new wxString (wxTextCtrl_GetStringSelection(_arg0));
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
}
|
||||
{
|
||||
delete _result;
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxTextCtrl_Clear(_swigobj) (_swigobj->Clear())
|
||||
static PyObject *_wrap_wxTextCtrl_Clear(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
@ -11183,6 +11216,7 @@ static PyMethodDef controlscMethods[] = {
|
||||
{ "wxTextCtrl_Remove", (PyCFunction) _wrap_wxTextCtrl_Remove, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxTextCtrl_Replace", (PyCFunction) _wrap_wxTextCtrl_Replace, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxTextCtrl_Clear", (PyCFunction) _wrap_wxTextCtrl_Clear, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxTextCtrl_GetStringSelection", (PyCFunction) _wrap_wxTextCtrl_GetStringSelection, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxTextCtrl_GetSelection", (PyCFunction) _wrap_wxTextCtrl_GetSelection, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxTextCtrl_IsEditable", (PyCFunction) _wrap_wxTextCtrl_IsEditable, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxTextCtrl_IsModified", (PyCFunction) _wrap_wxTextCtrl_IsModified, METH_VARARGS | METH_KEYWORDS },
|
||||
|
@ -635,6 +635,9 @@ class wxTextCtrlPtr(wxControlPtr):
|
||||
def GetSelection(self, *_args, **_kwargs):
|
||||
val = apply(controlsc.wxTextCtrl_GetSelection,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def GetStringSelection(self, *_args, **_kwargs):
|
||||
val = apply(controlsc.wxTextCtrl_GetStringSelection,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def Clear(self, *_args, **_kwargs):
|
||||
val = apply(controlsc.wxTextCtrl_Clear,(self,) + _args, _kwargs)
|
||||
return val
|
||||
|
Loading…
Reference in New Issue
Block a user