]> git.saurik.com Git - wxWidgets.git/commitdiff
reSWIGged
authorRobin Dunn <robin@alldunn.com>
Mon, 26 Apr 2004 23:41:48 +0000 (23:41 +0000)
committerRobin Dunn <robin@alldunn.com>
Mon, 26 Apr 2004 23:41:48 +0000 (23:41 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26981 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/src/gtk/_controls.py
wxPython/src/gtk/_controls_wrap.cpp
wxPython/src/gtk/_core_wrap.cpp
wxPython/src/mac/_controls.py
wxPython/src/mac/_controls_wrap.cpp
wxPython/src/msw/_controls.py
wxPython/src/msw/_controls_wrap.cpp

index 4c9ef52811960d4a547446a87c3943d99194ca0b..435c8f32cb47b7b390992c477e10df2de0ff7a2f 100644 (file)
@@ -381,7 +381,7 @@ class Choice(_core.ControlWithItems):
 
     def SetStringSelection(*args, **kwargs):
         """
-        SetStringSelection(self, String string)
+        SetStringSelection(self, String string) -> bool
 
         Select the item with the specifed string
         """
@@ -524,14 +524,34 @@ class ComboBox(_core.Control,_core.ItemContainer):
         """
         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)
 
     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)
 
+    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):
         """SetEditable(self, bool editable)"""
         return _controls_.ComboBox_SetEditable(*args, **kwargs)
index 2ed9f0630a09a3cf7948879cd94ddcf483bb20fa..669dbf999da21c3be5a000e4eeb7317ff2ee520a 100644 (file)
@@ -2687,6 +2687,7 @@ static PyObject *_wrap_Choice_SetStringSelection(PyObject *self, PyObject *args,
     PyObject *resultobj;
     wxChoice *arg1 = (wxChoice *) 0 ;
     wxString *arg2 = 0 ;
+    bool result;
     bool temp2 = False ;
     PyObject * obj0 = 0 ;
     PyObject * obj1 = 0 ;
@@ -2704,12 +2705,14 @@ static PyObject *_wrap_Choice_SetStringSelection(PyObject *self, PyObject *args,
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
-        (arg1)->SetStringSelection((wxString const &)*arg2);
+        result = (bool)(arg1)->SetStringSelection((wxString const &)*arg2);
         
         wxPyEndAllowThreads(__tstate);
         if (PyErr_Occurred()) SWIG_fail;
     }
-    Py_INCREF(Py_None); resultobj = Py_None;
+    {
+        resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj);
+    }
     {
         if (temp2)
         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) {
     PyObject *resultobj;
     wxComboBox *arg1 = (wxComboBox *) 0 ;
@@ -30276,6 +30368,8 @@ static PyMethodDef SwigMethods[] = {
         { (char *)"ComboBox_Replace", (PyCFunction) _wrap_ComboBox_Replace, 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_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_SetInsertionPointEnd", (PyCFunction) _wrap_ComboBox_SetInsertionPointEnd, METH_VARARGS | METH_KEYWORDS },
         { (char *)"ComboBox_Remove", (PyCFunction) _wrap_ComboBox_Remove, METH_VARARGS | METH_KEYWORDS },
index 1d55aacaec97e755a0034e01934452f261328674..a6e430a505365c9ae4be471ec25f8a27463535d6 100644 (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
-// the wx.core module and will then have safe access to these functions, even if
-// they are located in another shared library.
+// the wx._core_ module and will then have safe access to these functions,
+// even if they are located in another shared library.
 static wxPyCoreAPI API = {
 
     (p_SWIG_Python_TypeRegister_t)SWIG_Python_TypeRegister,
index 82388fe96472ec310457676f80204c055a9d2fe8..b64b37227b877e49e9b0da1dfa1ff00fcbc1416a 100644 (file)
@@ -381,7 +381,7 @@ class Choice(_core.ControlWithItems):
 
     def SetStringSelection(*args, **kwargs):
         """
-        SetStringSelection(self, String string)
+        SetStringSelection(self, String string) -> bool
 
         Select the item with the specifed string
         """
@@ -524,14 +524,34 @@ class ComboBox(_core.Control,_core.ItemContainer):
         """
         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)
 
     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)
 
+    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):
         """SetEditable(self, bool editable)"""
         return _controls_.ComboBox_SetEditable(*args, **kwargs)
@@ -2086,6 +2106,30 @@ class ToggleButton(_core.Control):
         del newobj.thisown
         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):
     def __init__(self, this):
index 9e760de78dd8babe2732304ca48dadbfea22a3f7..446c7f92e9aa10080eee2c5c026d5866abcda7a0 100644 (file)
@@ -2684,6 +2684,7 @@ static PyObject *_wrap_Choice_SetStringSelection(PyObject *self, PyObject *args,
     PyObject *resultobj;
     wxChoice *arg1 = (wxChoice *) 0 ;
     wxString *arg2 = 0 ;
+    bool result;
     bool temp2 = False ;
     PyObject * obj0 = 0 ;
     PyObject * obj1 = 0 ;
@@ -2701,12 +2702,14 @@ static PyObject *_wrap_Choice_SetStringSelection(PyObject *self, PyObject *args,
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
-        (arg1)->SetStringSelection((wxString const &)*arg2);
+        result = (bool)(arg1)->SetStringSelection((wxString const &)*arg2);
         
         wxPyEndAllowThreads(__tstate);
         if (PyErr_Occurred()) SWIG_fail;
     }
-    Py_INCREF(Py_None); resultobj = Py_None;
+    {
+        resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj);
+    }
     {
         if (temp2)
         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) {
     PyObject *resultobj;
     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) {
     PyObject *obj;
     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_SetSelection", (PyCFunction) _wrap_ComboBox_SetSelection, 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_SetInsertionPointEnd", (PyCFunction) _wrap_ComboBox_SetInsertionPointEnd, 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 *)"new_ToggleButton", (PyCFunction) _wrap_new_ToggleButton, 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 *)"BookCtrl_GetPageCount", (PyCFunction) _wrap_BookCtrl_GetPageCount, METH_VARARGS | METH_KEYWORDS },
         { (char *)"BookCtrl_GetPage", (PyCFunction) _wrap_BookCtrl_GetPage, METH_VARARGS | METH_KEYWORDS },
index afd9ed3e4941687a91716a331bd23c7b19a0959f..1e26f25220a535044f05047550818e21dc74647e 100644 (file)
@@ -381,7 +381,7 @@ class Choice(_core.ControlWithItems):
 
     def SetStringSelection(*args, **kwargs):
         """
-        SetStringSelection(self, String string)
+        SetStringSelection(self, String string) -> bool
 
         Select the item with the specifed string
         """
@@ -524,14 +524,34 @@ class ComboBox(Choice):
         """
         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)
 
     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)
 
+    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):
         """SetEditable(self, bool editable)"""
         return _controls_.ComboBox_SetEditable(*args, **kwargs)
index bb5ada952de6419b0fab2b6463861765661c5e12..55ebfad852a7c3203f3431a147b8989bc5c7cada 100644 (file)
@@ -2684,6 +2684,7 @@ static PyObject *_wrap_Choice_SetStringSelection(PyObject *self, PyObject *args,
     PyObject *resultobj;
     wxChoice *arg1 = (wxChoice *) 0 ;
     wxString *arg2 = 0 ;
+    bool result;
     bool temp2 = False ;
     PyObject * obj0 = 0 ;
     PyObject * obj1 = 0 ;
@@ -2701,12 +2702,14 @@ static PyObject *_wrap_Choice_SetStringSelection(PyObject *self, PyObject *args,
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
-        (arg1)->SetStringSelection((wxString const &)*arg2);
+        result = (bool)(arg1)->SetStringSelection((wxString const &)*arg2);
         
         wxPyEndAllowThreads(__tstate);
         if (PyErr_Occurred()) SWIG_fail;
     }
-    Py_INCREF(Py_None); resultobj = Py_None;
+    {
+        resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj);
+    }
     {
         if (temp2)
         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) {
     PyObject *resultobj;
     wxComboBox *arg1 = (wxComboBox *) 0 ;
@@ -30479,6 +30571,8 @@ static PyMethodDef SwigMethods[] = {
         { (char *)"ComboBox_Replace", (PyCFunction) _wrap_ComboBox_Replace, 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_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_SetInsertionPointEnd", (PyCFunction) _wrap_ComboBox_SetInsertionPointEnd, METH_VARARGS | METH_KEYWORDS },
         { (char *)"ComboBox_Remove", (PyCFunction) _wrap_ComboBox_Remove, METH_VARARGS | METH_KEYWORDS },