Fixed SetFonts methods to properly accept a Python list for the sizes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7213 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2000-04-20 07:34:04 +00:00
parent d72d009d64
commit 9b4c5d5a21
4 changed files with 53 additions and 119 deletions

View File

@@ -1,5 +1,5 @@
/*
* FILE : html.cpp
* FILE : ./html.cpp
*
* This file was automatically generated by :
* Simplified Wrapper and Interface Generator (SWIG)
@@ -1316,21 +1316,27 @@ static PyObject *_wrap_wxHtmlWinParser_GetWindow(PyObject *self, PyObject *args,
return _resultobj;
}
#define wxHtmlWinParser_SetFonts(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetFonts(_swigarg0,_swigarg1,_swigarg2))
static void wxHtmlWinParser_SetFonts(wxHtmlWinParser *self,wxString normal_face,wxString fixed_face,PyObject * sizes) {
int* temp = int_LIST_helper(sizes);
if (temp) {
self->SetFonts(normal_face, fixed_face, temp);
delete [] temp;
}
}
static PyObject *_wrap_wxHtmlWinParser_SetFonts(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxHtmlWinParser * _arg0;
wxString * _arg1;
wxString * _arg2;
int * _arg3;
PyObject * _arg3;
PyObject * _argo0 = 0;
PyObject * _obj1 = 0;
PyObject * _obj2 = 0;
PyObject * _argo3 = 0;
char *_kwnames[] = { "self","normal_face","fixed_face","LIST", NULL };
PyObject * _obj3 = 0;
char *_kwnames[] = { "self","normal_face","fixed_face","sizes", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOO:wxHtmlWinParser_SetFonts",_kwnames,&_argo0,&_obj1,&_obj2,&_argo3))
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOO:wxHtmlWinParser_SetFonts",_kwnames,&_argo0,&_obj1,&_obj2,&_obj3))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -1353,13 +1359,9 @@ static PyObject *_wrap_wxHtmlWinParser_SetFonts(PyObject *self, PyObject *args,
}
_arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2));
}
if (_argo3) {
if (_argo3 == Py_None) { _arg3 = NULL; }
else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_int_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxHtmlWinParser_SetFonts. Expected _int_p.");
return NULL;
}
}
{
_arg3 = _obj3;
}
{
wxPy_BEGIN_ALLOW_THREADS;
wxHtmlWinParser_SetFonts(_arg0,*_arg1,*_arg2,_arg3);
@@ -4117,21 +4119,27 @@ static PyObject *_wrap_wxHtmlWindow_SetRelatedStatusBar(PyObject *self, PyObject
return _resultobj;
}
#define wxHtmlWindow_SetFonts(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetFonts(_swigarg0,_swigarg1,_swigarg2))
static void wxPyHtmlWindow_SetFonts(wxPyHtmlWindow *self,wxString normal_face,wxString fixed_face,PyObject * sizes) {
int* temp = int_LIST_helper(sizes);
if (temp) {
self->SetFonts(normal_face, fixed_face, temp);
delete [] temp;
}
}
static PyObject *_wrap_wxHtmlWindow_SetFonts(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxPyHtmlWindow * _arg0;
wxString * _arg1;
wxString * _arg2;
int * _arg3;
PyObject * _arg3;
PyObject * _argo0 = 0;
PyObject * _obj1 = 0;
PyObject * _obj2 = 0;
PyObject * _argo3 = 0;
char *_kwnames[] = { "self","normal_face","fixed_face","LIST", NULL };
PyObject * _obj3 = 0;
char *_kwnames[] = { "self","normal_face","fixed_face","sizes", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOO:wxHtmlWindow_SetFonts",_kwnames,&_argo0,&_obj1,&_obj2,&_argo3))
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOO:wxHtmlWindow_SetFonts",_kwnames,&_argo0,&_obj1,&_obj2,&_obj3))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -4154,16 +4162,12 @@ static PyObject *_wrap_wxHtmlWindow_SetFonts(PyObject *self, PyObject *args, PyO
}
_arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2));
}
if (_argo3) {
if (_argo3 == Py_None) { _arg3 = NULL; }
else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_int_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxHtmlWindow_SetFonts. Expected _int_p.");
return NULL;
}
}
{
_arg3 = _obj3;
}
{
wxPy_BEGIN_ALLOW_THREADS;
wxHtmlWindow_SetFonts(_arg0,*_arg1,*_arg2,_arg3);
wxPyHtmlWindow_SetFonts(_arg0,*_arg1,*_arg2,_arg3);
wxPy_END_ALLOW_THREADS;
} Py_INCREF(Py_None);