X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f05326bac1f28170999fcfd22234335c7d02dd8c..a608c09d8533b09af952026203fb609703047843:/wxPython/src/msw/grid_wrap.cpp diff --git a/wxPython/src/msw/grid_wrap.cpp b/wxPython/src/msw/grid_wrap.cpp index cb0a0fc99a..541393fa71 100644 --- a/wxPython/src/msw/grid_wrap.cpp +++ b/wxPython/src/msw/grid_wrap.cpp @@ -11898,18 +11898,22 @@ SWIGINTERN PyObject *_wrap_Grid_XToCol(PyObject *SWIGUNUSEDPARM(self), PyObject PyObject *resultobj = 0; wxGrid *arg1 = (wxGrid *) 0 ; int arg2 ; + bool arg3 = (bool) false ; int result; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; + bool val3 ; + int ecode3 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; char * kwnames[] = { - (char *) "self",(char *) "x", NULL + (char *) "self",(char *) "x",(char *) "clipToMinMax", NULL }; - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Grid_XToCol",kwnames,&obj0,&obj1)) SWIG_fail; + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:Grid_XToCol",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxGrid, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Grid_XToCol" "', expected argument " "1"" of type '" "wxGrid *""'"); @@ -11920,9 +11924,16 @@ SWIGINTERN PyObject *_wrap_Grid_XToCol(PyObject *SWIGUNUSEDPARM(self), PyObject SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Grid_XToCol" "', expected argument " "2"" of type '" "int""'"); } arg2 = static_cast< int >(val2); + if (obj2) { + ecode3 = SWIG_AsVal_bool(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Grid_XToCol" "', expected argument " "3"" of type '" "bool""'"); + } + arg3 = static_cast< bool >(val3); + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (int)(arg1)->XToCol(arg2); + result = (int)(arg1)->XToCol(arg2,arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } @@ -13949,6 +13960,103 @@ fail: } +SWIGINTERN PyObject *_wrap_Grid_EnableDragColMove(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxGrid *arg1 = (wxGrid *) 0 ; + bool arg2 = (bool) true ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "enable", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Grid_EnableDragColMove",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Grid_EnableDragColMove" "', expected argument " "1"" of type '" "wxGrid *""'"); + } + arg1 = reinterpret_cast< wxGrid * >(argp1); + if (obj1) { + ecode2 = SWIG_AsVal_bool(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Grid_EnableDragColMove" "', expected argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->EnableDragColMove(arg2); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Grid_DisableDragColMove(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxGrid *arg1 = (wxGrid *) 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_wxGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Grid_DisableDragColMove" "', expected argument " "1"" of type '" "wxGrid *""'"); + } + arg1 = reinterpret_cast< wxGrid * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->DisableDragColMove(); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Grid_CanDragColMove(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + wxGrid *arg1 = (wxGrid *) 0 ; + bool 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_wxGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Grid_CanDragColMove" "', expected argument " "1"" of type '" "wxGrid *""'"); + } + arg1 = reinterpret_cast< wxGrid * >(argp1); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)(arg1)->CanDragColMove(); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_Grid_EnableDragGridSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxGrid *arg1 = (wxGrid *) 0 ; @@ -15418,6 +15526,131 @@ fail: } +SWIGINTERN PyObject *_wrap_Grid_GetColAt(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxGrid *arg1 = (wxGrid *) 0 ; + int arg2 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "colPos", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Grid_GetColAt",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Grid_GetColAt" "', expected argument " "1"" of type '" "wxGrid const *""'"); + } + arg1 = reinterpret_cast< wxGrid * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Grid_GetColAt" "', expected argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (int)((wxGrid const *)arg1)->GetColAt(arg2); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Grid_SetColPos(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxGrid *arg1 = (wxGrid *) 0 ; + int arg2 ; + int arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "colID",(char *) "newPos", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:Grid_SetColPos",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Grid_SetColPos" "', expected argument " "1"" of type '" "wxGrid *""'"); + } + arg1 = reinterpret_cast< wxGrid * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Grid_SetColPos" "', expected argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Grid_SetColPos" "', expected argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->SetColPos(arg2,arg3); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Grid_GetColPos(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { + PyObject *resultobj = 0; + wxGrid *arg1 = (wxGrid *) 0 ; + int arg2 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char * kwnames[] = { + (char *) "self",(char *) "colID", NULL + }; + + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Grid_GetColPos",kwnames,&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxGrid, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Grid_GetColPos" "', expected argument " "1"" of type '" "wxGrid const *""'"); + } + arg1 = reinterpret_cast< wxGrid * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Grid_GetColPos" "', expected argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (int)((wxGrid const *)arg1)->GetColPos(arg2); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_Grid_AutoSizeColumn(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; wxGrid *arg1 = (wxGrid *) 0 ; @@ -20324,6 +20557,9 @@ static PyMethodDef SwigMethods[] = { { (char *)"Grid_EnableDragColSize", (PyCFunction) _wrap_Grid_EnableDragColSize, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Grid_DisableDragColSize", (PyCFunction)_wrap_Grid_DisableDragColSize, METH_O, NULL}, { (char *)"Grid_CanDragColSize", (PyCFunction)_wrap_Grid_CanDragColSize, METH_O, NULL}, + { (char *)"Grid_EnableDragColMove", (PyCFunction) _wrap_Grid_EnableDragColMove, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"Grid_DisableDragColMove", (PyCFunction)_wrap_Grid_DisableDragColMove, METH_O, NULL}, + { (char *)"Grid_CanDragColMove", (PyCFunction)_wrap_Grid_CanDragColMove, METH_O, NULL}, { (char *)"Grid_EnableDragGridSize", (PyCFunction) _wrap_Grid_EnableDragGridSize, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Grid_DisableDragGridSize", (PyCFunction)_wrap_Grid_DisableDragGridSize, METH_O, NULL}, { (char *)"Grid_CanDragGridSize", (PyCFunction)_wrap_Grid_CanDragGridSize, METH_O, NULL}, @@ -20359,6 +20595,9 @@ static PyMethodDef SwigMethods[] = { { (char *)"Grid_SetRowSize", (PyCFunction) _wrap_Grid_SetRowSize, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Grid_SetDefaultColSize", (PyCFunction) _wrap_Grid_SetDefaultColSize, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Grid_SetColSize", (PyCFunction) _wrap_Grid_SetColSize, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"Grid_GetColAt", (PyCFunction) _wrap_Grid_GetColAt, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"Grid_SetColPos", (PyCFunction) _wrap_Grid_SetColPos, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"Grid_GetColPos", (PyCFunction) _wrap_Grid_GetColPos, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Grid_AutoSizeColumn", (PyCFunction) _wrap_Grid_AutoSizeColumn, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Grid_AutoSizeRow", (PyCFunction) _wrap_Grid_AutoSizeRow, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Grid_AutoSizeColumns", (PyCFunction) _wrap_Grid_AutoSizeColumns, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -22785,11 +23024,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) {