X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b02396e86fa089d576b5c70a2067a6559e653a50..e6ab1c5756d6f068ff4fd50ad759afce5bd04bbd:/wxPython/src/mac/_controls_wrap.cpp diff --git a/wxPython/src/mac/_controls_wrap.cpp b/wxPython/src/mac/_controls_wrap.cpp index 79740c2a47..5feef7d431 100644 --- a/wxPython/src/mac/_controls_wrap.cpp +++ b/wxPython/src/mac/_controls_wrap.cpp @@ -985,6 +985,10 @@ typedef struct swig_const_info { /* Common SWIG API */ +#if PY_VERSION_HEX < 0x02050000 +typedef int Py_ssize_t; +#endif + /* for raw pointers */ #define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0) #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags) @@ -2048,7 +2052,7 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { void *vptr = 0; /* here we get the method pointer for callbacks */ - char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); + const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; if (desc) { desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; @@ -2621,21 +2625,20 @@ SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) #define SWIGTYPE_p_wxToolBarToolBase swig_types[159] #define SWIGTYPE_p_wxToolbook swig_types[160] #define SWIGTYPE_p_wxToolbookEvent swig_types[161] -#define SWIGTYPE_p_wxTreeCtrl swig_types[162] -#define SWIGTYPE_p_wxTreeEvent swig_types[163] -#define SWIGTYPE_p_wxTreeItemId swig_types[164] -#define SWIGTYPE_p_wxTreebook swig_types[165] -#define SWIGTYPE_p_wxTreebookEvent swig_types[166] -#define SWIGTYPE_p_wxUpdateUIEvent swig_types[167] -#define SWIGTYPE_p_wxValidator swig_types[168] -#define SWIGTYPE_p_wxVisualAttributes swig_types[169] -#define SWIGTYPE_p_wxWindow swig_types[170] -#define SWIGTYPE_p_wxWindowBase swig_types[171] -#define SWIGTYPE_p_wxWindowCreateEvent swig_types[172] -#define SWIGTYPE_p_wxWindowDestroyEvent swig_types[173] -#define SWIGTYPE_p_wxXPMHandler swig_types[174] -static swig_type_info *swig_types[176]; -static swig_module_info swig_module = {swig_types, 175, 0, 0, 0, 0}; +#define SWIGTYPE_p_wxTreeEvent swig_types[162] +#define SWIGTYPE_p_wxTreeItemId swig_types[163] +#define SWIGTYPE_p_wxTreebook swig_types[164] +#define SWIGTYPE_p_wxTreebookEvent swig_types[165] +#define SWIGTYPE_p_wxUpdateUIEvent swig_types[166] +#define SWIGTYPE_p_wxValidator swig_types[167] +#define SWIGTYPE_p_wxVisualAttributes swig_types[168] +#define SWIGTYPE_p_wxWindow swig_types[169] +#define SWIGTYPE_p_wxWindowBase swig_types[170] +#define SWIGTYPE_p_wxWindowCreateEvent swig_types[171] +#define SWIGTYPE_p_wxWindowDestroyEvent swig_types[172] +#define SWIGTYPE_p_wxXPMHandler swig_types[173] +static swig_type_info *swig_types[175]; +static swig_module_info swig_module = {swig_types, 174, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -22023,7 +22026,7 @@ fail: SWIGINTERN PyObject *_wrap_Treebook_GetTreeCtrl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxTreebook *arg1 = (wxTreebook *) 0 ; - wxTreeCtrl *result = 0 ; + wxPyTreeCtrl *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; @@ -22037,11 +22040,13 @@ SWIGINTERN PyObject *_wrap_Treebook_GetTreeCtrl(PyObject *SWIGUNUSEDPARM(self), arg1 = reinterpret_cast< wxTreebook * >(argp1); { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxTreeCtrl *)((wxTreebook const *)arg1)->GetTreeCtrl(); + result = (wxPyTreeCtrl *)((wxTreebook const *)arg1)->GetTreeCtrl(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wxTreeCtrl, 0 | 0 ); + { + resultobj = wxPyMake_wxObject(result, (bool)0); + } return resultobj; fail: return NULL; @@ -36276,6 +36281,74 @@ fail: } +SWIGINTERN PyObject *_wrap_TreeCtrl_ExpandAllChildren(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxPyTreeCtrl *arg1 = (wxPyTreeCtrl *) 0 ; + wxTreeItemId *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "item", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TreeCtrl_ExpandAllChildren",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxPyTreeCtrl, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TreeCtrl_ExpandAllChildren" "', expected argument " "1"" of type '" "wxPyTreeCtrl *""'"); + } + arg1 = reinterpret_cast< wxPyTreeCtrl * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_wxTreeItemId, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TreeCtrl_ExpandAllChildren" "', expected argument " "2"" of type '" "wxTreeItemId const &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TreeCtrl_ExpandAllChildren" "', expected argument " "2"" of type '" "wxTreeItemId const &""'"); + } + arg2 = reinterpret_cast< wxTreeItemId * >(argp2); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->ExpandAllChildren((wxTreeItemId const &)*arg2); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_TreeCtrl_ExpandAll(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxPyTreeCtrl *arg1 = (wxPyTreeCtrl *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxPyTreeCtrl, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TreeCtrl_ExpandAll" "', expected argument " "1"" of type '" "wxPyTreeCtrl *""'"); + } + arg1 = reinterpret_cast< wxPyTreeCtrl * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->ExpandAll(); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_TreeCtrl_Collapse(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxPyTreeCtrl *arg1 = (wxPyTreeCtrl *) 0 ; @@ -42393,6 +42466,72 @@ fail: } +SWIGINTERN PyObject *_wrap_PickerBase_SetPickerCtrlProportion(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxPickerBase *arg1 = (wxPickerBase *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "prop", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PickerBase_SetPickerCtrlProportion",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxPickerBase, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PickerBase_SetPickerCtrlProportion" "', expected argument " "1"" of type '" "wxPickerBase *""'"); + } + arg1 = reinterpret_cast< wxPickerBase * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PickerBase_SetPickerCtrlProportion" "', expected argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->SetPickerCtrlProportion(arg2); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PickerBase_GetPickerCtrlProportion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxPickerBase *arg1 = (wxPickerBase *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxPickerBase, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PickerBase_GetPickerCtrlProportion" "', expected argument " "1"" of type '" "wxPickerBase const *""'"); + } + arg1 = reinterpret_cast< wxPickerBase * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (int)((wxPickerBase const *)arg1)->GetPickerCtrlProportion(); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_PickerBase_IsTextCtrlGrowable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; wxPickerBase *arg1 = (wxPickerBase *) 0 ; @@ -45769,6 +45908,8 @@ static PyMethodDef SwigMethods[] = { { (char *)"TreeCtrl_DeleteChildren", (PyCFunction) _wrap_TreeCtrl_DeleteChildren, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"TreeCtrl_DeleteAllItems", (PyCFunction)_wrap_TreeCtrl_DeleteAllItems, METH_O, NULL}, { (char *)"TreeCtrl_Expand", (PyCFunction) _wrap_TreeCtrl_Expand, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"TreeCtrl_ExpandAllChildren", (PyCFunction) _wrap_TreeCtrl_ExpandAllChildren, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"TreeCtrl_ExpandAll", (PyCFunction)_wrap_TreeCtrl_ExpandAll, METH_O, NULL}, { (char *)"TreeCtrl_Collapse", (PyCFunction) _wrap_TreeCtrl_Collapse, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"TreeCtrl_CollapseAndReset", (PyCFunction) _wrap_TreeCtrl_CollapseAndReset, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"TreeCtrl_Toggle", (PyCFunction) _wrap_TreeCtrl_Toggle, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -45925,6 +46066,8 @@ static PyMethodDef SwigMethods[] = { { (char *)"PickerBase_GetInternalMargin", (PyCFunction)_wrap_PickerBase_GetInternalMargin, METH_O, NULL}, { (char *)"PickerBase_SetTextCtrlProportion", (PyCFunction) _wrap_PickerBase_SetTextCtrlProportion, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"PickerBase_GetTextCtrlProportion", (PyCFunction)_wrap_PickerBase_GetTextCtrlProportion, METH_O, NULL}, + { (char *)"PickerBase_SetPickerCtrlProportion", (PyCFunction) _wrap_PickerBase_SetPickerCtrlProportion, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"PickerBase_GetPickerCtrlProportion", (PyCFunction)_wrap_PickerBase_GetPickerCtrlProportion, METH_O, NULL}, { (char *)"PickerBase_IsTextCtrlGrowable", (PyCFunction)_wrap_PickerBase_IsTextCtrlGrowable, METH_O, NULL}, { (char *)"PickerBase_SetTextCtrlGrowable", (PyCFunction) _wrap_PickerBase_SetTextCtrlGrowable, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"PickerBase_IsPickerCtrlGrowable", (PyCFunction)_wrap_PickerBase_IsPickerCtrlGrowable, METH_O, NULL}, @@ -47339,7 +47482,6 @@ static swig_type_info _swigt__p_wxToolBarBase = {"_p_wxToolBarBase", "wxToolBarB static swig_type_info _swigt__p_wxToolBarToolBase = {"_p_wxToolBarToolBase", "wxToolBarToolBase *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_wxToolbook = {"_p_wxToolbook", "wxToolbook *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_wxToolbookEvent = {"_p_wxToolbookEvent", "wxToolbookEvent *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_wxTreeCtrl = {"_p_wxTreeCtrl", "wxTreeCtrl *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_wxTreeEvent = {"_p_wxTreeEvent", "wxTreeEvent *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_wxTreeItemId = {"_p_wxTreeItemId", "wxTreeItemId *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_wxTreebook = {"_p_wxTreebook", "wxTreebook *", 0, 0, (void*)0, 0}; @@ -47512,7 +47654,6 @@ static swig_type_info *swig_type_initial[] = { &_swigt__p_wxToolBarToolBase, &_swigt__p_wxToolbook, &_swigt__p_wxToolbookEvent, - &_swigt__p_wxTreeCtrl, &_swigt__p_wxTreeEvent, &_swigt__p_wxTreeItemId, &_swigt__p_wxTreebook, @@ -47693,7 +47834,6 @@ static swig_cast_info _swigc__p_wxToolBarBase[] = { {&_swigt__p_wxToolBarBase, static swig_cast_info _swigc__p_wxToolBarToolBase[] = { {&_swigt__p_wxToolBarToolBase, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxToolbook[] = { {&_swigt__p_wxToolbook, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxToolbookEvent[] = { {&_swigt__p_wxToolbookEvent, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_wxTreeCtrl[] = { {&_swigt__p_wxTreeCtrl, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxTreeEvent[] = { {&_swigt__p_wxTreeEvent, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxTreeItemId[] = { {&_swigt__p_wxTreeItemId, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_wxTreebook[] = { {&_swigt__p_wxTreebook, 0, 0, 0},{0, 0, 0, 0}}; @@ -47866,7 +48006,6 @@ static swig_cast_info *swig_cast_initial[] = { _swigc__p_wxToolBarToolBase, _swigc__p_wxToolbook, _swigc__p_wxToolbookEvent, - _swigc__p_wxTreeCtrl, _swigc__p_wxTreeEvent, _swigc__p_wxTreeItemId, _swigc__p_wxTreebook, @@ -48323,11 +48462,11 @@ extern "C" { swig_type_info **types_initial) { size_t i; for (i = 0; methods[i].ml_name; ++i) { - char *c = methods[i].ml_doc; + const char *c = methods[i].ml_doc; if (c && (c = strstr(c, "swig_ptr: "))) { int j; swig_const_info *ci = 0; - char *name = c + 10; + const char *name = c + 10; for (j = 0; const_table[j].type; ++j) { if (strncmp(const_table[j].name, name, strlen(const_table[j].name)) == 0) { @@ -48491,6 +48630,11 @@ SWIGEXPORT void SWIG_init(void) { SWIG_Python_SetConstant(d, "BK_RIGHT",SWIG_From_int(static_cast< int >(wxBK_RIGHT))); SWIG_Python_SetConstant(d, "BK_ALIGN_MASK",SWIG_From_int(static_cast< int >(wxBK_ALIGN_MASK))); SWIG_Python_SetConstant(d, "BK_BUTTONBAR",SWIG_From_int(static_cast< int >(wxBK_BUTTONBAR))); + SWIG_Python_SetConstant(d, "BK_HITTEST_NOWHERE",SWIG_From_int(static_cast< int >(wxBK_HITTEST_NOWHERE))); + SWIG_Python_SetConstant(d, "BK_HITTEST_ONICON",SWIG_From_int(static_cast< int >(wxBK_HITTEST_ONICON))); + SWIG_Python_SetConstant(d, "BK_HITTEST_ONLABEL",SWIG_From_int(static_cast< int >(wxBK_HITTEST_ONLABEL))); + SWIG_Python_SetConstant(d, "BK_HITTEST_ONITEM",SWIG_From_int(static_cast< int >(wxBK_HITTEST_ONITEM))); + SWIG_Python_SetConstant(d, "BK_HITTEST_ONPAGE",SWIG_From_int(static_cast< int >(wxBK_HITTEST_ONPAGE))); SWIG_Python_SetConstant(d, "NB_FIXEDWIDTH",SWIG_From_int(static_cast< int >(wxNB_FIXEDWIDTH))); SWIG_Python_SetConstant(d, "NB_TOP",SWIG_From_int(static_cast< int >(wxNB_TOP))); SWIG_Python_SetConstant(d, "NB_LEFT",SWIG_From_int(static_cast< int >(wxNB_LEFT)));