"""IsVertical(self) -> bool"""
return _controls_.Listbook_IsVertical(*args, **kwargs)
+ def GetListView(*args, **kwargs):
+ """GetListView(self) -> ListView"""
+ return _controls_.Listbook_GetListView(*args, **kwargs)
+
class ListbookPtr(Listbook):
def __init__(self, this):
}
+static PyObject *_wrap_Listbook_GetListView(PyObject *, PyObject *args, PyObject *kwargs) {
+ PyObject *resultobj;
+ wxListbook *arg1 = (wxListbook *) 0 ;
+ wxListView *result;
+ PyObject * obj0 = 0 ;
+ char *kwnames[] = {
+ (char *) "self", NULL
+ };
+
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Listbook_GetListView",kwnames,&obj0)) goto fail;
+ if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxListbook,
+ SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
+ {
+ PyThreadState* __tstate = wxPyBeginAllowThreads();
+ result = (wxListView *)(arg1)->GetListView();
+
+ wxPyEndAllowThreads(__tstate);
+ if (PyErr_Occurred()) SWIG_fail;
+ }
+ resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxListView, 0);
+ return resultobj;
+ fail:
+ return NULL;
+}
+
+
static PyObject * Listbook_swigregister(PyObject *, PyObject *args) {
PyObject *obj;
if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
{ (char *)"new_PreListbook", (PyCFunction) _wrap_new_PreListbook, METH_VARARGS | METH_KEYWORDS, NULL },
{ (char *)"Listbook_Create", (PyCFunction) _wrap_Listbook_Create, METH_VARARGS | METH_KEYWORDS, NULL },
{ (char *)"Listbook_IsVertical", (PyCFunction) _wrap_Listbook_IsVertical, METH_VARARGS | METH_KEYWORDS, NULL },
+ { (char *)"Listbook_GetListView", (PyCFunction) _wrap_Listbook_GetListView, METH_VARARGS | METH_KEYWORDS, NULL },
{ (char *)"Listbook_swigregister", Listbook_swigregister, METH_VARARGS, NULL },
{ (char *)"new_ListbookEvent", (PyCFunction) _wrap_new_ListbookEvent, METH_VARARGS | METH_KEYWORDS, NULL },
{ (char *)"ListbookEvent_swigregister", ListbookEvent_swigregister, METH_VARARGS, NULL },
GetImageExtWildcard = staticmethod(GetImageExtWildcard)
def ConvertToBitmap(*args, **kwargs):
- """ConvertToBitmap(self) -> Bitmap"""
+ """ConvertToBitmap(self, int depth=-1) -> Bitmap"""
return _core_.Image_ConvertToBitmap(*args, **kwargs)
def ConvertToMonoBitmap(*args, **kwargs):
return SWIG_AsVal_unsigned_SS_long(obj, (unsigned long*)0);
}
-wxBitmap wxImage_ConvertToBitmap(wxImage *self){
- wxBitmap bitmap(*self);
+wxBitmap wxImage_ConvertToBitmap(wxImage *self,int depth){
+ wxBitmap bitmap(*self, depth);
return bitmap;
}
wxBitmap wxImage_ConvertToMonoBitmap(wxImage *self,unsigned char red,unsigned char green,unsigned char blue){
static PyObject *_wrap_Image_ConvertToBitmap(PyObject *, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxImage *arg1 = (wxImage *) 0 ;
+ int arg2 = (int) -1 ;
wxBitmap result;
PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
char *kwnames[] = {
- (char *) "self", NULL
+ (char *) "self",(char *) "depth", NULL
};
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Image_ConvertToBitmap",kwnames,&obj0)) goto fail;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Image_ConvertToBitmap",kwnames,&obj0,&obj1)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxImage,
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
+ if (obj1) {
+ arg2 = (int)SWIG_As_int(obj1);
+ if (PyErr_Occurred()) SWIG_fail;
+ }
{
if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = wxImage_ConvertToBitmap(arg1);
+ result = wxImage_ConvertToBitmap(arg1,arg2);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
"""GetWeekDay(self) -> int"""
return _calendar.CalendarEvent_GetWeekDay(*args, **kwargs)
+ def PySetDate(self, date):
+ """takes datetime.datetime or datetime.date object"""
+ self.SetDate(_py2wx(date))
+
+ def PyGetDate(self):
+ """returns datetime.date object"""
+ return _wx2py(self.GetDate())
+
class CalendarEventPtr(CalendarEvent):
def __init__(self, this):
return _calendar.CalendarCtrl_GetClassDefaultAttributes(*args, **kwargs)
GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
+ def PySetDate(self, date):
+ """takes datetime.datetime or datetime.date object"""
+ self.SetDate(_py2wx(date))
+
+ def PyGetDate(self):
+ """returns datetime.date object"""
+ return _wx2py(self.GetDate())
+
+ def PySetLowerDateLimit(self, date):
+ """takes datetime.datetime or datetime.date object"""
+ self.SetLowerDateLimit(_py2wx(date))
+
+ def PySetUpperDateLimit(self, date):
+ """takes datetime.datetime or datetime.date object"""
+ self.SetUpperDateLimit(_py2wx(date))
+
+ def PySetDateRange(self, lowerdate, upperdate):
+ """takes datetime.datetime or datetime.date objects"""
+ self.PySetLowerDateLimit(lowerdate)
+ self.PySetUpperDateLimit(upperdate)
+
+ def PyGetLowerDateLimit(self):
+ """returns datetime.date object"""
+ return _wx2py(self.GetLowerDateLimit())
+
+ def PyGetUpperDateLimit(self):
+ """returns datetime.date object"""
+ return _wx2py(self.GetUpperDateLimit())
+
class CalendarCtrlPtr(CalendarCtrl):
def __init__(self, this):
"""
return _calendar.CalendarCtrl_GetClassDefaultAttributes(*args, **kwargs)
+def _py2wx(date):
+ import datetime
+ assert isinstance(date, (datetime.datetime, datetime.date))
+ tt = date.timetuple()
+ dmy = (tt[2], tt[1]-1, tt[0])
+ return wx.DateTimeFromDMY(*dmy)
+
+def _wx2py(date):
+ import datetime
+ assert isinstance(date, wx.DateTime)
+ ymd = map(int, date.FormatISODate().split('-'))
+ return datetime.date(*ymd)
+
"""IsVertical(self) -> bool"""
return _controls_.Listbook_IsVertical(*args, **kwargs)
+ def GetListView(*args, **kwargs):
+ """GetListView(self) -> ListView"""
+ return _controls_.Listbook_GetListView(*args, **kwargs)
+
class ListbookPtr(Listbook):
def __init__(self, this):
}
+static PyObject *_wrap_Listbook_GetListView(PyObject *, PyObject *args, PyObject *kwargs) {
+ PyObject *resultobj;
+ wxListbook *arg1 = (wxListbook *) 0 ;
+ wxListView *result;
+ PyObject * obj0 = 0 ;
+ char *kwnames[] = {
+ (char *) "self", NULL
+ };
+
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Listbook_GetListView",kwnames,&obj0)) goto fail;
+ if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxListbook,
+ SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
+ {
+ PyThreadState* __tstate = wxPyBeginAllowThreads();
+ result = (wxListView *)(arg1)->GetListView();
+
+ wxPyEndAllowThreads(__tstate);
+ if (PyErr_Occurred()) SWIG_fail;
+ }
+ resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxListView, 0);
+ return resultobj;
+ fail:
+ return NULL;
+}
+
+
static PyObject * Listbook_swigregister(PyObject *, PyObject *args) {
PyObject *obj;
if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
{ (char *)"new_PreListbook", (PyCFunction) _wrap_new_PreListbook, METH_VARARGS | METH_KEYWORDS, NULL },
{ (char *)"Listbook_Create", (PyCFunction) _wrap_Listbook_Create, METH_VARARGS | METH_KEYWORDS, NULL },
{ (char *)"Listbook_IsVertical", (PyCFunction) _wrap_Listbook_IsVertical, METH_VARARGS | METH_KEYWORDS, NULL },
+ { (char *)"Listbook_GetListView", (PyCFunction) _wrap_Listbook_GetListView, METH_VARARGS | METH_KEYWORDS, NULL },
{ (char *)"Listbook_swigregister", Listbook_swigregister, METH_VARARGS, NULL },
{ (char *)"new_ListbookEvent", (PyCFunction) _wrap_new_ListbookEvent, METH_VARARGS | METH_KEYWORDS, NULL },
{ (char *)"ListbookEvent_swigregister", ListbookEvent_swigregister, METH_VARARGS, NULL },
GetImageExtWildcard = staticmethod(GetImageExtWildcard)
def ConvertToBitmap(*args, **kwargs):
- """ConvertToBitmap(self) -> Bitmap"""
+ """ConvertToBitmap(self, int depth=-1) -> Bitmap"""
return _core_.Image_ConvertToBitmap(*args, **kwargs)
def ConvertToMonoBitmap(*args, **kwargs):
return SWIG_AsVal_unsigned_SS_long(obj, (unsigned long*)0);
}
-wxBitmap wxImage_ConvertToBitmap(wxImage *self){
- wxBitmap bitmap(*self);
+wxBitmap wxImage_ConvertToBitmap(wxImage *self,int depth){
+ wxBitmap bitmap(*self, depth);
return bitmap;
}
wxBitmap wxImage_ConvertToMonoBitmap(wxImage *self,unsigned char red,unsigned char green,unsigned char blue){
static PyObject *_wrap_Image_ConvertToBitmap(PyObject *, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxImage *arg1 = (wxImage *) 0 ;
+ int arg2 = (int) -1 ;
wxBitmap result;
PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
char *kwnames[] = {
- (char *) "self", NULL
+ (char *) "self",(char *) "depth", NULL
};
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Image_ConvertToBitmap",kwnames,&obj0)) goto fail;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Image_ConvertToBitmap",kwnames,&obj0,&obj1)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxImage,
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
+ if (obj1) {
+ arg2 = (int)SWIG_As_int(obj1);
+ if (PyErr_Occurred()) SWIG_fail;
+ }
{
if (!wxPyCheckForApp()) SWIG_fail;
PyThreadState* __tstate = wxPyBeginAllowThreads();
- result = wxImage_ConvertToBitmap(arg1);
+ result = wxImage_ConvertToBitmap(arg1,arg2);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
"""GetWeekDay(self) -> int"""
return _calendar.CalendarEvent_GetWeekDay(*args, **kwargs)
+ def PySetDate(self, date):
+ """takes datetime.datetime or datetime.date object"""
+ self.SetDate(_py2wx(date))
+
+ def PyGetDate(self):
+ """returns datetime.date object"""
+ return _wx2py(self.GetDate())
+
class CalendarEventPtr(CalendarEvent):
def __init__(self, this):
return _calendar.CalendarCtrl_GetClassDefaultAttributes(*args, **kwargs)
GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
+ def PySetDate(self, date):
+ """takes datetime.datetime or datetime.date object"""
+ self.SetDate(_py2wx(date))
+
+ def PyGetDate(self):
+ """returns datetime.date object"""
+ return _wx2py(self.GetDate())
+
+ def PySetLowerDateLimit(self, date):
+ """takes datetime.datetime or datetime.date object"""
+ self.SetLowerDateLimit(_py2wx(date))
+
+ def PySetUpperDateLimit(self, date):
+ """takes datetime.datetime or datetime.date object"""
+ self.SetUpperDateLimit(_py2wx(date))
+
+ def PySetDateRange(self, lowerdate, upperdate):
+ """takes datetime.datetime or datetime.date objects"""
+ self.PySetLowerDateLimit(lowerdate)
+ self.PySetUpperDateLimit(upperdate)
+
+ def PyGetLowerDateLimit(self):
+ """returns datetime.date object"""
+ return _wx2py(self.GetLowerDateLimit())
+
+ def PyGetUpperDateLimit(self):
+ """returns datetime.date object"""
+ return _wx2py(self.GetUpperDateLimit())
+
class CalendarCtrlPtr(CalendarCtrl):
def __init__(self, this):
"""
return _calendar.CalendarCtrl_GetClassDefaultAttributes(*args, **kwargs)
+def _py2wx(date):
+ import datetime
+ assert isinstance(date, (datetime.datetime, datetime.date))
+ tt = date.timetuple()
+ dmy = (tt[2], tt[1]-1, tt[0])
+ return wx.DateTimeFromDMY(*dmy)
+
+def _wx2py(date):
+ import datetime
+ assert isinstance(date, wx.DateTime)
+ ymd = map(int, date.FormatISODate().split('-'))
+ return datetime.date(*ymd)
+