reSWIGged

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26981 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2004-04-26 23:41:48 +00:00
parent 5020e71e3d
commit 121b9a6757
7 changed files with 594 additions and 17 deletions

View File

@@ -381,7 +381,7 @@ class Choice(_core.ControlWithItems):
def SetStringSelection(*args, **kwargs): def SetStringSelection(*args, **kwargs):
""" """
SetStringSelection(self, String string) SetStringSelection(self, String string) -> bool
Select the item with the specifed string Select the item with the specifed string
""" """
@@ -524,14 +524,34 @@ class ComboBox(_core.Control,_core.ItemContainer):
""" """
SetSelection(self, int n) SetSelection(self, int n)
Selects the text between the two positions, in the combobox text field. Sets the item at index 'n' to be the selected item.
""" """
return _controls_.ComboBox_SetSelection(*args, **kwargs) return _controls_.ComboBox_SetSelection(*args, **kwargs)
def SetMark(*args, **kwargs): def SetMark(*args, **kwargs):
"""SetMark(self, long from, long to)""" """
SetMark(self, long from, long to)
Selects the text between the two positions in the combobox text field.
"""
return _controls_.ComboBox_SetMark(*args, **kwargs) return _controls_.ComboBox_SetMark(*args, **kwargs)
def SetStringSelection(*args, **kwargs):
"""
SetStringSelection(self, String string) -> bool
Select the item with the specifed string
"""
return _controls_.ComboBox_SetStringSelection(*args, **kwargs)
def SetString(*args, **kwargs):
"""
SetString(self, int n, String string)
Set the label for the n'th item (zero based) in the list.
"""
return _controls_.ComboBox_SetString(*args, **kwargs)
def SetEditable(*args, **kwargs): def SetEditable(*args, **kwargs):
"""SetEditable(self, bool editable)""" """SetEditable(self, bool editable)"""
return _controls_.ComboBox_SetEditable(*args, **kwargs) return _controls_.ComboBox_SetEditable(*args, **kwargs)

View File

@@ -2687,6 +2687,7 @@ static PyObject *_wrap_Choice_SetStringSelection(PyObject *self, PyObject *args,
PyObject *resultobj; PyObject *resultobj;
wxChoice *arg1 = (wxChoice *) 0 ; wxChoice *arg1 = (wxChoice *) 0 ;
wxString *arg2 = 0 ; wxString *arg2 = 0 ;
bool result;
bool temp2 = False ; bool temp2 = False ;
PyObject * obj0 = 0 ; PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ; PyObject * obj1 = 0 ;
@@ -2704,12 +2705,14 @@ static PyObject *_wrap_Choice_SetStringSelection(PyObject *self, PyObject *args,
} }
{ {
PyThreadState* __tstate = wxPyBeginAllowThreads(); PyThreadState* __tstate = wxPyBeginAllowThreads();
(arg1)->SetStringSelection((wxString const &)*arg2); result = (bool)(arg1)->SetStringSelection((wxString const &)*arg2);
wxPyEndAllowThreads(__tstate); wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail; if (PyErr_Occurred()) SWIG_fail;
} }
Py_INCREF(Py_None); resultobj = Py_None; {
resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj);
}
{ {
if (temp2) if (temp2)
delete arg2; delete arg2;
@@ -3446,6 +3449,95 @@ static PyObject *_wrap_ComboBox_SetMark(PyObject *self, PyObject *args, PyObject
} }
static PyObject *_wrap_ComboBox_SetStringSelection(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxComboBox *arg1 = (wxComboBox *) 0 ;
wxString *arg2 = 0 ;
bool result;
bool temp2 = False ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char *kwnames[] = {
(char *) "self",(char *) "string", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:ComboBox_SetStringSelection",kwnames,&obj0,&obj1)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxComboBox,
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
{
arg2 = wxString_in_helper(obj1);
if (arg2 == NULL) SWIG_fail;
temp2 = True;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (bool)(arg1)->SetStringSelection((wxString const &)*arg2);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
{
resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj);
}
{
if (temp2)
delete arg2;
}
return resultobj;
fail:
{
if (temp2)
delete arg2;
}
return NULL;
}
static PyObject *_wrap_ComboBox_SetString(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxComboBox *arg1 = (wxComboBox *) 0 ;
int arg2 ;
wxString *arg3 = 0 ;
bool temp3 = False ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
char *kwnames[] = {
(char *) "self",(char *) "n",(char *) "string", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:ComboBox_SetString",kwnames,&obj0,&obj1,&obj2)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxComboBox,
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
arg2 = (int) SWIG_AsInt(obj1);
if (PyErr_Occurred()) SWIG_fail;
{
arg3 = wxString_in_helper(obj2);
if (arg3 == NULL) SWIG_fail;
temp3 = True;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
(arg1)->SetString(arg2,(wxString const &)*arg3);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
Py_INCREF(Py_None); resultobj = Py_None;
{
if (temp3)
delete arg3;
}
return resultobj;
fail:
{
if (temp3)
delete arg3;
}
return NULL;
}
static PyObject *_wrap_ComboBox_SetEditable(PyObject *self, PyObject *args, PyObject *kwargs) { static PyObject *_wrap_ComboBox_SetEditable(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj; PyObject *resultobj;
wxComboBox *arg1 = (wxComboBox *) 0 ; wxComboBox *arg1 = (wxComboBox *) 0 ;
@@ -30276,6 +30368,8 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"ComboBox_Replace", (PyCFunction) _wrap_ComboBox_Replace, METH_VARARGS | METH_KEYWORDS }, { (char *)"ComboBox_Replace", (PyCFunction) _wrap_ComboBox_Replace, METH_VARARGS | METH_KEYWORDS },
{ (char *)"ComboBox_SetSelection", (PyCFunction) _wrap_ComboBox_SetSelection, METH_VARARGS | METH_KEYWORDS }, { (char *)"ComboBox_SetSelection", (PyCFunction) _wrap_ComboBox_SetSelection, METH_VARARGS | METH_KEYWORDS },
{ (char *)"ComboBox_SetMark", (PyCFunction) _wrap_ComboBox_SetMark, METH_VARARGS | METH_KEYWORDS }, { (char *)"ComboBox_SetMark", (PyCFunction) _wrap_ComboBox_SetMark, METH_VARARGS | METH_KEYWORDS },
{ (char *)"ComboBox_SetStringSelection", (PyCFunction) _wrap_ComboBox_SetStringSelection, METH_VARARGS | METH_KEYWORDS },
{ (char *)"ComboBox_SetString", (PyCFunction) _wrap_ComboBox_SetString, METH_VARARGS | METH_KEYWORDS },
{ (char *)"ComboBox_SetEditable", (PyCFunction) _wrap_ComboBox_SetEditable, METH_VARARGS | METH_KEYWORDS }, { (char *)"ComboBox_SetEditable", (PyCFunction) _wrap_ComboBox_SetEditable, METH_VARARGS | METH_KEYWORDS },
{ (char *)"ComboBox_SetInsertionPointEnd", (PyCFunction) _wrap_ComboBox_SetInsertionPointEnd, METH_VARARGS | METH_KEYWORDS }, { (char *)"ComboBox_SetInsertionPointEnd", (PyCFunction) _wrap_ComboBox_SetInsertionPointEnd, METH_VARARGS | METH_KEYWORDS },
{ (char *)"ComboBox_Remove", (PyCFunction) _wrap_ComboBox_Remove, METH_VARARGS | METH_KEYWORDS }, { (char *)"ComboBox_Remove", (PyCFunction) _wrap_ComboBox_Remove, METH_VARARGS | METH_KEYWORDS },

View File

@@ -493,8 +493,8 @@ PyObject* wxPyMakeSwigPtr(void* ptr, const wxChar* className) {
// Export a C API in a struct. Other modules will be able to load this from // Export a C API in a struct. Other modules will be able to load this from
// the wx.core module and will then have safe access to these functions, even if // the wx._core_ module and will then have safe access to these functions,
// they are located in another shared library. // even if they are located in another shared library.
static wxPyCoreAPI API = { static wxPyCoreAPI API = {
(p_SWIG_Python_TypeRegister_t)SWIG_Python_TypeRegister, (p_SWIG_Python_TypeRegister_t)SWIG_Python_TypeRegister,

View File

@@ -381,7 +381,7 @@ class Choice(_core.ControlWithItems):
def SetStringSelection(*args, **kwargs): def SetStringSelection(*args, **kwargs):
""" """
SetStringSelection(self, String string) SetStringSelection(self, String string) -> bool
Select the item with the specifed string Select the item with the specifed string
""" """
@@ -524,14 +524,34 @@ class ComboBox(_core.Control,_core.ItemContainer):
""" """
SetSelection(self, int n) SetSelection(self, int n)
Selects the text between the two positions, in the combobox text field. Sets the item at index 'n' to be the selected item.
""" """
return _controls_.ComboBox_SetSelection(*args, **kwargs) return _controls_.ComboBox_SetSelection(*args, **kwargs)
def SetMark(*args, **kwargs): def SetMark(*args, **kwargs):
"""SetMark(self, long from, long to)""" """
SetMark(self, long from, long to)
Selects the text between the two positions in the combobox text field.
"""
return _controls_.ComboBox_SetMark(*args, **kwargs) return _controls_.ComboBox_SetMark(*args, **kwargs)
def SetStringSelection(*args, **kwargs):
"""
SetStringSelection(self, String string) -> bool
Select the item with the specifed string
"""
return _controls_.ComboBox_SetStringSelection(*args, **kwargs)
def SetString(*args, **kwargs):
"""
SetString(self, int n, String string)
Set the label for the n'th item (zero based) in the list.
"""
return _controls_.ComboBox_SetString(*args, **kwargs)
def SetEditable(*args, **kwargs): def SetEditable(*args, **kwargs):
"""SetEditable(self, bool editable)""" """SetEditable(self, bool editable)"""
return _controls_.ComboBox_SetEditable(*args, **kwargs) return _controls_.ComboBox_SetEditable(*args, **kwargs)
@@ -2086,6 +2106,30 @@ class ToggleButton(_core.Control):
del newobj.thisown del newobj.thisown
self._setOORInfo(self) self._setOORInfo(self)
def Create(*args, **kwargs):
"""
Create(self, Window parent, int id, String label, Point pos=DefaultPosition,
Size size=DefaultSize, long style=0,
Validator validator=DefaultValidator, String name=ToggleButtonNameStr) -> bool
"""
return _controls_.ToggleButton_Create(*args, **kwargs)
def SetValue(*args, **kwargs):
"""SetValue(self, bool value)"""
return _controls_.ToggleButton_SetValue(*args, **kwargs)
def GetValue(*args, **kwargs):
"""GetValue(self) -> bool"""
return _controls_.ToggleButton_GetValue(*args, **kwargs)
def SetLabel(*args, **kwargs):
"""
SetLabel(self, String label)
Sets the item's text.
"""
return _controls_.ToggleButton_SetLabel(*args, **kwargs)
class ToggleButtonPtr(ToggleButton): class ToggleButtonPtr(ToggleButton):
def __init__(self, this): def __init__(self, this):

View File

@@ -2684,6 +2684,7 @@ static PyObject *_wrap_Choice_SetStringSelection(PyObject *self, PyObject *args,
PyObject *resultobj; PyObject *resultobj;
wxChoice *arg1 = (wxChoice *) 0 ; wxChoice *arg1 = (wxChoice *) 0 ;
wxString *arg2 = 0 ; wxString *arg2 = 0 ;
bool result;
bool temp2 = False ; bool temp2 = False ;
PyObject * obj0 = 0 ; PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ; PyObject * obj1 = 0 ;
@@ -2701,12 +2702,14 @@ static PyObject *_wrap_Choice_SetStringSelection(PyObject *self, PyObject *args,
} }
{ {
PyThreadState* __tstate = wxPyBeginAllowThreads(); PyThreadState* __tstate = wxPyBeginAllowThreads();
(arg1)->SetStringSelection((wxString const &)*arg2); result = (bool)(arg1)->SetStringSelection((wxString const &)*arg2);
wxPyEndAllowThreads(__tstate); wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail; if (PyErr_Occurred()) SWIG_fail;
} }
Py_INCREF(Py_None); resultobj = Py_None; {
resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj);
}
{ {
if (temp2) if (temp2)
delete arg2; delete arg2;
@@ -3443,6 +3446,95 @@ static PyObject *_wrap_ComboBox_SetMark(PyObject *self, PyObject *args, PyObject
} }
static PyObject *_wrap_ComboBox_SetStringSelection(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxComboBox *arg1 = (wxComboBox *) 0 ;
wxString *arg2 = 0 ;
bool result;
bool temp2 = False ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char *kwnames[] = {
(char *) "self",(char *) "string", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:ComboBox_SetStringSelection",kwnames,&obj0,&obj1)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxComboBox,
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
{
arg2 = wxString_in_helper(obj1);
if (arg2 == NULL) SWIG_fail;
temp2 = True;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (bool)(arg1)->SetStringSelection((wxString const &)*arg2);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
{
resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj);
}
{
if (temp2)
delete arg2;
}
return resultobj;
fail:
{
if (temp2)
delete arg2;
}
return NULL;
}
static PyObject *_wrap_ComboBox_SetString(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxComboBox *arg1 = (wxComboBox *) 0 ;
int arg2 ;
wxString *arg3 = 0 ;
bool temp3 = False ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
char *kwnames[] = {
(char *) "self",(char *) "n",(char *) "string", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:ComboBox_SetString",kwnames,&obj0,&obj1,&obj2)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxComboBox,
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
arg2 = (int) SWIG_AsInt(obj1);
if (PyErr_Occurred()) SWIG_fail;
{
arg3 = wxString_in_helper(obj2);
if (arg3 == NULL) SWIG_fail;
temp3 = True;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
(arg1)->SetString(arg2,(wxString const &)*arg3);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
Py_INCREF(Py_None); resultobj = Py_None;
{
if (temp3)
delete arg3;
}
return resultobj;
fail:
{
if (temp3)
delete arg3;
}
return NULL;
}
static PyObject *_wrap_ComboBox_SetEditable(PyObject *self, PyObject *args, PyObject *kwargs) { static PyObject *_wrap_ComboBox_SetEditable(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj; PyObject *resultobj;
wxComboBox *arg1 = (wxComboBox *) 0 ; wxComboBox *arg1 = (wxComboBox *) 0 ;
@@ -13038,6 +13130,213 @@ static PyObject *_wrap_new_PreToggleButton(PyObject *self, PyObject *args, PyObj
} }
static PyObject *_wrap_ToggleButton_Create(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxToggleButton *arg1 = (wxToggleButton *) 0 ;
wxWindow *arg2 = (wxWindow *) 0 ;
int arg3 ;
wxString *arg4 = 0 ;
wxPoint const &arg5_defvalue = wxDefaultPosition ;
wxPoint *arg5 = (wxPoint *) &arg5_defvalue ;
wxSize const &arg6_defvalue = wxDefaultSize ;
wxSize *arg6 = (wxSize *) &arg6_defvalue ;
long arg7 = (long) 0 ;
wxValidator const &arg8_defvalue = wxDefaultValidator ;
wxValidator *arg8 = (wxValidator *) &arg8_defvalue ;
wxString const &arg9_defvalue = wxPyToggleButtonNameStr ;
wxString *arg9 = (wxString *) &arg9_defvalue ;
bool result;
bool temp4 = False ;
wxPoint temp5 ;
wxSize temp6 ;
bool temp9 = False ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
PyObject * obj3 = 0 ;
PyObject * obj4 = 0 ;
PyObject * obj5 = 0 ;
PyObject * obj6 = 0 ;
PyObject * obj7 = 0 ;
PyObject * obj8 = 0 ;
char *kwnames[] = {
(char *) "self",(char *) "parent",(char *) "id",(char *) "label",(char *) "pos",(char *) "size",(char *) "style",(char *) "validator",(char *) "name", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOOOO:ToggleButton_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxToggleButton,
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow,
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
arg3 = (int) SWIG_AsInt(obj2);
if (PyErr_Occurred()) SWIG_fail;
{
arg4 = wxString_in_helper(obj3);
if (arg4 == NULL) SWIG_fail;
temp4 = True;
}
if (obj4) {
{
arg5 = &temp5;
if ( ! wxPoint_helper(obj4, &arg5)) SWIG_fail;
}
}
if (obj5) {
{
arg6 = &temp6;
if ( ! wxSize_helper(obj5, &arg6)) SWIG_fail;
}
}
if (obj6) {
arg7 = (long) SWIG_AsLong(obj6);
if (PyErr_Occurred()) SWIG_fail;
}
if (obj7) {
if ((SWIG_ConvertPtr(obj7,(void **)(&arg8),SWIGTYPE_p_wxValidator,
SWIG_POINTER_EXCEPTION | 0)) == -1)
SWIG_fail;
if (arg8 == NULL) {
PyErr_SetString(PyExc_TypeError,"null reference");
SWIG_fail;
}
}
if (obj8) {
{
arg9 = wxString_in_helper(obj8);
if (arg9 == NULL) SWIG_fail;
temp9 = True;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (bool)(arg1)->Create(arg2,arg3,(wxString const &)*arg4,(wxPoint const &)*arg5,(wxSize const &)*arg6,arg7,(wxValidator const &)*arg8,(wxString const &)*arg9);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
{
resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj);
}
{
if (temp4)
delete arg4;
}
{
if (temp9)
delete arg9;
}
return resultobj;
fail:
{
if (temp4)
delete arg4;
}
{
if (temp9)
delete arg9;
}
return NULL;
}
static PyObject *_wrap_ToggleButton_SetValue(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxToggleButton *arg1 = (wxToggleButton *) 0 ;
bool arg2 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char *kwnames[] = {
(char *) "self",(char *) "value", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:ToggleButton_SetValue",kwnames,&obj0,&obj1)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxToggleButton,
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
arg2 = (bool) SWIG_AsBool(obj1);
if (PyErr_Occurred()) SWIG_fail;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
(arg1)->SetValue(arg2);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
Py_INCREF(Py_None); resultobj = Py_None;
return resultobj;
fail:
return NULL;
}
static PyObject *_wrap_ToggleButton_GetValue(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxToggleButton *arg1 = (wxToggleButton *) 0 ;
bool result;
PyObject * obj0 = 0 ;
char *kwnames[] = {
(char *) "self", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:ToggleButton_GetValue",kwnames,&obj0)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxToggleButton,
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (bool)((wxToggleButton const *)arg1)->GetValue();
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
{
resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj);
}
return resultobj;
fail:
return NULL;
}
static PyObject *_wrap_ToggleButton_SetLabel(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxToggleButton *arg1 = (wxToggleButton *) 0 ;
wxString *arg2 = 0 ;
bool temp2 = False ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char *kwnames[] = {
(char *) "self",(char *) "label", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:ToggleButton_SetLabel",kwnames,&obj0,&obj1)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxToggleButton,
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
{
arg2 = wxString_in_helper(obj1);
if (arg2 == NULL) SWIG_fail;
temp2 = True;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
(arg1)->SetLabel((wxString const &)*arg2);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
Py_INCREF(Py_None); resultobj = Py_None;
{
if (temp2)
delete arg2;
}
return resultobj;
fail:
{
if (temp2)
delete arg2;
}
return NULL;
}
static PyObject * ToggleButton_swigregister(PyObject *self, PyObject *args) { static PyObject * ToggleButton_swigregister(PyObject *self, PyObject *args) {
PyObject *obj; PyObject *obj;
if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
@@ -30040,6 +30339,8 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"ComboBox_Replace", (PyCFunction) _wrap_ComboBox_Replace, METH_VARARGS | METH_KEYWORDS }, { (char *)"ComboBox_Replace", (PyCFunction) _wrap_ComboBox_Replace, METH_VARARGS | METH_KEYWORDS },
{ (char *)"ComboBox_SetSelection", (PyCFunction) _wrap_ComboBox_SetSelection, METH_VARARGS | METH_KEYWORDS }, { (char *)"ComboBox_SetSelection", (PyCFunction) _wrap_ComboBox_SetSelection, METH_VARARGS | METH_KEYWORDS },
{ (char *)"ComboBox_SetMark", (PyCFunction) _wrap_ComboBox_SetMark, METH_VARARGS | METH_KEYWORDS }, { (char *)"ComboBox_SetMark", (PyCFunction) _wrap_ComboBox_SetMark, METH_VARARGS | METH_KEYWORDS },
{ (char *)"ComboBox_SetStringSelection", (PyCFunction) _wrap_ComboBox_SetStringSelection, METH_VARARGS | METH_KEYWORDS },
{ (char *)"ComboBox_SetString", (PyCFunction) _wrap_ComboBox_SetString, METH_VARARGS | METH_KEYWORDS },
{ (char *)"ComboBox_SetEditable", (PyCFunction) _wrap_ComboBox_SetEditable, METH_VARARGS | METH_KEYWORDS }, { (char *)"ComboBox_SetEditable", (PyCFunction) _wrap_ComboBox_SetEditable, METH_VARARGS | METH_KEYWORDS },
{ (char *)"ComboBox_SetInsertionPointEnd", (PyCFunction) _wrap_ComboBox_SetInsertionPointEnd, METH_VARARGS | METH_KEYWORDS }, { (char *)"ComboBox_SetInsertionPointEnd", (PyCFunction) _wrap_ComboBox_SetInsertionPointEnd, METH_VARARGS | METH_KEYWORDS },
{ (char *)"ComboBox_Remove", (PyCFunction) _wrap_ComboBox_Remove, METH_VARARGS | METH_KEYWORDS }, { (char *)"ComboBox_Remove", (PyCFunction) _wrap_ComboBox_Remove, METH_VARARGS | METH_KEYWORDS },
@@ -30286,6 +30587,10 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"Slider_swigregister", Slider_swigregister, METH_VARARGS }, { (char *)"Slider_swigregister", Slider_swigregister, METH_VARARGS },
{ (char *)"new_ToggleButton", (PyCFunction) _wrap_new_ToggleButton, METH_VARARGS | METH_KEYWORDS }, { (char *)"new_ToggleButton", (PyCFunction) _wrap_new_ToggleButton, METH_VARARGS | METH_KEYWORDS },
{ (char *)"new_PreToggleButton", (PyCFunction) _wrap_new_PreToggleButton, METH_VARARGS | METH_KEYWORDS }, { (char *)"new_PreToggleButton", (PyCFunction) _wrap_new_PreToggleButton, METH_VARARGS | METH_KEYWORDS },
{ (char *)"ToggleButton_Create", (PyCFunction) _wrap_ToggleButton_Create, METH_VARARGS | METH_KEYWORDS },
{ (char *)"ToggleButton_SetValue", (PyCFunction) _wrap_ToggleButton_SetValue, METH_VARARGS | METH_KEYWORDS },
{ (char *)"ToggleButton_GetValue", (PyCFunction) _wrap_ToggleButton_GetValue, METH_VARARGS | METH_KEYWORDS },
{ (char *)"ToggleButton_SetLabel", (PyCFunction) _wrap_ToggleButton_SetLabel, METH_VARARGS | METH_KEYWORDS },
{ (char *)"ToggleButton_swigregister", ToggleButton_swigregister, METH_VARARGS }, { (char *)"ToggleButton_swigregister", ToggleButton_swigregister, METH_VARARGS },
{ (char *)"BookCtrl_GetPageCount", (PyCFunction) _wrap_BookCtrl_GetPageCount, METH_VARARGS | METH_KEYWORDS }, { (char *)"BookCtrl_GetPageCount", (PyCFunction) _wrap_BookCtrl_GetPageCount, METH_VARARGS | METH_KEYWORDS },
{ (char *)"BookCtrl_GetPage", (PyCFunction) _wrap_BookCtrl_GetPage, METH_VARARGS | METH_KEYWORDS }, { (char *)"BookCtrl_GetPage", (PyCFunction) _wrap_BookCtrl_GetPage, METH_VARARGS | METH_KEYWORDS },

View File

@@ -381,7 +381,7 @@ class Choice(_core.ControlWithItems):
def SetStringSelection(*args, **kwargs): def SetStringSelection(*args, **kwargs):
""" """
SetStringSelection(self, String string) SetStringSelection(self, String string) -> bool
Select the item with the specifed string Select the item with the specifed string
""" """
@@ -524,14 +524,34 @@ class ComboBox(Choice):
""" """
SetSelection(self, int n) SetSelection(self, int n)
Selects the text between the two positions, in the combobox text field. Sets the item at index 'n' to be the selected item.
""" """
return _controls_.ComboBox_SetSelection(*args, **kwargs) return _controls_.ComboBox_SetSelection(*args, **kwargs)
def SetMark(*args, **kwargs): def SetMark(*args, **kwargs):
"""SetMark(self, long from, long to)""" """
SetMark(self, long from, long to)
Selects the text between the two positions in the combobox text field.
"""
return _controls_.ComboBox_SetMark(*args, **kwargs) return _controls_.ComboBox_SetMark(*args, **kwargs)
def SetStringSelection(*args, **kwargs):
"""
SetStringSelection(self, String string) -> bool
Select the item with the specifed string
"""
return _controls_.ComboBox_SetStringSelection(*args, **kwargs)
def SetString(*args, **kwargs):
"""
SetString(self, int n, String string)
Set the label for the n'th item (zero based) in the list.
"""
return _controls_.ComboBox_SetString(*args, **kwargs)
def SetEditable(*args, **kwargs): def SetEditable(*args, **kwargs):
"""SetEditable(self, bool editable)""" """SetEditable(self, bool editable)"""
return _controls_.ComboBox_SetEditable(*args, **kwargs) return _controls_.ComboBox_SetEditable(*args, **kwargs)

View File

@@ -2684,6 +2684,7 @@ static PyObject *_wrap_Choice_SetStringSelection(PyObject *self, PyObject *args,
PyObject *resultobj; PyObject *resultobj;
wxChoice *arg1 = (wxChoice *) 0 ; wxChoice *arg1 = (wxChoice *) 0 ;
wxString *arg2 = 0 ; wxString *arg2 = 0 ;
bool result;
bool temp2 = False ; bool temp2 = False ;
PyObject * obj0 = 0 ; PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ; PyObject * obj1 = 0 ;
@@ -2701,12 +2702,14 @@ static PyObject *_wrap_Choice_SetStringSelection(PyObject *self, PyObject *args,
} }
{ {
PyThreadState* __tstate = wxPyBeginAllowThreads(); PyThreadState* __tstate = wxPyBeginAllowThreads();
(arg1)->SetStringSelection((wxString const &)*arg2); result = (bool)(arg1)->SetStringSelection((wxString const &)*arg2);
wxPyEndAllowThreads(__tstate); wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail; if (PyErr_Occurred()) SWIG_fail;
} }
Py_INCREF(Py_None); resultobj = Py_None; {
resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj);
}
{ {
if (temp2) if (temp2)
delete arg2; delete arg2;
@@ -3443,6 +3446,95 @@ static PyObject *_wrap_ComboBox_SetMark(PyObject *self, PyObject *args, PyObject
} }
static PyObject *_wrap_ComboBox_SetStringSelection(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxComboBox *arg1 = (wxComboBox *) 0 ;
wxString *arg2 = 0 ;
bool result;
bool temp2 = False ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char *kwnames[] = {
(char *) "self",(char *) "string", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:ComboBox_SetStringSelection",kwnames,&obj0,&obj1)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxComboBox,
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
{
arg2 = wxString_in_helper(obj1);
if (arg2 == NULL) SWIG_fail;
temp2 = True;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (bool)(arg1)->SetStringSelection((wxString const &)*arg2);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
{
resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj);
}
{
if (temp2)
delete arg2;
}
return resultobj;
fail:
{
if (temp2)
delete arg2;
}
return NULL;
}
static PyObject *_wrap_ComboBox_SetString(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxComboBox *arg1 = (wxComboBox *) 0 ;
int arg2 ;
wxString *arg3 = 0 ;
bool temp3 = False ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
char *kwnames[] = {
(char *) "self",(char *) "n",(char *) "string", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:ComboBox_SetString",kwnames,&obj0,&obj1,&obj2)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxComboBox,
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
arg2 = (int) SWIG_AsInt(obj1);
if (PyErr_Occurred()) SWIG_fail;
{
arg3 = wxString_in_helper(obj2);
if (arg3 == NULL) SWIG_fail;
temp3 = True;
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
(arg1)->SetString(arg2,(wxString const &)*arg3);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
Py_INCREF(Py_None); resultobj = Py_None;
{
if (temp3)
delete arg3;
}
return resultobj;
fail:
{
if (temp3)
delete arg3;
}
return NULL;
}
static PyObject *_wrap_ComboBox_SetEditable(PyObject *self, PyObject *args, PyObject *kwargs) { static PyObject *_wrap_ComboBox_SetEditable(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj; PyObject *resultobj;
wxComboBox *arg1 = (wxComboBox *) 0 ; wxComboBox *arg1 = (wxComboBox *) 0 ;
@@ -30479,6 +30571,8 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"ComboBox_Replace", (PyCFunction) _wrap_ComboBox_Replace, METH_VARARGS | METH_KEYWORDS }, { (char *)"ComboBox_Replace", (PyCFunction) _wrap_ComboBox_Replace, METH_VARARGS | METH_KEYWORDS },
{ (char *)"ComboBox_SetSelection", (PyCFunction) _wrap_ComboBox_SetSelection, METH_VARARGS | METH_KEYWORDS }, { (char *)"ComboBox_SetSelection", (PyCFunction) _wrap_ComboBox_SetSelection, METH_VARARGS | METH_KEYWORDS },
{ (char *)"ComboBox_SetMark", (PyCFunction) _wrap_ComboBox_SetMark, METH_VARARGS | METH_KEYWORDS }, { (char *)"ComboBox_SetMark", (PyCFunction) _wrap_ComboBox_SetMark, METH_VARARGS | METH_KEYWORDS },
{ (char *)"ComboBox_SetStringSelection", (PyCFunction) _wrap_ComboBox_SetStringSelection, METH_VARARGS | METH_KEYWORDS },
{ (char *)"ComboBox_SetString", (PyCFunction) _wrap_ComboBox_SetString, METH_VARARGS | METH_KEYWORDS },
{ (char *)"ComboBox_SetEditable", (PyCFunction) _wrap_ComboBox_SetEditable, METH_VARARGS | METH_KEYWORDS }, { (char *)"ComboBox_SetEditable", (PyCFunction) _wrap_ComboBox_SetEditable, METH_VARARGS | METH_KEYWORDS },
{ (char *)"ComboBox_SetInsertionPointEnd", (PyCFunction) _wrap_ComboBox_SetInsertionPointEnd, METH_VARARGS | METH_KEYWORDS }, { (char *)"ComboBox_SetInsertionPointEnd", (PyCFunction) _wrap_ComboBox_SetInsertionPointEnd, METH_VARARGS | METH_KEYWORDS },
{ (char *)"ComboBox_Remove", (PyCFunction) _wrap_ComboBox_Remove, METH_VARARGS | METH_KEYWORDS }, { (char *)"ComboBox_Remove", (PyCFunction) _wrap_ComboBox_Remove, METH_VARARGS | METH_KEYWORDS },