wxPython updates (SWIG really works, cannot believe it)

wxRadioBox now has multi column layout (the wxPython sample
    still doesn't do that correctly)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1245 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1998-12-19 12:38:52 +00:00
parent c2a6abc077
commit d3b4d11313
12 changed files with 413 additions and 227 deletions

View File

@@ -1783,6 +1783,152 @@ static PyObject *_wrap_wxFont_GetWeight(PyObject *self, PyObject *args) {
return _resultobj;
}
#define wxFont_SetFaceName(_swigobj,_swigarg0) (_swigobj->SetFaceName(_swigarg0))
static PyObject *_wrap_wxFont_SetFaceName(PyObject *self, PyObject *args) {
PyObject * _resultobj;
wxFont * _arg0;
wxString * _arg1;
char * _argc0 = 0;
PyObject * _obj1 = 0;
self = self;
if(!PyArg_ParseTuple(args,"sO:wxFont_SetFaceName",&_argc0,&_obj1))
return NULL;
if (_argc0) {
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFont_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetFaceName. Expected _wxFont_p.");
return NULL;
}
}
{
if (!PyString_Check(_obj1)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
_arg1 = new wxString(PyString_AsString(_obj1));
}
wxFont_SetFaceName(_arg0,*_arg1);
Py_INCREF(Py_None);
_resultobj = Py_None;
{
if (_obj1)
delete _arg1;
}
return _resultobj;
}
#define wxFont_SetFamily(_swigobj,_swigarg0) (_swigobj->SetFamily(_swigarg0))
static PyObject *_wrap_wxFont_SetFamily(PyObject *self, PyObject *args) {
PyObject * _resultobj;
wxFont * _arg0;
int _arg1;
char * _argc0 = 0;
self = self;
if(!PyArg_ParseTuple(args,"si:wxFont_SetFamily",&_argc0,&_arg1))
return NULL;
if (_argc0) {
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFont_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetFamily. Expected _wxFont_p.");
return NULL;
}
}
wxFont_SetFamily(_arg0,_arg1);
Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxFont_SetPointSize(_swigobj,_swigarg0) (_swigobj->SetPointSize(_swigarg0))
static PyObject *_wrap_wxFont_SetPointSize(PyObject *self, PyObject *args) {
PyObject * _resultobj;
wxFont * _arg0;
int _arg1;
char * _argc0 = 0;
self = self;
if(!PyArg_ParseTuple(args,"si:wxFont_SetPointSize",&_argc0,&_arg1))
return NULL;
if (_argc0) {
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFont_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetPointSize. Expected _wxFont_p.");
return NULL;
}
}
wxFont_SetPointSize(_arg0,_arg1);
Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxFont_SetStyle(_swigobj,_swigarg0) (_swigobj->SetStyle(_swigarg0))
static PyObject *_wrap_wxFont_SetStyle(PyObject *self, PyObject *args) {
PyObject * _resultobj;
wxFont * _arg0;
int _arg1;
char * _argc0 = 0;
self = self;
if(!PyArg_ParseTuple(args,"si:wxFont_SetStyle",&_argc0,&_arg1))
return NULL;
if (_argc0) {
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFont_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetStyle. Expected _wxFont_p.");
return NULL;
}
}
wxFont_SetStyle(_arg0,_arg1);
Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxFont_SetUnderlined(_swigobj,_swigarg0) (_swigobj->SetUnderlined(_swigarg0))
static PyObject *_wrap_wxFont_SetUnderlined(PyObject *self, PyObject *args) {
PyObject * _resultobj;
wxFont * _arg0;
bool _arg1;
char * _argc0 = 0;
int tempbool1;
self = self;
if(!PyArg_ParseTuple(args,"si:wxFont_SetUnderlined",&_argc0,&tempbool1))
return NULL;
if (_argc0) {
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFont_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetUnderlined. Expected _wxFont_p.");
return NULL;
}
}
_arg1 = (bool ) tempbool1;
wxFont_SetUnderlined(_arg0,_arg1);
Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxFont_SetWeight(_swigobj,_swigarg0) (_swigobj->SetWeight(_swigarg0))
static PyObject *_wrap_wxFont_SetWeight(PyObject *self, PyObject *args) {
PyObject * _resultobj;
wxFont * _arg0;
int _arg1;
char * _argc0 = 0;
self = self;
if(!PyArg_ParseTuple(args,"si:wxFont_SetWeight",&_argc0,&_arg1))
return NULL;
if (_argc0) {
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxFont_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetWeight. Expected _wxFont_p.");
return NULL;
}
}
wxFont_SetWeight(_arg0,_arg1);
Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define new_wxColour(_swigarg0,_swigarg1,_swigarg2) (new wxColour(_swigarg0,_swigarg1,_swigarg2))
static PyObject *_wrap_new_wxColour(PyObject *self, PyObject *args) {
PyObject * _resultobj;
@@ -4795,6 +4941,12 @@ static PyMethodDef gdicMethods[] = {
{ "wxColour_Red", _wrap_wxColour_Red, 1 },
{ "delete_wxColour", _wrap_delete_wxColour, 1 },
{ "new_wxColour", _wrap_new_wxColour, 1 },
{ "wxFont_SetWeight", _wrap_wxFont_SetWeight, 1 },
{ "wxFont_SetUnderlined", _wrap_wxFont_SetUnderlined, 1 },
{ "wxFont_SetStyle", _wrap_wxFont_SetStyle, 1 },
{ "wxFont_SetPointSize", _wrap_wxFont_SetPointSize, 1 },
{ "wxFont_SetFamily", _wrap_wxFont_SetFamily, 1 },
{ "wxFont_SetFaceName", _wrap_wxFont_SetFaceName, 1 },
{ "wxFont_GetWeight", _wrap_wxFont_GetWeight, 1 },
{ "wxFont_GetUnderlined", _wrap_wxFont_GetUnderlined, 1 },
{ "wxFont_GetStyle", _wrap_wxFont_GetStyle, 1 },

View File

@@ -162,6 +162,24 @@ class wxFontPtr :
def GetWeight(self):
val = gdic.wxFont_GetWeight(self.this)
return val
def SetFaceName(self,arg0):
val = gdic.wxFont_SetFaceName(self.this,arg0)
return val
def SetFamily(self,arg0):
val = gdic.wxFont_SetFamily(self.this,arg0)
return val
def SetPointSize(self,arg0):
val = gdic.wxFont_SetPointSize(self.this,arg0)
return val
def SetStyle(self,arg0):
val = gdic.wxFont_SetStyle(self.this,arg0)
return val
def SetUnderlined(self,arg0):
val = gdic.wxFont_SetUnderlined(self.this,arg0)
return val
def SetWeight(self,arg0):
val = gdic.wxFont_SetWeight(self.this,arg0)
return val
def __repr__(self):
return "<C wxFont instance>"
class wxFont(wxFontPtr):

View File

@@ -3826,6 +3826,30 @@ static PyObject *_wrap_wxMenuBar_FindMenuItem(PyObject *self, PyObject *args) {
return _resultobj;
}
#define wxMenuBar_FindItemForId(_swigobj,_swigarg0) (_swigobj->FindItemForId(_swigarg0))
static PyObject *_wrap_wxMenuBar_FindItemForId(PyObject *self, PyObject *args) {
PyObject * _resultobj;
wxMenuItem * _result;
wxMenuBar * _arg0;
int _arg1;
char * _argc0 = 0;
char _ptemp[128];
self = self;
if(!PyArg_ParseTuple(args,"si:wxMenuBar_FindItemForId",&_argc0,&_arg1))
return NULL;
if (_argc0) {
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuBar_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuBar_FindItemForId. Expected _wxMenuBar_p.");
return NULL;
}
}
_result = (wxMenuItem *)wxMenuBar_FindItemForId(_arg0,_arg1);
SWIG_MakePtr(_ptemp, (char *) _result,"_wxMenuItem_p");
_resultobj = Py_BuildValue("s",_ptemp);
return _resultobj;
}
#define wxMenuBar_GetMenuCount(_swigobj) (_swigobj->GetMenuCount())
static PyObject *_wrap_wxMenuBar_GetMenuCount(PyObject *self, PyObject *args) {
PyObject * _resultobj;
@@ -4178,6 +4202,7 @@ static PyMethodDef windowscMethods[] = {
{ "wxMenuItem_IsSeparator", _wrap_wxMenuItem_IsSeparator, 1 },
{ "wxMenuBar_GetMenu", _wrap_wxMenuBar_GetMenu, 1 },
{ "wxMenuBar_GetMenuCount", _wrap_wxMenuBar_GetMenuCount, 1 },
{ "wxMenuBar_FindItemForId", _wrap_wxMenuBar_FindItemForId, 1 },
{ "wxMenuBar_FindMenuItem", _wrap_wxMenuBar_FindMenuItem, 1 },
{ "wxMenuBar_Enabled", _wrap_wxMenuBar_Enabled, 1 },
{ "wxMenuBar_Enable", _wrap_wxMenuBar_Enable, 1 },

View File

@@ -546,6 +546,10 @@ class wxMenuBarPtr(wxEvtHandlerPtr):
def FindMenuItem(self,arg0,arg1):
val = windowsc.wxMenuBar_FindMenuItem(self.this,arg0,arg1)
return val
def FindItemForId(self,arg0):
val = windowsc.wxMenuBar_FindItemForId(self.this,arg0)
val = wxMenuItemPtr(val)
return val
def GetMenuCount(self):
val = windowsc.wxMenuBar_GetMenuCount(self.this)
return val

View File

@@ -3514,6 +3514,7 @@ SWIGEXPORT(void,initwindows2c)() {
SWIG_RegisterMapping("_class_wxEvent","_class_wxGridEvent",SwigwxGridEventTowxEvent);
SWIG_RegisterMapping("_class_wxEvent","_wxGridEvent",SwigwxGridEventTowxEvent);
SWIG_RegisterMapping("_class_wxEvent","_wxEvent",0);
SWIG_RegisterMapping("_wxCheckListBox","_class_wxCheckListBox",0);
SWIG_RegisterMapping("_wxGridEvent","_class_wxGridEvent",0);
SWIG_RegisterMapping("_wxRect","_class_wxRect",0);
SWIG_RegisterMapping("_wxCommandEvent","_class_wxNotebookEvent",SwigwxNotebookEventTowxCommandEvent);
@@ -3525,6 +3526,7 @@ SWIGEXPORT(void,initwindows2c)() {
SWIG_RegisterMapping("_wxRadioBox","_class_wxRadioBox",0);
SWIG_RegisterMapping("_wxBitmap","_class_wxBitmap",0);
SWIG_RegisterMapping("_wxPyTimer","_class_wxPyTimer",0);
SWIG_RegisterMapping("_wxWindowDC","_class_wxWindowDC",0);
SWIG_RegisterMapping("_wxScrollBar","_class_wxScrollBar",0);
SWIG_RegisterMapping("_wxSpinButton","_class_wxSpinButton",0);
SWIG_RegisterMapping("_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0);
@@ -3592,6 +3594,7 @@ SWIGEXPORT(void,initwindows2c)() {
SWIG_RegisterMapping("_signed_short","_short",0);
SWIG_RegisterMapping("_wxMemoryDC","_class_wxMemoryDC",0);
SWIG_RegisterMapping("_wxPaintDC","_class_wxPaintDC",0);
SWIG_RegisterMapping("_class_wxWindowDC","_wxWindowDC",0);
SWIG_RegisterMapping("_class_wxFocusEvent","_wxFocusEvent",0);
SWIG_RegisterMapping("_class_wxMaximizeEvent","_wxMaximizeEvent",0);
SWIG_RegisterMapping("_class_wxAcceleratorEntry","_wxAcceleratorEntry",0);
@@ -3659,6 +3662,7 @@ SWIGEXPORT(void,initwindows2c)() {
SWIG_RegisterMapping("_class_wxShowEvent","_wxShowEvent",0);
SWIG_RegisterMapping("_wxActivateEvent","_class_wxActivateEvent",0);
SWIG_RegisterMapping("_wxGauge","_class_wxGauge",0);
SWIG_RegisterMapping("_class_wxCheckListBox","_wxCheckListBox",0);
SWIG_RegisterMapping("_class_wxGridEvent","_wxGridEvent",0);
SWIG_RegisterMapping("_class_wxCommandEvent","_class_wxNotebookEvent",SwigwxNotebookEventTowxCommandEvent);
SWIG_RegisterMapping("_class_wxCommandEvent","_wxNotebookEvent",SwigwxNotebookEventTowxCommandEvent);