X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e6056257ab676ea10a51ef96e19b1f1092f95b40..a92b0cfd2bd0bef75b43c071df0b0e028f360d8e:/wxPython/src/mac/calendar.cpp?ds=sidebyside diff --git a/wxPython/src/mac/calendar.cpp b/wxPython/src/mac/calendar.cpp index 9452f8c2cd..6c0f8da5db 100644 --- a/wxPython/src/mac/calendar.cpp +++ b/wxPython/src/mac/calendar.cpp @@ -1123,6 +1123,198 @@ static PyObject *_wrap_wxCalendarCtrl_GetDate(PyObject *self, PyObject *args, Py return _resultobj; } +#define wxCalendarCtrl_SetLowerDateLimit(_swigobj,_swigarg0) (_swigobj->SetLowerDateLimit(_swigarg0)) +static PyObject *_wrap_wxCalendarCtrl_SetLowerDateLimit(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxCalendarCtrl * _arg0; + wxDateTime * _arg1 = (wxDateTime *) &wxDefaultDateTime; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","date", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxCalendarCtrl_SetLowerDateLimit",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_SetLowerDateLimit. Expected _wxCalendarCtrl_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxCalendarCtrl_SetLowerDateLimit. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxCalendarCtrl_SetLowerDateLimit(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxCalendarCtrl_GetLowerDateLimit(_swigobj) (_swigobj->GetLowerDateLimit()) +static PyObject *_wrap_wxCalendarCtrl_GetLowerDateLimit(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxCalendarCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCalendarCtrl_GetLowerDateLimit",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_GetLowerDateLimit. Expected _wxCalendarCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxDateTime & _result_ref = wxCalendarCtrl_GetLowerDateLimit(_arg0); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxCalendarCtrl_SetUpperDateLimit(_swigobj,_swigarg0) (_swigobj->SetUpperDateLimit(_swigarg0)) +static PyObject *_wrap_wxCalendarCtrl_SetUpperDateLimit(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxCalendarCtrl * _arg0; + wxDateTime * _arg1 = (wxDateTime *) &wxDefaultDateTime; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","date", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxCalendarCtrl_SetUpperDateLimit",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_SetUpperDateLimit. Expected _wxCalendarCtrl_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxCalendarCtrl_SetUpperDateLimit. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxCalendarCtrl_SetUpperDateLimit(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxCalendarCtrl_GetUpperDateLimit(_swigobj) (_swigobj->GetUpperDateLimit()) +static PyObject *_wrap_wxCalendarCtrl_GetUpperDateLimit(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + wxCalendarCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCalendarCtrl_GetUpperDateLimit",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_GetUpperDateLimit. Expected _wxCalendarCtrl_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxDateTime & _result_ref = wxCalendarCtrl_GetUpperDateLimit(_arg0); + _result = (wxDateTime *) &_result_ref; + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxCalendarCtrl_SetDateRange(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetDateRange(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxCalendarCtrl_SetDateRange(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxCalendarCtrl * _arg0; + wxDateTime * _arg1 = (wxDateTime *) &wxDefaultDateTime; + wxDateTime * _arg2 = (wxDateTime *) &wxDefaultDateTime; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _argo2 = 0; + char *_kwnames[] = { "self","lowerdate","upperdate", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|OO:wxCalendarCtrl_SetDateRange",_kwnames,&_argo0,&_argo1,&_argo2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_SetDateRange. Expected _wxCalendarCtrl_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxCalendarCtrl_SetDateRange. Expected _wxDateTime_p."); + return NULL; + } + } + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxCalendarCtrl_SetDateRange. Expected _wxDateTime_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxCalendarCtrl_SetDateRange(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxCalendarCtrl_EnableYearChange(_swigobj,_swigarg0) (_swigobj->EnableYearChange(_swigarg0)) static PyObject *_wrap_wxCalendarCtrl_EnableYearChange(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1750,7 +1942,71 @@ static PyObject *_wrap_wxCalendarCtrl_HitTest(PyObject *self, PyObject *args, Py return _resultobj; } +#define wxCalendarCtrl_Enable(_swigobj,_swigarg0) (_swigobj->Enable(_swigarg0)) +static PyObject *_wrap_wxCalendarCtrl_Enable(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxCalendarCtrl * _arg0; + bool _arg1 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool1 = (int) TRUE; + char *_kwnames[] = { "self","enable", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxCalendarCtrl_Enable",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_Enable. Expected _wxCalendarCtrl_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxCalendarCtrl_Enable(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxCalendarCtrl_Show(_swigobj,_swigarg0) (_swigobj->Show(_swigarg0)) +static PyObject *_wrap_wxCalendarCtrl_Show(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxCalendarCtrl * _arg0; + bool _arg1 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool1 = (int) TRUE; + char *_kwnames[] = { "self","show", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxCalendarCtrl_Show",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCalendarCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCalendarCtrl_Show. Expected _wxCalendarCtrl_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxCalendarCtrl_Show(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + static PyMethodDef calendarcMethods[] = { + { "wxCalendarCtrl_Show", (PyCFunction) _wrap_wxCalendarCtrl_Show, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_Enable", (PyCFunction) _wrap_wxCalendarCtrl_Enable, METH_VARARGS | METH_KEYWORDS }, { "wxCalendarCtrl_HitTest", (PyCFunction) _wrap_wxCalendarCtrl_HitTest, METH_VARARGS | METH_KEYWORDS }, { "wxCalendarCtrl_ResetAttr", (PyCFunction) _wrap_wxCalendarCtrl_ResetAttr, METH_VARARGS | METH_KEYWORDS }, { "wxCalendarCtrl_SetHoliday", (PyCFunction) _wrap_wxCalendarCtrl_SetHoliday, METH_VARARGS | METH_KEYWORDS }, @@ -1768,6 +2024,11 @@ static PyMethodDef calendarcMethods[] = { { "wxCalendarCtrl_EnableHolidayDisplay", (PyCFunction) _wrap_wxCalendarCtrl_EnableHolidayDisplay, METH_VARARGS | METH_KEYWORDS }, { "wxCalendarCtrl_EnableMonthChange", (PyCFunction) _wrap_wxCalendarCtrl_EnableMonthChange, METH_VARARGS | METH_KEYWORDS }, { "wxCalendarCtrl_EnableYearChange", (PyCFunction) _wrap_wxCalendarCtrl_EnableYearChange, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_SetDateRange", (PyCFunction) _wrap_wxCalendarCtrl_SetDateRange, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_GetUpperDateLimit", (PyCFunction) _wrap_wxCalendarCtrl_GetUpperDateLimit, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_SetUpperDateLimit", (PyCFunction) _wrap_wxCalendarCtrl_SetUpperDateLimit, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_GetLowerDateLimit", (PyCFunction) _wrap_wxCalendarCtrl_GetLowerDateLimit, METH_VARARGS | METH_KEYWORDS }, + { "wxCalendarCtrl_SetLowerDateLimit", (PyCFunction) _wrap_wxCalendarCtrl_SetLowerDateLimit, METH_VARARGS | METH_KEYWORDS }, { "wxCalendarCtrl_GetDate", (PyCFunction) _wrap_wxCalendarCtrl_GetDate, METH_VARARGS | METH_KEYWORDS }, { "wxCalendarCtrl_SetDate", (PyCFunction) _wrap_wxCalendarCtrl_SetDate, METH_VARARGS | METH_KEYWORDS }, { "wxCalendarCtrl_Create", (PyCFunction) _wrap_wxCalendarCtrl_Create, METH_VARARGS | METH_KEYWORDS }, @@ -1927,9 +2188,14 @@ SWIGEXPORT(void) initcalendarc() { PyDict_SetItemString(d,"wxCAL_SHOW_HOLIDAYS", PyInt_FromLong((long) wxCAL_SHOW_HOLIDAYS)); PyDict_SetItemString(d,"wxCAL_NO_YEAR_CHANGE", PyInt_FromLong((long) wxCAL_NO_YEAR_CHANGE)); PyDict_SetItemString(d,"wxCAL_NO_MONTH_CHANGE", PyInt_FromLong((long) wxCAL_NO_MONTH_CHANGE)); + PyDict_SetItemString(d,"wxCAL_SEQUENTIAL_MONTH_SELECTION", PyInt_FromLong((long) wxCAL_SEQUENTIAL_MONTH_SELECTION)); + PyDict_SetItemString(d,"wxCAL_SHOW_SURROUNDING_WEEKS", PyInt_FromLong((long) wxCAL_SHOW_SURROUNDING_WEEKS)); PyDict_SetItemString(d,"wxCAL_HITTEST_NOWHERE", PyInt_FromLong((long) wxCAL_HITTEST_NOWHERE)); PyDict_SetItemString(d,"wxCAL_HITTEST_HEADER", PyInt_FromLong((long) wxCAL_HITTEST_HEADER)); PyDict_SetItemString(d,"wxCAL_HITTEST_DAY", PyInt_FromLong((long) wxCAL_HITTEST_DAY)); + PyDict_SetItemString(d,"wxCAL_HITTEST_INCMONTH", PyInt_FromLong((long) wxCAL_HITTEST_INCMONTH)); + PyDict_SetItemString(d,"wxCAL_HITTEST_DECMONTH", PyInt_FromLong((long) wxCAL_HITTEST_DECMONTH)); + PyDict_SetItemString(d,"wxCAL_HITTEST_SURROUNDING_WEEK", PyInt_FromLong((long) wxCAL_HITTEST_SURROUNDING_WEEK)); PyDict_SetItemString(d,"wxCAL_BORDER_NONE", PyInt_FromLong((long) wxCAL_BORDER_NONE)); PyDict_SetItemString(d,"wxCAL_BORDER_SQUARE", PyInt_FromLong((long) wxCAL_BORDER_SQUARE)); PyDict_SetItemString(d,"wxCAL_BORDER_ROUND", PyInt_FromLong((long) wxCAL_BORDER_ROUND));