From 248ed9435a7aa3454bbeed1156bc4302581f99a2 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 4 Jun 2004 23:24:10 +0000 Subject: [PATCH] reSWIGged git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27643 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/contrib/gizmos/gtk/gizmos.py | 13 +- wxPython/contrib/gizmos/gtk/gizmos_wrap.cpp | 43 +- wxPython/contrib/gizmos/msw/gizmos.py | 13 +- wxPython/contrib/gizmos/msw/gizmos_wrap.cpp | 43 +- wxPython/contrib/stc/gtk/stc.py | 8 +- wxPython/contrib/stc/gtk/stc_wrap.cpp | 20 +- wxPython/contrib/stc/msw/stc.py | 9 +- wxPython/contrib/stc/msw/stc_wrap.cpp | 21 +- wxPython/contrib/xrc/msw/xrc_wrap.cpp | 1 - wxPython/src/gtk/_controls.py | 225 ++-- wxPython/src/gtk/_controls_wrap.cpp | 656 ++++++----- wxPython/src/gtk/_core.py | 1108 +++++++++++++++---- wxPython/src/gtk/_core_wrap.cpp | 762 +++---------- wxPython/src/gtk/_windows.py | 96 +- wxPython/src/gtk/_windows_wrap.cpp | 322 +++--- wxPython/src/gtk/grid.py | 8 +- wxPython/src/gtk/grid_wrap.cpp | 20 +- wxPython/src/msw/_controls.py | 225 ++-- wxPython/src/msw/_controls_wrap.cpp | 656 ++++++----- wxPython/src/msw/_core.py | 1108 +++++++++++++++---- wxPython/src/msw/_core_wrap.cpp | 762 +++---------- wxPython/src/msw/_windows.py | 117 +- wxPython/src/msw/_windows_wrap.cpp | 322 +++--- wxPython/src/msw/grid.py | 8 +- wxPython/src/msw/grid_wrap.cpp | 20 +- wxPython/wxPython/_core.py | 2 +- 26 files changed, 3822 insertions(+), 2766 deletions(-) diff --git a/wxPython/contrib/gizmos/gtk/gizmos.py b/wxPython/contrib/gizmos/gtk/gizmos.py index 107bedf7d4..5130ce72c3 100644 --- a/wxPython/contrib/gizmos/gtk/gizmos.py +++ b/wxPython/contrib/gizmos/gtk/gizmos.py @@ -60,8 +60,8 @@ class DynamicSashWindow(_core.Window): return "<%s.%s; proxy of C++ wxDynamicSashWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=wxCLIP_CHILDREN|wxDS_MANAGE_SCROLLBARS|wxDS_DRAG_CORNER, + __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=wxCLIP_CHILDREN|wxDS_MANAGE_SCROLLBARS|wxDS_DRAG_CORNER, String name=DynamicSashNameStr) -> DynamicSashWindow """ newobj = _gizmos.new_DynamicSashWindow(*args, **kwargs) @@ -72,8 +72,8 @@ class DynamicSashWindow(_core.Window): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=wxCLIP_CHILDREN|wxDS_MANAGE_SCROLLBARS|wxDS_DRAG_CORNER, + Create(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=wxCLIP_CHILDREN|wxDS_MANAGE_SCROLLBARS|wxDS_DRAG_CORNER, String name=DynamicSashNameStr) -> bool """ return _gizmos.DynamicSashWindow_Create(*args, **kwargs) @@ -111,8 +111,9 @@ class EditableListBox(_windows.Panel): return "<%s.%s; proxy of C++ wxEditableListBox instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, String label, Point pos=DefaultPosition, - Size size=DefaultSize, long style=wxEL_ALLOW_NEW|wxEL_ALLOW_EDIT|wxEL_ALLOW_DELETE, + __init__(self, Window parent, int id=-1, String label=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=wxEL_ALLOW_NEW|wxEL_ALLOW_EDIT|wxEL_ALLOW_DELETE, String name=EditableListBoxNameStr) -> EditableListBox """ newobj = _gizmos.new_EditableListBox(*args, **kwargs) diff --git a/wxPython/contrib/gizmos/gtk/gizmos_wrap.cpp b/wxPython/contrib/gizmos/gtk/gizmos_wrap.cpp index 4586d6071d..d7be90b845 100644 --- a/wxPython/contrib/gizmos/gtk/gizmos_wrap.cpp +++ b/wxPython/contrib/gizmos/gtk/gizmos_wrap.cpp @@ -827,7 +827,7 @@ static PyObject * DynamicSashUnifyEvent_swigregister(PyObject *self, PyObject *a static PyObject *_wrap_new_DynamicSashWindow(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; + int arg2 = (int) -1 ; wxPoint const &arg3_defvalue = wxDefaultPosition ; wxPoint *arg3 = (wxPoint *) &arg3_defvalue ; wxSize const &arg4_defvalue = wxDefaultSize ; @@ -849,11 +849,13 @@ static PyObject *_wrap_new_DynamicSashWindow(PyObject *self, PyObject *args, PyO (char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOO:new_DynamicSashWindow",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOO:new_DynamicSashWindow",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (obj2) { { arg3 = &temp3; @@ -927,7 +929,7 @@ static PyObject *_wrap_DynamicSashWindow_Create(PyObject *self, PyObject *args, PyObject *resultobj; wxDynamicSashWindow *arg1 = (wxDynamicSashWindow *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; + int arg3 = (int) -1 ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -950,13 +952,15 @@ static PyObject *_wrap_DynamicSashWindow_Create(PyObject *self, PyObject *args, (char *) "self",(char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:DynamicSashWindow_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOO:DynamicSashWindow_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxDynamicSashWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } if (obj3) { { arg4 = &temp4; @@ -1074,8 +1078,9 @@ static PyObject * DynamicSashWindow_swigregister(PyObject *self, PyObject *args) static PyObject *_wrap_new_EditableListBox(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; - wxString *arg3 = 0 ; + int arg2 = (int) -1 ; + wxString const &arg3_defvalue = wxPyEmptyString ; + wxString *arg3 = (wxString *) &arg3_defvalue ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -1099,15 +1104,19 @@ static PyObject *_wrap_new_EditableListBox(PyObject *self, PyObject *args, PyObj (char *) "parent",(char *) "id",(char *) "label",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:new_EditableListBox",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOO:new_EditableListBox",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; - { - arg3 = wxString_in_helper(obj2); - if (arg3 == NULL) SWIG_fail; - temp3 = True; + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj2) { + { + arg3 = wxString_in_helper(obj2); + if (arg3 == NULL) SWIG_fail; + temp3 = True; + } } if (obj3) { { diff --git a/wxPython/contrib/gizmos/msw/gizmos.py b/wxPython/contrib/gizmos/msw/gizmos.py index 107bedf7d4..5130ce72c3 100644 --- a/wxPython/contrib/gizmos/msw/gizmos.py +++ b/wxPython/contrib/gizmos/msw/gizmos.py @@ -60,8 +60,8 @@ class DynamicSashWindow(_core.Window): return "<%s.%s; proxy of C++ wxDynamicSashWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=wxCLIP_CHILDREN|wxDS_MANAGE_SCROLLBARS|wxDS_DRAG_CORNER, + __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=wxCLIP_CHILDREN|wxDS_MANAGE_SCROLLBARS|wxDS_DRAG_CORNER, String name=DynamicSashNameStr) -> DynamicSashWindow """ newobj = _gizmos.new_DynamicSashWindow(*args, **kwargs) @@ -72,8 +72,8 @@ class DynamicSashWindow(_core.Window): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=wxCLIP_CHILDREN|wxDS_MANAGE_SCROLLBARS|wxDS_DRAG_CORNER, + Create(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=wxCLIP_CHILDREN|wxDS_MANAGE_SCROLLBARS|wxDS_DRAG_CORNER, String name=DynamicSashNameStr) -> bool """ return _gizmos.DynamicSashWindow_Create(*args, **kwargs) @@ -111,8 +111,9 @@ class EditableListBox(_windows.Panel): return "<%s.%s; proxy of C++ wxEditableListBox instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, String label, Point pos=DefaultPosition, - Size size=DefaultSize, long style=wxEL_ALLOW_NEW|wxEL_ALLOW_EDIT|wxEL_ALLOW_DELETE, + __init__(self, Window parent, int id=-1, String label=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=wxEL_ALLOW_NEW|wxEL_ALLOW_EDIT|wxEL_ALLOW_DELETE, String name=EditableListBoxNameStr) -> EditableListBox """ newobj = _gizmos.new_EditableListBox(*args, **kwargs) diff --git a/wxPython/contrib/gizmos/msw/gizmos_wrap.cpp b/wxPython/contrib/gizmos/msw/gizmos_wrap.cpp index dbfbfdfaf0..433c02b834 100644 --- a/wxPython/contrib/gizmos/msw/gizmos_wrap.cpp +++ b/wxPython/contrib/gizmos/msw/gizmos_wrap.cpp @@ -827,7 +827,7 @@ static PyObject * DynamicSashUnifyEvent_swigregister(PyObject *self, PyObject *a static PyObject *_wrap_new_DynamicSashWindow(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; + int arg2 = (int) -1 ; wxPoint const &arg3_defvalue = wxDefaultPosition ; wxPoint *arg3 = (wxPoint *) &arg3_defvalue ; wxSize const &arg4_defvalue = wxDefaultSize ; @@ -849,11 +849,13 @@ static PyObject *_wrap_new_DynamicSashWindow(PyObject *self, PyObject *args, PyO (char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOO:new_DynamicSashWindow",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOO:new_DynamicSashWindow",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (obj2) { { arg3 = &temp3; @@ -927,7 +929,7 @@ static PyObject *_wrap_DynamicSashWindow_Create(PyObject *self, PyObject *args, PyObject *resultobj; wxDynamicSashWindow *arg1 = (wxDynamicSashWindow *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; + int arg3 = (int) -1 ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -950,13 +952,15 @@ static PyObject *_wrap_DynamicSashWindow_Create(PyObject *self, PyObject *args, (char *) "self",(char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:DynamicSashWindow_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOO:DynamicSashWindow_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxDynamicSashWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } if (obj3) { { arg4 = &temp4; @@ -1074,8 +1078,9 @@ static PyObject * DynamicSashWindow_swigregister(PyObject *self, PyObject *args) static PyObject *_wrap_new_EditableListBox(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; - wxString *arg3 = 0 ; + int arg2 = (int) -1 ; + wxString const &arg3_defvalue = wxPyEmptyString ; + wxString *arg3 = (wxString *) &arg3_defvalue ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -1099,15 +1104,19 @@ static PyObject *_wrap_new_EditableListBox(PyObject *self, PyObject *args, PyObj (char *) "parent",(char *) "id",(char *) "label",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:new_EditableListBox",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOO:new_EditableListBox",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; - { - arg3 = wxString_in_helper(obj2); - if (arg3 == NULL) SWIG_fail; - temp3 = True; + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj2) { + { + arg3 = wxString_in_helper(obj2); + if (arg3 == NULL) SWIG_fail; + temp3 = True; + } } if (obj3) { { diff --git a/wxPython/contrib/stc/gtk/stc.py b/wxPython/contrib/stc/gtk/stc.py index c88f7c613c..0351196dab 100644 --- a/wxPython/contrib/stc/gtk/stc.py +++ b/wxPython/contrib/stc/gtk/stc.py @@ -900,8 +900,8 @@ class StyledTextCtrl(_core.Control): return "<%s.%s; proxy of C++ wxStyledTextCtrl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=0, String name=STCNameStr) -> StyledTextCtrl + __init__(self, Window parent, int id=ID_ANY, Point pos=DefaultPosition, + Size size=DefaultSize, long style=0, String name=STCNameStr) -> StyledTextCtrl """ newobj = _stc.new_StyledTextCtrl(*args, **kwargs) self.this = newobj.this @@ -911,8 +911,8 @@ class StyledTextCtrl(_core.Control): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=0, String name=wxSTCNameStr) + Create(self, Window parent, int id=ID_ANY, Point pos=DefaultPosition, + Size size=DefaultSize, long style=0, String name=wxSTCNameStr) """ return _stc.StyledTextCtrl_Create(*args, **kwargs) diff --git a/wxPython/contrib/stc/gtk/stc_wrap.cpp b/wxPython/contrib/stc/gtk/stc_wrap.cpp index 32e853e11f..328c2e3a93 100644 --- a/wxPython/contrib/stc/gtk/stc_wrap.cpp +++ b/wxPython/contrib/stc/gtk/stc_wrap.cpp @@ -477,7 +477,7 @@ static PyObject *_wrap_STCNameStr_get() { static PyObject *_wrap_new_StyledTextCtrl(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; + int arg2 = (int) wxID_ANY ; wxPoint const &arg3_defvalue = wxDefaultPosition ; wxPoint *arg3 = (wxPoint *) &arg3_defvalue ; wxSize const &arg4_defvalue = wxDefaultSize ; @@ -499,11 +499,13 @@ static PyObject *_wrap_new_StyledTextCtrl(PyObject *self, PyObject *args, PyObje (char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOO:new_StyledTextCtrl",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOO:new_StyledTextCtrl",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (obj2) { { arg3 = &temp3; @@ -577,7 +579,7 @@ static PyObject *_wrap_StyledTextCtrl_Create(PyObject *self, PyObject *args, PyO PyObject *resultobj; wxStyledTextCtrl *arg1 = (wxStyledTextCtrl *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; + int arg3 = (int) wxID_ANY ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -599,13 +601,15 @@ static PyObject *_wrap_StyledTextCtrl_Create(PyObject *self, PyObject *args, PyO (char *) "self",(char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:StyledTextCtrl_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOO:StyledTextCtrl_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxStyledTextCtrl, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } if (obj3) { { arg4 = &temp4; diff --git a/wxPython/contrib/stc/msw/stc.py b/wxPython/contrib/stc/msw/stc.py index daaaef6639..0351196dab 100644 --- a/wxPython/contrib/stc/msw/stc.py +++ b/wxPython/contrib/stc/msw/stc.py @@ -900,8 +900,8 @@ class StyledTextCtrl(_core.Control): return "<%s.%s; proxy of C++ wxStyledTextCtrl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=0, String name=STCNameStr) -> StyledTextCtrl + __init__(self, Window parent, int id=ID_ANY, Point pos=DefaultPosition, + Size size=DefaultSize, long style=0, String name=STCNameStr) -> StyledTextCtrl """ newobj = _stc.new_StyledTextCtrl(*args, **kwargs) self.this = newobj.this @@ -911,8 +911,8 @@ class StyledTextCtrl(_core.Control): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=0, String name=wxSTCNameStr) + Create(self, Window parent, int id=ID_ANY, Point pos=DefaultPosition, + Size size=DefaultSize, long style=0, String name=wxSTCNameStr) """ return _stc.StyledTextCtrl_Create(*args, **kwargs) @@ -2845,7 +2845,6 @@ wxEVT_STC_MODIFIED = _stc.wxEVT_STC_MODIFIED wxEVT_STC_MACRORECORD = _stc.wxEVT_STC_MACRORECORD wxEVT_STC_MARGINCLICK = _stc.wxEVT_STC_MARGINCLICK wxEVT_STC_NEEDSHOWN = _stc.wxEVT_STC_NEEDSHOWN -wxEVT_STC_POSCHANGED = _stc.wxEVT_STC_POSCHANGED wxEVT_STC_PAINTED = _stc.wxEVT_STC_PAINTED wxEVT_STC_USERLISTSELECTION = _stc.wxEVT_STC_USERLISTSELECTION wxEVT_STC_URIDROPPED = _stc.wxEVT_STC_URIDROPPED diff --git a/wxPython/contrib/stc/msw/stc_wrap.cpp b/wxPython/contrib/stc/msw/stc_wrap.cpp index ca1326fbd7..328c2e3a93 100644 --- a/wxPython/contrib/stc/msw/stc_wrap.cpp +++ b/wxPython/contrib/stc/msw/stc_wrap.cpp @@ -477,7 +477,7 @@ static PyObject *_wrap_STCNameStr_get() { static PyObject *_wrap_new_StyledTextCtrl(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; + int arg2 = (int) wxID_ANY ; wxPoint const &arg3_defvalue = wxDefaultPosition ; wxPoint *arg3 = (wxPoint *) &arg3_defvalue ; wxSize const &arg4_defvalue = wxDefaultSize ; @@ -499,11 +499,13 @@ static PyObject *_wrap_new_StyledTextCtrl(PyObject *self, PyObject *args, PyObje (char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOO:new_StyledTextCtrl",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOO:new_StyledTextCtrl",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (obj2) { { arg3 = &temp3; @@ -577,7 +579,7 @@ static PyObject *_wrap_StyledTextCtrl_Create(PyObject *self, PyObject *args, PyO PyObject *resultobj; wxStyledTextCtrl *arg1 = (wxStyledTextCtrl *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; + int arg3 = (int) wxID_ANY ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -599,13 +601,15 @@ static PyObject *_wrap_StyledTextCtrl_Create(PyObject *self, PyObject *args, PyO (char *) "self",(char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:StyledTextCtrl_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOO:StyledTextCtrl_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxStyledTextCtrl, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } if (obj3) { { arg4 = &temp4; @@ -16382,7 +16386,6 @@ SWIGEXPORT(void) SWIG_init(void) { PyDict_SetItemString(d,"wxEVT_STC_MACRORECORD", SWIG_FromInt((int)wxEVT_STC_MACRORECORD)); PyDict_SetItemString(d,"wxEVT_STC_MARGINCLICK", SWIG_FromInt((int)wxEVT_STC_MARGINCLICK)); PyDict_SetItemString(d,"wxEVT_STC_NEEDSHOWN", SWIG_FromInt((int)wxEVT_STC_NEEDSHOWN)); - PyDict_SetItemString(d,"wxEVT_STC_POSCHANGED", SWIG_FromInt((int)wxEVT_STC_POSCHANGED)); PyDict_SetItemString(d,"wxEVT_STC_PAINTED", SWIG_FromInt((int)wxEVT_STC_PAINTED)); PyDict_SetItemString(d,"wxEVT_STC_USERLISTSELECTION", SWIG_FromInt((int)wxEVT_STC_USERLISTSELECTION)); PyDict_SetItemString(d,"wxEVT_STC_URIDROPPED", SWIG_FromInt((int)wxEVT_STC_URIDROPPED)); diff --git a/wxPython/contrib/xrc/msw/xrc_wrap.cpp b/wxPython/contrib/xrc/msw/xrc_wrap.cpp index b253d2e678..f35d937304 100644 --- a/wxPython/contrib/xrc/msw/xrc_wrap.cpp +++ b/wxPython/contrib/xrc/msw/xrc_wrap.cpp @@ -290,7 +290,6 @@ static swig_type_info *swig_types[23]; #include #include - static const wxString wxPyEmptyString(wxEmptyString); static const wxString wxPyUTF8String(wxT("UTF-8")); static const wxString wxPyStyleString(wxT("style")); diff --git a/wxPython/src/gtk/_controls.py b/wxPython/src/gtk/_controls.py index 445f48e93d..b8248bd580 100644 --- a/wxPython/src/gtk/_controls.py +++ b/wxPython/src/gtk/_controls.py @@ -23,9 +23,10 @@ class Button(_core.Control): return "<%s.%s; proxy of C++ wxButton instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, String label, Point pos=DefaultPosition, - Size size=DefaultSize, long style=0, - Validator validator=DefaultValidator, String name=ButtonNameStr) -> Button + __init__(self, Window parent, int id=-1, String label=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=0, Validator validator=DefaultValidator, + String name=ButtonNameStr) -> Button Create and show a button. """ @@ -37,9 +38,10 @@ class Button(_core.Control): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, String label, Point pos=DefaultPosition, - Size size=DefaultSize, long style=0, - Validator validator=DefaultValidator, String name=ButtonNameStr) -> bool + Create(self, Window parent, int id=-1, String label=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=0, Validator validator=DefaultValidator, + String name=ButtonNameStr) -> bool Acutally create the GUI Button for 2-phase creation. """ @@ -136,9 +138,9 @@ class BitmapButton(Button): return "<%s.%s; proxy of C++ wxBitmapButton instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, Bitmap bitmap, Point pos=DefaultPosition, - Size size=DefaultSize, long style=BU_AUTODRAW, - Validator validator=DefaultValidator, + __init__(self, Window parent, int id=-1, Bitmap bitmap=wxNullBitmap, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=BU_AUTODRAW, Validator validator=DefaultValidator, String name=ButtonNameStr) -> BitmapButton Create and show a button with a bitmap for the label. @@ -151,9 +153,9 @@ class BitmapButton(Button): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, Bitmap bitmap, Point pos=DefaultPosition, - Size size=DefaultSize, long style=BU_AUTODRAW, - Validator validator=DefaultValidator, + Create(self, Window parent, int id=-1, Bitmap bitmap=wxNullBitmap, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=BU_AUTODRAW, Validator validator=DefaultValidator, String name=ButtonNameStr) -> bool Acutally create the GUI BitmapButton for 2-phase creation. @@ -275,9 +277,10 @@ class CheckBox(_core.Control): return "<%s.%s; proxy of C++ wxCheckBox instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, String label, Point pos=DefaultPosition, - Size size=DefaultSize, long style=0, - Validator validator=DefaultValidator, String name=CheckBoxNameStr) -> CheckBox + __init__(self, Window parent, int id=-1, String label=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=0, Validator validator=DefaultValidator, + String name=CheckBoxNameStr) -> CheckBox Creates and shows a CheckBox control """ @@ -289,9 +292,10 @@ class CheckBox(_core.Control): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, String label, Point pos=DefaultPosition, - Size size=DefaultSize, long style=0, - Validator validator=DefaultValidator, String name=CheckBoxNameStr) -> bool + Create(self, Window parent, int id=-1, String label=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=0, Validator validator=DefaultValidator, + String name=CheckBoxNameStr) -> bool Actually create the GUI CheckBox for 2-phase creation. """ @@ -752,7 +756,7 @@ class Gauge(_core.Control): return "<%s.%s; proxy of C++ wxGauge instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, int range, Point pos=DefaultPosition, + __init__(self, Window parent, int id=-1, int range=100, Point pos=DefaultPosition, Size size=DefaultSize, long style=GA_HORIZONTAL, Validator validator=DefaultValidator, String name=GaugeNameStr) -> Gauge @@ -765,7 +769,7 @@ class Gauge(_core.Control): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, int range, Point pos=DefaultPosition, + Create(self, Window parent, int id=-1, int range=100, Point pos=DefaultPosition, Size size=DefaultSize, long style=GA_HORIZONTAL, Validator validator=DefaultValidator, String name=GaugeNameStr) -> bool @@ -865,9 +869,9 @@ class StaticBox(_core.Control): return "<%s.%s; proxy of C++ wxStaticBox instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, String label, Point pos=DefaultPosition, - Size size=DefaultSize, long style=0, - String name=StaticBoxNameStr) -> StaticBox + __init__(self, Window parent, int id=-1, String label=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=0, String name=StaticBoxNameStr) -> StaticBox """ newobj = _controls_.new_StaticBox(*args, **kwargs) self.this = newobj.this @@ -877,9 +881,9 @@ class StaticBox(_core.Control): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, String label, Point pos=DefaultPosition, - Size size=DefaultSize, long style=0, - String name=StaticBoxNameStr) -> bool + Create(self, Window parent, int id=-1, String label=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=0, String name=StaticBoxNameStr) -> bool """ return _controls_.StaticBox_Create(*args, **kwargs) @@ -942,8 +946,8 @@ class StaticLine(_core.Control): return "<%s.%s; proxy of C++ wxStaticLine instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=LI_HORIZONTAL, + __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=LI_HORIZONTAL, String name=StaticTextNameStr) -> StaticLine """ newobj = _controls_.new_StaticLine(*args, **kwargs) @@ -954,8 +958,8 @@ class StaticLine(_core.Control): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=LI_HORIZONTAL, + Create(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=LI_HORIZONTAL, String name=StaticTextNameStr) -> bool """ return _controls_.StaticLine_Create(*args, **kwargs) @@ -1029,9 +1033,9 @@ class StaticText(_core.Control): return "<%s.%s; proxy of C++ wxStaticText instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, String label, Point pos=DefaultPosition, - Size size=DefaultSize, long style=0, - String name=StaticTextNameStr) -> StaticText + __init__(self, Window parent, int id=-1, String label=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=0, String name=StaticTextNameStr) -> StaticText """ newobj = _controls_.new_StaticText(*args, **kwargs) self.this = newobj.this @@ -1041,9 +1045,9 @@ class StaticText(_core.Control): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, String label, Point pos=DefaultPosition, - Size size=DefaultSize, long style=0, - String name=StaticTextNameStr) -> bool + Create(self, Window parent, int id=-1, String label=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=0, String name=StaticTextNameStr) -> bool """ return _controls_.StaticText_Create(*args, **kwargs) @@ -1103,9 +1107,9 @@ class StaticBitmap(_core.Control): return "<%s.%s; proxy of C++ wxStaticBitmap instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, Bitmap bitmap, Point pos=DefaultPosition, - Size size=DefaultSize, long style=0, - String name=StaticBitmapNameStr) -> StaticBitmap + __init__(self, Window parent, int id=-1, Bitmap bitmap=wxNullBitmap, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=0, String name=StaticBitmapNameStr) -> StaticBitmap """ newobj = _controls_.new_StaticBitmap(*args, **kwargs) self.this = newobj.this @@ -1115,9 +1119,9 @@ class StaticBitmap(_core.Control): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, Bitmap bitmap, Point pos=DefaultPosition, - Size size=DefaultSize, long style=0, - String name=StaticBitmapNameStr) -> bool + Create(self, Window parent, int id=-1, Bitmap bitmap=wxNullBitmap, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=0, String name=StaticBitmapNameStr) -> bool """ return _controls_.StaticBitmap_Create(*args, **kwargs) @@ -1189,8 +1193,8 @@ class ListBox(_core.ControlWithItems): return "<%s.%s; proxy of C++ wxListBox instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - wxArrayString choices=wxPyEmptyStringArray, + __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, wxArrayString choices=wxPyEmptyStringArray, long style=0, Validator validator=DefaultValidator, String name=ListBoxNameStr) -> ListBox """ @@ -1202,8 +1206,8 @@ class ListBox(_core.ControlWithItems): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - wxArrayString choices=wxPyEmptyStringArray, + Create(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, wxArrayString choices=wxPyEmptyStringArray, long style=0, Validator validator=DefaultValidator, String name=ListBoxNameStr) -> bool """ @@ -1347,8 +1351,8 @@ class CheckListBox(ListBox): return "<%s.%s; proxy of C++ wxCheckListBox instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - wxArrayString choices=wxPyEmptyStringArray, + __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, wxArrayString choices=wxPyEmptyStringArray, long style=0, Validator validator=DefaultValidator, String name=ListBoxNameStr) -> CheckListBox """ @@ -1360,8 +1364,8 @@ class CheckListBox(ListBox): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - wxArrayString choices=wxPyEmptyStringArray, + Create(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, wxArrayString choices=wxPyEmptyStringArray, long style=0, Validator validator=DefaultValidator, String name=ListBoxNameStr) -> bool """ @@ -1602,8 +1606,8 @@ class TextCtrl(_core.Control): return "<%s.%s; proxy of C++ wxTextCtrl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, String value=EmptyString, Point pos=DefaultPosition, - Size size=DefaultSize, + __init__(self, Window parent, int id=-1, String value=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, long style=0, Validator validator=DefaultValidator, String name=TextCtrlNameStr) -> TextCtrl """ @@ -1615,8 +1619,8 @@ class TextCtrl(_core.Control): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, String value=EmptyString, Point pos=DefaultPosition, - Size size=DefaultSize, + Create(self, Window parent, int id=-1, String value=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, long style=0, Validator validator=DefaultValidator, String name=TextCtrlNameStr) -> bool """ @@ -2272,10 +2276,11 @@ class RadioBox(_core.Control): return "<%s.%s; proxy of C++ wxRadioBox instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, String label, Point pos=DefaultPosition, - Size size=DefaultSize, wxArrayString choices=wxPyEmptyStringArray, - int majorDimension=0, - long style=RA_HORIZONTAL, Validator validator=DefaultValidator, + __init__(self, Window parent, int id=-1, String label=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + wxArrayString choices=wxPyEmptyStringArray, + int majorDimension=0, long style=RA_HORIZONTAL, + Validator validator=DefaultValidator, String name=RadioBoxNameStr) -> RadioBox """ if kwargs.has_key('point'): kwargs['pos'] = kwargs['point'];del kwargs['point'] @@ -2287,10 +2292,11 @@ class RadioBox(_core.Control): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, String label, Point pos=DefaultPosition, - Size size=DefaultSize, wxArrayString choices=wxPyEmptyStringArray, - int majorDimension=0, - long style=RA_HORIZONTAL, Validator validator=DefaultValidator, + Create(self, Window parent, int id=-1, String label=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + wxArrayString choices=wxPyEmptyStringArray, + int majorDimension=0, long style=RA_HORIZONTAL, + Validator validator=DefaultValidator, String name=RadioBoxNameStr) -> bool """ return _controls_.RadioBox_Create(*args, **kwargs) @@ -2407,9 +2413,10 @@ class RadioButton(_core.Control): return "<%s.%s; proxy of C++ wxRadioButton instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, String label, Point pos=DefaultPosition, - Size size=DefaultSize, long style=0, - Validator validator=DefaultValidator, String name=RadioButtonNameStr) -> RadioButton + __init__(self, Window parent, int id=-1, String label=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=0, Validator validator=DefaultValidator, + String name=RadioButtonNameStr) -> RadioButton """ newobj = _controls_.new_RadioButton(*args, **kwargs) self.this = newobj.this @@ -2419,9 +2426,10 @@ class RadioButton(_core.Control): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, String label, Point pos=DefaultPosition, - Size size=DefaultSize, long style=0, - Validator validator=DefaultValidator, String name=RadioButtonNameStr) -> bool + Create(self, Window parent, int id=-1, String label=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=0, Validator validator=DefaultValidator, + String name=RadioButtonNameStr) -> bool """ return _controls_.RadioButton_Create(*args, **kwargs) @@ -2489,9 +2497,10 @@ class Slider(_core.Control): return "<%s.%s; proxy of C++ wxSlider instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, int value, int minValue, int maxValue, - Point pos=DefaultPosition, Size size=DefaultSize, - long style=SL_HORIZONTAL, Validator validator=DefaultValidator, + __init__(self, Window parent, int id=-1, int value=0, int minValue=0, + int maxValue=100, Point pos=DefaultPosition, + Size size=DefaultSize, long style=SL_HORIZONTAL, + Validator validator=DefaultValidator, String name=SliderNameStr) -> Slider """ if kwargs.has_key('point'): kwargs['pos'] = kwargs['point'];del kwargs['point'] @@ -2503,9 +2512,10 @@ class Slider(_core.Control): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, int value, int minValue, int maxValue, - Point pos=DefaultPosition, Size size=DefaultSize, - long style=SL_HORIZONTAL, Validator validator=DefaultValidator, + Create(self, Window parent, int id=-1, int value=0, int minValue=0, + int maxValue=100, Point pos=DefaultPosition, + Size size=DefaultSize, long style=SL_HORIZONTAL, + Validator validator=DefaultValidator, String name=SliderNameStr) -> bool """ return _controls_.Slider_Create(*args, **kwargs) @@ -2654,9 +2664,10 @@ class ToggleButton(_core.Control): return "<%s.%s; proxy of C++ wxToggleButton instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, String label, Point pos=DefaultPosition, - Size size=DefaultSize, long style=0, - Validator validator=DefaultValidator, String name=ToggleButtonNameStr) -> ToggleButton + __init__(self, Window parent, int id=-1, String label=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=0, Validator validator=DefaultValidator, + String name=ToggleButtonNameStr) -> ToggleButton """ newobj = _controls_.new_ToggleButton(*args, **kwargs) self.this = newobj.this @@ -2666,9 +2677,10 @@ class ToggleButton(_core.Control): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, String label, Point pos=DefaultPosition, - Size size=DefaultSize, long style=0, - Validator validator=DefaultValidator, String name=ToggleButtonNameStr) -> bool + Create(self, Window parent, int id=-1, String label=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=0, Validator validator=DefaultValidator, + String name=ToggleButtonNameStr) -> bool """ return _controls_.ToggleButton_Create(*args, **kwargs) @@ -2931,8 +2943,8 @@ class Notebook(BookCtrl): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=0, String name=NOTEBOOK_NAME) -> bool + Create(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=0, String name=NOTEBOOK_NAME) -> bool """ return _controls_.Notebook_Create(*args, **kwargs) @@ -3085,8 +3097,8 @@ class Listbook(BookCtrl): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=0, String name=EmptyString) -> bool + Create(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=0, String name=EmptyString) -> bool """ return _controls_.Listbook_Create(*args, **kwargs) @@ -3147,11 +3159,23 @@ class BookCtrlSizer(_core.Sizer): self._setOORInfo(self) def RecalcSizes(*args, **kwargs): - """RecalcSizes(self)""" + """ + RecalcSizes(self) + + Using the sizes calculated by `CalcMin` reposition and resize all the + items managed by this sizer. You should not need to call this directly as + it is called by `Layout`. + """ return _controls_.BookCtrlSizer_RecalcSizes(*args, **kwargs) def CalcMin(*args, **kwargs): - """CalcMin(self) -> Size""" + """ + CalcMin(self) -> Size + + This method is where the sizer will do the actual calculation of its + children's minimal sizes. You should not need to call this directly as + it is called by `Layout`. + """ return _controls_.BookCtrlSizer_CalcMin(*args, **kwargs) def GetControl(*args, **kwargs): @@ -3178,11 +3202,23 @@ class NotebookSizer(_core.Sizer): self._setOORInfo(self) def RecalcSizes(*args, **kwargs): - """RecalcSizes(self)""" + """ + RecalcSizes(self) + + Using the sizes calculated by `CalcMin` reposition and resize all the + items managed by this sizer. You should not need to call this directly as + it is called by `Layout`. + """ return _controls_.NotebookSizer_RecalcSizes(*args, **kwargs) def CalcMin(*args, **kwargs): - """CalcMin(self) -> Size""" + """ + CalcMin(self) -> Size + + This method is where the sizer will do the actual calculation of its + children's minimal sizes. You should not need to call this directly as + it is called by `Layout`. + """ return _controls_.NotebookSizer_CalcMin(*args, **kwargs) def GetNotebook(*args, **kwargs): @@ -3472,6 +3508,7 @@ class ToolBarBase(_core.Control): # For consistency with the backwards compatible methods above, here are # some non-'Label' versions of the Check and Radio methods + def AddCheckTool(self, id, bitmap, bmpDisabled = wx.NullBitmap, shortHelp = '', longHelp = '', @@ -3672,8 +3709,8 @@ class ToolBar(ToolBarBase): return "<%s.%s; proxy of C++ wxToolBar instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=wxNO_BORDER|wxTB_HORIZONTAL, + __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=wxNO_BORDER|wxTB_HORIZONTAL, String name=wxPyToolBarNameStr) -> ToolBar """ newobj = _controls_.new_ToolBar(*args, **kwargs) @@ -3684,8 +3721,8 @@ class ToolBar(ToolBarBase): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=wxNO_BORDER|wxTB_HORIZONTAL, + Create(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=wxNO_BORDER|wxTB_HORIZONTAL, String name=wxPyToolBarNameStr) -> bool """ return _controls_.ToolBar_Create(*args, **kwargs) @@ -5411,8 +5448,8 @@ class PyControl(_core.Control): return "<%s.%s; proxy of C++ wxPyControl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=0, Validator validator=DefaultValidator, + __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=0, Validator validator=DefaultValidator, String name=ControlNameStr) -> PyControl """ newobj = _controls_.new_PyControl(*args, **kwargs) diff --git a/wxPython/src/gtk/_controls_wrap.cpp b/wxPython/src/gtk/_controls_wrap.cpp index 66792ea2f4..b7a4fd7972 100644 --- a/wxPython/src/gtk/_controls_wrap.cpp +++ b/wxPython/src/gtk/_controls_wrap.cpp @@ -1043,8 +1043,9 @@ static PyObject *_wrap_ButtonNameStr_get() { static PyObject *_wrap_new_Button(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; - wxString *arg3 = 0 ; + int arg2 = (int) -1 ; + wxString const &arg3_defvalue = wxPyEmptyString ; + wxString *arg3 = (wxString *) &arg3_defvalue ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -1071,15 +1072,19 @@ static PyObject *_wrap_new_Button(PyObject *self, PyObject *args, PyObject *kwar (char *) "parent",(char *) "id",(char *) "label",(char *) "pos",(char *) "size",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOOO:new_Button",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOOO:new_Button",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; - { - arg3 = wxString_in_helper(obj2); - if (arg3 == NULL) SWIG_fail; - temp3 = True; + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj2) { + { + arg3 = wxString_in_helper(obj2); + if (arg3 == NULL) SWIG_fail; + temp3 = True; + } } if (obj3) { { @@ -1175,8 +1180,9 @@ static PyObject *_wrap_Button_Create(PyObject *self, PyObject *args, PyObject *k PyObject *resultobj; wxButton *arg1 = (wxButton *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; - wxString *arg4 = 0 ; + int arg3 = (int) -1 ; + wxString const &arg4_defvalue = wxPyEmptyString ; + wxString *arg4 = (wxString *) &arg4_defvalue ; wxPoint const &arg5_defvalue = wxDefaultPosition ; wxPoint *arg5 = (wxPoint *) &arg5_defvalue ; wxSize const &arg6_defvalue = wxDefaultSize ; @@ -1204,17 +1210,21 @@ static PyObject *_wrap_Button_Create(PyObject *self, PyObject *args, PyObject *k (char *) "self",(char *) "parent",(char *) "id",(char *) "label",(char *) "pos",(char *) "size",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOOOO:Button_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOOO:Button_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxButton, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; - { - arg4 = wxString_in_helper(obj3); - if (arg4 == NULL) SWIG_fail; - temp4 = True; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj3) { + { + arg4 = wxString_in_helper(obj3); + if (arg4 == NULL) SWIG_fail; + temp4 = True; + } } if (obj4) { { @@ -1374,8 +1384,9 @@ static PyObject * Button_swigregister(PyObject *self, PyObject *args) { static PyObject *_wrap_new_BitmapButton(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; - wxBitmap *arg3 = 0 ; + int arg2 = (int) -1 ; + wxBitmap const &arg3_defvalue = wxNullBitmap ; + wxBitmap *arg3 = (wxBitmap *) &arg3_defvalue ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -1401,17 +1412,21 @@ static PyObject *_wrap_new_BitmapButton(PyObject *self, PyObject *args, PyObject (char *) "parent",(char *) "id",(char *) "bitmap",(char *) "pos",(char *) "size",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOOO:new_BitmapButton",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOOO:new_BitmapButton",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; - if ((SWIG_ConvertPtr(obj2,(void **)(&arg3),SWIGTYPE_p_wxBitmap, - SWIG_POINTER_EXCEPTION | 0)) == -1) - SWIG_fail; - if (arg3 == NULL) { - PyErr_SetString(PyExc_TypeError,"null reference"); + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj2) { + if ((SWIG_ConvertPtr(obj2,(void **)(&arg3),SWIGTYPE_p_wxBitmap, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + if (arg3 == NULL) { + PyErr_SetString(PyExc_TypeError,"null reference"); + SWIG_fail; + } } if (obj3) { { @@ -1499,8 +1514,9 @@ static PyObject *_wrap_BitmapButton_Create(PyObject *self, PyObject *args, PyObj PyObject *resultobj; wxBitmapButton *arg1 = (wxBitmapButton *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; - wxBitmap *arg4 = 0 ; + int arg3 = (int) -1 ; + wxBitmap const &arg4_defvalue = wxNullBitmap ; + wxBitmap *arg4 = (wxBitmap *) &arg4_defvalue ; wxPoint const &arg5_defvalue = wxDefaultPosition ; wxPoint *arg5 = (wxPoint *) &arg5_defvalue ; wxSize const &arg6_defvalue = wxDefaultSize ; @@ -1527,19 +1543,23 @@ static PyObject *_wrap_BitmapButton_Create(PyObject *self, PyObject *args, PyObj (char *) "self",(char *) "parent",(char *) "id",(char *) "bitmap",(char *) "pos",(char *) "size",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOOOO:BitmapButton_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOOO:BitmapButton_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxBitmapButton, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; - if ((SWIG_ConvertPtr(obj3,(void **)(&arg4),SWIGTYPE_p_wxBitmap, - SWIG_POINTER_EXCEPTION | 0)) == -1) - SWIG_fail; - if (arg4 == NULL) { - PyErr_SetString(PyExc_TypeError,"null reference"); + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj3) { + if ((SWIG_ConvertPtr(obj3,(void **)(&arg4),SWIGTYPE_p_wxBitmap, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + if (arg4 == NULL) { + PyErr_SetString(PyExc_TypeError,"null reference"); + SWIG_fail; + } } if (obj4) { { @@ -1968,8 +1988,9 @@ static PyObject *_wrap_CheckBoxNameStr_get() { static PyObject *_wrap_new_CheckBox(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; - wxString *arg3 = 0 ; + int arg2 = (int) -1 ; + wxString const &arg3_defvalue = wxPyEmptyString ; + wxString *arg3 = (wxString *) &arg3_defvalue ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -1996,15 +2017,19 @@ static PyObject *_wrap_new_CheckBox(PyObject *self, PyObject *args, PyObject *kw (char *) "parent",(char *) "id",(char *) "label",(char *) "pos",(char *) "size",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOOO:new_CheckBox",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOOO:new_CheckBox",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; - { - arg3 = wxString_in_helper(obj2); - if (arg3 == NULL) SWIG_fail; - temp3 = True; + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj2) { + { + arg3 = wxString_in_helper(obj2); + if (arg3 == NULL) SWIG_fail; + temp3 = True; + } } if (obj3) { { @@ -2096,8 +2121,9 @@ static PyObject *_wrap_CheckBox_Create(PyObject *self, PyObject *args, PyObject PyObject *resultobj; wxCheckBox *arg1 = (wxCheckBox *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; - wxString *arg4 = 0 ; + int arg3 = (int) -1 ; + wxString const &arg4_defvalue = wxPyEmptyString ; + wxString *arg4 = (wxString *) &arg4_defvalue ; wxPoint const &arg5_defvalue = wxDefaultPosition ; wxPoint *arg5 = (wxPoint *) &arg5_defvalue ; wxSize const &arg6_defvalue = wxDefaultSize ; @@ -2125,17 +2151,21 @@ static PyObject *_wrap_CheckBox_Create(PyObject *self, PyObject *args, PyObject (char *) "self",(char *) "parent",(char *) "id",(char *) "label",(char *) "pos",(char *) "size",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOOOO:CheckBox_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOOO:CheckBox_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxCheckBox, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; - { - arg4 = wxString_in_helper(obj3); - if (arg4 == NULL) SWIG_fail; - temp4 = True; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj3) { + { + arg4 = wxString_in_helper(obj3); + if (arg4 == NULL) SWIG_fail; + temp4 = True; + } } if (obj4) { { @@ -3800,8 +3830,8 @@ static PyObject *_wrap_GaugeNameStr_get() { static PyObject *_wrap_new_Gauge(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; - int arg3 ; + int arg2 = (int) -1 ; + int arg3 = (int) 100 ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -3827,13 +3857,17 @@ static PyObject *_wrap_new_Gauge(PyObject *self, PyObject *args, PyObject *kwarg (char *) "parent",(char *) "id",(char *) "range",(char *) "pos",(char *) "size",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOOO:new_Gauge",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOOO:new_Gauge",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } if (obj3) { { arg4 = &temp4; @@ -3916,8 +3950,8 @@ static PyObject *_wrap_Gauge_Create(PyObject *self, PyObject *args, PyObject *kw PyObject *resultobj; wxGauge *arg1 = (wxGauge *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; - int arg4 ; + int arg3 = (int) -1 ; + int arg4 = (int) 100 ; wxPoint const &arg5_defvalue = wxDefaultPosition ; wxPoint *arg5 = (wxPoint *) &arg5_defvalue ; wxSize const &arg6_defvalue = wxDefaultSize ; @@ -3944,15 +3978,19 @@ static PyObject *_wrap_Gauge_Create(PyObject *self, PyObject *args, PyObject *kw (char *) "self",(char *) "parent",(char *) "id",(char *) "range",(char *) "pos",(char *) "size",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOOOO:Gauge_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOOO:Gauge_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxGauge, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; - arg4 = (int) SWIG_AsInt(obj3); - if (PyErr_Occurred()) SWIG_fail; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj3) { + arg4 = (int) SWIG_AsInt(obj3); + if (PyErr_Occurred()) SWIG_fail; + } if (obj4) { { arg5 = &temp5; @@ -4360,8 +4398,9 @@ static PyObject *_wrap_StaticTextNameStr_get() { static PyObject *_wrap_new_StaticBox(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; - wxString *arg3 = 0 ; + int arg2 = (int) -1 ; + wxString const &arg3_defvalue = wxPyEmptyString ; + wxString *arg3 = (wxString *) &arg3_defvalue ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -4385,15 +4424,19 @@ static PyObject *_wrap_new_StaticBox(PyObject *self, PyObject *args, PyObject *k (char *) "parent",(char *) "id",(char *) "label",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:new_StaticBox",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOO:new_StaticBox",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; - { - arg3 = wxString_in_helper(obj2); - if (arg3 == NULL) SWIG_fail; - temp3 = True; + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj2) { + { + arg3 = wxString_in_helper(obj2); + if (arg3 == NULL) SWIG_fail; + temp3 = True; + } } if (obj3) { { @@ -4480,8 +4523,9 @@ static PyObject *_wrap_StaticBox_Create(PyObject *self, PyObject *args, PyObject PyObject *resultobj; wxStaticBox *arg1 = (wxStaticBox *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; - wxString *arg4 = 0 ; + int arg3 = (int) -1 ; + wxString const &arg4_defvalue = wxPyEmptyString ; + wxString *arg4 = (wxString *) &arg4_defvalue ; wxPoint const &arg5_defvalue = wxDefaultPosition ; wxPoint *arg5 = (wxPoint *) &arg5_defvalue ; wxSize const &arg6_defvalue = wxDefaultSize ; @@ -4506,17 +4550,21 @@ static PyObject *_wrap_StaticBox_Create(PyObject *self, PyObject *args, PyObject (char *) "self",(char *) "parent",(char *) "id",(char *) "label",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOOO:StaticBox_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOO:StaticBox_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxStaticBox, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; - { - arg4 = wxString_in_helper(obj3); - if (arg4 == NULL) SWIG_fail; - temp4 = True; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj3) { + { + arg4 = wxString_in_helper(obj3); + if (arg4 == NULL) SWIG_fail; + temp4 = True; + } } if (obj4) { { @@ -4616,7 +4664,7 @@ static PyObject * StaticBox_swigregister(PyObject *self, PyObject *args) { static PyObject *_wrap_new_StaticLine(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; + int arg2 = (int) -1 ; wxPoint const &arg3_defvalue = wxDefaultPosition ; wxPoint *arg3 = (wxPoint *) &arg3_defvalue ; wxSize const &arg4_defvalue = wxDefaultSize ; @@ -4638,11 +4686,13 @@ static PyObject *_wrap_new_StaticLine(PyObject *self, PyObject *args, PyObject * (char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOO:new_StaticLine",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOO:new_StaticLine",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (obj2) { { arg3 = &temp3; @@ -4716,7 +4766,7 @@ static PyObject *_wrap_StaticLine_Create(PyObject *self, PyObject *args, PyObjec PyObject *resultobj; wxStaticLine *arg1 = (wxStaticLine *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; + int arg3 = (int) -1 ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -4739,13 +4789,15 @@ static PyObject *_wrap_StaticLine_Create(PyObject *self, PyObject *args, PyObjec (char *) "self",(char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:StaticLine_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOO:StaticLine_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxStaticLine, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } if (obj3) { { arg4 = &temp4; @@ -4886,8 +4938,9 @@ static PyObject * StaticLine_swigregister(PyObject *self, PyObject *args) { static PyObject *_wrap_new_StaticText(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; - wxString *arg3 = 0 ; + int arg2 = (int) -1 ; + wxString const &arg3_defvalue = wxPyEmptyString ; + wxString *arg3 = (wxString *) &arg3_defvalue ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -4911,15 +4964,19 @@ static PyObject *_wrap_new_StaticText(PyObject *self, PyObject *args, PyObject * (char *) "parent",(char *) "id",(char *) "label",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:new_StaticText",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOO:new_StaticText",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; - { - arg3 = wxString_in_helper(obj2); - if (arg3 == NULL) SWIG_fail; - temp3 = True; + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj2) { + { + arg3 = wxString_in_helper(obj2); + if (arg3 == NULL) SWIG_fail; + temp3 = True; + } } if (obj3) { { @@ -5002,8 +5059,9 @@ static PyObject *_wrap_StaticText_Create(PyObject *self, PyObject *args, PyObjec PyObject *resultobj; wxStaticText *arg1 = (wxStaticText *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; - wxString *arg4 = 0 ; + int arg3 = (int) -1 ; + wxString const &arg4_defvalue = wxPyEmptyString ; + wxString *arg4 = (wxString *) &arg4_defvalue ; wxPoint const &arg5_defvalue = wxDefaultPosition ; wxPoint *arg5 = (wxPoint *) &arg5_defvalue ; wxSize const &arg6_defvalue = wxDefaultSize ; @@ -5028,17 +5086,21 @@ static PyObject *_wrap_StaticText_Create(PyObject *self, PyObject *args, PyObjec (char *) "self",(char *) "parent",(char *) "id",(char *) "label",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOOO:StaticText_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOO:StaticText_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxStaticText, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; - { - arg4 = wxString_in_helper(obj3); - if (arg4 == NULL) SWIG_fail; - temp4 = True; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj3) { + { + arg4 = wxString_in_helper(obj3); + if (arg4 == NULL) SWIG_fail; + temp4 = True; + } } if (obj4) { { @@ -5138,8 +5200,9 @@ static PyObject * StaticText_swigregister(PyObject *self, PyObject *args) { static PyObject *_wrap_new_StaticBitmap(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; - wxBitmap *arg3 = 0 ; + int arg2 = (int) -1 ; + wxBitmap const &arg3_defvalue = wxNullBitmap ; + wxBitmap *arg3 = (wxBitmap *) &arg3_defvalue ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -5162,17 +5225,21 @@ static PyObject *_wrap_new_StaticBitmap(PyObject *self, PyObject *args, PyObject (char *) "parent",(char *) "id",(char *) "bitmap",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:new_StaticBitmap",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOO:new_StaticBitmap",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; - if ((SWIG_ConvertPtr(obj2,(void **)(&arg3),SWIGTYPE_p_wxBitmap, - SWIG_POINTER_EXCEPTION | 0)) == -1) - SWIG_fail; - if (arg3 == NULL) { - PyErr_SetString(PyExc_TypeError,"null reference"); + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj2) { + if ((SWIG_ConvertPtr(obj2,(void **)(&arg3),SWIGTYPE_p_wxBitmap, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + if (arg3 == NULL) { + PyErr_SetString(PyExc_TypeError,"null reference"); + SWIG_fail; + } } if (obj3) { { @@ -5247,8 +5314,9 @@ static PyObject *_wrap_StaticBitmap_Create(PyObject *self, PyObject *args, PyObj PyObject *resultobj; wxStaticBitmap *arg1 = (wxStaticBitmap *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; - wxBitmap *arg4 = 0 ; + int arg3 = (int) -1 ; + wxBitmap const &arg4_defvalue = wxNullBitmap ; + wxBitmap *arg4 = (wxBitmap *) &arg4_defvalue ; wxPoint const &arg5_defvalue = wxDefaultPosition ; wxPoint *arg5 = (wxPoint *) &arg5_defvalue ; wxSize const &arg6_defvalue = wxDefaultSize ; @@ -5272,19 +5340,23 @@ static PyObject *_wrap_StaticBitmap_Create(PyObject *self, PyObject *args, PyObj (char *) "self",(char *) "parent",(char *) "id",(char *) "bitmap",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOOO:StaticBitmap_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOO:StaticBitmap_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxStaticBitmap, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; - if ((SWIG_ConvertPtr(obj3,(void **)(&arg4),SWIGTYPE_p_wxBitmap, - SWIG_POINTER_EXCEPTION | 0)) == -1) - SWIG_fail; - if (arg4 == NULL) { - PyErr_SetString(PyExc_TypeError,"null reference"); + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj3) { + if ((SWIG_ConvertPtr(obj3,(void **)(&arg4),SWIGTYPE_p_wxBitmap, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + if (arg4 == NULL) { + PyErr_SetString(PyExc_TypeError,"null reference"); + SWIG_fail; + } } if (obj4) { { @@ -5494,7 +5566,7 @@ static PyObject *_wrap_ListBoxNameStr_get() { static PyObject *_wrap_new_ListBox(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; + int arg2 = (int) -1 ; wxPoint const &arg3_defvalue = wxDefaultPosition ; wxPoint *arg3 = (wxPoint *) &arg3_defvalue ; wxSize const &arg4_defvalue = wxDefaultSize ; @@ -5523,11 +5595,13 @@ static PyObject *_wrap_new_ListBox(PyObject *self, PyObject *args, PyObject *kwa (char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "choices",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOO:new_ListBox",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOOO:new_ListBox",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (obj2) { { arg3 = &temp3; @@ -5639,7 +5713,7 @@ static PyObject *_wrap_ListBox_Create(PyObject *self, PyObject *args, PyObject * PyObject *resultobj; wxListBox *arg1 = (wxListBox *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; + int arg3 = (int) -1 ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -5669,13 +5743,15 @@ static PyObject *_wrap_ListBox_Create(PyObject *self, PyObject *args, PyObject * (char *) "self",(char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "choices",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOOOO:ListBox_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOOO:ListBox_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxListBox, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } if (obj3) { { arg4 = &temp4; @@ -6478,7 +6554,7 @@ static PyObject * ListBox_swigregister(PyObject *self, PyObject *args) { static PyObject *_wrap_new_CheckListBox(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; + int arg2 = (int) -1 ; wxPoint const &arg3_defvalue = wxDefaultPosition ; wxPoint *arg3 = (wxPoint *) &arg3_defvalue ; wxSize const &arg4_defvalue = wxDefaultSize ; @@ -6507,11 +6583,13 @@ static PyObject *_wrap_new_CheckListBox(PyObject *self, PyObject *args, PyObject (char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "choices",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOO:new_CheckListBox",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOOO:new_CheckListBox",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (obj2) { { arg3 = &temp3; @@ -6623,7 +6701,7 @@ static PyObject *_wrap_CheckListBox_Create(PyObject *self, PyObject *args, PyObj PyObject *resultobj; wxCheckListBox *arg1 = (wxCheckListBox *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; + int arg3 = (int) -1 ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -6653,13 +6731,15 @@ static PyObject *_wrap_CheckListBox_Create(PyObject *self, PyObject *args, PyObj (char *) "self",(char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "choices",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOOOO:CheckListBox_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOOO:CheckListBox_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxCheckListBox, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } if (obj3) { { arg4 = &temp4; @@ -7957,7 +8037,7 @@ static PyObject * TextAttr_swigregister(PyObject *self, PyObject *args) { static PyObject *_wrap_new_TextCtrl(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; + int arg2 = (int) -1 ; wxString const &arg3_defvalue = wxPyEmptyString ; wxString *arg3 = (wxString *) &arg3_defvalue ; wxPoint const &arg4_defvalue = wxDefaultPosition ; @@ -7986,11 +8066,13 @@ static PyObject *_wrap_new_TextCtrl(PyObject *self, PyObject *args, PyObject *kw (char *) "parent",(char *) "id",(char *) "value",(char *) "pos",(char *) "size",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOO:new_TextCtrl",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOOO:new_TextCtrl",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (obj2) { { arg3 = wxString_in_helper(obj2); @@ -8092,7 +8174,7 @@ static PyObject *_wrap_TextCtrl_Create(PyObject *self, PyObject *args, PyObject PyObject *resultobj; wxTextCtrl *arg1 = (wxTextCtrl *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; + int arg3 = (int) -1 ; wxString const &arg4_defvalue = wxPyEmptyString ; wxString *arg4 = (wxString *) &arg4_defvalue ; wxPoint const &arg5_defvalue = wxDefaultPosition ; @@ -8122,13 +8204,15 @@ static PyObject *_wrap_TextCtrl_Create(PyObject *self, PyObject *args, PyObject (char *) "self",(char *) "parent",(char *) "id",(char *) "value",(char *) "pos",(char *) "size",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOOOO:TextCtrl_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOOO:TextCtrl_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxTextCtrl, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } if (obj3) { { arg4 = wxString_in_helper(obj3); @@ -11616,8 +11700,9 @@ static PyObject *_wrap_RadioButtonNameStr_get() { static PyObject *_wrap_new_RadioBox(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; - wxString *arg3 = 0 ; + int arg2 = (int) -1 ; + wxString const &arg3_defvalue = wxPyEmptyString ; + wxString *arg3 = (wxString *) &arg3_defvalue ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -11650,15 +11735,19 @@ static PyObject *_wrap_new_RadioBox(PyObject *self, PyObject *args, PyObject *kw (char *) "parent",(char *) "id",(char *) "label",(char *) "pos",(char *) "size",(char *) "choices",(char *) "majorDimension",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOOOOO:new_RadioBox",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOOOOO:new_RadioBox",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; - { - arg3 = wxString_in_helper(obj2); - if (arg3 == NULL) SWIG_fail; - temp3 = True; + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj2) { + { + arg3 = wxString_in_helper(obj2); + if (arg3 == NULL) SWIG_fail; + temp3 = True; + } } if (obj3) { { @@ -11783,8 +11872,9 @@ static PyObject *_wrap_RadioBox_Create(PyObject *self, PyObject *args, PyObject PyObject *resultobj; wxRadioBox *arg1 = (wxRadioBox *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; - wxString *arg4 = 0 ; + int arg3 = (int) -1 ; + wxString const &arg4_defvalue = wxPyEmptyString ; + wxString *arg4 = (wxString *) &arg4_defvalue ; wxPoint const &arg5_defvalue = wxDefaultPosition ; wxPoint *arg5 = (wxPoint *) &arg5_defvalue ; wxSize const &arg6_defvalue = wxDefaultSize ; @@ -11818,17 +11908,21 @@ static PyObject *_wrap_RadioBox_Create(PyObject *self, PyObject *args, PyObject (char *) "self",(char *) "parent",(char *) "id",(char *) "label",(char *) "pos",(char *) "size",(char *) "choices",(char *) "majorDimension",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOOOOOO:RadioBox_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOOOOO:RadioBox_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxRadioBox, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; - { - arg4 = wxString_in_helper(obj3); - if (arg4 == NULL) SWIG_fail; - temp4 = True; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj3) { + { + arg4 = wxString_in_helper(obj3); + if (arg4 == NULL) SWIG_fail; + temp4 = True; + } } if (obj4) { { @@ -12410,8 +12504,9 @@ static PyObject * RadioBox_swigregister(PyObject *self, PyObject *args) { static PyObject *_wrap_new_RadioButton(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; - wxString *arg3 = 0 ; + int arg2 = (int) -1 ; + wxString const &arg3_defvalue = wxPyEmptyString ; + wxString *arg3 = (wxString *) &arg3_defvalue ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -12438,15 +12533,19 @@ static PyObject *_wrap_new_RadioButton(PyObject *self, PyObject *args, PyObject (char *) "parent",(char *) "id",(char *) "label",(char *) "pos",(char *) "size",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOOO:new_RadioButton",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOOO:new_RadioButton",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; - { - arg3 = wxString_in_helper(obj2); - if (arg3 == NULL) SWIG_fail; - temp3 = True; + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj2) { + { + arg3 = wxString_in_helper(obj2); + if (arg3 == NULL) SWIG_fail; + temp3 = True; + } } if (obj3) { { @@ -12538,8 +12637,9 @@ static PyObject *_wrap_RadioButton_Create(PyObject *self, PyObject *args, PyObje PyObject *resultobj; wxRadioButton *arg1 = (wxRadioButton *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; - wxString *arg4 = 0 ; + int arg3 = (int) -1 ; + wxString const &arg4_defvalue = wxPyEmptyString ; + wxString *arg4 = (wxString *) &arg4_defvalue ; wxPoint const &arg5_defvalue = wxDefaultPosition ; wxPoint *arg5 = (wxPoint *) &arg5_defvalue ; wxSize const &arg6_defvalue = wxDefaultSize ; @@ -12567,17 +12667,21 @@ static PyObject *_wrap_RadioButton_Create(PyObject *self, PyObject *args, PyObje (char *) "self",(char *) "parent",(char *) "id",(char *) "label",(char *) "pos",(char *) "size",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOOOO:RadioButton_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOOO:RadioButton_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxRadioButton, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; - { - arg4 = wxString_in_helper(obj3); - if (arg4 == NULL) SWIG_fail; - temp4 = True; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj3) { + { + arg4 = wxString_in_helper(obj3); + if (arg4 == NULL) SWIG_fail; + temp4 = True; + } } if (obj4) { { @@ -12763,10 +12867,10 @@ static PyObject *_wrap_SliderNameStr_get() { static PyObject *_wrap_new_Slider(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; - int arg3 ; - int arg4 ; - int arg5 ; + int arg2 = (int) -1 ; + int arg3 = (int) 0 ; + int arg4 = (int) 0 ; + int arg5 = (int) 100 ; wxPoint const &arg6_defvalue = wxDefaultPosition ; wxPoint *arg6 = (wxPoint *) &arg6_defvalue ; wxSize const &arg7_defvalue = wxDefaultSize ; @@ -12794,17 +12898,25 @@ static PyObject *_wrap_new_Slider(PyObject *self, PyObject *args, PyObject *kwar (char *) "parent",(char *) "id",(char *) "value",(char *) "minValue",(char *) "maxValue",(char *) "pos",(char *) "size",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO|OOOOO:new_Slider",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOOOOO:new_Slider",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; - arg4 = (int) SWIG_AsInt(obj3); - if (PyErr_Occurred()) SWIG_fail; - arg5 = (int) SWIG_AsInt(obj4); - if (PyErr_Occurred()) SWIG_fail; + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj3) { + arg4 = (int) SWIG_AsInt(obj3); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj4) { + arg5 = (int) SWIG_AsInt(obj4); + if (PyErr_Occurred()) SWIG_fail; + } if (obj5) { { arg6 = &temp6; @@ -12887,10 +12999,10 @@ static PyObject *_wrap_Slider_Create(PyObject *self, PyObject *args, PyObject *k PyObject *resultobj; wxSlider *arg1 = (wxSlider *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; - int arg4 ; - int arg5 ; - int arg6 ; + int arg3 = (int) -1 ; + int arg4 = (int) 0 ; + int arg5 = (int) 0 ; + int arg6 = (int) 100 ; wxPoint const &arg7_defvalue = wxDefaultPosition ; wxPoint *arg7 = (wxPoint *) &arg7_defvalue ; wxSize const &arg8_defvalue = wxDefaultSize ; @@ -12919,19 +13031,27 @@ static PyObject *_wrap_Slider_Create(PyObject *self, PyObject *args, PyObject *k (char *) "self",(char *) "parent",(char *) "id",(char *) "value",(char *) "minValue",(char *) "maxValue",(char *) "pos",(char *) "size",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOO|OOOOO:Slider_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOOOOO:Slider_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxSlider, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; - arg4 = (int) SWIG_AsInt(obj3); - if (PyErr_Occurred()) SWIG_fail; - arg5 = (int) SWIG_AsInt(obj4); - if (PyErr_Occurred()) SWIG_fail; - arg6 = (int) SWIG_AsInt(obj5); - if (PyErr_Occurred()) SWIG_fail; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj3) { + arg4 = (int) SWIG_AsInt(obj3); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj4) { + arg5 = (int) SWIG_AsInt(obj4); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj5) { + arg6 = (int) SWIG_AsInt(obj5); + if (PyErr_Occurred()) SWIG_fail; + } if (obj6) { { arg7 = &temp7; @@ -13639,8 +13759,9 @@ static PyObject *_wrap_ToggleButtonNameStr_get() { static PyObject *_wrap_new_ToggleButton(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; - wxString *arg3 = 0 ; + int arg2 = (int) -1 ; + wxString const &arg3_defvalue = wxPyEmptyString ; + wxString *arg3 = (wxString *) &arg3_defvalue ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -13667,15 +13788,19 @@ static PyObject *_wrap_new_ToggleButton(PyObject *self, PyObject *args, PyObject (char *) "parent",(char *) "id",(char *) "label",(char *) "pos",(char *) "size",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOOO:new_ToggleButton",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOOO:new_ToggleButton",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; - { - arg3 = wxString_in_helper(obj2); - if (arg3 == NULL) SWIG_fail; - temp3 = True; + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj2) { + { + arg3 = wxString_in_helper(obj2); + if (arg3 == NULL) SWIG_fail; + temp3 = True; + } } if (obj3) { { @@ -13767,8 +13892,9 @@ static PyObject *_wrap_ToggleButton_Create(PyObject *self, PyObject *args, PyObj PyObject *resultobj; wxToggleButton *arg1 = (wxToggleButton *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; - wxString *arg4 = 0 ; + int arg3 = (int) -1 ; + wxString const &arg4_defvalue = wxPyEmptyString ; + wxString *arg4 = (wxString *) &arg4_defvalue ; wxPoint const &arg5_defvalue = wxDefaultPosition ; wxPoint *arg5 = (wxPoint *) &arg5_defvalue ; wxSize const &arg6_defvalue = wxDefaultSize ; @@ -13796,17 +13922,21 @@ static PyObject *_wrap_ToggleButton_Create(PyObject *self, PyObject *args, PyObj (char *) "self",(char *) "parent",(char *) "id",(char *) "label",(char *) "pos",(char *) "size",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOOOO:ToggleButton_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOOO:ToggleButton_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxToggleButton, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; - { - arg4 = wxString_in_helper(obj3); - if (arg4 == NULL) SWIG_fail; - temp4 = True; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj3) { + { + arg4 = wxString_in_helper(obj3); + if (arg4 == NULL) SWIG_fail; + temp4 = True; + } } if (obj4) { { @@ -15008,7 +15138,7 @@ static PyObject *_wrap_Notebook_Create(PyObject *self, PyObject *args, PyObject PyObject *resultobj; wxNotebook *arg1 = (wxNotebook *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; + int arg3 = (int) -1 ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -15031,13 +15161,15 @@ static PyObject *_wrap_Notebook_Create(PyObject *self, PyObject *args, PyObject (char *) "self",(char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:Notebook_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOO:Notebook_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxNotebook, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } if (obj3) { { arg4 = &temp4; @@ -15450,7 +15582,7 @@ static PyObject *_wrap_Listbook_Create(PyObject *self, PyObject *args, PyObject PyObject *resultobj; wxListbook *arg1 = (wxListbook *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; + int arg3 = (int) -1 ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -15473,13 +15605,15 @@ static PyObject *_wrap_Listbook_Create(PyObject *self, PyObject *args, PyObject (char *) "self",(char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:Listbook_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOO:Listbook_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxListbook, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } if (obj3) { { arg4 = &temp4; @@ -18313,7 +18447,7 @@ static PyObject * ToolBarBase_swigregister(PyObject *self, PyObject *args) { static PyObject *_wrap_new_ToolBar(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; + int arg2 = (int) -1 ; wxPoint const &arg3_defvalue = wxDefaultPosition ; wxPoint *arg3 = (wxPoint *) &arg3_defvalue ; wxSize const &arg4_defvalue = wxDefaultSize ; @@ -18335,11 +18469,13 @@ static PyObject *_wrap_new_ToolBar(PyObject *self, PyObject *args, PyObject *kwa (char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOO:new_ToolBar",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOO:new_ToolBar",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (obj2) { { arg3 = &temp3; @@ -18417,7 +18553,7 @@ static PyObject *_wrap_ToolBar_Create(PyObject *self, PyObject *args, PyObject * PyObject *resultobj; wxToolBar *arg1 = (wxToolBar *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; + int arg3 = (int) -1 ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -18440,13 +18576,15 @@ static PyObject *_wrap_ToolBar_Create(PyObject *self, PyObject *args, PyObject * (char *) "self",(char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:ToolBar_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOO:ToolBar_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxToolBar, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } if (obj3) { { arg4 = &temp4; @@ -28850,7 +28988,7 @@ static PyObject * DirFilterListCtrl_swigregister(PyObject *self, PyObject *args) static PyObject *_wrap_new_PyControl(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; + int arg2 = (int) (int)-1 ; wxPoint const &arg3_defvalue = wxDefaultPosition ; wxPoint *arg3 = (wxPoint *) &arg3_defvalue ; wxSize const &arg4_defvalue = wxDefaultSize ; @@ -28875,11 +29013,13 @@ static PyObject *_wrap_new_PyControl(PyObject *self, PyObject *args, PyObject *k (char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOO:new_PyControl",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOO:new_PyControl",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int const) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; + if (obj1) { + arg2 = (int const) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (obj2) { { arg3 = &temp3; diff --git a/wxPython/src/gtk/_core.py b/wxPython/src/gtk/_core.py index 2ff23bec9a..61830782b2 100644 --- a/wxPython/src/gtk/_core.py +++ b/wxPython/src/gtk/_core.py @@ -5781,7 +5781,7 @@ class Window(EvtHandler): """ GetBestSize(self) -> Size - This functions returns the best acceptable minimal size for the + This function returns the best acceptable minimal size for the window, if applicable. For example, for a static text control, it will be the minimal size such that the control label is not truncated. For windows containing subwindows (suzh aswx.Panel), the size returned by @@ -5794,7 +5794,7 @@ class Window(EvtHandler): """ GetBestSizeTuple() -> (width, height) - This functions returns the best acceptable minimal size for the + This function returns the best acceptable minimal size for the window, if applicable. For example, for a static text control, it will be the minimal size such that the control label is not truncated. For windows containing subwindows (suzh aswx.Panel), the size returned by @@ -8059,8 +8059,8 @@ class Control(Window): return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=0, Validator validator=DefaultValidator, + __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=0, Validator validator=DefaultValidator, String name=ControlNameStr) -> Control Create a Control. Normally you should only call this from a subclass' @@ -8074,8 +8074,8 @@ class Control(Window): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=0, Validator validator=DefaultValidator, + Create(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=0, Validator validator=DefaultValidator, String name=ControlNameStr) -> bool Do the 2nd phase and create the GUI control. @@ -8352,36 +8352,85 @@ _core_.ControlWithItems_swigregister(ControlWithItemsPtr) #--------------------------------------------------------------------------- class SizerItem(Object): + """ + The wx.SizerItem class is used to track the position, size and other + attributes of each item managed by a `wx.Sizer`. In normal usage user + code should never need to deal directly with a wx.SizerItem, but + custom classes derived from `wx.PySizer` will probably need to use the + collection of wx.SizerItems held by wx.Sizer when calculating layout. + + :see: `wx.Sizer`, `wx.GBSizerItem` + """ def __repr__(self): return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): - """__init__(self) -> SizerItem""" + """ + __init__(self) -> SizerItem + + Constructs an empty wx.SizerItem. Either a window, sizer or spacer + size will need to be set before this item can be used in a Sizer. + + You will probably never need to create a wx.SizerItem directly as they + are created automatically when the sizer's Add, Insert or Prepend + methods are called. + + :see: `wx.SizerItemSpacer`, `wx.SizerItemWindow`, `wx.SizerItemSizer` + """ newobj = _core_.new_SizerItem(*args, **kwargs) self.this = newobj.this self.thisown = 1 del newobj.thisown def DeleteWindows(*args, **kwargs): - """DeleteWindows(self)""" + """ + DeleteWindows(self) + + Destroy the window or the windows in a subsizer, depending on the type + of item. + """ return _core_.SizerItem_DeleteWindows(*args, **kwargs) def DetachSizer(*args, **kwargs): - """DetachSizer(self)""" + """ + DetachSizer(self) + + Enable deleting the SizerItem without destroying the contained sizer. + """ return _core_.SizerItem_DetachSizer(*args, **kwargs) def GetSize(*args, **kwargs): - """GetSize(self) -> Size""" + """ + GetSize(self) -> Size + + Get the current size of the item, as set in the last Layout. + """ return _core_.SizerItem_GetSize(*args, **kwargs) def CalcMin(*args, **kwargs): - """CalcMin(self) -> Size""" + """ + CalcMin(self) -> Size + + Calculates the minimum desired size for the item, including any space + needed by borders. + """ return _core_.SizerItem_CalcMin(*args, **kwargs) def SetDimension(*args, **kwargs): - """SetDimension(self, Point pos, Size size)""" + """ + SetDimension(self, Point pos, Size size) + + Set the position and size of the space allocated for this item by the + sizer, and adjust the position and size of the item (window or + subsizer) to be within that space taking alignment and borders into + account. + """ return _core_.SizerItem_SetDimension(*args, **kwargs) def GetMinSize(*args, **kwargs): - """GetMinSize(self) -> Size""" + """ + GetMinSize(self) -> Size + + Get the minimum size needed for the item. + """ return _core_.SizerItem_GetMinSize(*args, **kwargs) def SetInitSize(*args, **kwargs): @@ -8389,97 +8438,192 @@ class SizerItem(Object): return _core_.SizerItem_SetInitSize(*args, **kwargs) def SetRatioWH(*args, **kwargs): - """SetRatioWH(self, int width, int height)""" + """ + SetRatioWH(self, int width, int height) + + Set the ratio item attribute. + """ return _core_.SizerItem_SetRatioWH(*args, **kwargs) def SetRatioSize(*args, **kwargs): - """SetRatioSize(self, Size size)""" + """ + SetRatioSize(self, Size size) + + Set the ratio item attribute. + """ return _core_.SizerItem_SetRatioSize(*args, **kwargs) def SetRatio(*args, **kwargs): - """SetRatio(self, float ratio)""" + """ + SetRatio(self, float ratio) + + Set the ratio item attribute. + """ return _core_.SizerItem_SetRatio(*args, **kwargs) def GetRatio(*args, **kwargs): - """GetRatio(self) -> float""" + """ + GetRatio(self) -> float + + Set the ratio item attribute. + """ return _core_.SizerItem_GetRatio(*args, **kwargs) def IsWindow(*args, **kwargs): - """IsWindow(self) -> bool""" + """ + IsWindow(self) -> bool + + Is this sizer item a window? + """ return _core_.SizerItem_IsWindow(*args, **kwargs) def IsSizer(*args, **kwargs): - """IsSizer(self) -> bool""" + """ + IsSizer(self) -> bool + + Is this sizer item a subsizer? + """ return _core_.SizerItem_IsSizer(*args, **kwargs) def IsSpacer(*args, **kwargs): - """IsSpacer(self) -> bool""" + """ + IsSpacer(self) -> bool + + Is this sizer item a spacer? + """ return _core_.SizerItem_IsSpacer(*args, **kwargs) def SetProportion(*args, **kwargs): - """SetProportion(self, int proportion)""" + """ + SetProportion(self, int proportion) + + Set the proportion value for this item. + """ return _core_.SizerItem_SetProportion(*args, **kwargs) def GetProportion(*args, **kwargs): - """GetProportion(self) -> int""" + """ + GetProportion(self) -> int + + Get the proportion value for this item. + """ return _core_.SizerItem_GetProportion(*args, **kwargs) - SetOption = SetProportion - GetOption = GetProportion + SetOption = wx._deprecated(SetProportion, "Please use `SetProportion` instead.") + GetOption = wx._deprecated(GetProportion, "Please use `GetProportion` instead.") def SetFlag(*args, **kwargs): - """SetFlag(self, int flag)""" + """ + SetFlag(self, int flag) + + Set the flag value for this item. + """ return _core_.SizerItem_SetFlag(*args, **kwargs) def GetFlag(*args, **kwargs): - """GetFlag(self) -> int""" + """ + GetFlag(self) -> int + + Get the flag value for this item. + """ return _core_.SizerItem_GetFlag(*args, **kwargs) def SetBorder(*args, **kwargs): - """SetBorder(self, int border)""" + """ + SetBorder(self, int border) + + Set the border value for this item. + """ return _core_.SizerItem_SetBorder(*args, **kwargs) def GetBorder(*args, **kwargs): - """GetBorder(self) -> int""" + """ + GetBorder(self) -> int + + Get the border value for this item. + """ return _core_.SizerItem_GetBorder(*args, **kwargs) def GetWindow(*args, **kwargs): - """GetWindow(self) -> Window""" + """ + GetWindow(self) -> Window + + Get the window (if any) that is managed by this sizer item. + """ return _core_.SizerItem_GetWindow(*args, **kwargs) def SetWindow(*args, **kwargs): - """SetWindow(self, Window window)""" + """ + SetWindow(self, Window window) + + Set the window to be managed by this sizer item. + """ return _core_.SizerItem_SetWindow(*args, **kwargs) def GetSizer(*args, **kwargs): - """GetSizer(self) -> Sizer""" + """ + GetSizer(self) -> Sizer + + Get the subsizer (if any) that is managed by this sizer item. + """ return _core_.SizerItem_GetSizer(*args, **kwargs) def SetSizer(*args, **kwargs): - """SetSizer(self, Sizer sizer)""" + """ + SetSizer(self, Sizer sizer) + + Set the subsizer to be managed by this sizer item. + """ return _core_.SizerItem_SetSizer(*args, **kwargs) def GetSpacer(*args, **kwargs): - """GetSpacer(self) -> Size""" + """ + GetSpacer(self) -> Size + + Get the size of the spacer managed by this sizer item. + """ return _core_.SizerItem_GetSpacer(*args, **kwargs) def SetSpacer(*args, **kwargs): - """SetSpacer(self, Size size)""" + """ + SetSpacer(self, Size size) + + Set the size of the spacer to be managed by this sizer item. + """ return _core_.SizerItem_SetSpacer(*args, **kwargs) def Show(*args, **kwargs): - """Show(self, bool show)""" + """ + Show(self, bool show) + + Set the show item attribute, which sizers use to determine if the item + is to be made part of the layout or not. If the item is tracking a + window then it is shown or hidden as needed. + """ return _core_.SizerItem_Show(*args, **kwargs) def IsShown(*args, **kwargs): - """IsShown(self) -> bool""" + """ + IsShown(self) -> bool + + Is the item to be shown in the layout? + """ return _core_.SizerItem_IsShown(*args, **kwargs) def GetPosition(*args, **kwargs): - """GetPosition(self) -> Point""" + """ + GetPosition(self) -> Point + + Returns the current position of the item, as set in the last Layout. + """ return _core_.SizerItem_GetPosition(*args, **kwargs) def GetUserData(*args, **kwargs): - """GetUserData(self) -> PyObject""" + """ + GetUserData(self) -> PyObject + + Returns the userData associated with this sizer item, or None if there + isn't any. + """ return _core_.SizerItem_GetUserData(*args, **kwargs) @@ -8490,34 +8634,69 @@ class SizerItemPtr(SizerItem): self.__class__ = SizerItem _core_.SizerItem_swigregister(SizerItemPtr) -def SizerItemSpacer(*args, **kwargs): +def SizerItemWindow(*args, **kwargs): """ - SizerItemSpacer(int width, int height, int proportion, int flag, int border, - Object userData) -> SizerItem + SizerItemWindow(Window window, int proportion, int flag, int border, + PyObject userData=None) -> SizerItem + + Constructs a `wx.SizerItem` for tracking a window. """ - val = _core_.new_SizerItemSpacer(*args, **kwargs) + val = _core_.new_SizerItemWindow(*args, **kwargs) val.thisown = 1 return val -def SizerItemWindow(*args, **kwargs): +def SizerItemSpacer(*args, **kwargs): """ - SizerItemWindow(Window window, int proportion, int flag, int border, - Object userData) -> SizerItem + SizerItemSpacer(int width, int height, int proportion, int flag, int border, + PyObject userData=None) -> SizerItem + + Constructs a `wx.SizerItem` for tracking a spacer. """ - val = _core_.new_SizerItemWindow(*args, **kwargs) + val = _core_.new_SizerItemSpacer(*args, **kwargs) val.thisown = 1 return val def SizerItemSizer(*args, **kwargs): """ SizerItemSizer(Sizer sizer, int proportion, int flag, int border, - Object userData) -> SizerItem + PyObject userData=None) -> SizerItem + + Constructs a `wx.SizerItem` for tracking a subsizer """ val = _core_.new_SizerItemSizer(*args, **kwargs) val.thisown = 1 return val class Sizer(Object): + """ + wx.Sizer is the abstract base class used for laying out subwindows in + a window. You cannot use wx.Sizer directly; instead, you will have to + use one of the sizer classes derived from it such as `wx.BoxSizer`, + `wx.StaticBoxSizer`, `wx.NotebookSizer`, `wx.GridSizer`, `wx.FlexGridSizer` + and `wx.GridBagSizer`. + + The concept implemented by sizers in wxWidgets is closely related to + layout tools in other GUI toolkits, such as Java's AWT, the GTK + toolkit or the Qt toolkit. It is based upon the idea of the individual + subwindows reporting their minimal required size and their ability to + get stretched if the size of the parent window has changed. This will + most often mean that the programmer does not set the original size of + a dialog in the beginning, rather the dialog will assigned a sizer and + this sizer will be queried about the recommended size. The sizer in + turn will query its children, which can be normal windows or contorls, + empty space or other sizers, so that a hierarchy of sizers can be + constructed. Note that wxSizer does not derive from wxWindow and thus + do not interfere with tab ordering and requires very little resources + compared to a real window on screen. + + What makes sizers so well fitted for use in wxWidgets is the fact that + every control reports its own minimal size and the algorithm can + handle differences in font sizes or different window (dialog item) + sizes on different platforms without problems. If for example the + standard font as well as the overall design of Mac widgets requires + more space than on Windows, then the initial size of a dialog using a + sizer will automatically be bigger on Mac than on Windows. + """ def __init__(self): raise RuntimeError, "No constructor defined" def __repr__(self): return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) @@ -8527,60 +8706,112 @@ class Sizer(Object): def Add(*args, **kwargs): """ - Add(self, PyObject item, int proportion=0, int flag=0, int border=0, + Add(self, item, int proportion=0, int flag=0, int border=0, PyObject userData=None) + + Appends a child item to the sizer. """ return _core_.Sizer_Add(*args, **kwargs) def Insert(*args, **kwargs): """ - Insert(self, int before, PyObject item, int proportion=0, int flag=0, - int border=0, PyObject userData=None) + Insert(self, int before, item, int proportion=0, int flag=0, int border=0, + PyObject userData=None) + + Inserts a new item into the list of items managed by this sizer before + the item at index *before*. See `Add` for a description of the parameters. """ return _core_.Sizer_Insert(*args, **kwargs) def Prepend(*args, **kwargs): """ - Prepend(self, PyObject item, int proportion=0, int flag=0, int border=0, + Prepend(self, item, int proportion=0, int flag=0, int border=0, PyObject userData=None) + + Adds a new item to the begining of the list of sizer items managed by + this sizer. See `Add` for a description of the parameters. """ return _core_.Sizer_Prepend(*args, **kwargs) def Remove(*args, **kwargs): - """Remove(self, PyObject item) -> bool""" + """ + Remove(self, item) -> bool + + Removes an item from the sizer and destroys it. This method does not + cause any layout or resizing to take place, call `Layout` to update + the layout on screen after removing a child from the sizer. The + *item* parameter can be either a window, a sizer, or the zero-based + index of an item to remove. Returns True if the child item was found + and removed. + """ return _core_.Sizer_Remove(*args, **kwargs) def Detach(*args, **kwargs): - """Detach(self, PyObject item) -> bool""" + """ + Detach(self, item) -> bool + + Detaches an item from the sizer without destroying it. This method + does not cause any layout or resizing to take place, call `Layout` to + do so. The *item* parameter can be either a window, a sizer, or the + zero-based index of the item to be detached. Returns True if the child item + was found and detached. + """ return _core_.Sizer_Detach(*args, **kwargs) def _SetItemMinSize(*args, **kwargs): """_SetItemMinSize(self, PyObject item, Size size)""" return _core_.Sizer__SetItemMinSize(*args, **kwargs) + def SetItemMinSize(self, item, *args): + """ + SetItemMinSize(self, item, Size size) + + Sets the minimum size that will be allocated for an item in the sizer. + The *item* parameter can be either a window, a sizer, or the + zero-based index of the item. If a window or sizer is given then it + will be searched for recursivly in subsizers if neccessary. + """ + if len(args) == 2: + # for backward compatibility accept separate width,height args too + return self._SetItemMinSize(item, args) + else: + return self._SetItemMinSize(item, args[0]) + def AddItem(*args, **kwargs): - """AddItem(self, SizerItem item)""" + """ + AddItem(self, SizerItem item) + + Adds a `wx.SizerItem` to the sizer. + """ return _core_.Sizer_AddItem(*args, **kwargs) def InsertItem(*args, **kwargs): - """InsertItem(self, size_t index, SizerItem item)""" + """ + InsertItem(self, int index, SizerItem item) + + Inserts a `wx.SizerItem` to the sizer at the position given by *index*. + """ return _core_.Sizer_InsertItem(*args, **kwargs) def PrependItem(*args, **kwargs): - """PrependItem(self, SizerItem item)""" + """ + PrependItem(self, SizerItem item) + + Prepends a `wx.SizerItem` to the sizer. + """ return _core_.Sizer_PrependItem(*args, **kwargs) - def AddMany(self, widgets): + def AddMany(self, items): """ AddMany is a convenience method for adding several items to a sizer at one time. Simply pass it a list of tuples, where each tuple consists of the parameters that you would normally pass to the `Add` method. """ - for childinfo in widgets: - if type(childinfo) != type(()) or (len(childinfo) == 2 and type(childinfo[0]) == type(1)): - childinfo = (childinfo, ) - self.Add(*childinfo) + for item in items: + if type(item) != type(()) or (len(item) == 2 and type(item[0]) == type(1)): + item = (item, ) + self.Add(*item) # for backwards compatibility only, please do not use in new code AddWindow = wx._deprecated(Add, "AddWindow is deprecated, use `Add` instead.") @@ -8597,30 +8828,53 @@ class Sizer(Object): RemovePos = wx._deprecated(Remove, "RemovePos is deprecated, use `Remove` instead.") - def SetItemMinSize(self, item, *args): - if len(args) == 2: - return self._SetItemMinSize(item, args) - else: - return self._SetItemMinSize(item, args[0]) - def SetDimension(*args, **kwargs): - """SetDimension(self, int x, int y, int width, int height)""" + """ + SetDimension(self, int x, int y, int width, int height) + + Call this to force the sizer to take the given dimension and thus + force the items owned by the sizer to resize themselves according to + the rules defined by the parameter in the `Add`, `Insert` or `Prepend` + methods. + """ return _core_.Sizer_SetDimension(*args, **kwargs) def SetMinSize(*args, **kwargs): - """SetMinSize(self, Size size)""" + """ + SetMinSize(self, Size size) + + Call this to give the sizer a minimal size. Normally, the sizer will + calculate its minimal size based purely on how much space its children + need. After calling this method `GetMinSize` will return either the + minimal size as requested by its children or the minimal size set + here, depending on which is bigger. + """ return _core_.Sizer_SetMinSize(*args, **kwargs) def GetSize(*args, **kwargs): - """GetSize(self) -> Size""" + """ + GetSize(self) -> Size + + Returns the current size of the space managed by the sizer. + """ return _core_.Sizer_GetSize(*args, **kwargs) def GetPosition(*args, **kwargs): - """GetPosition(self) -> Point""" + """ + GetPosition(self) -> Point + + Returns the current position of the sizer's managed space. + """ return _core_.Sizer_GetPosition(*args, **kwargs) def GetMinSize(*args, **kwargs): - """GetMinSize(self) -> Size""" + """ + GetMinSize(self) -> Size + + Returns the minimal size of the sizer. This is either the combined + minimal size of all the children and their borders or the minimal size + set by SetMinSize, depending on which is bigger. + """ return _core_.Sizer_GetMinSize(*args, **kwargs) def GetSizeTuple(self): @@ -8631,59 +8885,150 @@ class Sizer(Object): return self.GetMinSize().Get() def RecalcSizes(*args, **kwargs): - """RecalcSizes(self)""" + """ + RecalcSizes(self) + + Using the sizes calculated by `CalcMin` reposition and resize all the + items managed by this sizer. You should not need to call this directly as + it is called by `Layout`. + """ return _core_.Sizer_RecalcSizes(*args, **kwargs) def CalcMin(*args, **kwargs): - """CalcMin(self) -> Size""" + """ + CalcMin(self) -> Size + + This method is where the sizer will do the actual calculation of its + children's minimal sizes. You should not need to call this directly as + it is called by `Layout`. + """ return _core_.Sizer_CalcMin(*args, **kwargs) def Layout(*args, **kwargs): - """Layout(self)""" + """ + Layout(self) + + This method will force the recalculation and layout of the items + controlled by the sizer using the current space allocated to the + sizer. Normally this is called automatically from the owning window's + EVT_SIZE handler, but it is also useful to call it from user code when + one of the items in a sizer change size, or items are added or + removed. + """ return _core_.Sizer_Layout(*args, **kwargs) def Fit(*args, **kwargs): - """Fit(self, Window window) -> Size""" + """ + Fit(self, Window window) -> Size + + Tell the sizer to resize the *window* to match the sizer's minimal + size. This is commonly done in the constructor of the window itself in + order to set its initial size to match the needs of the children as + determined by the sizer. Returns the new size. + + For a top level window this is the total window size, not the client size. + """ return _core_.Sizer_Fit(*args, **kwargs) def FitInside(*args, **kwargs): - """FitInside(self, Window window)""" + """ + FitInside(self, Window window) + + Tell the sizer to resize the *virtual size* of the *window* to match the + sizer's minimal size. This will not alter the on screen size of the + window, but may cause the addition/removal/alteration of scrollbars + required to view the virtual area in windows which manage it. + + :see: `wx.ScrolledWindow.SetScrollbars`, `SetVirtualSizeHints` + + """ return _core_.Sizer_FitInside(*args, **kwargs) def SetSizeHints(*args, **kwargs): - """SetSizeHints(self, Window window)""" + """ + SetSizeHints(self, Window window) + + Tell the sizer to set (and `Fit`) the minimal size of the *window* to + match the sizer's minimal size. This is commonly done in the + constructor of the window itself if the window is resizable (as are + many dialogs under Unix and frames on probably all platforms) in order + to prevent the window from being sized smaller than the minimal size + required by the sizer. + """ return _core_.Sizer_SetSizeHints(*args, **kwargs) def SetVirtualSizeHints(*args, **kwargs): - """SetVirtualSizeHints(self, Window window)""" + """ + SetVirtualSizeHints(self, Window window) + + Tell the sizer to set the minimal size of the window virtual area to + match the sizer's minimal size. For windows with managed scrollbars + this will set them appropriately. + + :see: `wx.ScrolledWindow.SetScrollbars` + + """ return _core_.Sizer_SetVirtualSizeHints(*args, **kwargs) def Clear(*args, **kwargs): - """Clear(self, bool delete_windows=False)""" + """ + Clear(self, bool deleteWindows=False) + + Clear all items from the sizer, optionally destroying the window items + as well. + """ return _core_.Sizer_Clear(*args, **kwargs) def DeleteWindows(*args, **kwargs): - """DeleteWindows(self)""" + """ + DeleteWindows(self) + + Destroy all windows managed by the sizer. + """ return _core_.Sizer_DeleteWindows(*args, **kwargs) def GetChildren(*args, **kwargs): - """GetChildren(self) -> PyObject""" + """ + GetChildren(sefl) -> list + + Returns a list of all the `wx.SizerItem` objects managed by the sizer. + """ return _core_.Sizer_GetChildren(*args, **kwargs) def Show(*args, **kwargs): - """Show(self, PyObject item, bool show=True)""" - return _core_.Sizer_Show(*args, **kwargs) + """ + Show(self, item, bool show=True) - def Hide(*args, **kwargs): - """Hide(self, PyObject item)""" - return _core_.Sizer_Hide(*args, **kwargs) + Shows or hides an item managed by the sizer. To make a sizer item + disappear or reappear, use Show followed by `Layout`. The *item* + parameter can be either a window, a sizer, or the zero-based index of + the item. + """ + return _core_.Sizer_Show(*args, **kwargs) def IsShown(*args, **kwargs): - """IsShown(self, PyObject item) -> bool""" + """ + IsShown(self, item) + + Determines if the item is currently shown. sizer. To make a sizer + item disappear or reappear, use Show followed by `Layout`. The *item* + parameter can be either a window, a sizer, or the zero-based index of + the item. + """ return _core_.Sizer_IsShown(*args, **kwargs) + def Hide(self, item): + """ + A convenience method for Show(item, False). + """ + self.Show(item, False) + def ShowItems(*args, **kwargs): - """ShowItems(self, bool show)""" + """ + ShowItems(self, bool show) + + Recursively call `wx.Window.Show` on all sizer items. + """ return _core_.Sizer_ShowItems(*args, **kwargs) @@ -8695,10 +9040,56 @@ class SizerPtr(Sizer): _core_.Sizer_swigregister(SizerPtr) class PySizer(Sizer): + """ + wx.PySizer is a special version of `wx.Sizer` that has been + instrumented to allow the C++ virtual methods to be overloaded in + Python derived classes. You would derive from this class if you are + wanting to implement a custom sizer in Python code. Simply implement + `CalcMin` and `RecalcSizes` in the derived class and you're all set. + For example:: + + class MySizer(wx.PySizer): + def __init__(self): + wx.PySizer.__init__(self) + + def CalcMin(self): + for item in self.GetChildren(): + # calculate the total minimum width and height needed + # by all items in the sizer according to this sizer's + # layout algorithm. + ... + return wx.Size(width, height) + + def RecalcSizes(self): + # find the space allotted to this sizer + pos = self.GetPosition() + size = self.GetSize() + for item in self.GetChildren(): + # Recalculate (if necessary) the position and size of + # each item and then call item.SetDimension to do the + # actual positioning and sizing of the items within the + # space alloted to this sizer. + ... + item.SetDimension(itemPos, itemSize) + + + When `Layout` is called it first calls `CalcMin` followed by + `RecalcSizes` so you can optimize a bit by saving the results of + `CalcMin` and resuing them in `RecalcSizes`. + + :see: `wx.SizerItem`, `wx.Sizer.GetChildren` + + + """ def __repr__(self): return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): - """__init__(self) -> PySizer""" + """ + __init__(self) -> PySizer + + Creates a wx.PySizer. Must be called from the __init__ in the derived + class. + """ newobj = _core_.new_PySizer(*args, **kwargs) self.this = newobj.this self.thisown = 1 @@ -8720,10 +9111,23 @@ _core_.PySizer_swigregister(PySizerPtr) #--------------------------------------------------------------------------- class BoxSizer(Sizer): + """ + The basic idea behind a box sizer is that windows will most often be + laid out in rather simple basic geometry, typically in a row or a + column or nested hierarchies of either. A wx.BoxSizer will lay out + its items in a simple row or column, depending on the orientation + parameter passed to the constructor. + """ def __repr__(self): return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): - """__init__(self, int orient=HORIZONTAL) -> BoxSizer""" + """ + __init__(self, int orient=HORIZONTAL) -> BoxSizer + + Constructor for a wx.BoxSizer. *orient* may be one of ``wx.VERTICAL`` + or ``wx.HORIZONTAL`` for creating either a column sizer or a row + sizer. + """ newobj = _core_.new_BoxSizer(*args, **kwargs) self.this = newobj.this self.thisown = 1 @@ -8731,20 +9135,20 @@ class BoxSizer(Sizer): self._setOORInfo(self) def GetOrientation(*args, **kwargs): - """GetOrientation(self) -> int""" + """ + GetOrientation(self) -> int + + Returns the current orientation of the sizer. + """ return _core_.BoxSizer_GetOrientation(*args, **kwargs) def SetOrientation(*args, **kwargs): - """SetOrientation(self, int orient)""" - return _core_.BoxSizer_SetOrientation(*args, **kwargs) - - def RecalcSizes(*args, **kwargs): - """RecalcSizes(self)""" - return _core_.BoxSizer_RecalcSizes(*args, **kwargs) + """ + SetOrientation(self, int orient) - def CalcMin(*args, **kwargs): - """CalcMin(self) -> Size""" - return _core_.BoxSizer_CalcMin(*args, **kwargs) + Resets the orientation of the sizer. + """ + return _core_.BoxSizer_SetOrientation(*args, **kwargs) class BoxSizerPtr(BoxSizer): @@ -8757,10 +9161,22 @@ _core_.BoxSizer_swigregister(BoxSizerPtr) #--------------------------------------------------------------------------- class StaticBoxSizer(BoxSizer): + """ + wx.StaticBoxSizer derives from and functions identically to the + `wx.BoxSizer` and adds a `wx.StaticBox` around the items that the sizer + manages. Note that this static box must be created separately and + passed to the sizer constructor. + """ def __repr__(self): return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): - """__init__(self, wxStaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer""" + """ + __init__(self, StaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer + + Constructor. It takes an associated static box and the orientation + *orient* as parameters - orient can be either of ``wx.VERTICAL`` or + ``wx.HORIZONTAL``. + """ newobj = _core_.new_StaticBoxSizer(*args, **kwargs) self.this = newobj.this self.thisown = 1 @@ -8768,16 +9184,12 @@ class StaticBoxSizer(BoxSizer): self._setOORInfo(self) def GetStaticBox(*args, **kwargs): - """GetStaticBox(self) -> wxStaticBox""" - return _core_.StaticBoxSizer_GetStaticBox(*args, **kwargs) - - def RecalcSizes(*args, **kwargs): - """RecalcSizes(self)""" - return _core_.StaticBoxSizer_RecalcSizes(*args, **kwargs) + """ + GetStaticBox(self) -> StaticBox - def CalcMin(*args, **kwargs): - """CalcMin(self) -> Size""" - return _core_.StaticBoxSizer_CalcMin(*args, **kwargs) + Returns the static box associated with this sizer. + """ + return _core_.StaticBoxSizer_GetStaticBox(*args, **kwargs) class StaticBoxSizerPtr(StaticBoxSizer): @@ -8790,54 +9202,102 @@ _core_.StaticBoxSizer_swigregister(StaticBoxSizerPtr) #--------------------------------------------------------------------------- class GridSizer(Sizer): + """ + A grid sizer is a sizer which lays out its children in a + two-dimensional table with all cells having the same size. In other + words, the width of each cell within the grid is the width of the + widest item added to the sizer and the height of each grid cell is the + height of the tallest item. An optional vertical and/or horizontal + gap between items can also be specified (in pixels.) + + Items are placed in the cells of the grid in the order they are added, + in row-major order. In other words, the first row is filled first, + then the second, and so on until all items have been added. (If + neccessary, additional rows will be added as items are added.) If you + need to have greater control over the cells that items are placed in + then use the `wx.GridBagSizer`. + + """ def __repr__(self): return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): - """__init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer""" + """ + __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer + + Constructor for a wx.GridSizer. *rows* and *cols* determine the number + of columns and rows in the sizer - if either of the parameters is + zero, it will be calculated to from the total number of children in + the sizer, thus making the sizer grow dynamically. *vgap* and *hgap* + define extra space between all children. + """ newobj = _core_.new_GridSizer(*args, **kwargs) self.this = newobj.this self.thisown = 1 del newobj.thisown self._setOORInfo(self) - def RecalcSizes(*args, **kwargs): - """RecalcSizes(self)""" - return _core_.GridSizer_RecalcSizes(*args, **kwargs) - - def CalcMin(*args, **kwargs): - """CalcMin(self) -> Size""" - return _core_.GridSizer_CalcMin(*args, **kwargs) - def SetCols(*args, **kwargs): - """SetCols(self, int cols)""" + """ + SetCols(self, int cols) + + Sets the number of columns in the sizer. + """ return _core_.GridSizer_SetCols(*args, **kwargs) def SetRows(*args, **kwargs): - """SetRows(self, int rows)""" + """ + SetRows(self, int rows) + + Sets the number of rows in the sizer. + """ return _core_.GridSizer_SetRows(*args, **kwargs) def SetVGap(*args, **kwargs): - """SetVGap(self, int gap)""" + """ + SetVGap(self, int gap) + + Sets the vertical gap (in pixels) between the cells in the sizer. + """ return _core_.GridSizer_SetVGap(*args, **kwargs) def SetHGap(*args, **kwargs): - """SetHGap(self, int gap)""" + """ + SetHGap(self, int gap) + + Sets the horizontal gap (in pixels) between cells in the sizer + """ return _core_.GridSizer_SetHGap(*args, **kwargs) def GetCols(*args, **kwargs): - """GetCols(self) -> int""" + """ + GetCols(self) -> int + + Returns the number of columns in the sizer. + """ return _core_.GridSizer_GetCols(*args, **kwargs) def GetRows(*args, **kwargs): - """GetRows(self) -> int""" + """ + GetRows(self) -> int + + Returns the number of rows in the sizer. + """ return _core_.GridSizer_GetRows(*args, **kwargs) def GetVGap(*args, **kwargs): - """GetVGap(self) -> int""" + """ + GetVGap(self) -> int + + Returns the vertical gap (in pixels) between the cells in the sizer. + """ return _core_.GridSizer_GetVGap(*args, **kwargs) def GetHGap(*args, **kwargs): - """GetHGap(self) -> int""" + """ + GetHGap(self) -> int + + Returns the horizontal gap (in pixels) between cells in the sizer. + """ return _core_.GridSizer_GetHGap(*args, **kwargs) @@ -8854,62 +9314,155 @@ FLEX_GROWMODE_NONE = _core_.FLEX_GROWMODE_NONE FLEX_GROWMODE_SPECIFIED = _core_.FLEX_GROWMODE_SPECIFIED FLEX_GROWMODE_ALL = _core_.FLEX_GROWMODE_ALL class FlexGridSizer(GridSizer): + """ + A flex grid sizer is a sizer which lays out its children in a + two-dimensional table with all table cells in one row having the same + height and all cells in one column having the same width, but all + rows or all columns are not necessarily the same height or width as in + the `wx.GridSizer`. + + wx.FlexGridSizer can also size items equally in one direction but + unequally ("flexibly") in the other. If the sizer is only flexible + in one direction (this can be changed using `SetFlexibleDirection`), it + needs to be decided how the sizer should grow in the other ("non + flexible") direction in order to fill the available space. The + `SetNonFlexibleGrowMode` method serves this purpose. + + + """ def __repr__(self): return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): - """__init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer""" + """ + __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer + + Constructor for a wx.FlexGridSizer. *rows* and *cols* determine the + number of columns and rows in the sizer - if either of the parameters + is zero, it will be calculated to from the total number of children in + the sizer, thus making the sizer grow dynamically. *vgap* and *hgap* + define extra space between all children. + """ newobj = _core_.new_FlexGridSizer(*args, **kwargs) self.this = newobj.this self.thisown = 1 del newobj.thisown self._setOORInfo(self) - def RecalcSizes(*args, **kwargs): - """RecalcSizes(self)""" - return _core_.FlexGridSizer_RecalcSizes(*args, **kwargs) + def AddGrowableRow(*args, **kwargs): + """ + AddGrowableRow(self, size_t idx, int proportion=0) - def CalcMin(*args, **kwargs): - """CalcMin(self) -> Size""" - return _core_.FlexGridSizer_CalcMin(*args, **kwargs) + Specifies that row *idx* (starting from zero) should be grown if there + is extra space available to the sizer. - def AddGrowableRow(*args, **kwargs): - """AddGrowableRow(self, size_t idx, int proportion=0)""" + The *proportion* parameter has the same meaning as the stretch factor + for the box sizers except that if all proportions are 0, then all + columns are resized equally (instead of not being resized at all). + """ return _core_.FlexGridSizer_AddGrowableRow(*args, **kwargs) def RemoveGrowableRow(*args, **kwargs): - """RemoveGrowableRow(self, size_t idx)""" + """ + RemoveGrowableRow(self, size_t idx) + + Specifies that row *idx* is no longer growable. + """ return _core_.FlexGridSizer_RemoveGrowableRow(*args, **kwargs) def AddGrowableCol(*args, **kwargs): - """AddGrowableCol(self, size_t idx, int proportion=0)""" + """ + AddGrowableCol(self, size_t idx, int proportion=0) + + Specifies that column *idx* (starting from zero) should be grown if + there is extra space available to the sizer. + + The *proportion* parameter has the same meaning as the stretch factor + for the box sizers except that if all proportions are 0, then all + columns are resized equally (instead of not being resized at all). + """ return _core_.FlexGridSizer_AddGrowableCol(*args, **kwargs) def RemoveGrowableCol(*args, **kwargs): - """RemoveGrowableCol(self, size_t idx)""" + """ + RemoveGrowableCol(self, size_t idx) + + Specifies that column *idx* is no longer growable. + """ return _core_.FlexGridSizer_RemoveGrowableCol(*args, **kwargs) def SetFlexibleDirection(*args, **kwargs): - """SetFlexibleDirection(self, int direction)""" + """ + SetFlexibleDirection(self, int direction) + + Specifies whether the sizer should flexibly resize its columns, rows, + or both. Argument *direction* can be one of the following values. Any + other value is ignored. + + ============== ======================================= + wx.VERTICAL Rows are flexibly sized. + wx.HORIZONTAL Columns are flexibly sized. + wx.BOTH Both rows and columns are flexibly sized + (this is the default value). + ============== ======================================= + + Note that this method does not trigger relayout. + + """ return _core_.FlexGridSizer_SetFlexibleDirection(*args, **kwargs) def GetFlexibleDirection(*args, **kwargs): - """GetFlexibleDirection(self) -> int""" + """ + GetFlexibleDirection(self) -> int + + Returns a value that specifies whether the sizer + flexibly resizes its columns, rows, or both (default). + + :see: `SetFlexibleDirection` + """ return _core_.FlexGridSizer_GetFlexibleDirection(*args, **kwargs) def SetNonFlexibleGrowMode(*args, **kwargs): - """SetNonFlexibleGrowMode(self, int mode)""" + """ + SetNonFlexibleGrowMode(self, int mode) + + Specifies how the sizer should grow in the non-flexible direction if + there is one (so `SetFlexibleDirection` must have been called + previously). Argument *mode* can be one of the following values: + + ========================== ================================================= + wx.FLEX_GROWMODE_NONE Sizer doesn't grow in the non flexible direction. + wx.FLEX_GROWMODE_SPECIFIED Sizer honors growable columns/rows set with + `AddGrowableCol` and `AddGrowableRow`. In this + case equal sizing applies to minimum sizes of + columns or rows (this is the default value). + wx.FLEX_GROWMODE_ALL Sizer equally stretches all columns or rows in + the non flexible direction, whether they are + growable or not in the flexbile direction. + ========================== ================================================= + + Note that this method does not trigger relayout. + + + """ return _core_.FlexGridSizer_SetNonFlexibleGrowMode(*args, **kwargs) def GetNonFlexibleGrowMode(*args, **kwargs): - """GetNonFlexibleGrowMode(self) -> int""" + """ + GetNonFlexibleGrowMode(self) -> int + + Returns the value that specifies how the sizer grows in the + non-flexible direction if there is one. + + :see: `SetNonFlexibleGrowMode` + """ return _core_.FlexGridSizer_GetNonFlexibleGrowMode(*args, **kwargs) def GetRowHeights(*args, **kwargs): - """GetRowHeights(self) -> wxArrayInt""" + """GetRowHeights(self) -> list""" return _core_.FlexGridSizer_GetRowHeights(*args, **kwargs) def GetColWidths(*args, **kwargs): - """GetColWidths(self) -> wxArrayInt""" + """GetColWidths(self) -> list""" return _core_.FlexGridSizer_GetColWidths(*args, **kwargs) @@ -8923,10 +9476,25 @@ _core_.FlexGridSizer_swigregister(FlexGridSizerPtr) #--------------------------------------------------------------------------- class GBPosition(object): + """ + This class represents the position of an item in a virtual grid of + rows and columns managed by a `wx.GridBagSizer`. wxPython has + typemaps that will automatically convert from a 2-element sequence of + integers to a wx.GBPosition, so you can use the more pythonic + representation of the position nearly transparently in Python code. + """ def __repr__(self): return "<%s.%s; proxy of C++ wxGBPosition instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): - """__init__(self, int row=0, int col=0) -> GBPosition""" + """ + __init__(self, int row=0, int col=0) -> GBPosition + + This class represents the position of an item in a virtual grid of + rows and columns managed by a `wx.GridBagSizer`. wxPython has + typemaps that will automatically convert from a 2-element sequence of + integers to a wx.GBPosition, so you can use the more pythonic + representation of the position nearly transparently in Python code. + """ newobj = _core_.new_GBPosition(*args, **kwargs) self.this = newobj.this self.thisown = 1 @@ -8988,10 +9556,24 @@ class GBPositionPtr(GBPosition): _core_.GBPosition_swigregister(GBPositionPtr) class GBSpan(object): + """ + This class is used to hold the row and column spanning attributes of + items in a `wx.GridBagSizer`. wxPython has typemaps that will + automatically convert from a 2-element sequence of integers to a + wx.GBSpan, so you can use the more pythonic representation of the span + nearly transparently in Python code. + + """ def __repr__(self): return "<%s.%s; proxy of C++ wxGBSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): - """__init__(self, int rowspan=1, int colspan=1) -> GBSpan""" + """ + __init__(self, int rowspan=1, int colspan=1) -> GBSpan + + Construct a new wxGBSpan, optionally setting the rowspan and + colspan. The default is (1,1). (Meaning that the item occupies one + cell in each direction. + """ newobj = _core_.new_GBSpan(*args, **kwargs) self.this = newobj.this self.thisown = 1 @@ -9053,49 +9635,108 @@ class GBSpanPtr(GBSpan): _core_.GBSpan_swigregister(GBSpanPtr) class GBSizerItem(SizerItem): + """ + The wx.GBSizerItem class is used to track the additional data about + items in a `wx.GridBagSizer` such as the item's position in the grid + and how many rows or columns it spans. + + """ def __repr__(self): return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): - """__init__(self) -> GBSizerItem""" + """ + __init__(self) -> GBSizerItem + + Constructs an empty wx.GBSizerItem. Either a window, sizer or spacer + size will need to be set, as well as a position and span before this + item can be used in a Sizer. + + You will probably never need to create a wx.GBSizerItem directly as they + are created automatically when the sizer's Add method is called. + """ newobj = _core_.new_GBSizerItem(*args, **kwargs) self.this = newobj.this self.thisown = 1 del newobj.thisown def GetPos(*args, **kwargs): - """GetPos(self) -> GBPosition""" + """ + GetPos(self) -> GBPosition + + Get the grid position of the item + """ return _core_.GBSizerItem_GetPos(*args, **kwargs) def GetPosTuple(self): return self.GetPos().Get() def GetSpan(*args, **kwargs): - """GetSpan(self) -> GBSpan""" + """ + GetSpan(self) -> GBSpan + + Get the row and column spanning of the item + """ return _core_.GBSizerItem_GetSpan(*args, **kwargs) def GetSpanTuple(self): return self.GetSpan().Get() def SetPos(*args, **kwargs): - """SetPos(self, GBPosition pos) -> bool""" + """ + SetPos(self, GBPosition pos) -> bool + + If the item is already a member of a sizer then first ensure that + there is no other item that would intersect with this one at the new + position, then set the new position. Returns True if the change is + successful and after the next Layout() the item will be moved. + """ return _core_.GBSizerItem_SetPos(*args, **kwargs) def SetSpan(*args, **kwargs): - """SetSpan(self, GBSpan span) -> bool""" + """ + SetSpan(self, GBSpan span) -> bool + + If the item is already a member of a sizer then first ensure that + there is no other item that would intersect with this one with its new + spanning size, then set the new spanning. Returns True if the change + is successful and after the next Layout() the item will be resized. + + """ return _core_.GBSizerItem_SetSpan(*args, **kwargs) - def Intersects(*args): + def Intersects(*args, **kwargs): """ Intersects(self, GBSizerItem other) -> bool - Intersects(self, GBPosition pos, GBSpan span) -> bool + + Returns True if this item and the other item instersect. """ - return _core_.GBSizerItem_Intersects(*args) + return _core_.GBSizerItem_Intersects(*args, **kwargs) + + def IntersectsPos(*args, **kwargs): + """ + IntersectsPos(self, GBPosition pos, GBSpan span) -> bool + + Returns True if the given pos/span would intersect with this item. + """ + return _core_.GBSizerItem_IntersectsPos(*args, **kwargs) def GetEndPos(*args, **kwargs): - """GetEndPos(self, int row, int col)""" + """ + GetEndPos(self) -> GBPosition + + Get the row and column of the endpoint of this item. + """ return _core_.GBSizerItem_GetEndPos(*args, **kwargs) def GetGBSizer(*args, **kwargs): - """GetGBSizer(self) -> GridBagSizer""" + """ + GetGBSizer(self) -> GridBagSizer + + Get the sizer this item is a member of. + """ return _core_.GBSizerItem_GetGBSizer(*args, **kwargs) def SetGBSizer(*args, **kwargs): - """SetGBSizer(self, GridBagSizer sizer)""" + """ + SetGBSizer(self, GridBagSizer sizer) + + Set the sizer this item is a member of. + """ return _core_.GBSizerItem_SetGBSizer(*args, **kwargs) @@ -9110,7 +9751,9 @@ DefaultSpan = cvar.DefaultSpan def GBSizerItemWindow(*args, **kwargs): """ GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag, - int border, Object userData) -> GBSizerItem + int border, PyObject userData=None) -> GBSizerItem + + Construct a `wx.GBSizerItem` for a window. """ val = _core_.new_GBSizerItemWindow(*args, **kwargs) val.thisown = 1 @@ -9119,7 +9762,9 @@ def GBSizerItemWindow(*args, **kwargs): def GBSizerItemSizer(*args, **kwargs): """ GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag, - int border, Object userData) -> GBSizerItem + int border, PyObject userData=None) -> GBSizerItem + + Construct a `wx.GBSizerItem` for a sizer """ val = _core_.new_GBSizerItemSizer(*args, **kwargs) val.thisown = 1 @@ -9128,105 +9773,174 @@ def GBSizerItemSizer(*args, **kwargs): def GBSizerItemSpacer(*args, **kwargs): """ GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span, - int flag, int border, Object userData) -> GBSizerItem + int flag, int border, PyObject userData=None) -> GBSizerItem + + Construct a `wx.GBSizerItem` for a spacer. """ val = _core_.new_GBSizerItemSpacer(*args, **kwargs) val.thisown = 1 return val class GridBagSizer(FlexGridSizer): + """ + A `wx.Sizer` that can lay out items in a virtual grid like a + `wx.FlexGridSizer` but in this case explicit positioning of the items + is allowed using `wx.GBPosition`, and items can optionally span more + than one row and/or column using `wx.GBSpan`. The total size of the + virtual grid is determined by the largest row and column that items are + positioned at, adjusted for spanning. + + """ def __repr__(self): return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): - """__init__(self, int vgap=0, int hgap=0) -> GridBagSizer""" + """ + __init__(self, int vgap=0, int hgap=0) -> GridBagSizer + + Constructor, with optional parameters to specify the gap between the + rows and columns. + """ newobj = _core_.new_GridBagSizer(*args, **kwargs) self.this = newobj.this self.thisown = 1 del newobj.thisown def Add(*args, **kwargs): """ - Add(self, PyObject item, GBPosition pos, GBSpan span=DefaultSpan, - int flag=0, int border=0, PyObject userData=None) -> bool + Add(self, item, GBPosition pos, GBSpan span=DefaultSpan, int flag=0, + int border=0, userData=None) + + Adds an item to the sizer at the grid cell *pos*, optionally spanning + more than one row or column as specified with *span*. The remaining + args behave similarly to `wx.Sizer.Add`. + + Returns True if the item was successfully placed at the given cell + position, False if something was already there. + """ return _core_.GridBagSizer_Add(*args, **kwargs) def AddItem(*args, **kwargs): - """AddItem(self, GBSizerItem item) -> bool""" + """ + Add(self, GBSizerItem item) -> bool + + Add an item to the sizer using a `wx.GBSizerItem`. Returns True if + the item was successfully placed at its given cell position, False if + something was already there. + """ return _core_.GridBagSizer_AddItem(*args, **kwargs) def GetEmptyCellSize(*args, **kwargs): - """GetEmptyCellSize(self) -> Size""" + """ + GetEmptyCellSize(self) -> Size + + Get the size used for cells in the grid with no item. + """ return _core_.GridBagSizer_GetEmptyCellSize(*args, **kwargs) def SetEmptyCellSize(*args, **kwargs): - """SetEmptyCellSize(self, Size sz)""" + """ + SetEmptyCellSize(self, Size sz) + + Set the size used for cells in the grid with no item. + """ return _core_.GridBagSizer_SetEmptyCellSize(*args, **kwargs) def GetItemPosition(*args): """ - GetItemPosition(self, Window window) -> GBPosition - GetItemPosition(self, Sizer sizer) -> GBPosition - GetItemPosition(self, size_t index) -> GBPosition + GetItemPosition(self, item) -> GBPosition + + Get the grid position of the specified *item* where *item* is either a + window or subsizer that is a member of this sizer, or a zero-based + index of an item. """ return _core_.GridBagSizer_GetItemPosition(*args) def SetItemPosition(*args): """ - SetItemPosition(self, Window window, GBPosition pos) -> bool - SetItemPosition(self, Sizer sizer, GBPosition pos) -> bool - SetItemPosition(self, size_t index, GBPosition pos) -> bool + SetItemPosition(self, item, GBPosition pos) -> bool + + Set the grid position of the specified *item* where *item* is either a + window or subsizer that is a member of this sizer, or a zero-based + index of an item. Returns True on success. If the move is not + allowed (because an item is already there) then False is returned. + """ return _core_.GridBagSizer_SetItemPosition(*args) def GetItemSpan(*args): """ - GetItemSpan(self, Window window) -> GBSpan - GetItemSpan(self, Sizer sizer) -> GBSpan - GetItemSpan(self, size_t index) -> GBSpan + GetItemSpan(self, item) -> GBSpan + + Get the row/col spanning of the specified *item* where *item* is + either a window or subsizer that is a member of this sizer, or a + zero-based index of an item. """ return _core_.GridBagSizer_GetItemSpan(*args) def SetItemSpan(*args): """ - SetItemSpan(self, Window window, GBSpan span) -> bool - SetItemSpan(self, Sizer sizer, GBSpan span) -> bool - SetItemSpan(self, size_t index, GBSpan span) -> bool + SetItemSpan(self, item, GBSpan span) -> bool + + Set the row/col spanning of the specified *item* where *item* is + either a window or subsizer that is a member of this sizer, or a + zero-based index of an item. Returns True on success. If the move is + not allowed (because an item is already there) then False is returned. """ return _core_.GridBagSizer_SetItemSpan(*args) def FindItem(*args): """ - FindItem(self, Window window) -> GBSizerItem - FindItem(self, Sizer sizer) -> GBSizerItem + FindItem(self, item) -> GBSizerItem + + Find the sizer item for the given window or subsizer, returns None if + not found. (non-recursive) """ return _core_.GridBagSizer_FindItem(*args) def FindItemAtPosition(*args, **kwargs): - """FindItemAtPosition(self, GBPosition pos) -> GBSizerItem""" + """ + FindItemAtPosition(self, GBPosition pos) -> GBSizerItem + + Return the sizer item for the given grid cell, or None if there is no + item at that position. (non-recursive) + """ return _core_.GridBagSizer_FindItemAtPosition(*args, **kwargs) def FindItemAtPoint(*args, **kwargs): - """FindItemAtPoint(self, Point pt) -> GBSizerItem""" + """ + FindItemAtPoint(self, Point pt) -> GBSizerItem + + Return the sizer item located at the point given in *pt*, or None if + there is no item at that point. The (x,y) coordinates in pt correspond + to the client coordinates of the window using the sizer for + layout. (non-recursive) + """ return _core_.GridBagSizer_FindItemAtPoint(*args, **kwargs) - def FindItemWithData(*args, **kwargs): - """FindItemWithData(self, Object userData) -> GBSizerItem""" - return _core_.GridBagSizer_FindItemWithData(*args, **kwargs) + def CheckForIntersection(*args, **kwargs): + """ + CheckForIntersection(self, GBSizerItem item, GBSizerItem excludeItem=None) -> bool - def RecalcSizes(*args, **kwargs): - """RecalcSizes(self)""" - return _core_.GridBagSizer_RecalcSizes(*args, **kwargs) + Look at all items and see if any intersect (or would overlap) the + given *item*. Returns True if so, False if there would be no overlap. + If an *excludeItem* is given then it will not be checked for + intersection, for example it may be the item we are checking the + position of. - def CalcMin(*args, **kwargs): - """CalcMin(self) -> Size""" - return _core_.GridBagSizer_CalcMin(*args, **kwargs) + """ + return _core_.GridBagSizer_CheckForIntersection(*args, **kwargs) - def CheckForIntersection(*args): + def CheckForIntersectionPos(*args, **kwargs): """ - CheckForIntersection(self, GBSizerItem item, GBSizerItem excludeItem=None) -> bool - CheckForIntersection(self, GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool + CheckForIntersectionPos(self, GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool + + Look at all items and see if any intersect (or would overlap) the + given position and span. Returns True if so, False if there would be + no overlap. If an *excludeItem* is given then it will not be checked + for intersection, for example it may be the item we are checking the + position of. """ - return _core_.GridBagSizer_CheckForIntersection(*args) + return _core_.GridBagSizer_CheckForIntersectionPos(*args, **kwargs) class GridBagSizerPtr(GridBagSizer): diff --git a/wxPython/src/gtk/_core_wrap.cpp b/wxPython/src/gtk/_core_wrap.cpp index abcbf5f5d7..df6a252534 100644 --- a/wxPython/src/gtk/_core_wrap.cpp +++ b/wxPython/src/gtk/_core_wrap.cpp @@ -1456,6 +1456,33 @@ void wxItemContainer_SetClientData(wxItemContainer *self,int n,PyObject *clientD } +wxSizerItem *new_wxSizerItem(wxWindow *window,int proportion,int flag,int border,PyObject *userData){ + wxPyUserData* data = NULL; + if ( userData ) { + bool blocked = wxPyBeginBlockThreads(); + data = new wxPyUserData(userData); + wxPyEndBlockThreads(blocked); + } + return new wxSizerItem(window, proportion, flag, border, data); + } +wxSizerItem *new_wxSizerItem(int width,int height,int proportion,int flag,int border,PyObject *userData){ + wxPyUserData* data = NULL; + if ( userData ) { + bool blocked = wxPyBeginBlockThreads(); + data = new wxPyUserData(userData); + wxPyEndBlockThreads(blocked); + } + return new wxSizerItem(width, height, proportion, flag, border, data); + } +wxSizerItem *new_wxSizerItem(wxSizer *sizer,int proportion,int flag,int border,PyObject *userData){ + wxPyUserData* data = NULL; + if ( userData ) { + bool blocked = wxPyBeginBlockThreads(); + data = new wxPyUserData(userData); + wxPyEndBlockThreads(blocked); + } + return new wxSizerItem(sizer, proportion, flag, border, data); + } #include @@ -1677,21 +1704,14 @@ PyObject *wxSizer_GetChildren(wxSizer *self){ } void wxSizer_Show(wxSizer *self,PyObject *item,bool show){ bool blocked = wxPyBeginBlockThreads(); - wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, False, False); + wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, False, True); wxPyEndBlockThreads(blocked); if ( info.window ) self->Show(info.window, show); else if ( info.sizer ) self->Show(info.sizer, show); - } -void wxSizer_Hide(wxSizer *self,PyObject *item){ - bool blocked = wxPyBeginBlockThreads(); - wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, False, False); - wxPyEndBlockThreads(blocked); - if ( info.window ) - self->Hide(info.window); - else if ( info.sizer ) - self->Hide(info.sizer); + else if ( info.gotPos ) + self->Show(info.pos, show); } bool wxSizer_IsShown(wxSizer *self,PyObject *item){ bool blocked = wxPyBeginBlockThreads(); @@ -1701,6 +1721,8 @@ bool wxSizer_IsShown(wxSizer *self,PyObject *item){ return self->IsShown(info.window); else if ( info.sizer ) return self->IsShown(info.sizer); + else if ( info.gotPos ) + return self->IsShown(info.pos); else return False; } @@ -1756,6 +1778,38 @@ PyObject *wxGBSpan_Get(wxGBSpan *self){ wxPyEndBlockThreads(blocked); return tup; } +wxGBSizerItem *new_wxGBSizerItem(wxWindow *window,wxGBPosition const &pos,wxGBSpan const &span,int flag,int border,PyObject *userData){ + wxPyUserData* data = NULL; + if ( userData ) { + bool blocked = wxPyBeginBlockThreads(); + data = new wxPyUserData(userData); + wxPyEndBlockThreads(blocked); + } + return new wxGBSizerItem(window, pos, span, flag, border, data); + } +wxGBSizerItem *new_wxGBSizerItem(wxSizer *sizer,wxGBPosition const &pos,wxGBSpan const &span,int flag,int border,PyObject *userData){ + wxPyUserData* data = NULL; + if ( userData ) { + bool blocked = wxPyBeginBlockThreads(); + data = new wxPyUserData(userData); + wxPyEndBlockThreads(blocked); + } + return new wxGBSizerItem(sizer, pos, span, flag, border, data); + } +wxGBSizerItem *new_wxGBSizerItem(int width,int height,wxGBPosition const &pos,wxGBSpan const &span,int flag,int border,PyObject *userData){ + wxPyUserData* data = NULL; + if ( userData ) { + bool blocked = wxPyBeginBlockThreads(); + data = new wxPyUserData(userData); + wxPyEndBlockThreads(blocked); + } + return new wxGBSizerItem(width, height, pos, span, flag, border, data); + } +wxGBPosition wxGBSizerItem_GetEndPos(wxGBSizerItem *self){ + int row, col; + self->GetEndPos(row, col); + return wxGBPosition(row, col); + } bool wxGridBagSizer_Add(wxGridBagSizer *self,PyObject *item,wxGBPosition const &pos,wxGBSpan const &span,int flag,int border,PyObject *userData){ wxPyUserData* data = NULL; @@ -32556,7 +32610,7 @@ static PyObject *_wrap_ControlNameStr_get() { static PyObject *_wrap_new_Control(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; + int arg2 = (int) -1 ; wxPoint const &arg3_defvalue = wxDefaultPosition ; wxPoint *arg3 = (wxPoint *) &arg3_defvalue ; wxSize const &arg4_defvalue = wxDefaultSize ; @@ -32581,11 +32635,13 @@ static PyObject *_wrap_new_Control(PyObject *self, PyObject *args, PyObject *kwa (char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOO:new_Control",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOO:new_Control",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (obj2) { { arg3 = &temp3; @@ -32672,7 +32728,7 @@ static PyObject *_wrap_Control_Create(PyObject *self, PyObject *args, PyObject * PyObject *resultobj; wxControl *arg1 = (wxControl *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; + int arg3 = (int) -1 ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -32698,13 +32754,15 @@ static PyObject *_wrap_Control_Create(PyObject *self, PyObject *args, PyObject * (char *) "self",(char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOOO:Control_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOO:Control_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxControl, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } if (obj3) { { arg4 = &temp4; @@ -33505,41 +33563,38 @@ static PyObject *_wrap_new_SizerItem(PyObject *self, PyObject *args, PyObject *k } -static PyObject *_wrap_new_SizerItemSpacer(PyObject *self, PyObject *args, PyObject *kwargs) { +static PyObject *_wrap_new_SizerItemWindow(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; - int arg1 ; + wxWindow *arg1 = (wxWindow *) 0 ; int arg2 ; int arg3 ; int arg4 ; - int arg5 ; - wxObject *arg6 = (wxObject *) 0 ; + PyObject *arg5 = (PyObject *) NULL ; wxSizerItem *result; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; char *kwnames[] = { - (char *) "width",(char *) "height",(char *) "proportion",(char *) "flag",(char *) "border",(char *) "userData", NULL + (char *) "window",(char *) "proportion",(char *) "flag",(char *) "border",(char *) "userData", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOO:new_SizerItemSpacer",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; - arg1 = (int) SWIG_AsInt(obj0); - if (PyErr_Occurred()) SWIG_fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|O:new_SizerItemWindow",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; arg2 = (int) SWIG_AsInt(obj1); if (PyErr_Occurred()) SWIG_fail; arg3 = (int) SWIG_AsInt(obj2); if (PyErr_Occurred()) SWIG_fail; arg4 = (int) SWIG_AsInt(obj3); if (PyErr_Occurred()) SWIG_fail; - arg5 = (int) SWIG_AsInt(obj4); - if (PyErr_Occurred()) SWIG_fail; - if ((SWIG_ConvertPtr(obj5,(void **)(&arg6),SWIGTYPE_p_wxObject, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + if (obj4) { + arg5 = obj4; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxSizerItem *)new wxSizerItem(arg1,arg2,arg3,arg4,arg5,arg6); + result = (wxSizerItem *)new_wxSizerItem(arg1,arg2,arg3,arg4,arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; @@ -33551,37 +33606,42 @@ static PyObject *_wrap_new_SizerItemSpacer(PyObject *self, PyObject *args, PyObj } -static PyObject *_wrap_new_SizerItemWindow(PyObject *self, PyObject *args, PyObject *kwargs) { +static PyObject *_wrap_new_SizerItemSpacer(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; - wxWindow *arg1 = (wxWindow *) 0 ; + int arg1 ; int arg2 ; int arg3 ; int arg4 ; - wxObject *arg5 = (wxObject *) 0 ; + int arg5 ; + PyObject *arg6 = (PyObject *) NULL ; wxSizerItem *result; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; + PyObject * obj5 = 0 ; char *kwnames[] = { - (char *) "window",(char *) "proportion",(char *) "flag",(char *) "border",(char *) "userData", NULL + (char *) "width",(char *) "height",(char *) "proportion",(char *) "flag",(char *) "border",(char *) "userData", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO:new_SizerItemWindow",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail; - if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO|O:new_SizerItemSpacer",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; + arg1 = (int) SWIG_AsInt(obj0); + if (PyErr_Occurred()) SWIG_fail; arg2 = (int) SWIG_AsInt(obj1); if (PyErr_Occurred()) SWIG_fail; arg3 = (int) SWIG_AsInt(obj2); if (PyErr_Occurred()) SWIG_fail; arg4 = (int) SWIG_AsInt(obj3); if (PyErr_Occurred()) SWIG_fail; - if ((SWIG_ConvertPtr(obj4,(void **)(&arg5),SWIGTYPE_p_wxObject, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + arg5 = (int) SWIG_AsInt(obj4); + if (PyErr_Occurred()) SWIG_fail; + if (obj5) { + arg6 = obj5; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxSizerItem *)new wxSizerItem(arg1,arg2,arg3,arg4,arg5); + result = (wxSizerItem *)new_wxSizerItem(arg1,arg2,arg3,arg4,arg5,arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; @@ -33599,7 +33659,7 @@ static PyObject *_wrap_new_SizerItemSizer(PyObject *self, PyObject *args, PyObje int arg2 ; int arg3 ; int arg4 ; - wxObject *arg5 = (wxObject *) 0 ; + PyObject *arg5 = (PyObject *) NULL ; wxSizerItem *result; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -33610,7 +33670,7 @@ static PyObject *_wrap_new_SizerItemSizer(PyObject *self, PyObject *args, PyObje (char *) "sizer",(char *) "proportion",(char *) "flag",(char *) "border",(char *) "userData", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO:new_SizerItemSizer",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|O:new_SizerItemSizer",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxSizer, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; arg2 = (int) SWIG_AsInt(obj1); @@ -33619,11 +33679,12 @@ static PyObject *_wrap_new_SizerItemSizer(PyObject *self, PyObject *args, PyObje if (PyErr_Occurred()) SWIG_fail; arg4 = (int) SWIG_AsInt(obj3); if (PyErr_Occurred()) SWIG_fail; - if ((SWIG_ConvertPtr(obj4,(void **)(&arg5),SWIGTYPE_p_wxObject, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + if (obj4) { + arg5 = obj4; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxSizerItem *)new wxSizerItem(arg1,arg2,arg3,arg4,arg5); + result = (wxSizerItem *)new_wxSizerItem(arg1,arg2,arg3,arg4,arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; @@ -35252,7 +35313,7 @@ static PyObject *_wrap_Sizer_Clear(PyObject *self, PyObject *args, PyObject *kwa PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char *kwnames[] = { - (char *) "self",(char *) "delete_windows", NULL + (char *) "self",(char *) "deleteWindows", NULL }; if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Sizer_Clear",kwnames,&obj0,&obj1)) goto fail; @@ -35361,34 +35422,6 @@ static PyObject *_wrap_Sizer_Show(PyObject *self, PyObject *args, PyObject *kwar } -static PyObject *_wrap_Sizer_Hide(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj; - wxSizer *arg1 = (wxSizer *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char *kwnames[] = { - (char *) "self",(char *) "item", NULL - }; - - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Sizer_Hide",kwnames,&obj0,&obj1)) goto fail; - if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxSizer, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = obj1; - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_Hide(arg1,arg2); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - Py_INCREF(Py_None); resultobj = Py_None; - return resultobj; - fail: - return NULL; -} - - static PyObject *_wrap_Sizer_IsShown(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxSizer *arg1 = (wxSizer *) 0 ; @@ -35599,61 +35632,6 @@ static PyObject *_wrap_BoxSizer_SetOrientation(PyObject *self, PyObject *args, P } -static PyObject *_wrap_BoxSizer_RecalcSizes(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj; - wxBoxSizer *arg1 = (wxBoxSizer *) 0 ; - PyObject * obj0 = 0 ; - char *kwnames[] = { - (char *) "self", NULL - }; - - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:BoxSizer_RecalcSizes",kwnames,&obj0)) goto fail; - if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxBoxSizer, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->RecalcSizes(); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - Py_INCREF(Py_None); resultobj = Py_None; - return resultobj; - fail: - return NULL; -} - - -static PyObject *_wrap_BoxSizer_CalcMin(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj; - wxBoxSizer *arg1 = (wxBoxSizer *) 0 ; - wxSize result; - PyObject * obj0 = 0 ; - char *kwnames[] = { - (char *) "self", NULL - }; - - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:BoxSizer_CalcMin",kwnames,&obj0)) goto fail; - if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxBoxSizer, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (arg1)->CalcMin(); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - { - wxSize * resultptr; - resultptr = new wxSize((wxSize &) result); - resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxSize, 1); - } - return resultobj; - fail: - return NULL; -} - - static PyObject * BoxSizer_swigregister(PyObject *self, PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; @@ -35721,61 +35699,6 @@ static PyObject *_wrap_StaticBoxSizer_GetStaticBox(PyObject *self, PyObject *arg } -static PyObject *_wrap_StaticBoxSizer_RecalcSizes(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj; - wxStaticBoxSizer *arg1 = (wxStaticBoxSizer *) 0 ; - PyObject * obj0 = 0 ; - char *kwnames[] = { - (char *) "self", NULL - }; - - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:StaticBoxSizer_RecalcSizes",kwnames,&obj0)) goto fail; - if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxStaticBoxSizer, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->RecalcSizes(); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - Py_INCREF(Py_None); resultobj = Py_None; - return resultobj; - fail: - return NULL; -} - - -static PyObject *_wrap_StaticBoxSizer_CalcMin(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj; - wxStaticBoxSizer *arg1 = (wxStaticBoxSizer *) 0 ; - wxSize result; - PyObject * obj0 = 0 ; - char *kwnames[] = { - (char *) "self", NULL - }; - - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:StaticBoxSizer_CalcMin",kwnames,&obj0)) goto fail; - if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxStaticBoxSizer, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (arg1)->CalcMin(); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - { - wxSize * resultptr; - resultptr = new wxSize((wxSize &) result); - resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxSize, 1); - } - return resultobj; - fail: - return NULL; -} - - static PyObject * StaticBoxSizer_swigregister(PyObject *self, PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; @@ -35829,61 +35752,6 @@ static PyObject *_wrap_new_GridSizer(PyObject *self, PyObject *args, PyObject *k } -static PyObject *_wrap_GridSizer_RecalcSizes(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj; - wxGridSizer *arg1 = (wxGridSizer *) 0 ; - PyObject * obj0 = 0 ; - char *kwnames[] = { - (char *) "self", NULL - }; - - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:GridSizer_RecalcSizes",kwnames,&obj0)) goto fail; - if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxGridSizer, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->RecalcSizes(); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - Py_INCREF(Py_None); resultobj = Py_None; - return resultobj; - fail: - return NULL; -} - - -static PyObject *_wrap_GridSizer_CalcMin(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj; - wxGridSizer *arg1 = (wxGridSizer *) 0 ; - wxSize result; - PyObject * obj0 = 0 ; - char *kwnames[] = { - (char *) "self", NULL - }; - - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:GridSizer_CalcMin",kwnames,&obj0)) goto fail; - if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxGridSizer, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (arg1)->CalcMin(); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - { - wxSize * resultptr; - resultptr = new wxSize((wxSize &) result); - resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxSize, 1); - } - return resultobj; - fail: - return NULL; -} - - static PyObject *_wrap_GridSizer_SetCols(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxGridSizer *arg1 = (wxGridSizer *) 0 ; @@ -36157,61 +36025,6 @@ static PyObject *_wrap_new_FlexGridSizer(PyObject *self, PyObject *args, PyObjec } -static PyObject *_wrap_FlexGridSizer_RecalcSizes(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj; - wxFlexGridSizer *arg1 = (wxFlexGridSizer *) 0 ; - PyObject * obj0 = 0 ; - char *kwnames[] = { - (char *) "self", NULL - }; - - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:FlexGridSizer_RecalcSizes",kwnames,&obj0)) goto fail; - if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxFlexGridSizer, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->RecalcSizes(); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - Py_INCREF(Py_None); resultobj = Py_None; - return resultobj; - fail: - return NULL; -} - - -static PyObject *_wrap_FlexGridSizer_CalcMin(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj; - wxFlexGridSizer *arg1 = (wxFlexGridSizer *) 0 ; - wxSize result; - PyObject * obj0 = 0 ; - char *kwnames[] = { - (char *) "self", NULL - }; - - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:FlexGridSizer_CalcMin",kwnames,&obj0)) goto fail; - if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxFlexGridSizer, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (arg1)->CalcMin(); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - { - wxSize * resultptr; - resultptr = new wxSize((wxSize &) result); - resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxSize, 1); - } - return resultobj; - fail: - return NULL; -} - - static PyObject *_wrap_FlexGridSizer_AddGrowableRow(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxFlexGridSizer *arg1 = (wxFlexGridSizer *) 0 ; @@ -37142,7 +36955,7 @@ static PyObject *_wrap_new_GBSizerItemWindow(PyObject *self, PyObject *args, PyO wxGBSpan *arg3 = 0 ; int arg4 ; int arg5 ; - wxObject *arg6 = (wxObject *) 0 ; + PyObject *arg6 = (PyObject *) NULL ; wxGBSizerItem *result; wxGBPosition temp2 ; wxGBSpan temp3 ; @@ -37156,7 +36969,7 @@ static PyObject *_wrap_new_GBSizerItemWindow(PyObject *self, PyObject *args, PyO (char *) "window",(char *) "pos",(char *) "span",(char *) "flag",(char *) "border",(char *) "userData", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOO:new_GBSizerItemWindow",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO|O:new_GBSizerItemWindow",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; { @@ -37171,11 +36984,12 @@ static PyObject *_wrap_new_GBSizerItemWindow(PyObject *self, PyObject *args, PyO if (PyErr_Occurred()) SWIG_fail; arg5 = (int) SWIG_AsInt(obj4); if (PyErr_Occurred()) SWIG_fail; - if ((SWIG_ConvertPtr(obj5,(void **)(&arg6),SWIGTYPE_p_wxObject, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + if (obj5) { + arg6 = obj5; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxGBSizerItem *)new wxGBSizerItem(arg1,(wxGBPosition const &)*arg2,(wxGBSpan const &)*arg3,arg4,arg5,arg6); + result = (wxGBSizerItem *)new_wxGBSizerItem(arg1,(wxGBPosition const &)*arg2,(wxGBSpan const &)*arg3,arg4,arg5,arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; @@ -37194,7 +37008,7 @@ static PyObject *_wrap_new_GBSizerItemSizer(PyObject *self, PyObject *args, PyOb wxGBSpan *arg3 = 0 ; int arg4 ; int arg5 ; - wxObject *arg6 = (wxObject *) 0 ; + PyObject *arg6 = (PyObject *) NULL ; wxGBSizerItem *result; wxGBPosition temp2 ; wxGBSpan temp3 ; @@ -37208,7 +37022,7 @@ static PyObject *_wrap_new_GBSizerItemSizer(PyObject *self, PyObject *args, PyOb (char *) "sizer",(char *) "pos",(char *) "span",(char *) "flag",(char *) "border",(char *) "userData", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOO:new_GBSizerItemSizer",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO|O:new_GBSizerItemSizer",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxSizer, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; { @@ -37223,11 +37037,12 @@ static PyObject *_wrap_new_GBSizerItemSizer(PyObject *self, PyObject *args, PyOb if (PyErr_Occurred()) SWIG_fail; arg5 = (int) SWIG_AsInt(obj4); if (PyErr_Occurred()) SWIG_fail; - if ((SWIG_ConvertPtr(obj5,(void **)(&arg6),SWIGTYPE_p_wxObject, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + if (obj5) { + arg6 = obj5; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxGBSizerItem *)new wxGBSizerItem(arg1,(wxGBPosition const &)*arg2,(wxGBSpan const &)*arg3,arg4,arg5,arg6); + result = (wxGBSizerItem *)new_wxGBSizerItem(arg1,(wxGBPosition const &)*arg2,(wxGBSpan const &)*arg3,arg4,arg5,arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; @@ -37247,7 +37062,7 @@ static PyObject *_wrap_new_GBSizerItemSpacer(PyObject *self, PyObject *args, PyO wxGBSpan *arg4 = 0 ; int arg5 ; int arg6 ; - wxObject *arg7 = (wxObject *) 0 ; + PyObject *arg7 = (PyObject *) NULL ; wxGBSizerItem *result; wxGBPosition temp3 ; wxGBSpan temp4 ; @@ -37262,7 +37077,7 @@ static PyObject *_wrap_new_GBSizerItemSpacer(PyObject *self, PyObject *args, PyO (char *) "width",(char *) "height",(char *) "pos",(char *) "span",(char *) "flag",(char *) "border",(char *) "userData", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOOO:new_GBSizerItemSpacer",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOO|O:new_GBSizerItemSpacer",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; arg1 = (int) SWIG_AsInt(obj0); if (PyErr_Occurred()) SWIG_fail; arg2 = (int) SWIG_AsInt(obj1); @@ -37279,11 +37094,12 @@ static PyObject *_wrap_new_GBSizerItemSpacer(PyObject *self, PyObject *args, PyO if (PyErr_Occurred()) SWIG_fail; arg6 = (int) SWIG_AsInt(obj5); if (PyErr_Occurred()) SWIG_fail; - if ((SWIG_ConvertPtr(obj6,(void **)(&arg7),SWIGTYPE_p_wxObject, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + if (obj6) { + arg7 = obj6; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxGBSizerItem *)new wxGBSizerItem(arg1,arg2,(wxGBPosition const &)*arg3,(wxGBSpan const &)*arg4,arg5,arg6,arg7); + result = (wxGBSizerItem *)new_wxGBSizerItem(arg1,arg2,(wxGBPosition const &)*arg3,(wxGBSpan const &)*arg4,arg5,arg6,arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; @@ -37425,15 +37241,18 @@ static PyObject *_wrap_GBSizerItem_SetSpan(PyObject *self, PyObject *args, PyObj } -static PyObject *_wrap_GBSizerItem_Intersects__SWIG_0(PyObject *self, PyObject *args) { +static PyObject *_wrap_GBSizerItem_Intersects(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxGBSizerItem *arg1 = (wxGBSizerItem *) 0 ; wxGBSizerItem *arg2 = 0 ; bool result; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "other", NULL + }; - if(!PyArg_ParseTuple(args,(char *)"OO:GBSizerItem_Intersects",&obj0,&obj1)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:GBSizerItem_Intersects",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxGBSizerItem, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxGBSizerItem, @@ -37459,7 +37278,7 @@ static PyObject *_wrap_GBSizerItem_Intersects__SWIG_0(PyObject *self, PyObject * } -static PyObject *_wrap_GBSizerItem_Intersects__SWIG_1(PyObject *self, PyObject *args) { +static PyObject *_wrap_GBSizerItem_IntersectsPos(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxGBSizerItem *arg1 = (wxGBSizerItem *) 0 ; wxGBPosition *arg2 = 0 ; @@ -37470,8 +37289,11 @@ static PyObject *_wrap_GBSizerItem_Intersects__SWIG_1(PyObject *self, PyObject * PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "pos",(char *) "span", NULL + }; - if(!PyArg_ParseTuple(args,(char *)"OOO:GBSizerItem_Intersects",&obj0,&obj1,&obj2)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:GBSizerItem_IntersectsPos",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxGBSizerItem, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; { @@ -37498,109 +37320,30 @@ static PyObject *_wrap_GBSizerItem_Intersects__SWIG_1(PyObject *self, PyObject * } -static PyObject *_wrap_GBSizerItem_Intersects(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[4]; - int ii; - - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 3); ii++) { - argv[ii] = PyTuple_GetItem(args,ii); - } - if (argc == 2) { - int _v; - { - void *ptr; - if (SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_wxGBSizerItem, 0) == -1) { - _v = 0; - PyErr_Clear(); - } else { - _v = 1; - } - } - if (_v) { - { - void *ptr; - if (SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_wxGBSizerItem, 0) == -1) { - _v = 0; - PyErr_Clear(); - } else { - _v = 1; - } - } - if (_v) { - return _wrap_GBSizerItem_Intersects__SWIG_0(self,args); - } - } - } - if (argc == 3) { - int _v; - { - void *ptr; - if (SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_wxGBSizerItem, 0) == -1) { - _v = 0; - PyErr_Clear(); - } else { - _v = 1; - } - } - if (_v) { - { - _v = wxPySimple_typecheck(argv[1], wxT("wxGBPosition"), 2); - } - if (_v) { - { - _v = wxPySimple_typecheck(argv[2], wxT("wxGBSpan"), 2); - } - if (_v) { - return _wrap_GBSizerItem_Intersects__SWIG_1(self,args); - } - } - } - } - - PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'GBSizerItem_Intersects'"); - return NULL; -} - - static PyObject *_wrap_GBSizerItem_GetEndPos(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxGBSizerItem *arg1 = (wxGBSizerItem *) 0 ; - int *arg2 = 0 ; - int *arg3 = 0 ; + wxGBPosition result; PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; char *kwnames[] = { - (char *) "self",(char *) "row",(char *) "col", NULL + (char *) "self", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:GBSizerItem_GetEndPos",kwnames,&obj0,&obj1,&obj2)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:GBSizerItem_GetEndPos",kwnames,&obj0)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxGBSizerItem, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_int, - SWIG_POINTER_EXCEPTION | 0)) == -1) - SWIG_fail; - if (arg2 == NULL) { - PyErr_SetString(PyExc_TypeError,"null reference"); - SWIG_fail; - } - if ((SWIG_ConvertPtr(obj2,(void **)(&arg3),SWIGTYPE_p_int, - SWIG_POINTER_EXCEPTION | 0)) == -1) - SWIG_fail; - if (arg3 == NULL) { - PyErr_SetString(PyExc_TypeError,"null reference"); - SWIG_fail; - } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->GetEndPos(*arg2,*arg3); + result = wxGBSizerItem_GetEndPos(arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - Py_INCREF(Py_None); resultobj = Py_None; + { + wxGBPosition * resultptr; + resultptr = new wxGBPosition((wxGBPosition &) result); + resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxGBPosition, 1); + } return resultobj; fail: return NULL; @@ -38821,92 +38564,7 @@ static PyObject *_wrap_GridBagSizer_FindItemAtPoint(PyObject *self, PyObject *ar } -static PyObject *_wrap_GridBagSizer_FindItemWithData(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj; - wxGridBagSizer *arg1 = (wxGridBagSizer *) 0 ; - wxObject *arg2 = (wxObject *) 0 ; - wxGBSizerItem *result; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char *kwnames[] = { - (char *) "self",(char *) "userData", NULL - }; - - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:GridBagSizer_FindItemWithData",kwnames,&obj0,&obj1)) goto fail; - if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxGridBagSizer, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxObject, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxGBSizerItem *)(arg1)->FindItemWithData((wxObject const *)arg2); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxGBSizerItem, 0); - return resultobj; - fail: - return NULL; -} - - -static PyObject *_wrap_GridBagSizer_RecalcSizes(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj; - wxGridBagSizer *arg1 = (wxGridBagSizer *) 0 ; - PyObject * obj0 = 0 ; - char *kwnames[] = { - (char *) "self", NULL - }; - - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:GridBagSizer_RecalcSizes",kwnames,&obj0)) goto fail; - if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxGridBagSizer, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->RecalcSizes(); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - Py_INCREF(Py_None); resultobj = Py_None; - return resultobj; - fail: - return NULL; -} - - -static PyObject *_wrap_GridBagSizer_CalcMin(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj; - wxGridBagSizer *arg1 = (wxGridBagSizer *) 0 ; - wxSize result; - PyObject * obj0 = 0 ; - char *kwnames[] = { - (char *) "self", NULL - }; - - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:GridBagSizer_CalcMin",kwnames,&obj0)) goto fail; - if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxGridBagSizer, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (arg1)->CalcMin(); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - { - wxSize * resultptr; - resultptr = new wxSize((wxSize &) result); - resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxSize, 1); - } - return resultobj; - fail: - return NULL; -} - - -static PyObject *_wrap_GridBagSizer_CheckForIntersection__SWIG_0(PyObject *self, PyObject *args) { +static PyObject *_wrap_GridBagSizer_CheckForIntersection(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxGridBagSizer *arg1 = (wxGridBagSizer *) 0 ; wxGBSizerItem *arg2 = (wxGBSizerItem *) 0 ; @@ -38915,8 +38573,11 @@ static PyObject *_wrap_GridBagSizer_CheckForIntersection__SWIG_0(PyObject *self, PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "item",(char *) "excludeItem", NULL + }; - if(!PyArg_ParseTuple(args,(char *)"OO|O:GridBagSizer_CheckForIntersection",&obj0,&obj1,&obj2)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:GridBagSizer_CheckForIntersection",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxGridBagSizer, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxGBSizerItem, @@ -38941,7 +38602,7 @@ static PyObject *_wrap_GridBagSizer_CheckForIntersection__SWIG_0(PyObject *self, } -static PyObject *_wrap_GridBagSizer_CheckForIntersection__SWIG_1(PyObject *self, PyObject *args) { +static PyObject *_wrap_GridBagSizer_CheckForIntersectionPos(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxGridBagSizer *arg1 = (wxGridBagSizer *) 0 ; wxGBPosition *arg2 = 0 ; @@ -38954,8 +38615,11 @@ static PyObject *_wrap_GridBagSizer_CheckForIntersection__SWIG_1(PyObject *self, PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "pos",(char *) "span",(char *) "excludeItem", NULL + }; - if(!PyArg_ParseTuple(args,(char *)"OOO|O:GridBagSizer_CheckForIntersection",&obj0,&obj1,&obj2,&obj3)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:GridBagSizer_CheckForIntersectionPos",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxGridBagSizer, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; { @@ -38986,100 +38650,6 @@ static PyObject *_wrap_GridBagSizer_CheckForIntersection__SWIG_1(PyObject *self, } -static PyObject *_wrap_GridBagSizer_CheckForIntersection(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[5]; - int ii; - - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 4); ii++) { - argv[ii] = PyTuple_GetItem(args,ii); - } - if ((argc >= 2) && (argc <= 3)) { - int _v; - { - void *ptr; - if (SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_wxGridBagSizer, 0) == -1) { - _v = 0; - PyErr_Clear(); - } else { - _v = 1; - } - } - if (_v) { - { - void *ptr; - if (SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_wxGBSizerItem, 0) == -1) { - _v = 0; - PyErr_Clear(); - } else { - _v = 1; - } - } - if (_v) { - if (argc <= 2) { - return _wrap_GridBagSizer_CheckForIntersection__SWIG_0(self,args); - } - { - void *ptr; - if (SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_wxGBSizerItem, 0) == -1) { - _v = 0; - PyErr_Clear(); - } else { - _v = 1; - } - } - if (_v) { - return _wrap_GridBagSizer_CheckForIntersection__SWIG_0(self,args); - } - } - } - } - if ((argc >= 3) && (argc <= 4)) { - int _v; - { - void *ptr; - if (SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_wxGridBagSizer, 0) == -1) { - _v = 0; - PyErr_Clear(); - } else { - _v = 1; - } - } - if (_v) { - { - _v = wxPySimple_typecheck(argv[1], wxT("wxGBPosition"), 2); - } - if (_v) { - { - _v = wxPySimple_typecheck(argv[2], wxT("wxGBSpan"), 2); - } - if (_v) { - if (argc <= 3) { - return _wrap_GridBagSizer_CheckForIntersection__SWIG_1(self,args); - } - { - void *ptr; - if (SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_wxGBSizerItem, 0) == -1) { - _v = 0; - PyErr_Clear(); - } else { - _v = 1; - } - } - if (_v) { - return _wrap_GridBagSizer_CheckForIntersection__SWIG_1(self,args); - } - } - } - } - } - - PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'GridBagSizer_CheckForIntersection'"); - return NULL; -} - - static PyObject * GridBagSizer_swigregister(PyObject *self, PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; @@ -41206,8 +40776,8 @@ static PyMethodDef SwigMethods[] = { { (char *)"ItemContainer_swigregister", ItemContainer_swigregister, METH_VARARGS }, { (char *)"ControlWithItems_swigregister", ControlWithItems_swigregister, METH_VARARGS }, { (char *)"new_SizerItem", (PyCFunction) _wrap_new_SizerItem, METH_VARARGS | METH_KEYWORDS }, - { (char *)"new_SizerItemSpacer", (PyCFunction) _wrap_new_SizerItemSpacer, METH_VARARGS | METH_KEYWORDS }, { (char *)"new_SizerItemWindow", (PyCFunction) _wrap_new_SizerItemWindow, METH_VARARGS | METH_KEYWORDS }, + { (char *)"new_SizerItemSpacer", (PyCFunction) _wrap_new_SizerItemSpacer, METH_VARARGS | METH_KEYWORDS }, { (char *)"new_SizerItemSizer", (PyCFunction) _wrap_new_SizerItemSizer, METH_VARARGS | METH_KEYWORDS }, { (char *)"SizerItem_DeleteWindows", (PyCFunction) _wrap_SizerItem_DeleteWindows, METH_VARARGS | METH_KEYWORDS }, { (char *)"SizerItem_DetachSizer", (PyCFunction) _wrap_SizerItem_DetachSizer, METH_VARARGS | METH_KEYWORDS }, @@ -41266,7 +40836,6 @@ static PyMethodDef SwigMethods[] = { { (char *)"Sizer_DeleteWindows", (PyCFunction) _wrap_Sizer_DeleteWindows, METH_VARARGS | METH_KEYWORDS }, { (char *)"Sizer_GetChildren", (PyCFunction) _wrap_Sizer_GetChildren, METH_VARARGS | METH_KEYWORDS }, { (char *)"Sizer_Show", (PyCFunction) _wrap_Sizer_Show, METH_VARARGS | METH_KEYWORDS }, - { (char *)"Sizer_Hide", (PyCFunction) _wrap_Sizer_Hide, METH_VARARGS | METH_KEYWORDS }, { (char *)"Sizer_IsShown", (PyCFunction) _wrap_Sizer_IsShown, METH_VARARGS | METH_KEYWORDS }, { (char *)"Sizer_ShowItems", (PyCFunction) _wrap_Sizer_ShowItems, METH_VARARGS | METH_KEYWORDS }, { (char *)"Sizer_swigregister", Sizer_swigregister, METH_VARARGS }, @@ -41276,17 +40845,11 @@ static PyMethodDef SwigMethods[] = { { (char *)"new_BoxSizer", (PyCFunction) _wrap_new_BoxSizer, METH_VARARGS | METH_KEYWORDS }, { (char *)"BoxSizer_GetOrientation", (PyCFunction) _wrap_BoxSizer_GetOrientation, METH_VARARGS | METH_KEYWORDS }, { (char *)"BoxSizer_SetOrientation", (PyCFunction) _wrap_BoxSizer_SetOrientation, METH_VARARGS | METH_KEYWORDS }, - { (char *)"BoxSizer_RecalcSizes", (PyCFunction) _wrap_BoxSizer_RecalcSizes, METH_VARARGS | METH_KEYWORDS }, - { (char *)"BoxSizer_CalcMin", (PyCFunction) _wrap_BoxSizer_CalcMin, METH_VARARGS | METH_KEYWORDS }, { (char *)"BoxSizer_swigregister", BoxSizer_swigregister, METH_VARARGS }, { (char *)"new_StaticBoxSizer", (PyCFunction) _wrap_new_StaticBoxSizer, METH_VARARGS | METH_KEYWORDS }, { (char *)"StaticBoxSizer_GetStaticBox", (PyCFunction) _wrap_StaticBoxSizer_GetStaticBox, METH_VARARGS | METH_KEYWORDS }, - { (char *)"StaticBoxSizer_RecalcSizes", (PyCFunction) _wrap_StaticBoxSizer_RecalcSizes, METH_VARARGS | METH_KEYWORDS }, - { (char *)"StaticBoxSizer_CalcMin", (PyCFunction) _wrap_StaticBoxSizer_CalcMin, METH_VARARGS | METH_KEYWORDS }, { (char *)"StaticBoxSizer_swigregister", StaticBoxSizer_swigregister, METH_VARARGS }, { (char *)"new_GridSizer", (PyCFunction) _wrap_new_GridSizer, METH_VARARGS | METH_KEYWORDS }, - { (char *)"GridSizer_RecalcSizes", (PyCFunction) _wrap_GridSizer_RecalcSizes, METH_VARARGS | METH_KEYWORDS }, - { (char *)"GridSizer_CalcMin", (PyCFunction) _wrap_GridSizer_CalcMin, METH_VARARGS | METH_KEYWORDS }, { (char *)"GridSizer_SetCols", (PyCFunction) _wrap_GridSizer_SetCols, METH_VARARGS | METH_KEYWORDS }, { (char *)"GridSizer_SetRows", (PyCFunction) _wrap_GridSizer_SetRows, METH_VARARGS | METH_KEYWORDS }, { (char *)"GridSizer_SetVGap", (PyCFunction) _wrap_GridSizer_SetVGap, METH_VARARGS | METH_KEYWORDS }, @@ -41297,8 +40860,6 @@ static PyMethodDef SwigMethods[] = { { (char *)"GridSizer_GetHGap", (PyCFunction) _wrap_GridSizer_GetHGap, METH_VARARGS | METH_KEYWORDS }, { (char *)"GridSizer_swigregister", GridSizer_swigregister, METH_VARARGS }, { (char *)"new_FlexGridSizer", (PyCFunction) _wrap_new_FlexGridSizer, METH_VARARGS | METH_KEYWORDS }, - { (char *)"FlexGridSizer_RecalcSizes", (PyCFunction) _wrap_FlexGridSizer_RecalcSizes, METH_VARARGS | METH_KEYWORDS }, - { (char *)"FlexGridSizer_CalcMin", (PyCFunction) _wrap_FlexGridSizer_CalcMin, METH_VARARGS | METH_KEYWORDS }, { (char *)"FlexGridSizer_AddGrowableRow", (PyCFunction) _wrap_FlexGridSizer_AddGrowableRow, METH_VARARGS | METH_KEYWORDS }, { (char *)"FlexGridSizer_RemoveGrowableRow", (PyCFunction) _wrap_FlexGridSizer_RemoveGrowableRow, METH_VARARGS | METH_KEYWORDS }, { (char *)"FlexGridSizer_AddGrowableCol", (PyCFunction) _wrap_FlexGridSizer_AddGrowableCol, METH_VARARGS | METH_KEYWORDS }, @@ -41338,7 +40899,8 @@ static PyMethodDef SwigMethods[] = { { (char *)"GBSizerItem_GetSpan", (PyCFunction) _wrap_GBSizerItem_GetSpan, METH_VARARGS | METH_KEYWORDS }, { (char *)"GBSizerItem_SetPos", (PyCFunction) _wrap_GBSizerItem_SetPos, METH_VARARGS | METH_KEYWORDS }, { (char *)"GBSizerItem_SetSpan", (PyCFunction) _wrap_GBSizerItem_SetSpan, METH_VARARGS | METH_KEYWORDS }, - { (char *)"GBSizerItem_Intersects", _wrap_GBSizerItem_Intersects, METH_VARARGS }, + { (char *)"GBSizerItem_Intersects", (PyCFunction) _wrap_GBSizerItem_Intersects, METH_VARARGS | METH_KEYWORDS }, + { (char *)"GBSizerItem_IntersectsPos", (PyCFunction) _wrap_GBSizerItem_IntersectsPos, METH_VARARGS | METH_KEYWORDS }, { (char *)"GBSizerItem_GetEndPos", (PyCFunction) _wrap_GBSizerItem_GetEndPos, METH_VARARGS | METH_KEYWORDS }, { (char *)"GBSizerItem_GetGBSizer", (PyCFunction) _wrap_GBSizerItem_GetGBSizer, METH_VARARGS | METH_KEYWORDS }, { (char *)"GBSizerItem_SetGBSizer", (PyCFunction) _wrap_GBSizerItem_SetGBSizer, METH_VARARGS | METH_KEYWORDS }, @@ -41355,10 +40917,8 @@ static PyMethodDef SwigMethods[] = { { (char *)"GridBagSizer_FindItem", _wrap_GridBagSizer_FindItem, METH_VARARGS }, { (char *)"GridBagSizer_FindItemAtPosition", (PyCFunction) _wrap_GridBagSizer_FindItemAtPosition, METH_VARARGS | METH_KEYWORDS }, { (char *)"GridBagSizer_FindItemAtPoint", (PyCFunction) _wrap_GridBagSizer_FindItemAtPoint, METH_VARARGS | METH_KEYWORDS }, - { (char *)"GridBagSizer_FindItemWithData", (PyCFunction) _wrap_GridBagSizer_FindItemWithData, METH_VARARGS | METH_KEYWORDS }, - { (char *)"GridBagSizer_RecalcSizes", (PyCFunction) _wrap_GridBagSizer_RecalcSizes, METH_VARARGS | METH_KEYWORDS }, - { (char *)"GridBagSizer_CalcMin", (PyCFunction) _wrap_GridBagSizer_CalcMin, METH_VARARGS | METH_KEYWORDS }, - { (char *)"GridBagSizer_CheckForIntersection", _wrap_GridBagSizer_CheckForIntersection, METH_VARARGS }, + { (char *)"GridBagSizer_CheckForIntersection", (PyCFunction) _wrap_GridBagSizer_CheckForIntersection, METH_VARARGS | METH_KEYWORDS }, + { (char *)"GridBagSizer_CheckForIntersectionPos", (PyCFunction) _wrap_GridBagSizer_CheckForIntersectionPos, METH_VARARGS | METH_KEYWORDS }, { (char *)"GridBagSizer_swigregister", GridBagSizer_swigregister, METH_VARARGS }, { (char *)"IndividualLayoutConstraint_Set", (PyCFunction) _wrap_IndividualLayoutConstraint_Set, METH_VARARGS | METH_KEYWORDS }, { (char *)"IndividualLayoutConstraint_LeftOf", (PyCFunction) _wrap_IndividualLayoutConstraint_LeftOf, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/gtk/_windows.py b/wxPython/src/gtk/_windows.py index ae857f8749..fa6334ffb2 100644 --- a/wxPython/src/gtk/_windows.py +++ b/wxPython/src/gtk/_windows.py @@ -27,8 +27,6 @@ class Panel(_core.Window): Create(self, Window parent, int id=-1, Point pos=DefaultPosition, Size size=DefaultSize, long style=wxTAB_TRAVERSAL|wxNO_BORDER, String name=PanelNameStr) -> bool - - Create the GUI part of the Window for 2-phase creation mode. """ return _windows_.Panel_Create(*args, **kwargs) @@ -112,8 +110,6 @@ class ScrolledWindow(Panel): Create(self, Window parent, int id=-1, Point pos=DefaultPosition, Size size=DefaultSize, long style=wxHSCROLL|wxVSCROLL, String name=PanelNameStr) -> bool - - Create the GUI part of the Window for 2-phase creation mode. """ return _windows_.ScrolledWindow_Create(*args, **kwargs) @@ -365,9 +361,9 @@ class Frame(TopLevelWindow): return "<%s.%s; proxy of C++ wxFrame instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, String title, Point pos=DefaultPosition, - Size size=DefaultSize, long style=DEFAULT_FRAME_STYLE, - String name=FrameNameStr) -> Frame + __init__(self, Window parent, int id=-1, String title=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=DEFAULT_FRAME_STYLE, String name=FrameNameStr) -> Frame """ newobj = _windows_.new_Frame(*args, **kwargs) self.this = newobj.this @@ -377,9 +373,9 @@ class Frame(TopLevelWindow): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, String title, Point pos=DefaultPosition, - Size size=DefaultSize, long style=DEFAULT_FRAME_STYLE, - String name=FrameNameStr) -> bool + Create(self, Window parent, int id=-1, String title=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=DEFAULT_FRAME_STYLE, String name=FrameNameStr) -> bool """ return _windows_.Frame_Create(*args, **kwargs) @@ -525,9 +521,9 @@ class Dialog(TopLevelWindow): return "<%s.%s; proxy of C++ wxDialog instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, String title, Point pos=DefaultPosition, - Size size=DefaultSize, long style=DEFAULT_DIALOG_STYLE, - String name=DialogNameStr) -> Dialog + __init__(self, Window parent, int id=-1, String title=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=DEFAULT_DIALOG_STYLE, String name=DialogNameStr) -> Dialog """ newobj = _windows_.new_Dialog(*args, **kwargs) self.this = newobj.this @@ -537,9 +533,9 @@ class Dialog(TopLevelWindow): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, String title, Point pos=DefaultPosition, - Size size=DefaultSize, long style=DEFAULT_DIALOG_STYLE, - String name=DialogNameStr) -> bool + Create(self, Window parent, int id=-1, String title=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=DEFAULT_DIALOG_STYLE, String name=DialogNameStr) -> bool """ return _windows_.Dialog_Create(*args, **kwargs) @@ -627,9 +623,9 @@ class MiniFrame(Frame): return "<%s.%s; proxy of C++ wxMiniFrame instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, String title, Point pos=DefaultPosition, - Size size=DefaultSize, long style=DEFAULT_FRAME_STYLE, - String name=FrameNameStr) -> MiniFrame + __init__(self, Window parent, int id=-1, String title=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=DEFAULT_FRAME_STYLE, String name=FrameNameStr) -> MiniFrame """ newobj = _windows_.new_MiniFrame(*args, **kwargs) self.this = newobj.this @@ -639,9 +635,9 @@ class MiniFrame(Frame): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, String title, Point pos=DefaultPosition, - Size size=DefaultSize, long style=DEFAULT_FRAME_STYLE, - String name=FrameNameStr) -> bool + Create(self, Window parent, int id=-1, String title=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=DEFAULT_FRAME_STYLE, String name=FrameNameStr) -> bool """ return _windows_.MiniFrame_Create(*args, **kwargs) @@ -702,7 +698,7 @@ class SplashScreen(Frame): def __init__(self, *args, **kwargs): """ __init__(self, Bitmap bitmap, long splashStyle, int milliseconds, - Window parent, int id, Point pos=DefaultPosition, + Window parent, int id=-1, Point pos=DefaultPosition, Size size=DefaultSize, long style=wxSIMPLE_BORDER|wxFRAME_NO_TASKBAR|wxSTAY_ON_TOP) -> SplashScreen """ newobj = _windows_.new_SplashScreen(*args, **kwargs) @@ -748,7 +744,7 @@ class StatusBar(_core.Window): self._setOORInfo(self) def Create(*args, **kwargs): - """Create(self, Window parent, int id, long style=ST_SIZEGRIP, String name=StatusLineNameStr) -> bool""" + """Create(self, Window parent, int id=-1, long style=ST_SIZEGRIP, String name=StatusLineNameStr) -> bool""" return _windows_.StatusBar_Create(*args, **kwargs) def SetFieldsCount(*args, **kwargs): @@ -1259,8 +1255,8 @@ class SashWindow(_core.Window): return "<%s.%s; proxy of C++ wxSashWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=wxCLIP_CHILDREN|wxSW_3D, + __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=wxCLIP_CHILDREN|wxSW_3D, String name=SashNameStr) -> SashWindow """ newobj = _windows_.new_SashWindow(*args, **kwargs) @@ -1271,8 +1267,8 @@ class SashWindow(_core.Window): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=wxCLIP_CHILDREN|wxSW_3D, + Create(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=wxCLIP_CHILDREN|wxSW_3D, String name=SashNameStr) -> bool """ return _windows_.SashWindow_Create(*args, **kwargs) @@ -1529,8 +1525,8 @@ class SashLayoutWindow(SashWindow): return "<%s.%s; proxy of C++ wxSashLayoutWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=wxCLIP_CHILDREN|wxSW_3D, + __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=wxCLIP_CHILDREN|wxSW_3D, String name=SashLayoutNameStr) -> SashLayoutWindow """ newobj = _windows_.new_SashLayoutWindow(*args, **kwargs) @@ -1541,8 +1537,8 @@ class SashLayoutWindow(SashWindow): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=wxCLIP_CHILDREN|wxSW_3D, + Create(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=wxCLIP_CHILDREN|wxSW_3D, String name=SashLayoutNameStr) -> bool """ return _windows_.SashLayoutWindow_Create(*args, **kwargs) @@ -2145,7 +2141,7 @@ class ColourData(_core.Object): Gets the i'th custom colour associated with the colour dialog. i should be an integer between 0 and 15. The default custom colours are - all white. + all invalid colours. """ return _windows_.ColourData_GetCustomColour(*args, **kwargs) @@ -2173,7 +2169,7 @@ class ColourData(_core.Object): SetCustomColour(self, int i, Colour colour) Sets the i'th custom colour for the colour dialog. i should be an - integer between 0 and 15. The default custom colours are all white. + integer between 0 and 15. The default custom colours are all invalid colours. """ return _windows_.ColourData_SetCustomColour(*args, **kwargs) @@ -3130,8 +3126,9 @@ class MDIParentFrame(Frame): return "<%s.%s; proxy of C++ wxMDIParentFrame instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, String title, Point pos=DefaultPosition, - Size size=DefaultSize, long style=wxDEFAULT_FRAME_STYLE|wxVSCROLL|wxHSCROLL, + __init__(self, Window parent, int id=-1, String title=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=wxDEFAULT_FRAME_STYLE|wxVSCROLL|wxHSCROLL, String name=FrameNameStr) -> MDIParentFrame """ newobj = _windows_.new_MDIParentFrame(*args, **kwargs) @@ -3142,8 +3139,9 @@ class MDIParentFrame(Frame): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, String title, Point pos=DefaultPosition, - Size size=DefaultSize, long style=wxDEFAULT_FRAME_STYLE|wxVSCROLL|wxHSCROLL, + Create(self, Window parent, int id=-1, String title=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=wxDEFAULT_FRAME_STYLE|wxVSCROLL|wxHSCROLL, String name=FrameNameStr) -> bool """ return _windows_.MDIParentFrame_Create(*args, **kwargs) @@ -3199,8 +3197,9 @@ class MDIChildFrame(Frame): return "<%s.%s; proxy of C++ wxMDIChildFrame instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, MDIParentFrame parent, int id, String title, Point pos=DefaultPosition, - Size size=DefaultSize, long style=DEFAULT_FRAME_STYLE, + __init__(self, MDIParentFrame parent, int id=-1, String title=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=DEFAULT_FRAME_STYLE, String name=FrameNameStr) -> MDIChildFrame """ newobj = _windows_.new_MDIChildFrame(*args, **kwargs) @@ -3211,8 +3210,9 @@ class MDIChildFrame(Frame): def Create(*args, **kwargs): """ - Create(self, MDIParentFrame parent, int id, String title, Point pos=DefaultPosition, - Size size=DefaultSize, long style=DEFAULT_FRAME_STYLE, + Create(self, MDIParentFrame parent, int id=-1, String title=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=DEFAULT_FRAME_STYLE, String name=FrameNameStr) -> bool """ return _windows_.MDIChildFrame_Create(*args, **kwargs) @@ -3279,8 +3279,8 @@ class PyWindow(_core.Window): return "<%s.%s; proxy of C++ wxPyWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=0, String name=PanelNameStr) -> PyWindow + __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=0, String name=PanelNameStr) -> PyWindow """ newobj = _windows_.new_PyWindow(*args, **kwargs) self.this = newobj.this @@ -3399,8 +3399,8 @@ class PyPanel(Panel): return "<%s.%s; proxy of C++ wxPyPanel instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=0, String name=PanelNameStr) -> PyPanel + __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=0, String name=PanelNameStr) -> PyPanel """ newobj = _windows_.new_PyPanel(*args, **kwargs) self.this = newobj.this @@ -3519,8 +3519,8 @@ class PyScrolledWindow(ScrolledWindow): return "<%s.%s; proxy of C++ wxPyScrolledWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=0, String name=PanelNameStr) -> PyScrolledWindow + __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=0, String name=PanelNameStr) -> PyScrolledWindow """ newobj = _windows_.new_PyScrolledWindow(*args, **kwargs) self.this = newobj.this diff --git a/wxPython/src/gtk/_windows_wrap.cpp b/wxPython/src/gtk/_windows_wrap.cpp index 11b665e84d..4c5ac1ae81 100644 --- a/wxPython/src/gtk/_windows_wrap.cpp +++ b/wxPython/src/gtk/_windows_wrap.cpp @@ -3035,8 +3035,9 @@ static PyObject * TopLevelWindow_swigregister(PyObject *self, PyObject *args) { static PyObject *_wrap_new_Frame(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; - wxString *arg3 = 0 ; + int arg2 = (int) (int)-1 ; + wxString const &arg3_defvalue = wxPyEmptyString ; + wxString *arg3 = (wxString *) &arg3_defvalue ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -3060,15 +3061,19 @@ static PyObject *_wrap_new_Frame(PyObject *self, PyObject *args, PyObject *kwarg (char *) "parent",(char *) "id",(char *) "title",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:new_Frame",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOO:new_Frame",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int const) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; - { - arg3 = wxString_in_helper(obj2); - if (arg3 == NULL) SWIG_fail; - temp3 = True; + if (obj1) { + arg2 = (int const) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj2) { + { + arg3 = wxString_in_helper(obj2); + if (arg3 == NULL) SWIG_fail; + temp3 = True; + } } if (obj3) { { @@ -3155,8 +3160,9 @@ static PyObject *_wrap_Frame_Create(PyObject *self, PyObject *args, PyObject *kw PyObject *resultobj; wxFrame *arg1 = (wxFrame *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; - wxString *arg4 = 0 ; + int arg3 = (int) (int)-1 ; + wxString const &arg4_defvalue = wxPyEmptyString ; + wxString *arg4 = (wxString *) &arg4_defvalue ; wxPoint const &arg5_defvalue = wxDefaultPosition ; wxPoint *arg5 = (wxPoint *) &arg5_defvalue ; wxSize const &arg6_defvalue = wxDefaultSize ; @@ -3181,17 +3187,21 @@ static PyObject *_wrap_Frame_Create(PyObject *self, PyObject *args, PyObject *kw (char *) "self",(char *) "parent",(char *) "id",(char *) "title",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOOO:Frame_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOO:Frame_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxFrame, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int const) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; - { - arg4 = wxString_in_helper(obj3); - if (arg4 == NULL) SWIG_fail; - temp4 = True; + if (obj2) { + arg3 = (int const) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj3) { + { + arg4 = wxString_in_helper(obj3); + if (arg4 == NULL) SWIG_fail; + temp4 = True; + } } if (obj4) { { @@ -3968,8 +3978,9 @@ static PyObject * Frame_swigregister(PyObject *self, PyObject *args) { static PyObject *_wrap_new_Dialog(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; - wxString *arg3 = 0 ; + int arg2 = (int) (int)-1 ; + wxString const &arg3_defvalue = wxPyEmptyString ; + wxString *arg3 = (wxString *) &arg3_defvalue ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -3993,15 +4004,19 @@ static PyObject *_wrap_new_Dialog(PyObject *self, PyObject *args, PyObject *kwar (char *) "parent",(char *) "id",(char *) "title",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:new_Dialog",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOO:new_Dialog",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int const) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; - { - arg3 = wxString_in_helper(obj2); - if (arg3 == NULL) SWIG_fail; - temp3 = True; + if (obj1) { + arg2 = (int const) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj2) { + { + arg3 = wxString_in_helper(obj2); + if (arg3 == NULL) SWIG_fail; + temp3 = True; + } } if (obj3) { { @@ -4088,8 +4103,9 @@ static PyObject *_wrap_Dialog_Create(PyObject *self, PyObject *args, PyObject *k PyObject *resultobj; wxDialog *arg1 = (wxDialog *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; - wxString *arg4 = 0 ; + int arg3 = (int) (int)-1 ; + wxString const &arg4_defvalue = wxPyEmptyString ; + wxString *arg4 = (wxString *) &arg4_defvalue ; wxPoint const &arg5_defvalue = wxDefaultPosition ; wxPoint *arg5 = (wxPoint *) &arg5_defvalue ; wxSize const &arg6_defvalue = wxDefaultSize ; @@ -4114,17 +4130,21 @@ static PyObject *_wrap_Dialog_Create(PyObject *self, PyObject *args, PyObject *k (char *) "self",(char *) "parent",(char *) "id",(char *) "title",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOOO:Dialog_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOO:Dialog_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxDialog, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int const) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; - { - arg4 = wxString_in_helper(obj3); - if (arg4 == NULL) SWIG_fail; - temp4 = True; + if (obj2) { + arg3 = (int const) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj3) { + { + arg4 = wxString_in_helper(obj3); + if (arg4 == NULL) SWIG_fail; + temp4 = True; + } } if (obj4) { { @@ -4438,8 +4458,9 @@ static PyObject * Dialog_swigregister(PyObject *self, PyObject *args) { static PyObject *_wrap_new_MiniFrame(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; - wxString *arg3 = 0 ; + int arg2 = (int) (int)-1 ; + wxString const &arg3_defvalue = wxPyEmptyString ; + wxString *arg3 = (wxString *) &arg3_defvalue ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -4463,15 +4484,19 @@ static PyObject *_wrap_new_MiniFrame(PyObject *self, PyObject *args, PyObject *k (char *) "parent",(char *) "id",(char *) "title",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:new_MiniFrame",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOO:new_MiniFrame",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int const) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; - { - arg3 = wxString_in_helper(obj2); - if (arg3 == NULL) SWIG_fail; - temp3 = True; + if (obj1) { + arg2 = (int const) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj2) { + { + arg3 = wxString_in_helper(obj2); + if (arg3 == NULL) SWIG_fail; + temp3 = True; + } } if (obj3) { { @@ -4554,8 +4579,9 @@ static PyObject *_wrap_MiniFrame_Create(PyObject *self, PyObject *args, PyObject PyObject *resultobj; wxMiniFrame *arg1 = (wxMiniFrame *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; - wxString *arg4 = 0 ; + int arg3 = (int) (int)-1 ; + wxString const &arg4_defvalue = wxPyEmptyString ; + wxString *arg4 = (wxString *) &arg4_defvalue ; wxPoint const &arg5_defvalue = wxDefaultPosition ; wxPoint *arg5 = (wxPoint *) &arg5_defvalue ; wxSize const &arg6_defvalue = wxDefaultSize ; @@ -4580,17 +4606,21 @@ static PyObject *_wrap_MiniFrame_Create(PyObject *self, PyObject *args, PyObject (char *) "self",(char *) "parent",(char *) "id",(char *) "title",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOOO:MiniFrame_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOO:MiniFrame_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxMiniFrame, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int const) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; - { - arg4 = wxString_in_helper(obj3); - if (arg4 == NULL) SWIG_fail; - temp4 = True; + if (obj2) { + arg3 = (int const) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj3) { + { + arg4 = wxString_in_helper(obj3); + if (arg4 == NULL) SWIG_fail; + temp4 = True; + } } if (obj4) { { @@ -4799,7 +4829,7 @@ static PyObject *_wrap_new_SplashScreen(PyObject *self, PyObject *args, PyObject long arg2 ; int arg3 ; wxWindow *arg4 = (wxWindow *) 0 ; - int arg5 ; + int arg5 = (int) -1 ; wxPoint const &arg6_defvalue = wxDefaultPosition ; wxPoint *arg6 = (wxPoint *) &arg6_defvalue ; wxSize const &arg7_defvalue = wxDefaultSize ; @@ -4820,7 +4850,7 @@ static PyObject *_wrap_new_SplashScreen(PyObject *self, PyObject *args, PyObject (char *) "bitmap",(char *) "splashStyle",(char *) "milliseconds",(char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO|OOO:new_SplashScreen",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOOO:new_SplashScreen",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxBitmap, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; @@ -4834,8 +4864,10 @@ static PyObject *_wrap_new_SplashScreen(PyObject *self, PyObject *args, PyObject if (PyErr_Occurred()) SWIG_fail; if ((SWIG_ConvertPtr(obj3,(void **)(&arg4),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg5 = (int) SWIG_AsInt(obj4); - if (PyErr_Occurred()) SWIG_fail; + if (obj4) { + arg5 = (int) SWIG_AsInt(obj4); + if (PyErr_Occurred()) SWIG_fail; + } if (obj5) { { arg6 = &temp6; @@ -5041,7 +5073,7 @@ static PyObject *_wrap_StatusBar_Create(PyObject *self, PyObject *args, PyObject PyObject *resultobj; wxStatusBar *arg1 = (wxStatusBar *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; + int arg3 = (int) -1 ; long arg4 = (long) wxST_SIZEGRIP ; wxString const &arg5_defvalue = wxPyStatusLineNameStr ; wxString *arg5 = (wxString *) &arg5_defvalue ; @@ -5056,13 +5088,15 @@ static PyObject *_wrap_StatusBar_Create(PyObject *self, PyObject *args, PyObject (char *) "self",(char *) "parent",(char *) "id",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OO:StatusBar_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOO:StatusBar_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxStatusBar, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } if (obj3) { arg4 = (long) SWIG_AsLong(obj3); if (PyErr_Occurred()) SWIG_fail; @@ -6672,7 +6706,7 @@ static PyObject *_wrap_SashLayoutNameStr_get() { static PyObject *_wrap_new_SashWindow(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; + int arg2 = (int) -1 ; wxPoint const &arg3_defvalue = wxDefaultPosition ; wxPoint *arg3 = (wxPoint *) &arg3_defvalue ; wxSize const &arg4_defvalue = wxDefaultSize ; @@ -6694,11 +6728,13 @@ static PyObject *_wrap_new_SashWindow(PyObject *self, PyObject *args, PyObject * (char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOO:new_SashWindow",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOO:new_SashWindow",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (obj2) { { arg3 = &temp3; @@ -6772,7 +6808,7 @@ static PyObject *_wrap_SashWindow_Create(PyObject *self, PyObject *args, PyObjec PyObject *resultobj; wxSashWindow *arg1 = (wxSashWindow *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; + int arg3 = (int) -1 ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -6795,13 +6831,15 @@ static PyObject *_wrap_SashWindow_Create(PyObject *self, PyObject *args, PyObjec (char *) "self",(char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:SashWindow_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOO:SashWindow_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxSashWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } if (obj3) { { arg4 = &temp4; @@ -8096,7 +8134,7 @@ static PyObject * CalculateLayoutEvent_swigregister(PyObject *self, PyObject *ar static PyObject *_wrap_new_SashLayoutWindow(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; + int arg2 = (int) -1 ; wxPoint const &arg3_defvalue = wxDefaultPosition ; wxPoint *arg3 = (wxPoint *) &arg3_defvalue ; wxSize const &arg4_defvalue = wxDefaultSize ; @@ -8118,11 +8156,13 @@ static PyObject *_wrap_new_SashLayoutWindow(PyObject *self, PyObject *args, PyOb (char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOO:new_SashLayoutWindow",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOO:new_SashLayoutWindow",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (obj2) { { arg3 = &temp3; @@ -8196,7 +8236,7 @@ static PyObject *_wrap_SashLayoutWindow_Create(PyObject *self, PyObject *args, P PyObject *resultobj; wxSashLayoutWindow *arg1 = (wxSashLayoutWindow *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; + int arg3 = (int) -1 ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -8219,13 +8259,15 @@ static PyObject *_wrap_SashLayoutWindow_Create(PyObject *self, PyObject *args, P (char *) "self",(char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:SashLayoutWindow_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOO:SashLayoutWindow_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxSashLayoutWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } if (obj3) { { arg4 = &temp4; @@ -12464,7 +12506,7 @@ static PyObject *_wrap_new_MultiChoiceDialog(PyObject *self, PyObject *args, PyO wxString *arg2 = 0 ; wxString *arg3 = 0 ; int arg4 = (int) 0 ; - wxString *arg5 = (wxString *) 0 ; + wxString *arg5 = (wxString *) NULL ; long arg6 = (long) wxCHOICEDLG_STYLE ; wxPoint const &arg7_defvalue = wxDefaultPosition ; wxPoint *arg7 = (wxPoint *) &arg7_defvalue ; @@ -14493,8 +14535,9 @@ static PyObject * FindReplaceDialog_swigregister(PyObject *self, PyObject *args) static PyObject *_wrap_new_MDIParentFrame(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; - wxString *arg3 = 0 ; + int arg2 = (int) (int)-1 ; + wxString const &arg3_defvalue = wxPyEmptyString ; + wxString *arg3 = (wxString *) &arg3_defvalue ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -14518,15 +14561,19 @@ static PyObject *_wrap_new_MDIParentFrame(PyObject *self, PyObject *args, PyObje (char *) "parent",(char *) "id",(char *) "title",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:new_MDIParentFrame",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOO:new_MDIParentFrame",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int const) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; - { - arg3 = wxString_in_helper(obj2); - if (arg3 == NULL) SWIG_fail; - temp3 = True; + if (obj1) { + arg2 = (int const) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj2) { + { + arg3 = wxString_in_helper(obj2); + if (arg3 == NULL) SWIG_fail; + temp3 = True; + } } if (obj3) { { @@ -14609,8 +14656,9 @@ static PyObject *_wrap_MDIParentFrame_Create(PyObject *self, PyObject *args, PyO PyObject *resultobj; wxMDIParentFrame *arg1 = (wxMDIParentFrame *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; - wxString *arg4 = 0 ; + int arg3 = (int) (int)-1 ; + wxString const &arg4_defvalue = wxPyEmptyString ; + wxString *arg4 = (wxString *) &arg4_defvalue ; wxPoint const &arg5_defvalue = wxDefaultPosition ; wxPoint *arg5 = (wxPoint *) &arg5_defvalue ; wxSize const &arg6_defvalue = wxDefaultSize ; @@ -14635,17 +14683,21 @@ static PyObject *_wrap_MDIParentFrame_Create(PyObject *self, PyObject *args, PyO (char *) "self",(char *) "parent",(char *) "id",(char *) "title",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOOO:MDIParentFrame_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOO:MDIParentFrame_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxMDIParentFrame, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int const) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; - { - arg4 = wxString_in_helper(obj3); - if (arg4 == NULL) SWIG_fail; - temp4 = True; + if (obj2) { + arg3 = (int const) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj3) { + { + arg4 = wxString_in_helper(obj3); + if (arg4 == NULL) SWIG_fail; + temp4 = True; + } } if (obj4) { { @@ -14921,8 +14973,9 @@ static PyObject * MDIParentFrame_swigregister(PyObject *self, PyObject *args) { static PyObject *_wrap_new_MDIChildFrame(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxMDIParentFrame *arg1 = (wxMDIParentFrame *) 0 ; - int arg2 ; - wxString *arg3 = 0 ; + int arg2 = (int) (int)-1 ; + wxString const &arg3_defvalue = wxPyEmptyString ; + wxString *arg3 = (wxString *) &arg3_defvalue ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -14946,15 +14999,19 @@ static PyObject *_wrap_new_MDIChildFrame(PyObject *self, PyObject *args, PyObjec (char *) "parent",(char *) "id",(char *) "title",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:new_MDIChildFrame",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOO:new_MDIChildFrame",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxMDIParentFrame, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int const) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; - { - arg3 = wxString_in_helper(obj2); - if (arg3 == NULL) SWIG_fail; - temp3 = True; + if (obj1) { + arg2 = (int const) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj2) { + { + arg3 = wxString_in_helper(obj2); + if (arg3 == NULL) SWIG_fail; + temp3 = True; + } } if (obj3) { { @@ -15041,8 +15098,9 @@ static PyObject *_wrap_MDIChildFrame_Create(PyObject *self, PyObject *args, PyOb PyObject *resultobj; wxMDIChildFrame *arg1 = (wxMDIChildFrame *) 0 ; wxMDIParentFrame *arg2 = (wxMDIParentFrame *) 0 ; - int arg3 ; - wxString *arg4 = 0 ; + int arg3 = (int) (int)-1 ; + wxString const &arg4_defvalue = wxPyEmptyString ; + wxString *arg4 = (wxString *) &arg4_defvalue ; wxPoint const &arg5_defvalue = wxDefaultPosition ; wxPoint *arg5 = (wxPoint *) &arg5_defvalue ; wxSize const &arg6_defvalue = wxDefaultSize ; @@ -15067,17 +15125,21 @@ static PyObject *_wrap_MDIChildFrame_Create(PyObject *self, PyObject *args, PyOb (char *) "self",(char *) "parent",(char *) "id",(char *) "title",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOOO:MDIChildFrame_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOO:MDIChildFrame_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxMDIChildFrame, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxMDIParentFrame, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int const) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; - { - arg4 = wxString_in_helper(obj3); - if (arg4 == NULL) SWIG_fail; - temp4 = True; + if (obj2) { + arg3 = (int const) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj3) { + { + arg4 = wxString_in_helper(obj3); + if (arg4 == NULL) SWIG_fail; + temp4 = True; + } } if (obj4) { { @@ -15328,7 +15390,7 @@ static PyObject * MDIClientWindow_swigregister(PyObject *self, PyObject *args) { static PyObject *_wrap_new_PyWindow(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; + int arg2 = (int) (int)-1 ; wxPoint const &arg3_defvalue = wxDefaultPosition ; wxPoint *arg3 = (wxPoint *) &arg3_defvalue ; wxSize const &arg4_defvalue = wxDefaultSize ; @@ -15350,11 +15412,13 @@ static PyObject *_wrap_new_PyWindow(PyObject *self, PyObject *args, PyObject *kw (char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOO:new_PyWindow",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOO:new_PyWindow",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int const) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; + if (obj1) { + arg2 = (int const) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (obj2) { { arg3 = &temp3; @@ -16171,7 +16235,7 @@ static PyObject * PyWindow_swigregister(PyObject *self, PyObject *args) { static PyObject *_wrap_new_PyPanel(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; + int arg2 = (int) (int)-1 ; wxPoint const &arg3_defvalue = wxDefaultPosition ; wxPoint *arg3 = (wxPoint *) &arg3_defvalue ; wxSize const &arg4_defvalue = wxDefaultSize ; @@ -16193,11 +16257,13 @@ static PyObject *_wrap_new_PyPanel(PyObject *self, PyObject *args, PyObject *kwa (char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOO:new_PyPanel",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOO:new_PyPanel",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int const) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; + if (obj1) { + arg2 = (int const) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (obj2) { { arg3 = &temp3; @@ -17014,7 +17080,7 @@ static PyObject * PyPanel_swigregister(PyObject *self, PyObject *args) { static PyObject *_wrap_new_PyScrolledWindow(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; + int arg2 = (int) (int)-1 ; wxPoint const &arg3_defvalue = wxDefaultPosition ; wxPoint *arg3 = (wxPoint *) &arg3_defvalue ; wxSize const &arg4_defvalue = wxDefaultSize ; @@ -17036,11 +17102,13 @@ static PyObject *_wrap_new_PyScrolledWindow(PyObject *self, PyObject *args, PyOb (char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOO:new_PyScrolledWindow",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOO:new_PyScrolledWindow",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int const) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; + if (obj1) { + arg2 = (int const) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (obj2) { { arg3 = &temp3; diff --git a/wxPython/src/gtk/grid.py b/wxPython/src/gtk/grid.py index ddf9fe322c..30ddf3efca 100644 --- a/wxPython/src/gtk/grid.py +++ b/wxPython/src/gtk/grid.py @@ -1217,8 +1217,8 @@ class Grid(_windows.ScrolledWindow): return "<%s.%s; proxy of C++ wxGrid instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=WANTS_CHARS, + __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=WANTS_CHARS, String name=PanelNameStr) -> Grid """ newobj = _grid.new_Grid(*args, **kwargs) @@ -1229,8 +1229,8 @@ class Grid(_windows.ScrolledWindow): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=WANTS_CHARS, + Create(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=WANTS_CHARS, String name=PanelNameStr) -> bool """ return _grid.Grid_Create(*args, **kwargs) diff --git a/wxPython/src/gtk/grid_wrap.cpp b/wxPython/src/gtk/grid_wrap.cpp index 5e66409680..a3bdc54010 100644 --- a/wxPython/src/gtk/grid_wrap.cpp +++ b/wxPython/src/gtk/grid_wrap.cpp @@ -8017,7 +8017,7 @@ static PyObject * GridCellCoords_swigregister(PyObject *self, PyObject *args) { static PyObject *_wrap_new_Grid(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; + int arg2 = (int) -1 ; wxPoint const &arg3_defvalue = wxDefaultPosition ; wxPoint *arg3 = (wxPoint *) &arg3_defvalue ; wxSize const &arg4_defvalue = wxDefaultSize ; @@ -8039,11 +8039,13 @@ static PyObject *_wrap_new_Grid(PyObject *self, PyObject *args, PyObject *kwargs (char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOO:new_Grid",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOO:new_Grid",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (obj2) { { arg3 = &temp3; @@ -8121,7 +8123,7 @@ static PyObject *_wrap_Grid_Create(PyObject *self, PyObject *args, PyObject *kwa PyObject *resultobj; wxGrid *arg1 = (wxGrid *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; + int arg3 = (int) -1 ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -8144,13 +8146,15 @@ static PyObject *_wrap_Grid_Create(PyObject *self, PyObject *args, PyObject *kwa (char *) "self",(char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:Grid_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOO:Grid_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxGrid, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } if (obj3) { { arg4 = &temp4; diff --git a/wxPython/src/msw/_controls.py b/wxPython/src/msw/_controls.py index 28b41c104f..edb9a4eaed 100644 --- a/wxPython/src/msw/_controls.py +++ b/wxPython/src/msw/_controls.py @@ -23,9 +23,10 @@ class Button(_core.Control): return "<%s.%s; proxy of C++ wxButton instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, String label, Point pos=DefaultPosition, - Size size=DefaultSize, long style=0, - Validator validator=DefaultValidator, String name=ButtonNameStr) -> Button + __init__(self, Window parent, int id=-1, String label=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=0, Validator validator=DefaultValidator, + String name=ButtonNameStr) -> Button Create and show a button. """ @@ -37,9 +38,10 @@ class Button(_core.Control): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, String label, Point pos=DefaultPosition, - Size size=DefaultSize, long style=0, - Validator validator=DefaultValidator, String name=ButtonNameStr) -> bool + Create(self, Window parent, int id=-1, String label=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=0, Validator validator=DefaultValidator, + String name=ButtonNameStr) -> bool Acutally create the GUI Button for 2-phase creation. """ @@ -136,9 +138,9 @@ class BitmapButton(Button): return "<%s.%s; proxy of C++ wxBitmapButton instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, Bitmap bitmap, Point pos=DefaultPosition, - Size size=DefaultSize, long style=BU_AUTODRAW, - Validator validator=DefaultValidator, + __init__(self, Window parent, int id=-1, Bitmap bitmap=wxNullBitmap, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=BU_AUTODRAW, Validator validator=DefaultValidator, String name=ButtonNameStr) -> BitmapButton Create and show a button with a bitmap for the label. @@ -151,9 +153,9 @@ class BitmapButton(Button): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, Bitmap bitmap, Point pos=DefaultPosition, - Size size=DefaultSize, long style=BU_AUTODRAW, - Validator validator=DefaultValidator, + Create(self, Window parent, int id=-1, Bitmap bitmap=wxNullBitmap, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=BU_AUTODRAW, Validator validator=DefaultValidator, String name=ButtonNameStr) -> bool Acutally create the GUI BitmapButton for 2-phase creation. @@ -275,9 +277,10 @@ class CheckBox(_core.Control): return "<%s.%s; proxy of C++ wxCheckBox instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, String label, Point pos=DefaultPosition, - Size size=DefaultSize, long style=0, - Validator validator=DefaultValidator, String name=CheckBoxNameStr) -> CheckBox + __init__(self, Window parent, int id=-1, String label=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=0, Validator validator=DefaultValidator, + String name=CheckBoxNameStr) -> CheckBox Creates and shows a CheckBox control """ @@ -289,9 +292,10 @@ class CheckBox(_core.Control): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, String label, Point pos=DefaultPosition, - Size size=DefaultSize, long style=0, - Validator validator=DefaultValidator, String name=CheckBoxNameStr) -> bool + Create(self, Window parent, int id=-1, String label=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=0, Validator validator=DefaultValidator, + String name=CheckBoxNameStr) -> bool Actually create the GUI CheckBox for 2-phase creation. """ @@ -752,7 +756,7 @@ class Gauge(_core.Control): return "<%s.%s; proxy of C++ wxGauge instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, int range, Point pos=DefaultPosition, + __init__(self, Window parent, int id=-1, int range=100, Point pos=DefaultPosition, Size size=DefaultSize, long style=GA_HORIZONTAL, Validator validator=DefaultValidator, String name=GaugeNameStr) -> Gauge @@ -765,7 +769,7 @@ class Gauge(_core.Control): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, int range, Point pos=DefaultPosition, + Create(self, Window parent, int id=-1, int range=100, Point pos=DefaultPosition, Size size=DefaultSize, long style=GA_HORIZONTAL, Validator validator=DefaultValidator, String name=GaugeNameStr) -> bool @@ -865,9 +869,9 @@ class StaticBox(_core.Control): return "<%s.%s; proxy of C++ wxStaticBox instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, String label, Point pos=DefaultPosition, - Size size=DefaultSize, long style=0, - String name=StaticBoxNameStr) -> StaticBox + __init__(self, Window parent, int id=-1, String label=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=0, String name=StaticBoxNameStr) -> StaticBox """ newobj = _controls_.new_StaticBox(*args, **kwargs) self.this = newobj.this @@ -877,9 +881,9 @@ class StaticBox(_core.Control): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, String label, Point pos=DefaultPosition, - Size size=DefaultSize, long style=0, - String name=StaticBoxNameStr) -> bool + Create(self, Window parent, int id=-1, String label=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=0, String name=StaticBoxNameStr) -> bool """ return _controls_.StaticBox_Create(*args, **kwargs) @@ -942,8 +946,8 @@ class StaticLine(_core.Control): return "<%s.%s; proxy of C++ wxStaticLine instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=LI_HORIZONTAL, + __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=LI_HORIZONTAL, String name=StaticTextNameStr) -> StaticLine """ newobj = _controls_.new_StaticLine(*args, **kwargs) @@ -954,8 +958,8 @@ class StaticLine(_core.Control): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=LI_HORIZONTAL, + Create(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=LI_HORIZONTAL, String name=StaticTextNameStr) -> bool """ return _controls_.StaticLine_Create(*args, **kwargs) @@ -1029,9 +1033,9 @@ class StaticText(_core.Control): return "<%s.%s; proxy of C++ wxStaticText instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, String label, Point pos=DefaultPosition, - Size size=DefaultSize, long style=0, - String name=StaticTextNameStr) -> StaticText + __init__(self, Window parent, int id=-1, String label=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=0, String name=StaticTextNameStr) -> StaticText """ newobj = _controls_.new_StaticText(*args, **kwargs) self.this = newobj.this @@ -1041,9 +1045,9 @@ class StaticText(_core.Control): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, String label, Point pos=DefaultPosition, - Size size=DefaultSize, long style=0, - String name=StaticTextNameStr) -> bool + Create(self, Window parent, int id=-1, String label=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=0, String name=StaticTextNameStr) -> bool """ return _controls_.StaticText_Create(*args, **kwargs) @@ -1103,9 +1107,9 @@ class StaticBitmap(_core.Control): return "<%s.%s; proxy of C++ wxStaticBitmap instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, Bitmap bitmap, Point pos=DefaultPosition, - Size size=DefaultSize, long style=0, - String name=StaticBitmapNameStr) -> StaticBitmap + __init__(self, Window parent, int id=-1, Bitmap bitmap=wxNullBitmap, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=0, String name=StaticBitmapNameStr) -> StaticBitmap """ newobj = _controls_.new_StaticBitmap(*args, **kwargs) self.this = newobj.this @@ -1115,9 +1119,9 @@ class StaticBitmap(_core.Control): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, Bitmap bitmap, Point pos=DefaultPosition, - Size size=DefaultSize, long style=0, - String name=StaticBitmapNameStr) -> bool + Create(self, Window parent, int id=-1, Bitmap bitmap=wxNullBitmap, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=0, String name=StaticBitmapNameStr) -> bool """ return _controls_.StaticBitmap_Create(*args, **kwargs) @@ -1189,8 +1193,8 @@ class ListBox(_core.ControlWithItems): return "<%s.%s; proxy of C++ wxListBox instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - wxArrayString choices=wxPyEmptyStringArray, + __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, wxArrayString choices=wxPyEmptyStringArray, long style=0, Validator validator=DefaultValidator, String name=ListBoxNameStr) -> ListBox """ @@ -1202,8 +1206,8 @@ class ListBox(_core.ControlWithItems): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - wxArrayString choices=wxPyEmptyStringArray, + Create(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, wxArrayString choices=wxPyEmptyStringArray, long style=0, Validator validator=DefaultValidator, String name=ListBoxNameStr) -> bool """ @@ -1347,8 +1351,8 @@ class CheckListBox(ListBox): return "<%s.%s; proxy of C++ wxCheckListBox instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - wxArrayString choices=wxPyEmptyStringArray, + __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, wxArrayString choices=wxPyEmptyStringArray, long style=0, Validator validator=DefaultValidator, String name=ListBoxNameStr) -> CheckListBox """ @@ -1360,8 +1364,8 @@ class CheckListBox(ListBox): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - wxArrayString choices=wxPyEmptyStringArray, + Create(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, wxArrayString choices=wxPyEmptyStringArray, long style=0, Validator validator=DefaultValidator, String name=ListBoxNameStr) -> bool """ @@ -1602,8 +1606,8 @@ class TextCtrl(_core.Control): return "<%s.%s; proxy of C++ wxTextCtrl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, String value=EmptyString, Point pos=DefaultPosition, - Size size=DefaultSize, + __init__(self, Window parent, int id=-1, String value=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, long style=0, Validator validator=DefaultValidator, String name=TextCtrlNameStr) -> TextCtrl """ @@ -1615,8 +1619,8 @@ class TextCtrl(_core.Control): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, String value=EmptyString, Point pos=DefaultPosition, - Size size=DefaultSize, + Create(self, Window parent, int id=-1, String value=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, long style=0, Validator validator=DefaultValidator, String name=TextCtrlNameStr) -> bool """ @@ -2280,10 +2284,11 @@ class RadioBox(_core.Control): return "<%s.%s; proxy of C++ wxRadioBox instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, String label, Point pos=DefaultPosition, - Size size=DefaultSize, wxArrayString choices=wxPyEmptyStringArray, - int majorDimension=0, - long style=RA_HORIZONTAL, Validator validator=DefaultValidator, + __init__(self, Window parent, int id=-1, String label=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + wxArrayString choices=wxPyEmptyStringArray, + int majorDimension=0, long style=RA_HORIZONTAL, + Validator validator=DefaultValidator, String name=RadioBoxNameStr) -> RadioBox """ if kwargs.has_key('point'): kwargs['pos'] = kwargs['point'];del kwargs['point'] @@ -2295,10 +2300,11 @@ class RadioBox(_core.Control): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, String label, Point pos=DefaultPosition, - Size size=DefaultSize, wxArrayString choices=wxPyEmptyStringArray, - int majorDimension=0, - long style=RA_HORIZONTAL, Validator validator=DefaultValidator, + Create(self, Window parent, int id=-1, String label=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + wxArrayString choices=wxPyEmptyStringArray, + int majorDimension=0, long style=RA_HORIZONTAL, + Validator validator=DefaultValidator, String name=RadioBoxNameStr) -> bool """ return _controls_.RadioBox_Create(*args, **kwargs) @@ -2415,9 +2421,10 @@ class RadioButton(_core.Control): return "<%s.%s; proxy of C++ wxRadioButton instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, String label, Point pos=DefaultPosition, - Size size=DefaultSize, long style=0, - Validator validator=DefaultValidator, String name=RadioButtonNameStr) -> RadioButton + __init__(self, Window parent, int id=-1, String label=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=0, Validator validator=DefaultValidator, + String name=RadioButtonNameStr) -> RadioButton """ newobj = _controls_.new_RadioButton(*args, **kwargs) self.this = newobj.this @@ -2427,9 +2434,10 @@ class RadioButton(_core.Control): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, String label, Point pos=DefaultPosition, - Size size=DefaultSize, long style=0, - Validator validator=DefaultValidator, String name=RadioButtonNameStr) -> bool + Create(self, Window parent, int id=-1, String label=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=0, Validator validator=DefaultValidator, + String name=RadioButtonNameStr) -> bool """ return _controls_.RadioButton_Create(*args, **kwargs) @@ -2497,9 +2505,10 @@ class Slider(_core.Control): return "<%s.%s; proxy of C++ wxSlider instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, int value, int minValue, int maxValue, - Point pos=DefaultPosition, Size size=DefaultSize, - long style=SL_HORIZONTAL, Validator validator=DefaultValidator, + __init__(self, Window parent, int id=-1, int value=0, int minValue=0, + int maxValue=100, Point pos=DefaultPosition, + Size size=DefaultSize, long style=SL_HORIZONTAL, + Validator validator=DefaultValidator, String name=SliderNameStr) -> Slider """ if kwargs.has_key('point'): kwargs['pos'] = kwargs['point'];del kwargs['point'] @@ -2511,9 +2520,10 @@ class Slider(_core.Control): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, int value, int minValue, int maxValue, - Point pos=DefaultPosition, Size size=DefaultSize, - long style=SL_HORIZONTAL, Validator validator=DefaultValidator, + Create(self, Window parent, int id=-1, int value=0, int minValue=0, + int maxValue=100, Point pos=DefaultPosition, + Size size=DefaultSize, long style=SL_HORIZONTAL, + Validator validator=DefaultValidator, String name=SliderNameStr) -> bool """ return _controls_.Slider_Create(*args, **kwargs) @@ -2662,9 +2672,10 @@ class ToggleButton(_core.Control): return "<%s.%s; proxy of C++ wxToggleButton instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, String label, Point pos=DefaultPosition, - Size size=DefaultSize, long style=0, - Validator validator=DefaultValidator, String name=ToggleButtonNameStr) -> ToggleButton + __init__(self, Window parent, int id=-1, String label=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=0, Validator validator=DefaultValidator, + String name=ToggleButtonNameStr) -> ToggleButton """ newobj = _controls_.new_ToggleButton(*args, **kwargs) self.this = newobj.this @@ -2674,9 +2685,10 @@ class ToggleButton(_core.Control): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, String label, Point pos=DefaultPosition, - Size size=DefaultSize, long style=0, - Validator validator=DefaultValidator, String name=ToggleButtonNameStr) -> bool + Create(self, Window parent, int id=-1, String label=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=0, Validator validator=DefaultValidator, + String name=ToggleButtonNameStr) -> bool """ return _controls_.ToggleButton_Create(*args, **kwargs) @@ -2939,8 +2951,8 @@ class Notebook(BookCtrl): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=0, String name=NOTEBOOK_NAME) -> bool + Create(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=0, String name=NOTEBOOK_NAME) -> bool """ return _controls_.Notebook_Create(*args, **kwargs) @@ -3097,8 +3109,8 @@ class Listbook(BookCtrl): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=0, String name=EmptyString) -> bool + Create(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=0, String name=EmptyString) -> bool """ return _controls_.Listbook_Create(*args, **kwargs) @@ -3159,11 +3171,23 @@ class BookCtrlSizer(_core.Sizer): self._setOORInfo(self) def RecalcSizes(*args, **kwargs): - """RecalcSizes(self)""" + """ + RecalcSizes(self) + + Using the sizes calculated by `CalcMin` reposition and resize all the + items managed by this sizer. You should not need to call this directly as + it is called by `Layout`. + """ return _controls_.BookCtrlSizer_RecalcSizes(*args, **kwargs) def CalcMin(*args, **kwargs): - """CalcMin(self) -> Size""" + """ + CalcMin(self) -> Size + + This method is where the sizer will do the actual calculation of its + children's minimal sizes. You should not need to call this directly as + it is called by `Layout`. + """ return _controls_.BookCtrlSizer_CalcMin(*args, **kwargs) def GetControl(*args, **kwargs): @@ -3190,11 +3214,23 @@ class NotebookSizer(_core.Sizer): self._setOORInfo(self) def RecalcSizes(*args, **kwargs): - """RecalcSizes(self)""" + """ + RecalcSizes(self) + + Using the sizes calculated by `CalcMin` reposition and resize all the + items managed by this sizer. You should not need to call this directly as + it is called by `Layout`. + """ return _controls_.NotebookSizer_RecalcSizes(*args, **kwargs) def CalcMin(*args, **kwargs): - """CalcMin(self) -> Size""" + """ + CalcMin(self) -> Size + + This method is where the sizer will do the actual calculation of its + children's minimal sizes. You should not need to call this directly as + it is called by `Layout`. + """ return _controls_.NotebookSizer_CalcMin(*args, **kwargs) def GetNotebook(*args, **kwargs): @@ -3484,6 +3520,7 @@ class ToolBarBase(_core.Control): # For consistency with the backwards compatible methods above, here are # some non-'Label' versions of the Check and Radio methods + def AddCheckTool(self, id, bitmap, bmpDisabled = wx.NullBitmap, shortHelp = '', longHelp = '', @@ -3684,8 +3721,8 @@ class ToolBar(ToolBarBase): return "<%s.%s; proxy of C++ wxToolBar instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=wxNO_BORDER|wxTB_HORIZONTAL, + __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=wxNO_BORDER|wxTB_HORIZONTAL, String name=wxPyToolBarNameStr) -> ToolBar """ newobj = _controls_.new_ToolBar(*args, **kwargs) @@ -3696,8 +3733,8 @@ class ToolBar(ToolBarBase): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=wxNO_BORDER|wxTB_HORIZONTAL, + Create(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=wxNO_BORDER|wxTB_HORIZONTAL, String name=wxPyToolBarNameStr) -> bool """ return _controls_.ToolBar_Create(*args, **kwargs) @@ -5435,8 +5472,8 @@ class PyControl(_core.Control): return "<%s.%s; proxy of C++ wxPyControl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=0, Validator validator=DefaultValidator, + __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=0, Validator validator=DefaultValidator, String name=ControlNameStr) -> PyControl """ newobj = _controls_.new_PyControl(*args, **kwargs) diff --git a/wxPython/src/msw/_controls_wrap.cpp b/wxPython/src/msw/_controls_wrap.cpp index a02955a27c..02e8fda0a8 100644 --- a/wxPython/src/msw/_controls_wrap.cpp +++ b/wxPython/src/msw/_controls_wrap.cpp @@ -1040,8 +1040,9 @@ static PyObject *_wrap_ButtonNameStr_get() { static PyObject *_wrap_new_Button(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; - wxString *arg3 = 0 ; + int arg2 = (int) -1 ; + wxString const &arg3_defvalue = wxPyEmptyString ; + wxString *arg3 = (wxString *) &arg3_defvalue ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -1068,15 +1069,19 @@ static PyObject *_wrap_new_Button(PyObject *self, PyObject *args, PyObject *kwar (char *) "parent",(char *) "id",(char *) "label",(char *) "pos",(char *) "size",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOOO:new_Button",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOOO:new_Button",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; - { - arg3 = wxString_in_helper(obj2); - if (arg3 == NULL) SWIG_fail; - temp3 = True; + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj2) { + { + arg3 = wxString_in_helper(obj2); + if (arg3 == NULL) SWIG_fail; + temp3 = True; + } } if (obj3) { { @@ -1172,8 +1177,9 @@ static PyObject *_wrap_Button_Create(PyObject *self, PyObject *args, PyObject *k PyObject *resultobj; wxButton *arg1 = (wxButton *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; - wxString *arg4 = 0 ; + int arg3 = (int) -1 ; + wxString const &arg4_defvalue = wxPyEmptyString ; + wxString *arg4 = (wxString *) &arg4_defvalue ; wxPoint const &arg5_defvalue = wxDefaultPosition ; wxPoint *arg5 = (wxPoint *) &arg5_defvalue ; wxSize const &arg6_defvalue = wxDefaultSize ; @@ -1201,17 +1207,21 @@ static PyObject *_wrap_Button_Create(PyObject *self, PyObject *args, PyObject *k (char *) "self",(char *) "parent",(char *) "id",(char *) "label",(char *) "pos",(char *) "size",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOOOO:Button_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOOO:Button_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxButton, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; - { - arg4 = wxString_in_helper(obj3); - if (arg4 == NULL) SWIG_fail; - temp4 = True; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj3) { + { + arg4 = wxString_in_helper(obj3); + if (arg4 == NULL) SWIG_fail; + temp4 = True; + } } if (obj4) { { @@ -1371,8 +1381,9 @@ static PyObject * Button_swigregister(PyObject *self, PyObject *args) { static PyObject *_wrap_new_BitmapButton(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; - wxBitmap *arg3 = 0 ; + int arg2 = (int) -1 ; + wxBitmap const &arg3_defvalue = wxNullBitmap ; + wxBitmap *arg3 = (wxBitmap *) &arg3_defvalue ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -1398,17 +1409,21 @@ static PyObject *_wrap_new_BitmapButton(PyObject *self, PyObject *args, PyObject (char *) "parent",(char *) "id",(char *) "bitmap",(char *) "pos",(char *) "size",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOOO:new_BitmapButton",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOOO:new_BitmapButton",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; - if ((SWIG_ConvertPtr(obj2,(void **)(&arg3),SWIGTYPE_p_wxBitmap, - SWIG_POINTER_EXCEPTION | 0)) == -1) - SWIG_fail; - if (arg3 == NULL) { - PyErr_SetString(PyExc_TypeError,"null reference"); + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj2) { + if ((SWIG_ConvertPtr(obj2,(void **)(&arg3),SWIGTYPE_p_wxBitmap, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + if (arg3 == NULL) { + PyErr_SetString(PyExc_TypeError,"null reference"); + SWIG_fail; + } } if (obj3) { { @@ -1496,8 +1511,9 @@ static PyObject *_wrap_BitmapButton_Create(PyObject *self, PyObject *args, PyObj PyObject *resultobj; wxBitmapButton *arg1 = (wxBitmapButton *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; - wxBitmap *arg4 = 0 ; + int arg3 = (int) -1 ; + wxBitmap const &arg4_defvalue = wxNullBitmap ; + wxBitmap *arg4 = (wxBitmap *) &arg4_defvalue ; wxPoint const &arg5_defvalue = wxDefaultPosition ; wxPoint *arg5 = (wxPoint *) &arg5_defvalue ; wxSize const &arg6_defvalue = wxDefaultSize ; @@ -1524,19 +1540,23 @@ static PyObject *_wrap_BitmapButton_Create(PyObject *self, PyObject *args, PyObj (char *) "self",(char *) "parent",(char *) "id",(char *) "bitmap",(char *) "pos",(char *) "size",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOOOO:BitmapButton_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOOO:BitmapButton_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxBitmapButton, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; - if ((SWIG_ConvertPtr(obj3,(void **)(&arg4),SWIGTYPE_p_wxBitmap, - SWIG_POINTER_EXCEPTION | 0)) == -1) - SWIG_fail; - if (arg4 == NULL) { - PyErr_SetString(PyExc_TypeError,"null reference"); + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj3) { + if ((SWIG_ConvertPtr(obj3,(void **)(&arg4),SWIGTYPE_p_wxBitmap, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + if (arg4 == NULL) { + PyErr_SetString(PyExc_TypeError,"null reference"); + SWIG_fail; + } } if (obj4) { { @@ -1965,8 +1985,9 @@ static PyObject *_wrap_CheckBoxNameStr_get() { static PyObject *_wrap_new_CheckBox(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; - wxString *arg3 = 0 ; + int arg2 = (int) -1 ; + wxString const &arg3_defvalue = wxPyEmptyString ; + wxString *arg3 = (wxString *) &arg3_defvalue ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -1993,15 +2014,19 @@ static PyObject *_wrap_new_CheckBox(PyObject *self, PyObject *args, PyObject *kw (char *) "parent",(char *) "id",(char *) "label",(char *) "pos",(char *) "size",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOOO:new_CheckBox",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOOO:new_CheckBox",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; - { - arg3 = wxString_in_helper(obj2); - if (arg3 == NULL) SWIG_fail; - temp3 = True; + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj2) { + { + arg3 = wxString_in_helper(obj2); + if (arg3 == NULL) SWIG_fail; + temp3 = True; + } } if (obj3) { { @@ -2093,8 +2118,9 @@ static PyObject *_wrap_CheckBox_Create(PyObject *self, PyObject *args, PyObject PyObject *resultobj; wxCheckBox *arg1 = (wxCheckBox *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; - wxString *arg4 = 0 ; + int arg3 = (int) -1 ; + wxString const &arg4_defvalue = wxPyEmptyString ; + wxString *arg4 = (wxString *) &arg4_defvalue ; wxPoint const &arg5_defvalue = wxDefaultPosition ; wxPoint *arg5 = (wxPoint *) &arg5_defvalue ; wxSize const &arg6_defvalue = wxDefaultSize ; @@ -2122,17 +2148,21 @@ static PyObject *_wrap_CheckBox_Create(PyObject *self, PyObject *args, PyObject (char *) "self",(char *) "parent",(char *) "id",(char *) "label",(char *) "pos",(char *) "size",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOOOO:CheckBox_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOOO:CheckBox_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxCheckBox, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; - { - arg4 = wxString_in_helper(obj3); - if (arg4 == NULL) SWIG_fail; - temp4 = True; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj3) { + { + arg4 = wxString_in_helper(obj3); + if (arg4 == NULL) SWIG_fail; + temp4 = True; + } } if (obj4) { { @@ -3797,8 +3827,8 @@ static PyObject *_wrap_GaugeNameStr_get() { static PyObject *_wrap_new_Gauge(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; - int arg3 ; + int arg2 = (int) -1 ; + int arg3 = (int) 100 ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -3824,13 +3854,17 @@ static PyObject *_wrap_new_Gauge(PyObject *self, PyObject *args, PyObject *kwarg (char *) "parent",(char *) "id",(char *) "range",(char *) "pos",(char *) "size",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOOO:new_Gauge",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOOO:new_Gauge",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } if (obj3) { { arg4 = &temp4; @@ -3913,8 +3947,8 @@ static PyObject *_wrap_Gauge_Create(PyObject *self, PyObject *args, PyObject *kw PyObject *resultobj; wxGauge *arg1 = (wxGauge *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; - int arg4 ; + int arg3 = (int) -1 ; + int arg4 = (int) 100 ; wxPoint const &arg5_defvalue = wxDefaultPosition ; wxPoint *arg5 = (wxPoint *) &arg5_defvalue ; wxSize const &arg6_defvalue = wxDefaultSize ; @@ -3941,15 +3975,19 @@ static PyObject *_wrap_Gauge_Create(PyObject *self, PyObject *args, PyObject *kw (char *) "self",(char *) "parent",(char *) "id",(char *) "range",(char *) "pos",(char *) "size",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOOOO:Gauge_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOOO:Gauge_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxGauge, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; - arg4 = (int) SWIG_AsInt(obj3); - if (PyErr_Occurred()) SWIG_fail; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj3) { + arg4 = (int) SWIG_AsInt(obj3); + if (PyErr_Occurred()) SWIG_fail; + } if (obj4) { { arg5 = &temp5; @@ -4357,8 +4395,9 @@ static PyObject *_wrap_StaticTextNameStr_get() { static PyObject *_wrap_new_StaticBox(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; - wxString *arg3 = 0 ; + int arg2 = (int) -1 ; + wxString const &arg3_defvalue = wxPyEmptyString ; + wxString *arg3 = (wxString *) &arg3_defvalue ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -4382,15 +4421,19 @@ static PyObject *_wrap_new_StaticBox(PyObject *self, PyObject *args, PyObject *k (char *) "parent",(char *) "id",(char *) "label",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:new_StaticBox",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOO:new_StaticBox",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; - { - arg3 = wxString_in_helper(obj2); - if (arg3 == NULL) SWIG_fail; - temp3 = True; + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj2) { + { + arg3 = wxString_in_helper(obj2); + if (arg3 == NULL) SWIG_fail; + temp3 = True; + } } if (obj3) { { @@ -4477,8 +4520,9 @@ static PyObject *_wrap_StaticBox_Create(PyObject *self, PyObject *args, PyObject PyObject *resultobj; wxStaticBox *arg1 = (wxStaticBox *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; - wxString *arg4 = 0 ; + int arg3 = (int) -1 ; + wxString const &arg4_defvalue = wxPyEmptyString ; + wxString *arg4 = (wxString *) &arg4_defvalue ; wxPoint const &arg5_defvalue = wxDefaultPosition ; wxPoint *arg5 = (wxPoint *) &arg5_defvalue ; wxSize const &arg6_defvalue = wxDefaultSize ; @@ -4503,17 +4547,21 @@ static PyObject *_wrap_StaticBox_Create(PyObject *self, PyObject *args, PyObject (char *) "self",(char *) "parent",(char *) "id",(char *) "label",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOOO:StaticBox_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOO:StaticBox_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxStaticBox, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; - { - arg4 = wxString_in_helper(obj3); - if (arg4 == NULL) SWIG_fail; - temp4 = True; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj3) { + { + arg4 = wxString_in_helper(obj3); + if (arg4 == NULL) SWIG_fail; + temp4 = True; + } } if (obj4) { { @@ -4613,7 +4661,7 @@ static PyObject * StaticBox_swigregister(PyObject *self, PyObject *args) { static PyObject *_wrap_new_StaticLine(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; + int arg2 = (int) -1 ; wxPoint const &arg3_defvalue = wxDefaultPosition ; wxPoint *arg3 = (wxPoint *) &arg3_defvalue ; wxSize const &arg4_defvalue = wxDefaultSize ; @@ -4635,11 +4683,13 @@ static PyObject *_wrap_new_StaticLine(PyObject *self, PyObject *args, PyObject * (char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOO:new_StaticLine",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOO:new_StaticLine",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (obj2) { { arg3 = &temp3; @@ -4713,7 +4763,7 @@ static PyObject *_wrap_StaticLine_Create(PyObject *self, PyObject *args, PyObjec PyObject *resultobj; wxStaticLine *arg1 = (wxStaticLine *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; + int arg3 = (int) -1 ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -4736,13 +4786,15 @@ static PyObject *_wrap_StaticLine_Create(PyObject *self, PyObject *args, PyObjec (char *) "self",(char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:StaticLine_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOO:StaticLine_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxStaticLine, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } if (obj3) { { arg4 = &temp4; @@ -4883,8 +4935,9 @@ static PyObject * StaticLine_swigregister(PyObject *self, PyObject *args) { static PyObject *_wrap_new_StaticText(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; - wxString *arg3 = 0 ; + int arg2 = (int) -1 ; + wxString const &arg3_defvalue = wxPyEmptyString ; + wxString *arg3 = (wxString *) &arg3_defvalue ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -4908,15 +4961,19 @@ static PyObject *_wrap_new_StaticText(PyObject *self, PyObject *args, PyObject * (char *) "parent",(char *) "id",(char *) "label",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:new_StaticText",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOO:new_StaticText",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; - { - arg3 = wxString_in_helper(obj2); - if (arg3 == NULL) SWIG_fail; - temp3 = True; + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj2) { + { + arg3 = wxString_in_helper(obj2); + if (arg3 == NULL) SWIG_fail; + temp3 = True; + } } if (obj3) { { @@ -4999,8 +5056,9 @@ static PyObject *_wrap_StaticText_Create(PyObject *self, PyObject *args, PyObjec PyObject *resultobj; wxStaticText *arg1 = (wxStaticText *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; - wxString *arg4 = 0 ; + int arg3 = (int) -1 ; + wxString const &arg4_defvalue = wxPyEmptyString ; + wxString *arg4 = (wxString *) &arg4_defvalue ; wxPoint const &arg5_defvalue = wxDefaultPosition ; wxPoint *arg5 = (wxPoint *) &arg5_defvalue ; wxSize const &arg6_defvalue = wxDefaultSize ; @@ -5025,17 +5083,21 @@ static PyObject *_wrap_StaticText_Create(PyObject *self, PyObject *args, PyObjec (char *) "self",(char *) "parent",(char *) "id",(char *) "label",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOOO:StaticText_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOO:StaticText_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxStaticText, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; - { - arg4 = wxString_in_helper(obj3); - if (arg4 == NULL) SWIG_fail; - temp4 = True; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj3) { + { + arg4 = wxString_in_helper(obj3); + if (arg4 == NULL) SWIG_fail; + temp4 = True; + } } if (obj4) { { @@ -5135,8 +5197,9 @@ static PyObject * StaticText_swigregister(PyObject *self, PyObject *args) { static PyObject *_wrap_new_StaticBitmap(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; - wxBitmap *arg3 = 0 ; + int arg2 = (int) -1 ; + wxBitmap const &arg3_defvalue = wxNullBitmap ; + wxBitmap *arg3 = (wxBitmap *) &arg3_defvalue ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -5159,17 +5222,21 @@ static PyObject *_wrap_new_StaticBitmap(PyObject *self, PyObject *args, PyObject (char *) "parent",(char *) "id",(char *) "bitmap",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:new_StaticBitmap",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOO:new_StaticBitmap",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; - if ((SWIG_ConvertPtr(obj2,(void **)(&arg3),SWIGTYPE_p_wxBitmap, - SWIG_POINTER_EXCEPTION | 0)) == -1) - SWIG_fail; - if (arg3 == NULL) { - PyErr_SetString(PyExc_TypeError,"null reference"); + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj2) { + if ((SWIG_ConvertPtr(obj2,(void **)(&arg3),SWIGTYPE_p_wxBitmap, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + if (arg3 == NULL) { + PyErr_SetString(PyExc_TypeError,"null reference"); + SWIG_fail; + } } if (obj3) { { @@ -5244,8 +5311,9 @@ static PyObject *_wrap_StaticBitmap_Create(PyObject *self, PyObject *args, PyObj PyObject *resultobj; wxStaticBitmap *arg1 = (wxStaticBitmap *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; - wxBitmap *arg4 = 0 ; + int arg3 = (int) -1 ; + wxBitmap const &arg4_defvalue = wxNullBitmap ; + wxBitmap *arg4 = (wxBitmap *) &arg4_defvalue ; wxPoint const &arg5_defvalue = wxDefaultPosition ; wxPoint *arg5 = (wxPoint *) &arg5_defvalue ; wxSize const &arg6_defvalue = wxDefaultSize ; @@ -5269,19 +5337,23 @@ static PyObject *_wrap_StaticBitmap_Create(PyObject *self, PyObject *args, PyObj (char *) "self",(char *) "parent",(char *) "id",(char *) "bitmap",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOOO:StaticBitmap_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOO:StaticBitmap_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxStaticBitmap, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; - if ((SWIG_ConvertPtr(obj3,(void **)(&arg4),SWIGTYPE_p_wxBitmap, - SWIG_POINTER_EXCEPTION | 0)) == -1) - SWIG_fail; - if (arg4 == NULL) { - PyErr_SetString(PyExc_TypeError,"null reference"); + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj3) { + if ((SWIG_ConvertPtr(obj3,(void **)(&arg4),SWIGTYPE_p_wxBitmap, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + if (arg4 == NULL) { + PyErr_SetString(PyExc_TypeError,"null reference"); + SWIG_fail; + } } if (obj4) { { @@ -5491,7 +5563,7 @@ static PyObject *_wrap_ListBoxNameStr_get() { static PyObject *_wrap_new_ListBox(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; + int arg2 = (int) -1 ; wxPoint const &arg3_defvalue = wxDefaultPosition ; wxPoint *arg3 = (wxPoint *) &arg3_defvalue ; wxSize const &arg4_defvalue = wxDefaultSize ; @@ -5520,11 +5592,13 @@ static PyObject *_wrap_new_ListBox(PyObject *self, PyObject *args, PyObject *kwa (char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "choices",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOO:new_ListBox",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOOO:new_ListBox",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (obj2) { { arg3 = &temp3; @@ -5636,7 +5710,7 @@ static PyObject *_wrap_ListBox_Create(PyObject *self, PyObject *args, PyObject * PyObject *resultobj; wxListBox *arg1 = (wxListBox *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; + int arg3 = (int) -1 ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -5666,13 +5740,15 @@ static PyObject *_wrap_ListBox_Create(PyObject *self, PyObject *args, PyObject * (char *) "self",(char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "choices",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOOOO:ListBox_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOOO:ListBox_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxListBox, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } if (obj3) { { arg4 = &temp4; @@ -6475,7 +6551,7 @@ static PyObject * ListBox_swigregister(PyObject *self, PyObject *args) { static PyObject *_wrap_new_CheckListBox(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; + int arg2 = (int) -1 ; wxPoint const &arg3_defvalue = wxDefaultPosition ; wxPoint *arg3 = (wxPoint *) &arg3_defvalue ; wxSize const &arg4_defvalue = wxDefaultSize ; @@ -6504,11 +6580,13 @@ static PyObject *_wrap_new_CheckListBox(PyObject *self, PyObject *args, PyObject (char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "choices",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOO:new_CheckListBox",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOOO:new_CheckListBox",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (obj2) { { arg3 = &temp3; @@ -6620,7 +6698,7 @@ static PyObject *_wrap_CheckListBox_Create(PyObject *self, PyObject *args, PyObj PyObject *resultobj; wxCheckListBox *arg1 = (wxCheckListBox *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; + int arg3 = (int) -1 ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -6650,13 +6728,15 @@ static PyObject *_wrap_CheckListBox_Create(PyObject *self, PyObject *args, PyObj (char *) "self",(char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "choices",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOOOO:CheckListBox_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOOO:CheckListBox_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxCheckListBox, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } if (obj3) { { arg4 = &temp4; @@ -7954,7 +8034,7 @@ static PyObject * TextAttr_swigregister(PyObject *self, PyObject *args) { static PyObject *_wrap_new_TextCtrl(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; + int arg2 = (int) -1 ; wxString const &arg3_defvalue = wxPyEmptyString ; wxString *arg3 = (wxString *) &arg3_defvalue ; wxPoint const &arg4_defvalue = wxDefaultPosition ; @@ -7983,11 +8063,13 @@ static PyObject *_wrap_new_TextCtrl(PyObject *self, PyObject *args, PyObject *kw (char *) "parent",(char *) "id",(char *) "value",(char *) "pos",(char *) "size",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOO:new_TextCtrl",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOOO:new_TextCtrl",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (obj2) { { arg3 = wxString_in_helper(obj2); @@ -8089,7 +8171,7 @@ static PyObject *_wrap_TextCtrl_Create(PyObject *self, PyObject *args, PyObject PyObject *resultobj; wxTextCtrl *arg1 = (wxTextCtrl *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; + int arg3 = (int) -1 ; wxString const &arg4_defvalue = wxPyEmptyString ; wxString *arg4 = (wxString *) &arg4_defvalue ; wxPoint const &arg5_defvalue = wxDefaultPosition ; @@ -8119,13 +8201,15 @@ static PyObject *_wrap_TextCtrl_Create(PyObject *self, PyObject *args, PyObject (char *) "self",(char *) "parent",(char *) "id",(char *) "value",(char *) "pos",(char *) "size",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOOOO:TextCtrl_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOOO:TextCtrl_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxTextCtrl, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } if (obj3) { { arg4 = wxString_in_helper(obj3); @@ -11675,8 +11759,9 @@ static PyObject *_wrap_RadioButtonNameStr_get() { static PyObject *_wrap_new_RadioBox(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; - wxString *arg3 = 0 ; + int arg2 = (int) -1 ; + wxString const &arg3_defvalue = wxPyEmptyString ; + wxString *arg3 = (wxString *) &arg3_defvalue ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -11709,15 +11794,19 @@ static PyObject *_wrap_new_RadioBox(PyObject *self, PyObject *args, PyObject *kw (char *) "parent",(char *) "id",(char *) "label",(char *) "pos",(char *) "size",(char *) "choices",(char *) "majorDimension",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOOOOO:new_RadioBox",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOOOOO:new_RadioBox",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; - { - arg3 = wxString_in_helper(obj2); - if (arg3 == NULL) SWIG_fail; - temp3 = True; + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj2) { + { + arg3 = wxString_in_helper(obj2); + if (arg3 == NULL) SWIG_fail; + temp3 = True; + } } if (obj3) { { @@ -11842,8 +11931,9 @@ static PyObject *_wrap_RadioBox_Create(PyObject *self, PyObject *args, PyObject PyObject *resultobj; wxRadioBox *arg1 = (wxRadioBox *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; - wxString *arg4 = 0 ; + int arg3 = (int) -1 ; + wxString const &arg4_defvalue = wxPyEmptyString ; + wxString *arg4 = (wxString *) &arg4_defvalue ; wxPoint const &arg5_defvalue = wxDefaultPosition ; wxPoint *arg5 = (wxPoint *) &arg5_defvalue ; wxSize const &arg6_defvalue = wxDefaultSize ; @@ -11877,17 +11967,21 @@ static PyObject *_wrap_RadioBox_Create(PyObject *self, PyObject *args, PyObject (char *) "self",(char *) "parent",(char *) "id",(char *) "label",(char *) "pos",(char *) "size",(char *) "choices",(char *) "majorDimension",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOOOOOO:RadioBox_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOOOOO:RadioBox_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxRadioBox, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; - { - arg4 = wxString_in_helper(obj3); - if (arg4 == NULL) SWIG_fail; - temp4 = True; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj3) { + { + arg4 = wxString_in_helper(obj3); + if (arg4 == NULL) SWIG_fail; + temp4 = True; + } } if (obj4) { { @@ -12469,8 +12563,9 @@ static PyObject * RadioBox_swigregister(PyObject *self, PyObject *args) { static PyObject *_wrap_new_RadioButton(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; - wxString *arg3 = 0 ; + int arg2 = (int) -1 ; + wxString const &arg3_defvalue = wxPyEmptyString ; + wxString *arg3 = (wxString *) &arg3_defvalue ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -12497,15 +12592,19 @@ static PyObject *_wrap_new_RadioButton(PyObject *self, PyObject *args, PyObject (char *) "parent",(char *) "id",(char *) "label",(char *) "pos",(char *) "size",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOOO:new_RadioButton",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOOO:new_RadioButton",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; - { - arg3 = wxString_in_helper(obj2); - if (arg3 == NULL) SWIG_fail; - temp3 = True; + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj2) { + { + arg3 = wxString_in_helper(obj2); + if (arg3 == NULL) SWIG_fail; + temp3 = True; + } } if (obj3) { { @@ -12597,8 +12696,9 @@ static PyObject *_wrap_RadioButton_Create(PyObject *self, PyObject *args, PyObje PyObject *resultobj; wxRadioButton *arg1 = (wxRadioButton *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; - wxString *arg4 = 0 ; + int arg3 = (int) -1 ; + wxString const &arg4_defvalue = wxPyEmptyString ; + wxString *arg4 = (wxString *) &arg4_defvalue ; wxPoint const &arg5_defvalue = wxDefaultPosition ; wxPoint *arg5 = (wxPoint *) &arg5_defvalue ; wxSize const &arg6_defvalue = wxDefaultSize ; @@ -12626,17 +12726,21 @@ static PyObject *_wrap_RadioButton_Create(PyObject *self, PyObject *args, PyObje (char *) "self",(char *) "parent",(char *) "id",(char *) "label",(char *) "pos",(char *) "size",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOOOO:RadioButton_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOOO:RadioButton_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxRadioButton, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; - { - arg4 = wxString_in_helper(obj3); - if (arg4 == NULL) SWIG_fail; - temp4 = True; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj3) { + { + arg4 = wxString_in_helper(obj3); + if (arg4 == NULL) SWIG_fail; + temp4 = True; + } } if (obj4) { { @@ -12822,10 +12926,10 @@ static PyObject *_wrap_SliderNameStr_get() { static PyObject *_wrap_new_Slider(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; - int arg3 ; - int arg4 ; - int arg5 ; + int arg2 = (int) -1 ; + int arg3 = (int) 0 ; + int arg4 = (int) 0 ; + int arg5 = (int) 100 ; wxPoint const &arg6_defvalue = wxDefaultPosition ; wxPoint *arg6 = (wxPoint *) &arg6_defvalue ; wxSize const &arg7_defvalue = wxDefaultSize ; @@ -12853,17 +12957,25 @@ static PyObject *_wrap_new_Slider(PyObject *self, PyObject *args, PyObject *kwar (char *) "parent",(char *) "id",(char *) "value",(char *) "minValue",(char *) "maxValue",(char *) "pos",(char *) "size",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO|OOOOO:new_Slider",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOOOOO:new_Slider",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; - arg4 = (int) SWIG_AsInt(obj3); - if (PyErr_Occurred()) SWIG_fail; - arg5 = (int) SWIG_AsInt(obj4); - if (PyErr_Occurred()) SWIG_fail; + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj3) { + arg4 = (int) SWIG_AsInt(obj3); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj4) { + arg5 = (int) SWIG_AsInt(obj4); + if (PyErr_Occurred()) SWIG_fail; + } if (obj5) { { arg6 = &temp6; @@ -12946,10 +13058,10 @@ static PyObject *_wrap_Slider_Create(PyObject *self, PyObject *args, PyObject *k PyObject *resultobj; wxSlider *arg1 = (wxSlider *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; - int arg4 ; - int arg5 ; - int arg6 ; + int arg3 = (int) -1 ; + int arg4 = (int) 0 ; + int arg5 = (int) 0 ; + int arg6 = (int) 100 ; wxPoint const &arg7_defvalue = wxDefaultPosition ; wxPoint *arg7 = (wxPoint *) &arg7_defvalue ; wxSize const &arg8_defvalue = wxDefaultSize ; @@ -12978,19 +13090,27 @@ static PyObject *_wrap_Slider_Create(PyObject *self, PyObject *args, PyObject *k (char *) "self",(char *) "parent",(char *) "id",(char *) "value",(char *) "minValue",(char *) "maxValue",(char *) "pos",(char *) "size",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOO|OOOOO:Slider_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOOOOO:Slider_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxSlider, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; - arg4 = (int) SWIG_AsInt(obj3); - if (PyErr_Occurred()) SWIG_fail; - arg5 = (int) SWIG_AsInt(obj4); - if (PyErr_Occurred()) SWIG_fail; - arg6 = (int) SWIG_AsInt(obj5); - if (PyErr_Occurred()) SWIG_fail; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj3) { + arg4 = (int) SWIG_AsInt(obj3); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj4) { + arg5 = (int) SWIG_AsInt(obj4); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj5) { + arg6 = (int) SWIG_AsInt(obj5); + if (PyErr_Occurred()) SWIG_fail; + } if (obj6) { { arg7 = &temp7; @@ -13698,8 +13818,9 @@ static PyObject *_wrap_ToggleButtonNameStr_get() { static PyObject *_wrap_new_ToggleButton(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; - wxString *arg3 = 0 ; + int arg2 = (int) -1 ; + wxString const &arg3_defvalue = wxPyEmptyString ; + wxString *arg3 = (wxString *) &arg3_defvalue ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -13726,15 +13847,19 @@ static PyObject *_wrap_new_ToggleButton(PyObject *self, PyObject *args, PyObject (char *) "parent",(char *) "id",(char *) "label",(char *) "pos",(char *) "size",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOOO:new_ToggleButton",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOOO:new_ToggleButton",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; - { - arg3 = wxString_in_helper(obj2); - if (arg3 == NULL) SWIG_fail; - temp3 = True; + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj2) { + { + arg3 = wxString_in_helper(obj2); + if (arg3 == NULL) SWIG_fail; + temp3 = True; + } } if (obj3) { { @@ -13826,8 +13951,9 @@ static PyObject *_wrap_ToggleButton_Create(PyObject *self, PyObject *args, PyObj PyObject *resultobj; wxToggleButton *arg1 = (wxToggleButton *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; - wxString *arg4 = 0 ; + int arg3 = (int) -1 ; + wxString const &arg4_defvalue = wxPyEmptyString ; + wxString *arg4 = (wxString *) &arg4_defvalue ; wxPoint const &arg5_defvalue = wxDefaultPosition ; wxPoint *arg5 = (wxPoint *) &arg5_defvalue ; wxSize const &arg6_defvalue = wxDefaultSize ; @@ -13855,17 +13981,21 @@ static PyObject *_wrap_ToggleButton_Create(PyObject *self, PyObject *args, PyObj (char *) "self",(char *) "parent",(char *) "id",(char *) "label",(char *) "pos",(char *) "size",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOOOO:ToggleButton_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOOO:ToggleButton_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxToggleButton, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; - { - arg4 = wxString_in_helper(obj3); - if (arg4 == NULL) SWIG_fail; - temp4 = True; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj3) { + { + arg4 = wxString_in_helper(obj3); + if (arg4 == NULL) SWIG_fail; + temp4 = True; + } } if (obj4) { { @@ -15067,7 +15197,7 @@ static PyObject *_wrap_Notebook_Create(PyObject *self, PyObject *args, PyObject PyObject *resultobj; wxNotebook *arg1 = (wxNotebook *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; + int arg3 = (int) -1 ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -15090,13 +15220,15 @@ static PyObject *_wrap_Notebook_Create(PyObject *self, PyObject *args, PyObject (char *) "self",(char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:Notebook_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOO:Notebook_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxNotebook, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } if (obj3) { { arg4 = &temp4; @@ -15545,7 +15677,7 @@ static PyObject *_wrap_Listbook_Create(PyObject *self, PyObject *args, PyObject PyObject *resultobj; wxListbook *arg1 = (wxListbook *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; + int arg3 = (int) -1 ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -15568,13 +15700,15 @@ static PyObject *_wrap_Listbook_Create(PyObject *self, PyObject *args, PyObject (char *) "self",(char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:Listbook_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOO:Listbook_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxListbook, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } if (obj3) { { arg4 = &temp4; @@ -18408,7 +18542,7 @@ static PyObject * ToolBarBase_swigregister(PyObject *self, PyObject *args) { static PyObject *_wrap_new_ToolBar(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; + int arg2 = (int) -1 ; wxPoint const &arg3_defvalue = wxDefaultPosition ; wxPoint *arg3 = (wxPoint *) &arg3_defvalue ; wxSize const &arg4_defvalue = wxDefaultSize ; @@ -18430,11 +18564,13 @@ static PyObject *_wrap_new_ToolBar(PyObject *self, PyObject *args, PyObject *kwa (char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOO:new_ToolBar",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOO:new_ToolBar",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (obj2) { { arg3 = &temp3; @@ -18512,7 +18648,7 @@ static PyObject *_wrap_ToolBar_Create(PyObject *self, PyObject *args, PyObject * PyObject *resultobj; wxToolBar *arg1 = (wxToolBar *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; + int arg3 = (int) -1 ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -18535,13 +18671,15 @@ static PyObject *_wrap_ToolBar_Create(PyObject *self, PyObject *args, PyObject * (char *) "self",(char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:ToolBar_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOO:ToolBar_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxToolBar, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } if (obj3) { { arg4 = &temp4; @@ -29053,7 +29191,7 @@ static PyObject * DirFilterListCtrl_swigregister(PyObject *self, PyObject *args) static PyObject *_wrap_new_PyControl(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; + int arg2 = (int) (int)-1 ; wxPoint const &arg3_defvalue = wxDefaultPosition ; wxPoint *arg3 = (wxPoint *) &arg3_defvalue ; wxSize const &arg4_defvalue = wxDefaultSize ; @@ -29078,11 +29216,13 @@ static PyObject *_wrap_new_PyControl(PyObject *self, PyObject *args, PyObject *k (char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOO:new_PyControl",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOO:new_PyControl",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int const) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; + if (obj1) { + arg2 = (int const) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (obj2) { { arg3 = &temp3; diff --git a/wxPython/src/msw/_core.py b/wxPython/src/msw/_core.py index e8e7f9d915..da20c4e590 100644 --- a/wxPython/src/msw/_core.py +++ b/wxPython/src/msw/_core.py @@ -5781,7 +5781,7 @@ class Window(EvtHandler): """ GetBestSize(self) -> Size - This functions returns the best acceptable minimal size for the + This function returns the best acceptable minimal size for the window, if applicable. For example, for a static text control, it will be the minimal size such that the control label is not truncated. For windows containing subwindows (suzh aswx.Panel), the size returned by @@ -5794,7 +5794,7 @@ class Window(EvtHandler): """ GetBestSizeTuple() -> (width, height) - This functions returns the best acceptable minimal size for the + This function returns the best acceptable minimal size for the window, if applicable. For example, for a static text control, it will be the minimal size such that the control label is not truncated. For windows containing subwindows (suzh aswx.Panel), the size returned by @@ -8128,8 +8128,8 @@ class Control(Window): return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=0, Validator validator=DefaultValidator, + __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=0, Validator validator=DefaultValidator, String name=ControlNameStr) -> Control Create a Control. Normally you should only call this from a subclass' @@ -8143,8 +8143,8 @@ class Control(Window): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=0, Validator validator=DefaultValidator, + Create(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=0, Validator validator=DefaultValidator, String name=ControlNameStr) -> bool Do the 2nd phase and create the GUI control. @@ -8421,36 +8421,85 @@ _core_.ControlWithItems_swigregister(ControlWithItemsPtr) #--------------------------------------------------------------------------- class SizerItem(Object): + """ + The wx.SizerItem class is used to track the position, size and other + attributes of each item managed by a `wx.Sizer`. In normal usage user + code should never need to deal directly with a wx.SizerItem, but + custom classes derived from `wx.PySizer` will probably need to use the + collection of wx.SizerItems held by wx.Sizer when calculating layout. + + :see: `wx.Sizer`, `wx.GBSizerItem` + """ def __repr__(self): return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): - """__init__(self) -> SizerItem""" + """ + __init__(self) -> SizerItem + + Constructs an empty wx.SizerItem. Either a window, sizer or spacer + size will need to be set before this item can be used in a Sizer. + + You will probably never need to create a wx.SizerItem directly as they + are created automatically when the sizer's Add, Insert or Prepend + methods are called. + + :see: `wx.SizerItemSpacer`, `wx.SizerItemWindow`, `wx.SizerItemSizer` + """ newobj = _core_.new_SizerItem(*args, **kwargs) self.this = newobj.this self.thisown = 1 del newobj.thisown def DeleteWindows(*args, **kwargs): - """DeleteWindows(self)""" + """ + DeleteWindows(self) + + Destroy the window or the windows in a subsizer, depending on the type + of item. + """ return _core_.SizerItem_DeleteWindows(*args, **kwargs) def DetachSizer(*args, **kwargs): - """DetachSizer(self)""" + """ + DetachSizer(self) + + Enable deleting the SizerItem without destroying the contained sizer. + """ return _core_.SizerItem_DetachSizer(*args, **kwargs) def GetSize(*args, **kwargs): - """GetSize(self) -> Size""" + """ + GetSize(self) -> Size + + Get the current size of the item, as set in the last Layout. + """ return _core_.SizerItem_GetSize(*args, **kwargs) def CalcMin(*args, **kwargs): - """CalcMin(self) -> Size""" + """ + CalcMin(self) -> Size + + Calculates the minimum desired size for the item, including any space + needed by borders. + """ return _core_.SizerItem_CalcMin(*args, **kwargs) def SetDimension(*args, **kwargs): - """SetDimension(self, Point pos, Size size)""" + """ + SetDimension(self, Point pos, Size size) + + Set the position and size of the space allocated for this item by the + sizer, and adjust the position and size of the item (window or + subsizer) to be within that space taking alignment and borders into + account. + """ return _core_.SizerItem_SetDimension(*args, **kwargs) def GetMinSize(*args, **kwargs): - """GetMinSize(self) -> Size""" + """ + GetMinSize(self) -> Size + + Get the minimum size needed for the item. + """ return _core_.SizerItem_GetMinSize(*args, **kwargs) def SetInitSize(*args, **kwargs): @@ -8458,97 +8507,192 @@ class SizerItem(Object): return _core_.SizerItem_SetInitSize(*args, **kwargs) def SetRatioWH(*args, **kwargs): - """SetRatioWH(self, int width, int height)""" + """ + SetRatioWH(self, int width, int height) + + Set the ratio item attribute. + """ return _core_.SizerItem_SetRatioWH(*args, **kwargs) def SetRatioSize(*args, **kwargs): - """SetRatioSize(self, Size size)""" + """ + SetRatioSize(self, Size size) + + Set the ratio item attribute. + """ return _core_.SizerItem_SetRatioSize(*args, **kwargs) def SetRatio(*args, **kwargs): - """SetRatio(self, float ratio)""" + """ + SetRatio(self, float ratio) + + Set the ratio item attribute. + """ return _core_.SizerItem_SetRatio(*args, **kwargs) def GetRatio(*args, **kwargs): - """GetRatio(self) -> float""" + """ + GetRatio(self) -> float + + Set the ratio item attribute. + """ return _core_.SizerItem_GetRatio(*args, **kwargs) def IsWindow(*args, **kwargs): - """IsWindow(self) -> bool""" + """ + IsWindow(self) -> bool + + Is this sizer item a window? + """ return _core_.SizerItem_IsWindow(*args, **kwargs) def IsSizer(*args, **kwargs): - """IsSizer(self) -> bool""" + """ + IsSizer(self) -> bool + + Is this sizer item a subsizer? + """ return _core_.SizerItem_IsSizer(*args, **kwargs) def IsSpacer(*args, **kwargs): - """IsSpacer(self) -> bool""" + """ + IsSpacer(self) -> bool + + Is this sizer item a spacer? + """ return _core_.SizerItem_IsSpacer(*args, **kwargs) def SetProportion(*args, **kwargs): - """SetProportion(self, int proportion)""" + """ + SetProportion(self, int proportion) + + Set the proportion value for this item. + """ return _core_.SizerItem_SetProportion(*args, **kwargs) def GetProportion(*args, **kwargs): - """GetProportion(self) -> int""" + """ + GetProportion(self) -> int + + Get the proportion value for this item. + """ return _core_.SizerItem_GetProportion(*args, **kwargs) - SetOption = SetProportion - GetOption = GetProportion + SetOption = wx._deprecated(SetProportion, "Please use `SetProportion` instead.") + GetOption = wx._deprecated(GetProportion, "Please use `GetProportion` instead.") def SetFlag(*args, **kwargs): - """SetFlag(self, int flag)""" + """ + SetFlag(self, int flag) + + Set the flag value for this item. + """ return _core_.SizerItem_SetFlag(*args, **kwargs) def GetFlag(*args, **kwargs): - """GetFlag(self) -> int""" + """ + GetFlag(self) -> int + + Get the flag value for this item. + """ return _core_.SizerItem_GetFlag(*args, **kwargs) def SetBorder(*args, **kwargs): - """SetBorder(self, int border)""" + """ + SetBorder(self, int border) + + Set the border value for this item. + """ return _core_.SizerItem_SetBorder(*args, **kwargs) def GetBorder(*args, **kwargs): - """GetBorder(self) -> int""" + """ + GetBorder(self) -> int + + Get the border value for this item. + """ return _core_.SizerItem_GetBorder(*args, **kwargs) def GetWindow(*args, **kwargs): - """GetWindow(self) -> Window""" + """ + GetWindow(self) -> Window + + Get the window (if any) that is managed by this sizer item. + """ return _core_.SizerItem_GetWindow(*args, **kwargs) def SetWindow(*args, **kwargs): - """SetWindow(self, Window window)""" + """ + SetWindow(self, Window window) + + Set the window to be managed by this sizer item. + """ return _core_.SizerItem_SetWindow(*args, **kwargs) def GetSizer(*args, **kwargs): - """GetSizer(self) -> Sizer""" + """ + GetSizer(self) -> Sizer + + Get the subsizer (if any) that is managed by this sizer item. + """ return _core_.SizerItem_GetSizer(*args, **kwargs) def SetSizer(*args, **kwargs): - """SetSizer(self, Sizer sizer)""" + """ + SetSizer(self, Sizer sizer) + + Set the subsizer to be managed by this sizer item. + """ return _core_.SizerItem_SetSizer(*args, **kwargs) def GetSpacer(*args, **kwargs): - """GetSpacer(self) -> Size""" + """ + GetSpacer(self) -> Size + + Get the size of the spacer managed by this sizer item. + """ return _core_.SizerItem_GetSpacer(*args, **kwargs) def SetSpacer(*args, **kwargs): - """SetSpacer(self, Size size)""" + """ + SetSpacer(self, Size size) + + Set the size of the spacer to be managed by this sizer item. + """ return _core_.SizerItem_SetSpacer(*args, **kwargs) def Show(*args, **kwargs): - """Show(self, bool show)""" + """ + Show(self, bool show) + + Set the show item attribute, which sizers use to determine if the item + is to be made part of the layout or not. If the item is tracking a + window then it is shown or hidden as needed. + """ return _core_.SizerItem_Show(*args, **kwargs) def IsShown(*args, **kwargs): - """IsShown(self) -> bool""" + """ + IsShown(self) -> bool + + Is the item to be shown in the layout? + """ return _core_.SizerItem_IsShown(*args, **kwargs) def GetPosition(*args, **kwargs): - """GetPosition(self) -> Point""" + """ + GetPosition(self) -> Point + + Returns the current position of the item, as set in the last Layout. + """ return _core_.SizerItem_GetPosition(*args, **kwargs) def GetUserData(*args, **kwargs): - """GetUserData(self) -> PyObject""" + """ + GetUserData(self) -> PyObject + + Returns the userData associated with this sizer item, or None if there + isn't any. + """ return _core_.SizerItem_GetUserData(*args, **kwargs) @@ -8559,34 +8703,69 @@ class SizerItemPtr(SizerItem): self.__class__ = SizerItem _core_.SizerItem_swigregister(SizerItemPtr) -def SizerItemSpacer(*args, **kwargs): +def SizerItemWindow(*args, **kwargs): """ - SizerItemSpacer(int width, int height, int proportion, int flag, int border, - Object userData) -> SizerItem + SizerItemWindow(Window window, int proportion, int flag, int border, + PyObject userData=None) -> SizerItem + + Constructs a `wx.SizerItem` for tracking a window. """ - val = _core_.new_SizerItemSpacer(*args, **kwargs) + val = _core_.new_SizerItemWindow(*args, **kwargs) val.thisown = 1 return val -def SizerItemWindow(*args, **kwargs): +def SizerItemSpacer(*args, **kwargs): """ - SizerItemWindow(Window window, int proportion, int flag, int border, - Object userData) -> SizerItem + SizerItemSpacer(int width, int height, int proportion, int flag, int border, + PyObject userData=None) -> SizerItem + + Constructs a `wx.SizerItem` for tracking a spacer. """ - val = _core_.new_SizerItemWindow(*args, **kwargs) + val = _core_.new_SizerItemSpacer(*args, **kwargs) val.thisown = 1 return val def SizerItemSizer(*args, **kwargs): """ SizerItemSizer(Sizer sizer, int proportion, int flag, int border, - Object userData) -> SizerItem + PyObject userData=None) -> SizerItem + + Constructs a `wx.SizerItem` for tracking a subsizer """ val = _core_.new_SizerItemSizer(*args, **kwargs) val.thisown = 1 return val class Sizer(Object): + """ + wx.Sizer is the abstract base class used for laying out subwindows in + a window. You cannot use wx.Sizer directly; instead, you will have to + use one of the sizer classes derived from it such as `wx.BoxSizer`, + `wx.StaticBoxSizer`, `wx.NotebookSizer`, `wx.GridSizer`, `wx.FlexGridSizer` + and `wx.GridBagSizer`. + + The concept implemented by sizers in wxWidgets is closely related to + layout tools in other GUI toolkits, such as Java's AWT, the GTK + toolkit or the Qt toolkit. It is based upon the idea of the individual + subwindows reporting their minimal required size and their ability to + get stretched if the size of the parent window has changed. This will + most often mean that the programmer does not set the original size of + a dialog in the beginning, rather the dialog will assigned a sizer and + this sizer will be queried about the recommended size. The sizer in + turn will query its children, which can be normal windows or contorls, + empty space or other sizers, so that a hierarchy of sizers can be + constructed. Note that wxSizer does not derive from wxWindow and thus + do not interfere with tab ordering and requires very little resources + compared to a real window on screen. + + What makes sizers so well fitted for use in wxWidgets is the fact that + every control reports its own minimal size and the algorithm can + handle differences in font sizes or different window (dialog item) + sizes on different platforms without problems. If for example the + standard font as well as the overall design of Mac widgets requires + more space than on Windows, then the initial size of a dialog using a + sizer will automatically be bigger on Mac than on Windows. + """ def __init__(self): raise RuntimeError, "No constructor defined" def __repr__(self): return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) @@ -8596,60 +8775,112 @@ class Sizer(Object): def Add(*args, **kwargs): """ - Add(self, PyObject item, int proportion=0, int flag=0, int border=0, + Add(self, item, int proportion=0, int flag=0, int border=0, PyObject userData=None) + + Appends a child item to the sizer. """ return _core_.Sizer_Add(*args, **kwargs) def Insert(*args, **kwargs): """ - Insert(self, int before, PyObject item, int proportion=0, int flag=0, - int border=0, PyObject userData=None) + Insert(self, int before, item, int proportion=0, int flag=0, int border=0, + PyObject userData=None) + + Inserts a new item into the list of items managed by this sizer before + the item at index *before*. See `Add` for a description of the parameters. """ return _core_.Sizer_Insert(*args, **kwargs) def Prepend(*args, **kwargs): """ - Prepend(self, PyObject item, int proportion=0, int flag=0, int border=0, + Prepend(self, item, int proportion=0, int flag=0, int border=0, PyObject userData=None) + + Adds a new item to the begining of the list of sizer items managed by + this sizer. See `Add` for a description of the parameters. """ return _core_.Sizer_Prepend(*args, **kwargs) def Remove(*args, **kwargs): - """Remove(self, PyObject item) -> bool""" + """ + Remove(self, item) -> bool + + Removes an item from the sizer and destroys it. This method does not + cause any layout or resizing to take place, call `Layout` to update + the layout on screen after removing a child from the sizer. The + *item* parameter can be either a window, a sizer, or the zero-based + index of an item to remove. Returns True if the child item was found + and removed. + """ return _core_.Sizer_Remove(*args, **kwargs) def Detach(*args, **kwargs): - """Detach(self, PyObject item) -> bool""" + """ + Detach(self, item) -> bool + + Detaches an item from the sizer without destroying it. This method + does not cause any layout or resizing to take place, call `Layout` to + do so. The *item* parameter can be either a window, a sizer, or the + zero-based index of the item to be detached. Returns True if the child item + was found and detached. + """ return _core_.Sizer_Detach(*args, **kwargs) def _SetItemMinSize(*args, **kwargs): """_SetItemMinSize(self, PyObject item, Size size)""" return _core_.Sizer__SetItemMinSize(*args, **kwargs) + def SetItemMinSize(self, item, *args): + """ + SetItemMinSize(self, item, Size size) + + Sets the minimum size that will be allocated for an item in the sizer. + The *item* parameter can be either a window, a sizer, or the + zero-based index of the item. If a window or sizer is given then it + will be searched for recursivly in subsizers if neccessary. + """ + if len(args) == 2: + # for backward compatibility accept separate width,height args too + return self._SetItemMinSize(item, args) + else: + return self._SetItemMinSize(item, args[0]) + def AddItem(*args, **kwargs): - """AddItem(self, SizerItem item)""" + """ + AddItem(self, SizerItem item) + + Adds a `wx.SizerItem` to the sizer. + """ return _core_.Sizer_AddItem(*args, **kwargs) def InsertItem(*args, **kwargs): - """InsertItem(self, size_t index, SizerItem item)""" + """ + InsertItem(self, int index, SizerItem item) + + Inserts a `wx.SizerItem` to the sizer at the position given by *index*. + """ return _core_.Sizer_InsertItem(*args, **kwargs) def PrependItem(*args, **kwargs): - """PrependItem(self, SizerItem item)""" + """ + PrependItem(self, SizerItem item) + + Prepends a `wx.SizerItem` to the sizer. + """ return _core_.Sizer_PrependItem(*args, **kwargs) - def AddMany(self, widgets): + def AddMany(self, items): """ AddMany is a convenience method for adding several items to a sizer at one time. Simply pass it a list of tuples, where each tuple consists of the parameters that you would normally pass to the `Add` method. """ - for childinfo in widgets: - if type(childinfo) != type(()) or (len(childinfo) == 2 and type(childinfo[0]) == type(1)): - childinfo = (childinfo, ) - self.Add(*childinfo) + for item in items: + if type(item) != type(()) or (len(item) == 2 and type(item[0]) == type(1)): + item = (item, ) + self.Add(*item) # for backwards compatibility only, please do not use in new code AddWindow = wx._deprecated(Add, "AddWindow is deprecated, use `Add` instead.") @@ -8666,30 +8897,53 @@ class Sizer(Object): RemovePos = wx._deprecated(Remove, "RemovePos is deprecated, use `Remove` instead.") - def SetItemMinSize(self, item, *args): - if len(args) == 2: - return self._SetItemMinSize(item, args) - else: - return self._SetItemMinSize(item, args[0]) - def SetDimension(*args, **kwargs): - """SetDimension(self, int x, int y, int width, int height)""" + """ + SetDimension(self, int x, int y, int width, int height) + + Call this to force the sizer to take the given dimension and thus + force the items owned by the sizer to resize themselves according to + the rules defined by the parameter in the `Add`, `Insert` or `Prepend` + methods. + """ return _core_.Sizer_SetDimension(*args, **kwargs) def SetMinSize(*args, **kwargs): - """SetMinSize(self, Size size)""" + """ + SetMinSize(self, Size size) + + Call this to give the sizer a minimal size. Normally, the sizer will + calculate its minimal size based purely on how much space its children + need. After calling this method `GetMinSize` will return either the + minimal size as requested by its children or the minimal size set + here, depending on which is bigger. + """ return _core_.Sizer_SetMinSize(*args, **kwargs) def GetSize(*args, **kwargs): - """GetSize(self) -> Size""" + """ + GetSize(self) -> Size + + Returns the current size of the space managed by the sizer. + """ return _core_.Sizer_GetSize(*args, **kwargs) def GetPosition(*args, **kwargs): - """GetPosition(self) -> Point""" + """ + GetPosition(self) -> Point + + Returns the current position of the sizer's managed space. + """ return _core_.Sizer_GetPosition(*args, **kwargs) def GetMinSize(*args, **kwargs): - """GetMinSize(self) -> Size""" + """ + GetMinSize(self) -> Size + + Returns the minimal size of the sizer. This is either the combined + minimal size of all the children and their borders or the minimal size + set by SetMinSize, depending on which is bigger. + """ return _core_.Sizer_GetMinSize(*args, **kwargs) def GetSizeTuple(self): @@ -8700,59 +8954,150 @@ class Sizer(Object): return self.GetMinSize().Get() def RecalcSizes(*args, **kwargs): - """RecalcSizes(self)""" + """ + RecalcSizes(self) + + Using the sizes calculated by `CalcMin` reposition and resize all the + items managed by this sizer. You should not need to call this directly as + it is called by `Layout`. + """ return _core_.Sizer_RecalcSizes(*args, **kwargs) def CalcMin(*args, **kwargs): - """CalcMin(self) -> Size""" + """ + CalcMin(self) -> Size + + This method is where the sizer will do the actual calculation of its + children's minimal sizes. You should not need to call this directly as + it is called by `Layout`. + """ return _core_.Sizer_CalcMin(*args, **kwargs) def Layout(*args, **kwargs): - """Layout(self)""" + """ + Layout(self) + + This method will force the recalculation and layout of the items + controlled by the sizer using the current space allocated to the + sizer. Normally this is called automatically from the owning window's + EVT_SIZE handler, but it is also useful to call it from user code when + one of the items in a sizer change size, or items are added or + removed. + """ return _core_.Sizer_Layout(*args, **kwargs) def Fit(*args, **kwargs): - """Fit(self, Window window) -> Size""" + """ + Fit(self, Window window) -> Size + + Tell the sizer to resize the *window* to match the sizer's minimal + size. This is commonly done in the constructor of the window itself in + order to set its initial size to match the needs of the children as + determined by the sizer. Returns the new size. + + For a top level window this is the total window size, not the client size. + """ return _core_.Sizer_Fit(*args, **kwargs) def FitInside(*args, **kwargs): - """FitInside(self, Window window)""" + """ + FitInside(self, Window window) + + Tell the sizer to resize the *virtual size* of the *window* to match the + sizer's minimal size. This will not alter the on screen size of the + window, but may cause the addition/removal/alteration of scrollbars + required to view the virtual area in windows which manage it. + + :see: `wx.ScrolledWindow.SetScrollbars`, `SetVirtualSizeHints` + + """ return _core_.Sizer_FitInside(*args, **kwargs) def SetSizeHints(*args, **kwargs): - """SetSizeHints(self, Window window)""" + """ + SetSizeHints(self, Window window) + + Tell the sizer to set (and `Fit`) the minimal size of the *window* to + match the sizer's minimal size. This is commonly done in the + constructor of the window itself if the window is resizable (as are + many dialogs under Unix and frames on probably all platforms) in order + to prevent the window from being sized smaller than the minimal size + required by the sizer. + """ return _core_.Sizer_SetSizeHints(*args, **kwargs) def SetVirtualSizeHints(*args, **kwargs): - """SetVirtualSizeHints(self, Window window)""" + """ + SetVirtualSizeHints(self, Window window) + + Tell the sizer to set the minimal size of the window virtual area to + match the sizer's minimal size. For windows with managed scrollbars + this will set them appropriately. + + :see: `wx.ScrolledWindow.SetScrollbars` + + """ return _core_.Sizer_SetVirtualSizeHints(*args, **kwargs) def Clear(*args, **kwargs): - """Clear(self, bool delete_windows=False)""" + """ + Clear(self, bool deleteWindows=False) + + Clear all items from the sizer, optionally destroying the window items + as well. + """ return _core_.Sizer_Clear(*args, **kwargs) def DeleteWindows(*args, **kwargs): - """DeleteWindows(self)""" + """ + DeleteWindows(self) + + Destroy all windows managed by the sizer. + """ return _core_.Sizer_DeleteWindows(*args, **kwargs) def GetChildren(*args, **kwargs): - """GetChildren(self) -> PyObject""" + """ + GetChildren(sefl) -> list + + Returns a list of all the `wx.SizerItem` objects managed by the sizer. + """ return _core_.Sizer_GetChildren(*args, **kwargs) def Show(*args, **kwargs): - """Show(self, PyObject item, bool show=True)""" - return _core_.Sizer_Show(*args, **kwargs) + """ + Show(self, item, bool show=True) - def Hide(*args, **kwargs): - """Hide(self, PyObject item)""" - return _core_.Sizer_Hide(*args, **kwargs) + Shows or hides an item managed by the sizer. To make a sizer item + disappear or reappear, use Show followed by `Layout`. The *item* + parameter can be either a window, a sizer, or the zero-based index of + the item. + """ + return _core_.Sizer_Show(*args, **kwargs) def IsShown(*args, **kwargs): - """IsShown(self, PyObject item) -> bool""" + """ + IsShown(self, item) + + Determines if the item is currently shown. sizer. To make a sizer + item disappear or reappear, use Show followed by `Layout`. The *item* + parameter can be either a window, a sizer, or the zero-based index of + the item. + """ return _core_.Sizer_IsShown(*args, **kwargs) + def Hide(self, item): + """ + A convenience method for Show(item, False). + """ + self.Show(item, False) + def ShowItems(*args, **kwargs): - """ShowItems(self, bool show)""" + """ + ShowItems(self, bool show) + + Recursively call `wx.Window.Show` on all sizer items. + """ return _core_.Sizer_ShowItems(*args, **kwargs) @@ -8764,10 +9109,56 @@ class SizerPtr(Sizer): _core_.Sizer_swigregister(SizerPtr) class PySizer(Sizer): + """ + wx.PySizer is a special version of `wx.Sizer` that has been + instrumented to allow the C++ virtual methods to be overloaded in + Python derived classes. You would derive from this class if you are + wanting to implement a custom sizer in Python code. Simply implement + `CalcMin` and `RecalcSizes` in the derived class and you're all set. + For example:: + + class MySizer(wx.PySizer): + def __init__(self): + wx.PySizer.__init__(self) + + def CalcMin(self): + for item in self.GetChildren(): + # calculate the total minimum width and height needed + # by all items in the sizer according to this sizer's + # layout algorithm. + ... + return wx.Size(width, height) + + def RecalcSizes(self): + # find the space allotted to this sizer + pos = self.GetPosition() + size = self.GetSize() + for item in self.GetChildren(): + # Recalculate (if necessary) the position and size of + # each item and then call item.SetDimension to do the + # actual positioning and sizing of the items within the + # space alloted to this sizer. + ... + item.SetDimension(itemPos, itemSize) + + + When `Layout` is called it first calls `CalcMin` followed by + `RecalcSizes` so you can optimize a bit by saving the results of + `CalcMin` and resuing them in `RecalcSizes`. + + :see: `wx.SizerItem`, `wx.Sizer.GetChildren` + + + """ def __repr__(self): return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): - """__init__(self) -> PySizer""" + """ + __init__(self) -> PySizer + + Creates a wx.PySizer. Must be called from the __init__ in the derived + class. + """ newobj = _core_.new_PySizer(*args, **kwargs) self.this = newobj.this self.thisown = 1 @@ -8789,10 +9180,23 @@ _core_.PySizer_swigregister(PySizerPtr) #--------------------------------------------------------------------------- class BoxSizer(Sizer): + """ + The basic idea behind a box sizer is that windows will most often be + laid out in rather simple basic geometry, typically in a row or a + column or nested hierarchies of either. A wx.BoxSizer will lay out + its items in a simple row or column, depending on the orientation + parameter passed to the constructor. + """ def __repr__(self): return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): - """__init__(self, int orient=HORIZONTAL) -> BoxSizer""" + """ + __init__(self, int orient=HORIZONTAL) -> BoxSizer + + Constructor for a wx.BoxSizer. *orient* may be one of ``wx.VERTICAL`` + or ``wx.HORIZONTAL`` for creating either a column sizer or a row + sizer. + """ newobj = _core_.new_BoxSizer(*args, **kwargs) self.this = newobj.this self.thisown = 1 @@ -8800,20 +9204,20 @@ class BoxSizer(Sizer): self._setOORInfo(self) def GetOrientation(*args, **kwargs): - """GetOrientation(self) -> int""" + """ + GetOrientation(self) -> int + + Returns the current orientation of the sizer. + """ return _core_.BoxSizer_GetOrientation(*args, **kwargs) def SetOrientation(*args, **kwargs): - """SetOrientation(self, int orient)""" - return _core_.BoxSizer_SetOrientation(*args, **kwargs) - - def RecalcSizes(*args, **kwargs): - """RecalcSizes(self)""" - return _core_.BoxSizer_RecalcSizes(*args, **kwargs) + """ + SetOrientation(self, int orient) - def CalcMin(*args, **kwargs): - """CalcMin(self) -> Size""" - return _core_.BoxSizer_CalcMin(*args, **kwargs) + Resets the orientation of the sizer. + """ + return _core_.BoxSizer_SetOrientation(*args, **kwargs) class BoxSizerPtr(BoxSizer): @@ -8826,10 +9230,22 @@ _core_.BoxSizer_swigregister(BoxSizerPtr) #--------------------------------------------------------------------------- class StaticBoxSizer(BoxSizer): + """ + wx.StaticBoxSizer derives from and functions identically to the + `wx.BoxSizer` and adds a `wx.StaticBox` around the items that the sizer + manages. Note that this static box must be created separately and + passed to the sizer constructor. + """ def __repr__(self): return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): - """__init__(self, wxStaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer""" + """ + __init__(self, StaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer + + Constructor. It takes an associated static box and the orientation + *orient* as parameters - orient can be either of ``wx.VERTICAL`` or + ``wx.HORIZONTAL``. + """ newobj = _core_.new_StaticBoxSizer(*args, **kwargs) self.this = newobj.this self.thisown = 1 @@ -8837,16 +9253,12 @@ class StaticBoxSizer(BoxSizer): self._setOORInfo(self) def GetStaticBox(*args, **kwargs): - """GetStaticBox(self) -> wxStaticBox""" - return _core_.StaticBoxSizer_GetStaticBox(*args, **kwargs) - - def RecalcSizes(*args, **kwargs): - """RecalcSizes(self)""" - return _core_.StaticBoxSizer_RecalcSizes(*args, **kwargs) + """ + GetStaticBox(self) -> StaticBox - def CalcMin(*args, **kwargs): - """CalcMin(self) -> Size""" - return _core_.StaticBoxSizer_CalcMin(*args, **kwargs) + Returns the static box associated with this sizer. + """ + return _core_.StaticBoxSizer_GetStaticBox(*args, **kwargs) class StaticBoxSizerPtr(StaticBoxSizer): @@ -8859,54 +9271,102 @@ _core_.StaticBoxSizer_swigregister(StaticBoxSizerPtr) #--------------------------------------------------------------------------- class GridSizer(Sizer): + """ + A grid sizer is a sizer which lays out its children in a + two-dimensional table with all cells having the same size. In other + words, the width of each cell within the grid is the width of the + widest item added to the sizer and the height of each grid cell is the + height of the tallest item. An optional vertical and/or horizontal + gap between items can also be specified (in pixels.) + + Items are placed in the cells of the grid in the order they are added, + in row-major order. In other words, the first row is filled first, + then the second, and so on until all items have been added. (If + neccessary, additional rows will be added as items are added.) If you + need to have greater control over the cells that items are placed in + then use the `wx.GridBagSizer`. + + """ def __repr__(self): return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): - """__init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer""" + """ + __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer + + Constructor for a wx.GridSizer. *rows* and *cols* determine the number + of columns and rows in the sizer - if either of the parameters is + zero, it will be calculated to from the total number of children in + the sizer, thus making the sizer grow dynamically. *vgap* and *hgap* + define extra space between all children. + """ newobj = _core_.new_GridSizer(*args, **kwargs) self.this = newobj.this self.thisown = 1 del newobj.thisown self._setOORInfo(self) - def RecalcSizes(*args, **kwargs): - """RecalcSizes(self)""" - return _core_.GridSizer_RecalcSizes(*args, **kwargs) - - def CalcMin(*args, **kwargs): - """CalcMin(self) -> Size""" - return _core_.GridSizer_CalcMin(*args, **kwargs) - def SetCols(*args, **kwargs): - """SetCols(self, int cols)""" + """ + SetCols(self, int cols) + + Sets the number of columns in the sizer. + """ return _core_.GridSizer_SetCols(*args, **kwargs) def SetRows(*args, **kwargs): - """SetRows(self, int rows)""" + """ + SetRows(self, int rows) + + Sets the number of rows in the sizer. + """ return _core_.GridSizer_SetRows(*args, **kwargs) def SetVGap(*args, **kwargs): - """SetVGap(self, int gap)""" + """ + SetVGap(self, int gap) + + Sets the vertical gap (in pixels) between the cells in the sizer. + """ return _core_.GridSizer_SetVGap(*args, **kwargs) def SetHGap(*args, **kwargs): - """SetHGap(self, int gap)""" + """ + SetHGap(self, int gap) + + Sets the horizontal gap (in pixels) between cells in the sizer + """ return _core_.GridSizer_SetHGap(*args, **kwargs) def GetCols(*args, **kwargs): - """GetCols(self) -> int""" + """ + GetCols(self) -> int + + Returns the number of columns in the sizer. + """ return _core_.GridSizer_GetCols(*args, **kwargs) def GetRows(*args, **kwargs): - """GetRows(self) -> int""" + """ + GetRows(self) -> int + + Returns the number of rows in the sizer. + """ return _core_.GridSizer_GetRows(*args, **kwargs) def GetVGap(*args, **kwargs): - """GetVGap(self) -> int""" + """ + GetVGap(self) -> int + + Returns the vertical gap (in pixels) between the cells in the sizer. + """ return _core_.GridSizer_GetVGap(*args, **kwargs) def GetHGap(*args, **kwargs): - """GetHGap(self) -> int""" + """ + GetHGap(self) -> int + + Returns the horizontal gap (in pixels) between cells in the sizer. + """ return _core_.GridSizer_GetHGap(*args, **kwargs) @@ -8923,62 +9383,155 @@ FLEX_GROWMODE_NONE = _core_.FLEX_GROWMODE_NONE FLEX_GROWMODE_SPECIFIED = _core_.FLEX_GROWMODE_SPECIFIED FLEX_GROWMODE_ALL = _core_.FLEX_GROWMODE_ALL class FlexGridSizer(GridSizer): + """ + A flex grid sizer is a sizer which lays out its children in a + two-dimensional table with all table cells in one row having the same + height and all cells in one column having the same width, but all + rows or all columns are not necessarily the same height or width as in + the `wx.GridSizer`. + + wx.FlexGridSizer can also size items equally in one direction but + unequally ("flexibly") in the other. If the sizer is only flexible + in one direction (this can be changed using `SetFlexibleDirection`), it + needs to be decided how the sizer should grow in the other ("non + flexible") direction in order to fill the available space. The + `SetNonFlexibleGrowMode` method serves this purpose. + + + """ def __repr__(self): return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): - """__init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer""" + """ + __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer + + Constructor for a wx.FlexGridSizer. *rows* and *cols* determine the + number of columns and rows in the sizer - if either of the parameters + is zero, it will be calculated to from the total number of children in + the sizer, thus making the sizer grow dynamically. *vgap* and *hgap* + define extra space between all children. + """ newobj = _core_.new_FlexGridSizer(*args, **kwargs) self.this = newobj.this self.thisown = 1 del newobj.thisown self._setOORInfo(self) - def RecalcSizes(*args, **kwargs): - """RecalcSizes(self)""" - return _core_.FlexGridSizer_RecalcSizes(*args, **kwargs) + def AddGrowableRow(*args, **kwargs): + """ + AddGrowableRow(self, size_t idx, int proportion=0) - def CalcMin(*args, **kwargs): - """CalcMin(self) -> Size""" - return _core_.FlexGridSizer_CalcMin(*args, **kwargs) + Specifies that row *idx* (starting from zero) should be grown if there + is extra space available to the sizer. - def AddGrowableRow(*args, **kwargs): - """AddGrowableRow(self, size_t idx, int proportion=0)""" + The *proportion* parameter has the same meaning as the stretch factor + for the box sizers except that if all proportions are 0, then all + columns are resized equally (instead of not being resized at all). + """ return _core_.FlexGridSizer_AddGrowableRow(*args, **kwargs) def RemoveGrowableRow(*args, **kwargs): - """RemoveGrowableRow(self, size_t idx)""" + """ + RemoveGrowableRow(self, size_t idx) + + Specifies that row *idx* is no longer growable. + """ return _core_.FlexGridSizer_RemoveGrowableRow(*args, **kwargs) def AddGrowableCol(*args, **kwargs): - """AddGrowableCol(self, size_t idx, int proportion=0)""" + """ + AddGrowableCol(self, size_t idx, int proportion=0) + + Specifies that column *idx* (starting from zero) should be grown if + there is extra space available to the sizer. + + The *proportion* parameter has the same meaning as the stretch factor + for the box sizers except that if all proportions are 0, then all + columns are resized equally (instead of not being resized at all). + """ return _core_.FlexGridSizer_AddGrowableCol(*args, **kwargs) def RemoveGrowableCol(*args, **kwargs): - """RemoveGrowableCol(self, size_t idx)""" + """ + RemoveGrowableCol(self, size_t idx) + + Specifies that column *idx* is no longer growable. + """ return _core_.FlexGridSizer_RemoveGrowableCol(*args, **kwargs) def SetFlexibleDirection(*args, **kwargs): - """SetFlexibleDirection(self, int direction)""" + """ + SetFlexibleDirection(self, int direction) + + Specifies whether the sizer should flexibly resize its columns, rows, + or both. Argument *direction* can be one of the following values. Any + other value is ignored. + + ============== ======================================= + wx.VERTICAL Rows are flexibly sized. + wx.HORIZONTAL Columns are flexibly sized. + wx.BOTH Both rows and columns are flexibly sized + (this is the default value). + ============== ======================================= + + Note that this method does not trigger relayout. + + """ return _core_.FlexGridSizer_SetFlexibleDirection(*args, **kwargs) def GetFlexibleDirection(*args, **kwargs): - """GetFlexibleDirection(self) -> int""" + """ + GetFlexibleDirection(self) -> int + + Returns a value that specifies whether the sizer + flexibly resizes its columns, rows, or both (default). + + :see: `SetFlexibleDirection` + """ return _core_.FlexGridSizer_GetFlexibleDirection(*args, **kwargs) def SetNonFlexibleGrowMode(*args, **kwargs): - """SetNonFlexibleGrowMode(self, int mode)""" + """ + SetNonFlexibleGrowMode(self, int mode) + + Specifies how the sizer should grow in the non-flexible direction if + there is one (so `SetFlexibleDirection` must have been called + previously). Argument *mode* can be one of the following values: + + ========================== ================================================= + wx.FLEX_GROWMODE_NONE Sizer doesn't grow in the non flexible direction. + wx.FLEX_GROWMODE_SPECIFIED Sizer honors growable columns/rows set with + `AddGrowableCol` and `AddGrowableRow`. In this + case equal sizing applies to minimum sizes of + columns or rows (this is the default value). + wx.FLEX_GROWMODE_ALL Sizer equally stretches all columns or rows in + the non flexible direction, whether they are + growable or not in the flexbile direction. + ========================== ================================================= + + Note that this method does not trigger relayout. + + + """ return _core_.FlexGridSizer_SetNonFlexibleGrowMode(*args, **kwargs) def GetNonFlexibleGrowMode(*args, **kwargs): - """GetNonFlexibleGrowMode(self) -> int""" + """ + GetNonFlexibleGrowMode(self) -> int + + Returns the value that specifies how the sizer grows in the + non-flexible direction if there is one. + + :see: `SetNonFlexibleGrowMode` + """ return _core_.FlexGridSizer_GetNonFlexibleGrowMode(*args, **kwargs) def GetRowHeights(*args, **kwargs): - """GetRowHeights(self) -> wxArrayInt""" + """GetRowHeights(self) -> list""" return _core_.FlexGridSizer_GetRowHeights(*args, **kwargs) def GetColWidths(*args, **kwargs): - """GetColWidths(self) -> wxArrayInt""" + """GetColWidths(self) -> list""" return _core_.FlexGridSizer_GetColWidths(*args, **kwargs) @@ -8992,10 +9545,25 @@ _core_.FlexGridSizer_swigregister(FlexGridSizerPtr) #--------------------------------------------------------------------------- class GBPosition(object): + """ + This class represents the position of an item in a virtual grid of + rows and columns managed by a `wx.GridBagSizer`. wxPython has + typemaps that will automatically convert from a 2-element sequence of + integers to a wx.GBPosition, so you can use the more pythonic + representation of the position nearly transparently in Python code. + """ def __repr__(self): return "<%s.%s; proxy of C++ wxGBPosition instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): - """__init__(self, int row=0, int col=0) -> GBPosition""" + """ + __init__(self, int row=0, int col=0) -> GBPosition + + This class represents the position of an item in a virtual grid of + rows and columns managed by a `wx.GridBagSizer`. wxPython has + typemaps that will automatically convert from a 2-element sequence of + integers to a wx.GBPosition, so you can use the more pythonic + representation of the position nearly transparently in Python code. + """ newobj = _core_.new_GBPosition(*args, **kwargs) self.this = newobj.this self.thisown = 1 @@ -9057,10 +9625,24 @@ class GBPositionPtr(GBPosition): _core_.GBPosition_swigregister(GBPositionPtr) class GBSpan(object): + """ + This class is used to hold the row and column spanning attributes of + items in a `wx.GridBagSizer`. wxPython has typemaps that will + automatically convert from a 2-element sequence of integers to a + wx.GBSpan, so you can use the more pythonic representation of the span + nearly transparently in Python code. + + """ def __repr__(self): return "<%s.%s; proxy of C++ wxGBSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): - """__init__(self, int rowspan=1, int colspan=1) -> GBSpan""" + """ + __init__(self, int rowspan=1, int colspan=1) -> GBSpan + + Construct a new wxGBSpan, optionally setting the rowspan and + colspan. The default is (1,1). (Meaning that the item occupies one + cell in each direction. + """ newobj = _core_.new_GBSpan(*args, **kwargs) self.this = newobj.this self.thisown = 1 @@ -9122,49 +9704,108 @@ class GBSpanPtr(GBSpan): _core_.GBSpan_swigregister(GBSpanPtr) class GBSizerItem(SizerItem): + """ + The wx.GBSizerItem class is used to track the additional data about + items in a `wx.GridBagSizer` such as the item's position in the grid + and how many rows or columns it spans. + + """ def __repr__(self): return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): - """__init__(self) -> GBSizerItem""" + """ + __init__(self) -> GBSizerItem + + Constructs an empty wx.GBSizerItem. Either a window, sizer or spacer + size will need to be set, as well as a position and span before this + item can be used in a Sizer. + + You will probably never need to create a wx.GBSizerItem directly as they + are created automatically when the sizer's Add method is called. + """ newobj = _core_.new_GBSizerItem(*args, **kwargs) self.this = newobj.this self.thisown = 1 del newobj.thisown def GetPos(*args, **kwargs): - """GetPos(self) -> GBPosition""" + """ + GetPos(self) -> GBPosition + + Get the grid position of the item + """ return _core_.GBSizerItem_GetPos(*args, **kwargs) def GetPosTuple(self): return self.GetPos().Get() def GetSpan(*args, **kwargs): - """GetSpan(self) -> GBSpan""" + """ + GetSpan(self) -> GBSpan + + Get the row and column spanning of the item + """ return _core_.GBSizerItem_GetSpan(*args, **kwargs) def GetSpanTuple(self): return self.GetSpan().Get() def SetPos(*args, **kwargs): - """SetPos(self, GBPosition pos) -> bool""" + """ + SetPos(self, GBPosition pos) -> bool + + If the item is already a member of a sizer then first ensure that + there is no other item that would intersect with this one at the new + position, then set the new position. Returns True if the change is + successful and after the next Layout() the item will be moved. + """ return _core_.GBSizerItem_SetPos(*args, **kwargs) def SetSpan(*args, **kwargs): - """SetSpan(self, GBSpan span) -> bool""" + """ + SetSpan(self, GBSpan span) -> bool + + If the item is already a member of a sizer then first ensure that + there is no other item that would intersect with this one with its new + spanning size, then set the new spanning. Returns True if the change + is successful and after the next Layout() the item will be resized. + + """ return _core_.GBSizerItem_SetSpan(*args, **kwargs) - def Intersects(*args): + def Intersects(*args, **kwargs): """ Intersects(self, GBSizerItem other) -> bool - Intersects(self, GBPosition pos, GBSpan span) -> bool + + Returns True if this item and the other item instersect. """ - return _core_.GBSizerItem_Intersects(*args) + return _core_.GBSizerItem_Intersects(*args, **kwargs) + + def IntersectsPos(*args, **kwargs): + """ + IntersectsPos(self, GBPosition pos, GBSpan span) -> bool + + Returns True if the given pos/span would intersect with this item. + """ + return _core_.GBSizerItem_IntersectsPos(*args, **kwargs) def GetEndPos(*args, **kwargs): - """GetEndPos(self, int row, int col)""" + """ + GetEndPos(self) -> GBPosition + + Get the row and column of the endpoint of this item. + """ return _core_.GBSizerItem_GetEndPos(*args, **kwargs) def GetGBSizer(*args, **kwargs): - """GetGBSizer(self) -> GridBagSizer""" + """ + GetGBSizer(self) -> GridBagSizer + + Get the sizer this item is a member of. + """ return _core_.GBSizerItem_GetGBSizer(*args, **kwargs) def SetGBSizer(*args, **kwargs): - """SetGBSizer(self, GridBagSizer sizer)""" + """ + SetGBSizer(self, GridBagSizer sizer) + + Set the sizer this item is a member of. + """ return _core_.GBSizerItem_SetGBSizer(*args, **kwargs) @@ -9179,7 +9820,9 @@ DefaultSpan = cvar.DefaultSpan def GBSizerItemWindow(*args, **kwargs): """ GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag, - int border, Object userData) -> GBSizerItem + int border, PyObject userData=None) -> GBSizerItem + + Construct a `wx.GBSizerItem` for a window. """ val = _core_.new_GBSizerItemWindow(*args, **kwargs) val.thisown = 1 @@ -9188,7 +9831,9 @@ def GBSizerItemWindow(*args, **kwargs): def GBSizerItemSizer(*args, **kwargs): """ GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag, - int border, Object userData) -> GBSizerItem + int border, PyObject userData=None) -> GBSizerItem + + Construct a `wx.GBSizerItem` for a sizer """ val = _core_.new_GBSizerItemSizer(*args, **kwargs) val.thisown = 1 @@ -9197,105 +9842,174 @@ def GBSizerItemSizer(*args, **kwargs): def GBSizerItemSpacer(*args, **kwargs): """ GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span, - int flag, int border, Object userData) -> GBSizerItem + int flag, int border, PyObject userData=None) -> GBSizerItem + + Construct a `wx.GBSizerItem` for a spacer. """ val = _core_.new_GBSizerItemSpacer(*args, **kwargs) val.thisown = 1 return val class GridBagSizer(FlexGridSizer): + """ + A `wx.Sizer` that can lay out items in a virtual grid like a + `wx.FlexGridSizer` but in this case explicit positioning of the items + is allowed using `wx.GBPosition`, and items can optionally span more + than one row and/or column using `wx.GBSpan`. The total size of the + virtual grid is determined by the largest row and column that items are + positioned at, adjusted for spanning. + + """ def __repr__(self): return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): - """__init__(self, int vgap=0, int hgap=0) -> GridBagSizer""" + """ + __init__(self, int vgap=0, int hgap=0) -> GridBagSizer + + Constructor, with optional parameters to specify the gap between the + rows and columns. + """ newobj = _core_.new_GridBagSizer(*args, **kwargs) self.this = newobj.this self.thisown = 1 del newobj.thisown def Add(*args, **kwargs): """ - Add(self, PyObject item, GBPosition pos, GBSpan span=DefaultSpan, - int flag=0, int border=0, PyObject userData=None) -> bool + Add(self, item, GBPosition pos, GBSpan span=DefaultSpan, int flag=0, + int border=0, userData=None) + + Adds an item to the sizer at the grid cell *pos*, optionally spanning + more than one row or column as specified with *span*. The remaining + args behave similarly to `wx.Sizer.Add`. + + Returns True if the item was successfully placed at the given cell + position, False if something was already there. + """ return _core_.GridBagSizer_Add(*args, **kwargs) def AddItem(*args, **kwargs): - """AddItem(self, GBSizerItem item) -> bool""" + """ + Add(self, GBSizerItem item) -> bool + + Add an item to the sizer using a `wx.GBSizerItem`. Returns True if + the item was successfully placed at its given cell position, False if + something was already there. + """ return _core_.GridBagSizer_AddItem(*args, **kwargs) def GetEmptyCellSize(*args, **kwargs): - """GetEmptyCellSize(self) -> Size""" + """ + GetEmptyCellSize(self) -> Size + + Get the size used for cells in the grid with no item. + """ return _core_.GridBagSizer_GetEmptyCellSize(*args, **kwargs) def SetEmptyCellSize(*args, **kwargs): - """SetEmptyCellSize(self, Size sz)""" + """ + SetEmptyCellSize(self, Size sz) + + Set the size used for cells in the grid with no item. + """ return _core_.GridBagSizer_SetEmptyCellSize(*args, **kwargs) def GetItemPosition(*args): """ - GetItemPosition(self, Window window) -> GBPosition - GetItemPosition(self, Sizer sizer) -> GBPosition - GetItemPosition(self, size_t index) -> GBPosition + GetItemPosition(self, item) -> GBPosition + + Get the grid position of the specified *item* where *item* is either a + window or subsizer that is a member of this sizer, or a zero-based + index of an item. """ return _core_.GridBagSizer_GetItemPosition(*args) def SetItemPosition(*args): """ - SetItemPosition(self, Window window, GBPosition pos) -> bool - SetItemPosition(self, Sizer sizer, GBPosition pos) -> bool - SetItemPosition(self, size_t index, GBPosition pos) -> bool + SetItemPosition(self, item, GBPosition pos) -> bool + + Set the grid position of the specified *item* where *item* is either a + window or subsizer that is a member of this sizer, or a zero-based + index of an item. Returns True on success. If the move is not + allowed (because an item is already there) then False is returned. + """ return _core_.GridBagSizer_SetItemPosition(*args) def GetItemSpan(*args): """ - GetItemSpan(self, Window window) -> GBSpan - GetItemSpan(self, Sizer sizer) -> GBSpan - GetItemSpan(self, size_t index) -> GBSpan + GetItemSpan(self, item) -> GBSpan + + Get the row/col spanning of the specified *item* where *item* is + either a window or subsizer that is a member of this sizer, or a + zero-based index of an item. """ return _core_.GridBagSizer_GetItemSpan(*args) def SetItemSpan(*args): """ - SetItemSpan(self, Window window, GBSpan span) -> bool - SetItemSpan(self, Sizer sizer, GBSpan span) -> bool - SetItemSpan(self, size_t index, GBSpan span) -> bool + SetItemSpan(self, item, GBSpan span) -> bool + + Set the row/col spanning of the specified *item* where *item* is + either a window or subsizer that is a member of this sizer, or a + zero-based index of an item. Returns True on success. If the move is + not allowed (because an item is already there) then False is returned. """ return _core_.GridBagSizer_SetItemSpan(*args) def FindItem(*args): """ - FindItem(self, Window window) -> GBSizerItem - FindItem(self, Sizer sizer) -> GBSizerItem + FindItem(self, item) -> GBSizerItem + + Find the sizer item for the given window or subsizer, returns None if + not found. (non-recursive) """ return _core_.GridBagSizer_FindItem(*args) def FindItemAtPosition(*args, **kwargs): - """FindItemAtPosition(self, GBPosition pos) -> GBSizerItem""" + """ + FindItemAtPosition(self, GBPosition pos) -> GBSizerItem + + Return the sizer item for the given grid cell, or None if there is no + item at that position. (non-recursive) + """ return _core_.GridBagSizer_FindItemAtPosition(*args, **kwargs) def FindItemAtPoint(*args, **kwargs): - """FindItemAtPoint(self, Point pt) -> GBSizerItem""" + """ + FindItemAtPoint(self, Point pt) -> GBSizerItem + + Return the sizer item located at the point given in *pt*, or None if + there is no item at that point. The (x,y) coordinates in pt correspond + to the client coordinates of the window using the sizer for + layout. (non-recursive) + """ return _core_.GridBagSizer_FindItemAtPoint(*args, **kwargs) - def FindItemWithData(*args, **kwargs): - """FindItemWithData(self, Object userData) -> GBSizerItem""" - return _core_.GridBagSizer_FindItemWithData(*args, **kwargs) + def CheckForIntersection(*args, **kwargs): + """ + CheckForIntersection(self, GBSizerItem item, GBSizerItem excludeItem=None) -> bool - def RecalcSizes(*args, **kwargs): - """RecalcSizes(self)""" - return _core_.GridBagSizer_RecalcSizes(*args, **kwargs) + Look at all items and see if any intersect (or would overlap) the + given *item*. Returns True if so, False if there would be no overlap. + If an *excludeItem* is given then it will not be checked for + intersection, for example it may be the item we are checking the + position of. - def CalcMin(*args, **kwargs): - """CalcMin(self) -> Size""" - return _core_.GridBagSizer_CalcMin(*args, **kwargs) + """ + return _core_.GridBagSizer_CheckForIntersection(*args, **kwargs) - def CheckForIntersection(*args): + def CheckForIntersectionPos(*args, **kwargs): """ - CheckForIntersection(self, GBSizerItem item, GBSizerItem excludeItem=None) -> bool - CheckForIntersection(self, GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool + CheckForIntersectionPos(self, GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool + + Look at all items and see if any intersect (or would overlap) the + given position and span. Returns True if so, False if there would be + no overlap. If an *excludeItem* is given then it will not be checked + for intersection, for example it may be the item we are checking the + position of. """ - return _core_.GridBagSizer_CheckForIntersection(*args) + return _core_.GridBagSizer_CheckForIntersectionPos(*args, **kwargs) class GridBagSizerPtr(GridBagSizer): diff --git a/wxPython/src/msw/_core_wrap.cpp b/wxPython/src/msw/_core_wrap.cpp index 6849a94776..e4a6d1889c 100644 --- a/wxPython/src/msw/_core_wrap.cpp +++ b/wxPython/src/msw/_core_wrap.cpp @@ -1454,6 +1454,33 @@ void wxItemContainer_SetClientData(wxItemContainer *self,int n,PyObject *clientD } +wxSizerItem *new_wxSizerItem(wxWindow *window,int proportion,int flag,int border,PyObject *userData){ + wxPyUserData* data = NULL; + if ( userData ) { + bool blocked = wxPyBeginBlockThreads(); + data = new wxPyUserData(userData); + wxPyEndBlockThreads(blocked); + } + return new wxSizerItem(window, proportion, flag, border, data); + } +wxSizerItem *new_wxSizerItem(int width,int height,int proportion,int flag,int border,PyObject *userData){ + wxPyUserData* data = NULL; + if ( userData ) { + bool blocked = wxPyBeginBlockThreads(); + data = new wxPyUserData(userData); + wxPyEndBlockThreads(blocked); + } + return new wxSizerItem(width, height, proportion, flag, border, data); + } +wxSizerItem *new_wxSizerItem(wxSizer *sizer,int proportion,int flag,int border,PyObject *userData){ + wxPyUserData* data = NULL; + if ( userData ) { + bool blocked = wxPyBeginBlockThreads(); + data = new wxPyUserData(userData); + wxPyEndBlockThreads(blocked); + } + return new wxSizerItem(sizer, proportion, flag, border, data); + } #include @@ -1675,21 +1702,14 @@ PyObject *wxSizer_GetChildren(wxSizer *self){ } void wxSizer_Show(wxSizer *self,PyObject *item,bool show){ bool blocked = wxPyBeginBlockThreads(); - wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, False, False); + wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, False, True); wxPyEndBlockThreads(blocked); if ( info.window ) self->Show(info.window, show); else if ( info.sizer ) self->Show(info.sizer, show); - } -void wxSizer_Hide(wxSizer *self,PyObject *item){ - bool blocked = wxPyBeginBlockThreads(); - wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, False, False); - wxPyEndBlockThreads(blocked); - if ( info.window ) - self->Hide(info.window); - else if ( info.sizer ) - self->Hide(info.sizer); + else if ( info.gotPos ) + self->Show(info.pos, show); } bool wxSizer_IsShown(wxSizer *self,PyObject *item){ bool blocked = wxPyBeginBlockThreads(); @@ -1699,6 +1719,8 @@ bool wxSizer_IsShown(wxSizer *self,PyObject *item){ return self->IsShown(info.window); else if ( info.sizer ) return self->IsShown(info.sizer); + else if ( info.gotPos ) + return self->IsShown(info.pos); else return False; } @@ -1754,6 +1776,38 @@ PyObject *wxGBSpan_Get(wxGBSpan *self){ wxPyEndBlockThreads(blocked); return tup; } +wxGBSizerItem *new_wxGBSizerItem(wxWindow *window,wxGBPosition const &pos,wxGBSpan const &span,int flag,int border,PyObject *userData){ + wxPyUserData* data = NULL; + if ( userData ) { + bool blocked = wxPyBeginBlockThreads(); + data = new wxPyUserData(userData); + wxPyEndBlockThreads(blocked); + } + return new wxGBSizerItem(window, pos, span, flag, border, data); + } +wxGBSizerItem *new_wxGBSizerItem(wxSizer *sizer,wxGBPosition const &pos,wxGBSpan const &span,int flag,int border,PyObject *userData){ + wxPyUserData* data = NULL; + if ( userData ) { + bool blocked = wxPyBeginBlockThreads(); + data = new wxPyUserData(userData); + wxPyEndBlockThreads(blocked); + } + return new wxGBSizerItem(sizer, pos, span, flag, border, data); + } +wxGBSizerItem *new_wxGBSizerItem(int width,int height,wxGBPosition const &pos,wxGBSpan const &span,int flag,int border,PyObject *userData){ + wxPyUserData* data = NULL; + if ( userData ) { + bool blocked = wxPyBeginBlockThreads(); + data = new wxPyUserData(userData); + wxPyEndBlockThreads(blocked); + } + return new wxGBSizerItem(width, height, pos, span, flag, border, data); + } +wxGBPosition wxGBSizerItem_GetEndPos(wxGBSizerItem *self){ + int row, col; + self->GetEndPos(row, col); + return wxGBPosition(row, col); + } bool wxGridBagSizer_Add(wxGridBagSizer *self,PyObject *item,wxGBPosition const &pos,wxGBSpan const &span,int flag,int border,PyObject *userData){ wxPyUserData* data = NULL; @@ -33056,7 +33110,7 @@ static PyObject *_wrap_ControlNameStr_get() { static PyObject *_wrap_new_Control(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; + int arg2 = (int) -1 ; wxPoint const &arg3_defvalue = wxDefaultPosition ; wxPoint *arg3 = (wxPoint *) &arg3_defvalue ; wxSize const &arg4_defvalue = wxDefaultSize ; @@ -33081,11 +33135,13 @@ static PyObject *_wrap_new_Control(PyObject *self, PyObject *args, PyObject *kwa (char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOO:new_Control",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOO:new_Control",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (obj2) { { arg3 = &temp3; @@ -33172,7 +33228,7 @@ static PyObject *_wrap_Control_Create(PyObject *self, PyObject *args, PyObject * PyObject *resultobj; wxControl *arg1 = (wxControl *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; + int arg3 = (int) -1 ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -33198,13 +33254,15 @@ static PyObject *_wrap_Control_Create(PyObject *self, PyObject *args, PyObject * (char *) "self",(char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "validator",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOOO:Control_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOO:Control_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxControl, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } if (obj3) { { arg4 = &temp4; @@ -34005,41 +34063,38 @@ static PyObject *_wrap_new_SizerItem(PyObject *self, PyObject *args, PyObject *k } -static PyObject *_wrap_new_SizerItemSpacer(PyObject *self, PyObject *args, PyObject *kwargs) { +static PyObject *_wrap_new_SizerItemWindow(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; - int arg1 ; + wxWindow *arg1 = (wxWindow *) 0 ; int arg2 ; int arg3 ; int arg4 ; - int arg5 ; - wxObject *arg6 = (wxObject *) 0 ; + PyObject *arg5 = (PyObject *) NULL ; wxSizerItem *result; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; char *kwnames[] = { - (char *) "width",(char *) "height",(char *) "proportion",(char *) "flag",(char *) "border",(char *) "userData", NULL + (char *) "window",(char *) "proportion",(char *) "flag",(char *) "border",(char *) "userData", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOO:new_SizerItemSpacer",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; - arg1 = (int) SWIG_AsInt(obj0); - if (PyErr_Occurred()) SWIG_fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|O:new_SizerItemWindow",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; arg2 = (int) SWIG_AsInt(obj1); if (PyErr_Occurred()) SWIG_fail; arg3 = (int) SWIG_AsInt(obj2); if (PyErr_Occurred()) SWIG_fail; arg4 = (int) SWIG_AsInt(obj3); if (PyErr_Occurred()) SWIG_fail; - arg5 = (int) SWIG_AsInt(obj4); - if (PyErr_Occurred()) SWIG_fail; - if ((SWIG_ConvertPtr(obj5,(void **)(&arg6),SWIGTYPE_p_wxObject, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + if (obj4) { + arg5 = obj4; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxSizerItem *)new wxSizerItem(arg1,arg2,arg3,arg4,arg5,arg6); + result = (wxSizerItem *)new_wxSizerItem(arg1,arg2,arg3,arg4,arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; @@ -34051,37 +34106,42 @@ static PyObject *_wrap_new_SizerItemSpacer(PyObject *self, PyObject *args, PyObj } -static PyObject *_wrap_new_SizerItemWindow(PyObject *self, PyObject *args, PyObject *kwargs) { +static PyObject *_wrap_new_SizerItemSpacer(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; - wxWindow *arg1 = (wxWindow *) 0 ; + int arg1 ; int arg2 ; int arg3 ; int arg4 ; - wxObject *arg5 = (wxObject *) 0 ; + int arg5 ; + PyObject *arg6 = (PyObject *) NULL ; wxSizerItem *result; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; + PyObject * obj5 = 0 ; char *kwnames[] = { - (char *) "window",(char *) "proportion",(char *) "flag",(char *) "border",(char *) "userData", NULL + (char *) "width",(char *) "height",(char *) "proportion",(char *) "flag",(char *) "border",(char *) "userData", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO:new_SizerItemWindow",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail; - if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO|O:new_SizerItemSpacer",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; + arg1 = (int) SWIG_AsInt(obj0); + if (PyErr_Occurred()) SWIG_fail; arg2 = (int) SWIG_AsInt(obj1); if (PyErr_Occurred()) SWIG_fail; arg3 = (int) SWIG_AsInt(obj2); if (PyErr_Occurred()) SWIG_fail; arg4 = (int) SWIG_AsInt(obj3); if (PyErr_Occurred()) SWIG_fail; - if ((SWIG_ConvertPtr(obj4,(void **)(&arg5),SWIGTYPE_p_wxObject, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + arg5 = (int) SWIG_AsInt(obj4); + if (PyErr_Occurred()) SWIG_fail; + if (obj5) { + arg6 = obj5; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxSizerItem *)new wxSizerItem(arg1,arg2,arg3,arg4,arg5); + result = (wxSizerItem *)new_wxSizerItem(arg1,arg2,arg3,arg4,arg5,arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; @@ -34099,7 +34159,7 @@ static PyObject *_wrap_new_SizerItemSizer(PyObject *self, PyObject *args, PyObje int arg2 ; int arg3 ; int arg4 ; - wxObject *arg5 = (wxObject *) 0 ; + PyObject *arg5 = (PyObject *) NULL ; wxSizerItem *result; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; @@ -34110,7 +34170,7 @@ static PyObject *_wrap_new_SizerItemSizer(PyObject *self, PyObject *args, PyObje (char *) "sizer",(char *) "proportion",(char *) "flag",(char *) "border",(char *) "userData", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO:new_SizerItemSizer",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|O:new_SizerItemSizer",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxSizer, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; arg2 = (int) SWIG_AsInt(obj1); @@ -34119,11 +34179,12 @@ static PyObject *_wrap_new_SizerItemSizer(PyObject *self, PyObject *args, PyObje if (PyErr_Occurred()) SWIG_fail; arg4 = (int) SWIG_AsInt(obj3); if (PyErr_Occurred()) SWIG_fail; - if ((SWIG_ConvertPtr(obj4,(void **)(&arg5),SWIGTYPE_p_wxObject, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + if (obj4) { + arg5 = obj4; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxSizerItem *)new wxSizerItem(arg1,arg2,arg3,arg4,arg5); + result = (wxSizerItem *)new_wxSizerItem(arg1,arg2,arg3,arg4,arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; @@ -35752,7 +35813,7 @@ static PyObject *_wrap_Sizer_Clear(PyObject *self, PyObject *args, PyObject *kwa PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; char *kwnames[] = { - (char *) "self",(char *) "delete_windows", NULL + (char *) "self",(char *) "deleteWindows", NULL }; if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Sizer_Clear",kwnames,&obj0,&obj1)) goto fail; @@ -35861,34 +35922,6 @@ static PyObject *_wrap_Sizer_Show(PyObject *self, PyObject *args, PyObject *kwar } -static PyObject *_wrap_Sizer_Hide(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj; - wxSizer *arg1 = (wxSizer *) 0 ; - PyObject *arg2 = (PyObject *) 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char *kwnames[] = { - (char *) "self",(char *) "item", NULL - }; - - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Sizer_Hide",kwnames,&obj0,&obj1)) goto fail; - if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxSizer, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = obj1; - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_Hide(arg1,arg2); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - Py_INCREF(Py_None); resultobj = Py_None; - return resultobj; - fail: - return NULL; -} - - static PyObject *_wrap_Sizer_IsShown(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxSizer *arg1 = (wxSizer *) 0 ; @@ -36099,61 +36132,6 @@ static PyObject *_wrap_BoxSizer_SetOrientation(PyObject *self, PyObject *args, P } -static PyObject *_wrap_BoxSizer_RecalcSizes(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj; - wxBoxSizer *arg1 = (wxBoxSizer *) 0 ; - PyObject * obj0 = 0 ; - char *kwnames[] = { - (char *) "self", NULL - }; - - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:BoxSizer_RecalcSizes",kwnames,&obj0)) goto fail; - if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxBoxSizer, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->RecalcSizes(); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - Py_INCREF(Py_None); resultobj = Py_None; - return resultobj; - fail: - return NULL; -} - - -static PyObject *_wrap_BoxSizer_CalcMin(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj; - wxBoxSizer *arg1 = (wxBoxSizer *) 0 ; - wxSize result; - PyObject * obj0 = 0 ; - char *kwnames[] = { - (char *) "self", NULL - }; - - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:BoxSizer_CalcMin",kwnames,&obj0)) goto fail; - if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxBoxSizer, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (arg1)->CalcMin(); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - { - wxSize * resultptr; - resultptr = new wxSize((wxSize &) result); - resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxSize, 1); - } - return resultobj; - fail: - return NULL; -} - - static PyObject * BoxSizer_swigregister(PyObject *self, PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; @@ -36221,61 +36199,6 @@ static PyObject *_wrap_StaticBoxSizer_GetStaticBox(PyObject *self, PyObject *arg } -static PyObject *_wrap_StaticBoxSizer_RecalcSizes(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj; - wxStaticBoxSizer *arg1 = (wxStaticBoxSizer *) 0 ; - PyObject * obj0 = 0 ; - char *kwnames[] = { - (char *) "self", NULL - }; - - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:StaticBoxSizer_RecalcSizes",kwnames,&obj0)) goto fail; - if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxStaticBoxSizer, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->RecalcSizes(); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - Py_INCREF(Py_None); resultobj = Py_None; - return resultobj; - fail: - return NULL; -} - - -static PyObject *_wrap_StaticBoxSizer_CalcMin(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj; - wxStaticBoxSizer *arg1 = (wxStaticBoxSizer *) 0 ; - wxSize result; - PyObject * obj0 = 0 ; - char *kwnames[] = { - (char *) "self", NULL - }; - - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:StaticBoxSizer_CalcMin",kwnames,&obj0)) goto fail; - if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxStaticBoxSizer, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (arg1)->CalcMin(); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - { - wxSize * resultptr; - resultptr = new wxSize((wxSize &) result); - resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxSize, 1); - } - return resultobj; - fail: - return NULL; -} - - static PyObject * StaticBoxSizer_swigregister(PyObject *self, PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; @@ -36329,61 +36252,6 @@ static PyObject *_wrap_new_GridSizer(PyObject *self, PyObject *args, PyObject *k } -static PyObject *_wrap_GridSizer_RecalcSizes(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj; - wxGridSizer *arg1 = (wxGridSizer *) 0 ; - PyObject * obj0 = 0 ; - char *kwnames[] = { - (char *) "self", NULL - }; - - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:GridSizer_RecalcSizes",kwnames,&obj0)) goto fail; - if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxGridSizer, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->RecalcSizes(); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - Py_INCREF(Py_None); resultobj = Py_None; - return resultobj; - fail: - return NULL; -} - - -static PyObject *_wrap_GridSizer_CalcMin(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj; - wxGridSizer *arg1 = (wxGridSizer *) 0 ; - wxSize result; - PyObject * obj0 = 0 ; - char *kwnames[] = { - (char *) "self", NULL - }; - - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:GridSizer_CalcMin",kwnames,&obj0)) goto fail; - if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxGridSizer, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (arg1)->CalcMin(); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - { - wxSize * resultptr; - resultptr = new wxSize((wxSize &) result); - resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxSize, 1); - } - return resultobj; - fail: - return NULL; -} - - static PyObject *_wrap_GridSizer_SetCols(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxGridSizer *arg1 = (wxGridSizer *) 0 ; @@ -36657,61 +36525,6 @@ static PyObject *_wrap_new_FlexGridSizer(PyObject *self, PyObject *args, PyObjec } -static PyObject *_wrap_FlexGridSizer_RecalcSizes(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj; - wxFlexGridSizer *arg1 = (wxFlexGridSizer *) 0 ; - PyObject * obj0 = 0 ; - char *kwnames[] = { - (char *) "self", NULL - }; - - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:FlexGridSizer_RecalcSizes",kwnames,&obj0)) goto fail; - if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxFlexGridSizer, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->RecalcSizes(); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - Py_INCREF(Py_None); resultobj = Py_None; - return resultobj; - fail: - return NULL; -} - - -static PyObject *_wrap_FlexGridSizer_CalcMin(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj; - wxFlexGridSizer *arg1 = (wxFlexGridSizer *) 0 ; - wxSize result; - PyObject * obj0 = 0 ; - char *kwnames[] = { - (char *) "self", NULL - }; - - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:FlexGridSizer_CalcMin",kwnames,&obj0)) goto fail; - if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxFlexGridSizer, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (arg1)->CalcMin(); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - { - wxSize * resultptr; - resultptr = new wxSize((wxSize &) result); - resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxSize, 1); - } - return resultobj; - fail: - return NULL; -} - - static PyObject *_wrap_FlexGridSizer_AddGrowableRow(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxFlexGridSizer *arg1 = (wxFlexGridSizer *) 0 ; @@ -37642,7 +37455,7 @@ static PyObject *_wrap_new_GBSizerItemWindow(PyObject *self, PyObject *args, PyO wxGBSpan *arg3 = 0 ; int arg4 ; int arg5 ; - wxObject *arg6 = (wxObject *) 0 ; + PyObject *arg6 = (PyObject *) NULL ; wxGBSizerItem *result; wxGBPosition temp2 ; wxGBSpan temp3 ; @@ -37656,7 +37469,7 @@ static PyObject *_wrap_new_GBSizerItemWindow(PyObject *self, PyObject *args, PyO (char *) "window",(char *) "pos",(char *) "span",(char *) "flag",(char *) "border",(char *) "userData", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOO:new_GBSizerItemWindow",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO|O:new_GBSizerItemWindow",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; { @@ -37671,11 +37484,12 @@ static PyObject *_wrap_new_GBSizerItemWindow(PyObject *self, PyObject *args, PyO if (PyErr_Occurred()) SWIG_fail; arg5 = (int) SWIG_AsInt(obj4); if (PyErr_Occurred()) SWIG_fail; - if ((SWIG_ConvertPtr(obj5,(void **)(&arg6),SWIGTYPE_p_wxObject, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + if (obj5) { + arg6 = obj5; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxGBSizerItem *)new wxGBSizerItem(arg1,(wxGBPosition const &)*arg2,(wxGBSpan const &)*arg3,arg4,arg5,arg6); + result = (wxGBSizerItem *)new_wxGBSizerItem(arg1,(wxGBPosition const &)*arg2,(wxGBSpan const &)*arg3,arg4,arg5,arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; @@ -37694,7 +37508,7 @@ static PyObject *_wrap_new_GBSizerItemSizer(PyObject *self, PyObject *args, PyOb wxGBSpan *arg3 = 0 ; int arg4 ; int arg5 ; - wxObject *arg6 = (wxObject *) 0 ; + PyObject *arg6 = (PyObject *) NULL ; wxGBSizerItem *result; wxGBPosition temp2 ; wxGBSpan temp3 ; @@ -37708,7 +37522,7 @@ static PyObject *_wrap_new_GBSizerItemSizer(PyObject *self, PyObject *args, PyOb (char *) "sizer",(char *) "pos",(char *) "span",(char *) "flag",(char *) "border",(char *) "userData", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOO:new_GBSizerItemSizer",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO|O:new_GBSizerItemSizer",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxSizer, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; { @@ -37723,11 +37537,12 @@ static PyObject *_wrap_new_GBSizerItemSizer(PyObject *self, PyObject *args, PyOb if (PyErr_Occurred()) SWIG_fail; arg5 = (int) SWIG_AsInt(obj4); if (PyErr_Occurred()) SWIG_fail; - if ((SWIG_ConvertPtr(obj5,(void **)(&arg6),SWIGTYPE_p_wxObject, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + if (obj5) { + arg6 = obj5; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxGBSizerItem *)new wxGBSizerItem(arg1,(wxGBPosition const &)*arg2,(wxGBSpan const &)*arg3,arg4,arg5,arg6); + result = (wxGBSizerItem *)new_wxGBSizerItem(arg1,(wxGBPosition const &)*arg2,(wxGBSpan const &)*arg3,arg4,arg5,arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; @@ -37747,7 +37562,7 @@ static PyObject *_wrap_new_GBSizerItemSpacer(PyObject *self, PyObject *args, PyO wxGBSpan *arg4 = 0 ; int arg5 ; int arg6 ; - wxObject *arg7 = (wxObject *) 0 ; + PyObject *arg7 = (PyObject *) NULL ; wxGBSizerItem *result; wxGBPosition temp3 ; wxGBSpan temp4 ; @@ -37762,7 +37577,7 @@ static PyObject *_wrap_new_GBSizerItemSpacer(PyObject *self, PyObject *args, PyO (char *) "width",(char *) "height",(char *) "pos",(char *) "span",(char *) "flag",(char *) "border",(char *) "userData", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOOO:new_GBSizerItemSpacer",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOO|O:new_GBSizerItemSpacer",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; arg1 = (int) SWIG_AsInt(obj0); if (PyErr_Occurred()) SWIG_fail; arg2 = (int) SWIG_AsInt(obj1); @@ -37779,11 +37594,12 @@ static PyObject *_wrap_new_GBSizerItemSpacer(PyObject *self, PyObject *args, PyO if (PyErr_Occurred()) SWIG_fail; arg6 = (int) SWIG_AsInt(obj5); if (PyErr_Occurred()) SWIG_fail; - if ((SWIG_ConvertPtr(obj6,(void **)(&arg7),SWIGTYPE_p_wxObject, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + if (obj6) { + arg7 = obj6; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxGBSizerItem *)new wxGBSizerItem(arg1,arg2,(wxGBPosition const &)*arg3,(wxGBSpan const &)*arg4,arg5,arg6,arg7); + result = (wxGBSizerItem *)new_wxGBSizerItem(arg1,arg2,(wxGBPosition const &)*arg3,(wxGBSpan const &)*arg4,arg5,arg6,arg7); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; @@ -37925,15 +37741,18 @@ static PyObject *_wrap_GBSizerItem_SetSpan(PyObject *self, PyObject *args, PyObj } -static PyObject *_wrap_GBSizerItem_Intersects__SWIG_0(PyObject *self, PyObject *args) { +static PyObject *_wrap_GBSizerItem_Intersects(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxGBSizerItem *arg1 = (wxGBSizerItem *) 0 ; wxGBSizerItem *arg2 = 0 ; bool result; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "other", NULL + }; - if(!PyArg_ParseTuple(args,(char *)"OO:GBSizerItem_Intersects",&obj0,&obj1)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:GBSizerItem_Intersects",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxGBSizerItem, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxGBSizerItem, @@ -37959,7 +37778,7 @@ static PyObject *_wrap_GBSizerItem_Intersects__SWIG_0(PyObject *self, PyObject * } -static PyObject *_wrap_GBSizerItem_Intersects__SWIG_1(PyObject *self, PyObject *args) { +static PyObject *_wrap_GBSizerItem_IntersectsPos(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxGBSizerItem *arg1 = (wxGBSizerItem *) 0 ; wxGBPosition *arg2 = 0 ; @@ -37970,8 +37789,11 @@ static PyObject *_wrap_GBSizerItem_Intersects__SWIG_1(PyObject *self, PyObject * PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "pos",(char *) "span", NULL + }; - if(!PyArg_ParseTuple(args,(char *)"OOO:GBSizerItem_Intersects",&obj0,&obj1,&obj2)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:GBSizerItem_IntersectsPos",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxGBSizerItem, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; { @@ -37998,109 +37820,30 @@ static PyObject *_wrap_GBSizerItem_Intersects__SWIG_1(PyObject *self, PyObject * } -static PyObject *_wrap_GBSizerItem_Intersects(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[4]; - int ii; - - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 3); ii++) { - argv[ii] = PyTuple_GetItem(args,ii); - } - if (argc == 2) { - int _v; - { - void *ptr; - if (SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_wxGBSizerItem, 0) == -1) { - _v = 0; - PyErr_Clear(); - } else { - _v = 1; - } - } - if (_v) { - { - void *ptr; - if (SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_wxGBSizerItem, 0) == -1) { - _v = 0; - PyErr_Clear(); - } else { - _v = 1; - } - } - if (_v) { - return _wrap_GBSizerItem_Intersects__SWIG_0(self,args); - } - } - } - if (argc == 3) { - int _v; - { - void *ptr; - if (SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_wxGBSizerItem, 0) == -1) { - _v = 0; - PyErr_Clear(); - } else { - _v = 1; - } - } - if (_v) { - { - _v = wxPySimple_typecheck(argv[1], wxT("wxGBPosition"), 2); - } - if (_v) { - { - _v = wxPySimple_typecheck(argv[2], wxT("wxGBSpan"), 2); - } - if (_v) { - return _wrap_GBSizerItem_Intersects__SWIG_1(self,args); - } - } - } - } - - PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'GBSizerItem_Intersects'"); - return NULL; -} - - static PyObject *_wrap_GBSizerItem_GetEndPos(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxGBSizerItem *arg1 = (wxGBSizerItem *) 0 ; - int *arg2 = 0 ; - int *arg3 = 0 ; + wxGBPosition result; PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; char *kwnames[] = { - (char *) "self",(char *) "row",(char *) "col", NULL + (char *) "self", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:GBSizerItem_GetEndPos",kwnames,&obj0,&obj1,&obj2)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:GBSizerItem_GetEndPos",kwnames,&obj0)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxGBSizerItem, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_int, - SWIG_POINTER_EXCEPTION | 0)) == -1) - SWIG_fail; - if (arg2 == NULL) { - PyErr_SetString(PyExc_TypeError,"null reference"); - SWIG_fail; - } - if ((SWIG_ConvertPtr(obj2,(void **)(&arg3),SWIGTYPE_p_int, - SWIG_POINTER_EXCEPTION | 0)) == -1) - SWIG_fail; - if (arg3 == NULL) { - PyErr_SetString(PyExc_TypeError,"null reference"); - SWIG_fail; - } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->GetEndPos(*arg2,*arg3); + result = wxGBSizerItem_GetEndPos(arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } - Py_INCREF(Py_None); resultobj = Py_None; + { + wxGBPosition * resultptr; + resultptr = new wxGBPosition((wxGBPosition &) result); + resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxGBPosition, 1); + } return resultobj; fail: return NULL; @@ -39321,92 +39064,7 @@ static PyObject *_wrap_GridBagSizer_FindItemAtPoint(PyObject *self, PyObject *ar } -static PyObject *_wrap_GridBagSizer_FindItemWithData(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj; - wxGridBagSizer *arg1 = (wxGridBagSizer *) 0 ; - wxObject *arg2 = (wxObject *) 0 ; - wxGBSizerItem *result; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char *kwnames[] = { - (char *) "self",(char *) "userData", NULL - }; - - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:GridBagSizer_FindItemWithData",kwnames,&obj0,&obj1)) goto fail; - if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxGridBagSizer, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxObject, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxGBSizerItem *)(arg1)->FindItemWithData((wxObject const *)arg2); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxGBSizerItem, 0); - return resultobj; - fail: - return NULL; -} - - -static PyObject *_wrap_GridBagSizer_RecalcSizes(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj; - wxGridBagSizer *arg1 = (wxGridBagSizer *) 0 ; - PyObject * obj0 = 0 ; - char *kwnames[] = { - (char *) "self", NULL - }; - - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:GridBagSizer_RecalcSizes",kwnames,&obj0)) goto fail; - if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxGridBagSizer, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->RecalcSizes(); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - Py_INCREF(Py_None); resultobj = Py_None; - return resultobj; - fail: - return NULL; -} - - -static PyObject *_wrap_GridBagSizer_CalcMin(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj; - wxGridBagSizer *arg1 = (wxGridBagSizer *) 0 ; - wxSize result; - PyObject * obj0 = 0 ; - char *kwnames[] = { - (char *) "self", NULL - }; - - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:GridBagSizer_CalcMin",kwnames,&obj0)) goto fail; - if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxGridBagSizer, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (arg1)->CalcMin(); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - { - wxSize * resultptr; - resultptr = new wxSize((wxSize &) result); - resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxSize, 1); - } - return resultobj; - fail: - return NULL; -} - - -static PyObject *_wrap_GridBagSizer_CheckForIntersection__SWIG_0(PyObject *self, PyObject *args) { +static PyObject *_wrap_GridBagSizer_CheckForIntersection(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxGridBagSizer *arg1 = (wxGridBagSizer *) 0 ; wxGBSizerItem *arg2 = (wxGBSizerItem *) 0 ; @@ -39415,8 +39073,11 @@ static PyObject *_wrap_GridBagSizer_CheckForIntersection__SWIG_0(PyObject *self, PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "item",(char *) "excludeItem", NULL + }; - if(!PyArg_ParseTuple(args,(char *)"OO|O:GridBagSizer_CheckForIntersection",&obj0,&obj1,&obj2)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:GridBagSizer_CheckForIntersection",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxGridBagSizer, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxGBSizerItem, @@ -39441,7 +39102,7 @@ static PyObject *_wrap_GridBagSizer_CheckForIntersection__SWIG_0(PyObject *self, } -static PyObject *_wrap_GridBagSizer_CheckForIntersection__SWIG_1(PyObject *self, PyObject *args) { +static PyObject *_wrap_GridBagSizer_CheckForIntersectionPos(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxGridBagSizer *arg1 = (wxGridBagSizer *) 0 ; wxGBPosition *arg2 = 0 ; @@ -39454,8 +39115,11 @@ static PyObject *_wrap_GridBagSizer_CheckForIntersection__SWIG_1(PyObject *self, PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "pos",(char *) "span",(char *) "excludeItem", NULL + }; - if(!PyArg_ParseTuple(args,(char *)"OOO|O:GridBagSizer_CheckForIntersection",&obj0,&obj1,&obj2,&obj3)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:GridBagSizer_CheckForIntersectionPos",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxGridBagSizer, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; { @@ -39486,100 +39150,6 @@ static PyObject *_wrap_GridBagSizer_CheckForIntersection__SWIG_1(PyObject *self, } -static PyObject *_wrap_GridBagSizer_CheckForIntersection(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[5]; - int ii; - - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 4); ii++) { - argv[ii] = PyTuple_GetItem(args,ii); - } - if ((argc >= 2) && (argc <= 3)) { - int _v; - { - void *ptr; - if (SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_wxGridBagSizer, 0) == -1) { - _v = 0; - PyErr_Clear(); - } else { - _v = 1; - } - } - if (_v) { - { - void *ptr; - if (SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_wxGBSizerItem, 0) == -1) { - _v = 0; - PyErr_Clear(); - } else { - _v = 1; - } - } - if (_v) { - if (argc <= 2) { - return _wrap_GridBagSizer_CheckForIntersection__SWIG_0(self,args); - } - { - void *ptr; - if (SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_wxGBSizerItem, 0) == -1) { - _v = 0; - PyErr_Clear(); - } else { - _v = 1; - } - } - if (_v) { - return _wrap_GridBagSizer_CheckForIntersection__SWIG_0(self,args); - } - } - } - } - if ((argc >= 3) && (argc <= 4)) { - int _v; - { - void *ptr; - if (SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_wxGridBagSizer, 0) == -1) { - _v = 0; - PyErr_Clear(); - } else { - _v = 1; - } - } - if (_v) { - { - _v = wxPySimple_typecheck(argv[1], wxT("wxGBPosition"), 2); - } - if (_v) { - { - _v = wxPySimple_typecheck(argv[2], wxT("wxGBSpan"), 2); - } - if (_v) { - if (argc <= 3) { - return _wrap_GridBagSizer_CheckForIntersection__SWIG_1(self,args); - } - { - void *ptr; - if (SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_wxGBSizerItem, 0) == -1) { - _v = 0; - PyErr_Clear(); - } else { - _v = 1; - } - } - if (_v) { - return _wrap_GridBagSizer_CheckForIntersection__SWIG_1(self,args); - } - } - } - } - } - - PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'GridBagSizer_CheckForIntersection'"); - return NULL; -} - - static PyObject * GridBagSizer_swigregister(PyObject *self, PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; @@ -41722,8 +41292,8 @@ static PyMethodDef SwigMethods[] = { { (char *)"ItemContainer_swigregister", ItemContainer_swigregister, METH_VARARGS }, { (char *)"ControlWithItems_swigregister", ControlWithItems_swigregister, METH_VARARGS }, { (char *)"new_SizerItem", (PyCFunction) _wrap_new_SizerItem, METH_VARARGS | METH_KEYWORDS }, - { (char *)"new_SizerItemSpacer", (PyCFunction) _wrap_new_SizerItemSpacer, METH_VARARGS | METH_KEYWORDS }, { (char *)"new_SizerItemWindow", (PyCFunction) _wrap_new_SizerItemWindow, METH_VARARGS | METH_KEYWORDS }, + { (char *)"new_SizerItemSpacer", (PyCFunction) _wrap_new_SizerItemSpacer, METH_VARARGS | METH_KEYWORDS }, { (char *)"new_SizerItemSizer", (PyCFunction) _wrap_new_SizerItemSizer, METH_VARARGS | METH_KEYWORDS }, { (char *)"SizerItem_DeleteWindows", (PyCFunction) _wrap_SizerItem_DeleteWindows, METH_VARARGS | METH_KEYWORDS }, { (char *)"SizerItem_DetachSizer", (PyCFunction) _wrap_SizerItem_DetachSizer, METH_VARARGS | METH_KEYWORDS }, @@ -41782,7 +41352,6 @@ static PyMethodDef SwigMethods[] = { { (char *)"Sizer_DeleteWindows", (PyCFunction) _wrap_Sizer_DeleteWindows, METH_VARARGS | METH_KEYWORDS }, { (char *)"Sizer_GetChildren", (PyCFunction) _wrap_Sizer_GetChildren, METH_VARARGS | METH_KEYWORDS }, { (char *)"Sizer_Show", (PyCFunction) _wrap_Sizer_Show, METH_VARARGS | METH_KEYWORDS }, - { (char *)"Sizer_Hide", (PyCFunction) _wrap_Sizer_Hide, METH_VARARGS | METH_KEYWORDS }, { (char *)"Sizer_IsShown", (PyCFunction) _wrap_Sizer_IsShown, METH_VARARGS | METH_KEYWORDS }, { (char *)"Sizer_ShowItems", (PyCFunction) _wrap_Sizer_ShowItems, METH_VARARGS | METH_KEYWORDS }, { (char *)"Sizer_swigregister", Sizer_swigregister, METH_VARARGS }, @@ -41792,17 +41361,11 @@ static PyMethodDef SwigMethods[] = { { (char *)"new_BoxSizer", (PyCFunction) _wrap_new_BoxSizer, METH_VARARGS | METH_KEYWORDS }, { (char *)"BoxSizer_GetOrientation", (PyCFunction) _wrap_BoxSizer_GetOrientation, METH_VARARGS | METH_KEYWORDS }, { (char *)"BoxSizer_SetOrientation", (PyCFunction) _wrap_BoxSizer_SetOrientation, METH_VARARGS | METH_KEYWORDS }, - { (char *)"BoxSizer_RecalcSizes", (PyCFunction) _wrap_BoxSizer_RecalcSizes, METH_VARARGS | METH_KEYWORDS }, - { (char *)"BoxSizer_CalcMin", (PyCFunction) _wrap_BoxSizer_CalcMin, METH_VARARGS | METH_KEYWORDS }, { (char *)"BoxSizer_swigregister", BoxSizer_swigregister, METH_VARARGS }, { (char *)"new_StaticBoxSizer", (PyCFunction) _wrap_new_StaticBoxSizer, METH_VARARGS | METH_KEYWORDS }, { (char *)"StaticBoxSizer_GetStaticBox", (PyCFunction) _wrap_StaticBoxSizer_GetStaticBox, METH_VARARGS | METH_KEYWORDS }, - { (char *)"StaticBoxSizer_RecalcSizes", (PyCFunction) _wrap_StaticBoxSizer_RecalcSizes, METH_VARARGS | METH_KEYWORDS }, - { (char *)"StaticBoxSizer_CalcMin", (PyCFunction) _wrap_StaticBoxSizer_CalcMin, METH_VARARGS | METH_KEYWORDS }, { (char *)"StaticBoxSizer_swigregister", StaticBoxSizer_swigregister, METH_VARARGS }, { (char *)"new_GridSizer", (PyCFunction) _wrap_new_GridSizer, METH_VARARGS | METH_KEYWORDS }, - { (char *)"GridSizer_RecalcSizes", (PyCFunction) _wrap_GridSizer_RecalcSizes, METH_VARARGS | METH_KEYWORDS }, - { (char *)"GridSizer_CalcMin", (PyCFunction) _wrap_GridSizer_CalcMin, METH_VARARGS | METH_KEYWORDS }, { (char *)"GridSizer_SetCols", (PyCFunction) _wrap_GridSizer_SetCols, METH_VARARGS | METH_KEYWORDS }, { (char *)"GridSizer_SetRows", (PyCFunction) _wrap_GridSizer_SetRows, METH_VARARGS | METH_KEYWORDS }, { (char *)"GridSizer_SetVGap", (PyCFunction) _wrap_GridSizer_SetVGap, METH_VARARGS | METH_KEYWORDS }, @@ -41813,8 +41376,6 @@ static PyMethodDef SwigMethods[] = { { (char *)"GridSizer_GetHGap", (PyCFunction) _wrap_GridSizer_GetHGap, METH_VARARGS | METH_KEYWORDS }, { (char *)"GridSizer_swigregister", GridSizer_swigregister, METH_VARARGS }, { (char *)"new_FlexGridSizer", (PyCFunction) _wrap_new_FlexGridSizer, METH_VARARGS | METH_KEYWORDS }, - { (char *)"FlexGridSizer_RecalcSizes", (PyCFunction) _wrap_FlexGridSizer_RecalcSizes, METH_VARARGS | METH_KEYWORDS }, - { (char *)"FlexGridSizer_CalcMin", (PyCFunction) _wrap_FlexGridSizer_CalcMin, METH_VARARGS | METH_KEYWORDS }, { (char *)"FlexGridSizer_AddGrowableRow", (PyCFunction) _wrap_FlexGridSizer_AddGrowableRow, METH_VARARGS | METH_KEYWORDS }, { (char *)"FlexGridSizer_RemoveGrowableRow", (PyCFunction) _wrap_FlexGridSizer_RemoveGrowableRow, METH_VARARGS | METH_KEYWORDS }, { (char *)"FlexGridSizer_AddGrowableCol", (PyCFunction) _wrap_FlexGridSizer_AddGrowableCol, METH_VARARGS | METH_KEYWORDS }, @@ -41854,7 +41415,8 @@ static PyMethodDef SwigMethods[] = { { (char *)"GBSizerItem_GetSpan", (PyCFunction) _wrap_GBSizerItem_GetSpan, METH_VARARGS | METH_KEYWORDS }, { (char *)"GBSizerItem_SetPos", (PyCFunction) _wrap_GBSizerItem_SetPos, METH_VARARGS | METH_KEYWORDS }, { (char *)"GBSizerItem_SetSpan", (PyCFunction) _wrap_GBSizerItem_SetSpan, METH_VARARGS | METH_KEYWORDS }, - { (char *)"GBSizerItem_Intersects", _wrap_GBSizerItem_Intersects, METH_VARARGS }, + { (char *)"GBSizerItem_Intersects", (PyCFunction) _wrap_GBSizerItem_Intersects, METH_VARARGS | METH_KEYWORDS }, + { (char *)"GBSizerItem_IntersectsPos", (PyCFunction) _wrap_GBSizerItem_IntersectsPos, METH_VARARGS | METH_KEYWORDS }, { (char *)"GBSizerItem_GetEndPos", (PyCFunction) _wrap_GBSizerItem_GetEndPos, METH_VARARGS | METH_KEYWORDS }, { (char *)"GBSizerItem_GetGBSizer", (PyCFunction) _wrap_GBSizerItem_GetGBSizer, METH_VARARGS | METH_KEYWORDS }, { (char *)"GBSizerItem_SetGBSizer", (PyCFunction) _wrap_GBSizerItem_SetGBSizer, METH_VARARGS | METH_KEYWORDS }, @@ -41871,10 +41433,8 @@ static PyMethodDef SwigMethods[] = { { (char *)"GridBagSizer_FindItem", _wrap_GridBagSizer_FindItem, METH_VARARGS }, { (char *)"GridBagSizer_FindItemAtPosition", (PyCFunction) _wrap_GridBagSizer_FindItemAtPosition, METH_VARARGS | METH_KEYWORDS }, { (char *)"GridBagSizer_FindItemAtPoint", (PyCFunction) _wrap_GridBagSizer_FindItemAtPoint, METH_VARARGS | METH_KEYWORDS }, - { (char *)"GridBagSizer_FindItemWithData", (PyCFunction) _wrap_GridBagSizer_FindItemWithData, METH_VARARGS | METH_KEYWORDS }, - { (char *)"GridBagSizer_RecalcSizes", (PyCFunction) _wrap_GridBagSizer_RecalcSizes, METH_VARARGS | METH_KEYWORDS }, - { (char *)"GridBagSizer_CalcMin", (PyCFunction) _wrap_GridBagSizer_CalcMin, METH_VARARGS | METH_KEYWORDS }, - { (char *)"GridBagSizer_CheckForIntersection", _wrap_GridBagSizer_CheckForIntersection, METH_VARARGS }, + { (char *)"GridBagSizer_CheckForIntersection", (PyCFunction) _wrap_GridBagSizer_CheckForIntersection, METH_VARARGS | METH_KEYWORDS }, + { (char *)"GridBagSizer_CheckForIntersectionPos", (PyCFunction) _wrap_GridBagSizer_CheckForIntersectionPos, METH_VARARGS | METH_KEYWORDS }, { (char *)"GridBagSizer_swigregister", GridBagSizer_swigregister, METH_VARARGS }, { (char *)"IndividualLayoutConstraint_Set", (PyCFunction) _wrap_IndividualLayoutConstraint_Set, METH_VARARGS | METH_KEYWORDS }, { (char *)"IndividualLayoutConstraint_LeftOf", (PyCFunction) _wrap_IndividualLayoutConstraint_LeftOf, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/msw/_windows.py b/wxPython/src/msw/_windows.py index a1c2f721c4..2a21a1e7b2 100644 --- a/wxPython/src/msw/_windows.py +++ b/wxPython/src/msw/_windows.py @@ -27,8 +27,6 @@ class Panel(_core.Window): Create(self, Window parent, int id=-1, Point pos=DefaultPosition, Size size=DefaultSize, long style=wxTAB_TRAVERSAL|wxNO_BORDER, String name=PanelNameStr) -> bool - - Create the GUI part of the Window for 2-phase creation mode. """ return _windows_.Panel_Create(*args, **kwargs) @@ -112,8 +110,6 @@ class ScrolledWindow(Panel): Create(self, Window parent, int id=-1, Point pos=DefaultPosition, Size size=DefaultSize, long style=wxHSCROLL|wxVSCROLL, String name=PanelNameStr) -> bool - - Create the GUI part of the Window for 2-phase creation mode. """ return _windows_.ScrolledWindow_Create(*args, **kwargs) @@ -373,9 +369,9 @@ class Frame(TopLevelWindow): return "<%s.%s; proxy of C++ wxFrame instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, String title, Point pos=DefaultPosition, - Size size=DefaultSize, long style=DEFAULT_FRAME_STYLE, - String name=FrameNameStr) -> Frame + __init__(self, Window parent, int id=-1, String title=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=DEFAULT_FRAME_STYLE, String name=FrameNameStr) -> Frame """ newobj = _windows_.new_Frame(*args, **kwargs) self.this = newobj.this @@ -385,9 +381,9 @@ class Frame(TopLevelWindow): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, String title, Point pos=DefaultPosition, - Size size=DefaultSize, long style=DEFAULT_FRAME_STYLE, - String name=FrameNameStr) -> bool + Create(self, Window parent, int id=-1, String title=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=DEFAULT_FRAME_STYLE, String name=FrameNameStr) -> bool """ return _windows_.Frame_Create(*args, **kwargs) @@ -533,9 +529,9 @@ class Dialog(TopLevelWindow): return "<%s.%s; proxy of C++ wxDialog instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, String title, Point pos=DefaultPosition, - Size size=DefaultSize, long style=DEFAULT_DIALOG_STYLE, - String name=DialogNameStr) -> Dialog + __init__(self, Window parent, int id=-1, String title=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=DEFAULT_DIALOG_STYLE, String name=DialogNameStr) -> Dialog """ newobj = _windows_.new_Dialog(*args, **kwargs) self.this = newobj.this @@ -545,9 +541,9 @@ class Dialog(TopLevelWindow): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, String title, Point pos=DefaultPosition, - Size size=DefaultSize, long style=DEFAULT_DIALOG_STYLE, - String name=DialogNameStr) -> bool + Create(self, Window parent, int id=-1, String title=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=DEFAULT_DIALOG_STYLE, String name=DialogNameStr) -> bool """ return _windows_.Dialog_Create(*args, **kwargs) @@ -635,9 +631,9 @@ class MiniFrame(Frame): return "<%s.%s; proxy of C++ wxMiniFrame instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, String title, Point pos=DefaultPosition, - Size size=DefaultSize, long style=DEFAULT_FRAME_STYLE, - String name=FrameNameStr) -> MiniFrame + __init__(self, Window parent, int id=-1, String title=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=DEFAULT_FRAME_STYLE, String name=FrameNameStr) -> MiniFrame """ newobj = _windows_.new_MiniFrame(*args, **kwargs) self.this = newobj.this @@ -647,9 +643,9 @@ class MiniFrame(Frame): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, String title, Point pos=DefaultPosition, - Size size=DefaultSize, long style=DEFAULT_FRAME_STYLE, - String name=FrameNameStr) -> bool + Create(self, Window parent, int id=-1, String title=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=DEFAULT_FRAME_STYLE, String name=FrameNameStr) -> bool """ return _windows_.MiniFrame_Create(*args, **kwargs) @@ -710,7 +706,7 @@ class SplashScreen(Frame): def __init__(self, *args, **kwargs): """ __init__(self, Bitmap bitmap, long splashStyle, int milliseconds, - Window parent, int id, Point pos=DefaultPosition, + Window parent, int id=-1, Point pos=DefaultPosition, Size size=DefaultSize, long style=wxSIMPLE_BORDER|wxFRAME_NO_TASKBAR|wxSTAY_ON_TOP) -> SplashScreen """ newobj = _windows_.new_SplashScreen(*args, **kwargs) @@ -753,7 +749,7 @@ class StatusBar(_core.Window): self._setOORInfo(self) def Create(*args, **kwargs): - """Create(self, Window parent, int id, long style=ST_SIZEGRIP, String name=StatusLineNameStr) -> bool""" + """Create(self, Window parent, int id=-1, long style=ST_SIZEGRIP, String name=StatusLineNameStr) -> bool""" return _windows_.StatusBar_Create(*args, **kwargs) def SetFieldsCount(*args, **kwargs): @@ -1264,8 +1260,8 @@ class SashWindow(_core.Window): return "<%s.%s; proxy of C++ wxSashWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=wxCLIP_CHILDREN|wxSW_3D, + __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=wxCLIP_CHILDREN|wxSW_3D, String name=SashNameStr) -> SashWindow """ newobj = _windows_.new_SashWindow(*args, **kwargs) @@ -1276,8 +1272,8 @@ class SashWindow(_core.Window): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=wxCLIP_CHILDREN|wxSW_3D, + Create(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=wxCLIP_CHILDREN|wxSW_3D, String name=SashNameStr) -> bool """ return _windows_.SashWindow_Create(*args, **kwargs) @@ -1534,8 +1530,8 @@ class SashLayoutWindow(SashWindow): return "<%s.%s; proxy of C++ wxSashLayoutWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=wxCLIP_CHILDREN|wxSW_3D, + __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=wxCLIP_CHILDREN|wxSW_3D, String name=SashLayoutNameStr) -> SashLayoutWindow """ newobj = _windows_.new_SashLayoutWindow(*args, **kwargs) @@ -1546,8 +1542,8 @@ class SashLayoutWindow(SashWindow): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=wxCLIP_CHILDREN|wxSW_3D, + Create(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=wxCLIP_CHILDREN|wxSW_3D, String name=SashLayoutNameStr) -> bool """ return _windows_.SashLayoutWindow_Create(*args, **kwargs) @@ -1760,14 +1756,7 @@ class VScrolledWindow(Panel): return _windows_.VScrolledWindow_ScrollToLine(*args, **kwargs) def ScrollLines(*args, **kwargs): - """ - ScrollLines(self, int lines) -> bool - - If the platform and window class supports it, scrolls the window by - the given number of lines down, if lines is positive, or up if lines - is negative. Returns True if the window was scrolled, False if it was - already on top/bottom and nothing was done. - """ + """ScrollLines(self, int lines) -> bool""" return _windows_.VScrolledWindow_ScrollLines(*args, **kwargs) def ScrollPages(*args, **kwargs): @@ -1790,19 +1779,11 @@ class VScrolledWindow(Panel): return _windows_.VScrolledWindow_RefreshLines(*args, **kwargs) def HitTestXT(*args, **kwargs): - """ - HitTestXT(self, int x, int y) -> int - - Test where the given (in client coords) point lies - """ + """HitTestXT(self, int x, int y) -> int""" return _windows_.VScrolledWindow_HitTestXT(*args, **kwargs) def HitTest(*args, **kwargs): - """ - HitTest(self, Point pt) -> int - - Test where the given (in client coords) point lies - """ + """HitTest(self, Point pt) -> int""" return _windows_.VScrolledWindow_HitTest(*args, **kwargs) def RefreshAll(*args, **kwargs): @@ -2150,7 +2131,7 @@ class ColourData(_core.Object): Gets the i'th custom colour associated with the colour dialog. i should be an integer between 0 and 15. The default custom colours are - all white. + all invalid colours. """ return _windows_.ColourData_GetCustomColour(*args, **kwargs) @@ -2178,7 +2159,7 @@ class ColourData(_core.Object): SetCustomColour(self, int i, Colour colour) Sets the i'th custom colour for the colour dialog. i should be an - integer between 0 and 15. The default custom colours are all white. + integer between 0 and 15. The default custom colours are all invalid colours. """ return _windows_.ColourData_SetCustomColour(*args, **kwargs) @@ -3135,8 +3116,9 @@ class MDIParentFrame(Frame): return "<%s.%s; proxy of C++ wxMDIParentFrame instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, String title, Point pos=DefaultPosition, - Size size=DefaultSize, long style=wxDEFAULT_FRAME_STYLE|wxVSCROLL|wxHSCROLL, + __init__(self, Window parent, int id=-1, String title=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=wxDEFAULT_FRAME_STYLE|wxVSCROLL|wxHSCROLL, String name=FrameNameStr) -> MDIParentFrame """ newobj = _windows_.new_MDIParentFrame(*args, **kwargs) @@ -3147,8 +3129,9 @@ class MDIParentFrame(Frame): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, String title, Point pos=DefaultPosition, - Size size=DefaultSize, long style=wxDEFAULT_FRAME_STYLE|wxVSCROLL|wxHSCROLL, + Create(self, Window parent, int id=-1, String title=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=wxDEFAULT_FRAME_STYLE|wxVSCROLL|wxHSCROLL, String name=FrameNameStr) -> bool """ return _windows_.MDIParentFrame_Create(*args, **kwargs) @@ -3216,8 +3199,9 @@ class MDIChildFrame(Frame): return "<%s.%s; proxy of C++ wxMDIChildFrame instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, MDIParentFrame parent, int id, String title, Point pos=DefaultPosition, - Size size=DefaultSize, long style=DEFAULT_FRAME_STYLE, + __init__(self, MDIParentFrame parent, int id=-1, String title=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=DEFAULT_FRAME_STYLE, String name=FrameNameStr) -> MDIChildFrame """ newobj = _windows_.new_MDIChildFrame(*args, **kwargs) @@ -3228,8 +3212,9 @@ class MDIChildFrame(Frame): def Create(*args, **kwargs): """ - Create(self, MDIParentFrame parent, int id, String title, Point pos=DefaultPosition, - Size size=DefaultSize, long style=DEFAULT_FRAME_STYLE, + Create(self, MDIParentFrame parent, int id=-1, String title=EmptyString, + Point pos=DefaultPosition, Size size=DefaultSize, + long style=DEFAULT_FRAME_STYLE, String name=FrameNameStr) -> bool """ return _windows_.MDIChildFrame_Create(*args, **kwargs) @@ -3296,8 +3281,8 @@ class PyWindow(_core.Window): return "<%s.%s; proxy of C++ wxPyWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=0, String name=PanelNameStr) -> PyWindow + __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=0, String name=PanelNameStr) -> PyWindow """ newobj = _windows_.new_PyWindow(*args, **kwargs) self.this = newobj.this @@ -3416,8 +3401,8 @@ class PyPanel(Panel): return "<%s.%s; proxy of C++ wxPyPanel instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=0, String name=PanelNameStr) -> PyPanel + __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=0, String name=PanelNameStr) -> PyPanel """ newobj = _windows_.new_PyPanel(*args, **kwargs) self.this = newobj.this @@ -3536,8 +3521,8 @@ class PyScrolledWindow(ScrolledWindow): return "<%s.%s; proxy of C++ wxPyScrolledWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=0, String name=PanelNameStr) -> PyScrolledWindow + __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=0, String name=PanelNameStr) -> PyScrolledWindow """ newobj = _windows_.new_PyScrolledWindow(*args, **kwargs) self.this = newobj.this diff --git a/wxPython/src/msw/_windows_wrap.cpp b/wxPython/src/msw/_windows_wrap.cpp index d57a21028e..8aafd7fe37 100644 --- a/wxPython/src/msw/_windows_wrap.cpp +++ b/wxPython/src/msw/_windows_wrap.cpp @@ -3097,8 +3097,9 @@ static PyObject * TopLevelWindow_swigregister(PyObject *self, PyObject *args) { static PyObject *_wrap_new_Frame(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; - wxString *arg3 = 0 ; + int arg2 = (int) (int)-1 ; + wxString const &arg3_defvalue = wxPyEmptyString ; + wxString *arg3 = (wxString *) &arg3_defvalue ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -3122,15 +3123,19 @@ static PyObject *_wrap_new_Frame(PyObject *self, PyObject *args, PyObject *kwarg (char *) "parent",(char *) "id",(char *) "title",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:new_Frame",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOO:new_Frame",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int const) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; - { - arg3 = wxString_in_helper(obj2); - if (arg3 == NULL) SWIG_fail; - temp3 = True; + if (obj1) { + arg2 = (int const) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj2) { + { + arg3 = wxString_in_helper(obj2); + if (arg3 == NULL) SWIG_fail; + temp3 = True; + } } if (obj3) { { @@ -3217,8 +3222,9 @@ static PyObject *_wrap_Frame_Create(PyObject *self, PyObject *args, PyObject *kw PyObject *resultobj; wxFrame *arg1 = (wxFrame *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; - wxString *arg4 = 0 ; + int arg3 = (int) (int)-1 ; + wxString const &arg4_defvalue = wxPyEmptyString ; + wxString *arg4 = (wxString *) &arg4_defvalue ; wxPoint const &arg5_defvalue = wxDefaultPosition ; wxPoint *arg5 = (wxPoint *) &arg5_defvalue ; wxSize const &arg6_defvalue = wxDefaultSize ; @@ -3243,17 +3249,21 @@ static PyObject *_wrap_Frame_Create(PyObject *self, PyObject *args, PyObject *kw (char *) "self",(char *) "parent",(char *) "id",(char *) "title",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOOO:Frame_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOO:Frame_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxFrame, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int const) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; - { - arg4 = wxString_in_helper(obj3); - if (arg4 == NULL) SWIG_fail; - temp4 = True; + if (obj2) { + arg3 = (int const) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj3) { + { + arg4 = wxString_in_helper(obj3); + if (arg4 == NULL) SWIG_fail; + temp4 = True; + } } if (obj4) { { @@ -4030,8 +4040,9 @@ static PyObject * Frame_swigregister(PyObject *self, PyObject *args) { static PyObject *_wrap_new_Dialog(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; - wxString *arg3 = 0 ; + int arg2 = (int) (int)-1 ; + wxString const &arg3_defvalue = wxPyEmptyString ; + wxString *arg3 = (wxString *) &arg3_defvalue ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -4055,15 +4066,19 @@ static PyObject *_wrap_new_Dialog(PyObject *self, PyObject *args, PyObject *kwar (char *) "parent",(char *) "id",(char *) "title",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:new_Dialog",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOO:new_Dialog",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int const) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; - { - arg3 = wxString_in_helper(obj2); - if (arg3 == NULL) SWIG_fail; - temp3 = True; + if (obj1) { + arg2 = (int const) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj2) { + { + arg3 = wxString_in_helper(obj2); + if (arg3 == NULL) SWIG_fail; + temp3 = True; + } } if (obj3) { { @@ -4150,8 +4165,9 @@ static PyObject *_wrap_Dialog_Create(PyObject *self, PyObject *args, PyObject *k PyObject *resultobj; wxDialog *arg1 = (wxDialog *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; - wxString *arg4 = 0 ; + int arg3 = (int) (int)-1 ; + wxString const &arg4_defvalue = wxPyEmptyString ; + wxString *arg4 = (wxString *) &arg4_defvalue ; wxPoint const &arg5_defvalue = wxDefaultPosition ; wxPoint *arg5 = (wxPoint *) &arg5_defvalue ; wxSize const &arg6_defvalue = wxDefaultSize ; @@ -4176,17 +4192,21 @@ static PyObject *_wrap_Dialog_Create(PyObject *self, PyObject *args, PyObject *k (char *) "self",(char *) "parent",(char *) "id",(char *) "title",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOOO:Dialog_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOO:Dialog_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxDialog, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int const) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; - { - arg4 = wxString_in_helper(obj3); - if (arg4 == NULL) SWIG_fail; - temp4 = True; + if (obj2) { + arg3 = (int const) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj3) { + { + arg4 = wxString_in_helper(obj3); + if (arg4 == NULL) SWIG_fail; + temp4 = True; + } } if (obj4) { { @@ -4500,8 +4520,9 @@ static PyObject * Dialog_swigregister(PyObject *self, PyObject *args) { static PyObject *_wrap_new_MiniFrame(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; - wxString *arg3 = 0 ; + int arg2 = (int) (int)-1 ; + wxString const &arg3_defvalue = wxPyEmptyString ; + wxString *arg3 = (wxString *) &arg3_defvalue ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -4525,15 +4546,19 @@ static PyObject *_wrap_new_MiniFrame(PyObject *self, PyObject *args, PyObject *k (char *) "parent",(char *) "id",(char *) "title",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:new_MiniFrame",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOO:new_MiniFrame",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int const) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; - { - arg3 = wxString_in_helper(obj2); - if (arg3 == NULL) SWIG_fail; - temp3 = True; + if (obj1) { + arg2 = (int const) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj2) { + { + arg3 = wxString_in_helper(obj2); + if (arg3 == NULL) SWIG_fail; + temp3 = True; + } } if (obj3) { { @@ -4616,8 +4641,9 @@ static PyObject *_wrap_MiniFrame_Create(PyObject *self, PyObject *args, PyObject PyObject *resultobj; wxMiniFrame *arg1 = (wxMiniFrame *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; - wxString *arg4 = 0 ; + int arg3 = (int) (int)-1 ; + wxString const &arg4_defvalue = wxPyEmptyString ; + wxString *arg4 = (wxString *) &arg4_defvalue ; wxPoint const &arg5_defvalue = wxDefaultPosition ; wxPoint *arg5 = (wxPoint *) &arg5_defvalue ; wxSize const &arg6_defvalue = wxDefaultSize ; @@ -4642,17 +4668,21 @@ static PyObject *_wrap_MiniFrame_Create(PyObject *self, PyObject *args, PyObject (char *) "self",(char *) "parent",(char *) "id",(char *) "title",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOOO:MiniFrame_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOO:MiniFrame_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxMiniFrame, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int const) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; - { - arg4 = wxString_in_helper(obj3); - if (arg4 == NULL) SWIG_fail; - temp4 = True; + if (obj2) { + arg3 = (int const) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj3) { + { + arg4 = wxString_in_helper(obj3); + if (arg4 == NULL) SWIG_fail; + temp4 = True; + } } if (obj4) { { @@ -4861,7 +4891,7 @@ static PyObject *_wrap_new_SplashScreen(PyObject *self, PyObject *args, PyObject long arg2 ; int arg3 ; wxWindow *arg4 = (wxWindow *) 0 ; - int arg5 ; + int arg5 = (int) -1 ; wxPoint const &arg6_defvalue = wxDefaultPosition ; wxPoint *arg6 = (wxPoint *) &arg6_defvalue ; wxSize const &arg7_defvalue = wxDefaultSize ; @@ -4882,7 +4912,7 @@ static PyObject *_wrap_new_SplashScreen(PyObject *self, PyObject *args, PyObject (char *) "bitmap",(char *) "splashStyle",(char *) "milliseconds",(char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO|OOO:new_SplashScreen",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOOO:new_SplashScreen",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxBitmap, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; @@ -4896,8 +4926,10 @@ static PyObject *_wrap_new_SplashScreen(PyObject *self, PyObject *args, PyObject if (PyErr_Occurred()) SWIG_fail; if ((SWIG_ConvertPtr(obj3,(void **)(&arg4),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg5 = (int) SWIG_AsInt(obj4); - if (PyErr_Occurred()) SWIG_fail; + if (obj4) { + arg5 = (int) SWIG_AsInt(obj4); + if (PyErr_Occurred()) SWIG_fail; + } if (obj5) { { arg6 = &temp6; @@ -5103,7 +5135,7 @@ static PyObject *_wrap_StatusBar_Create(PyObject *self, PyObject *args, PyObject PyObject *resultobj; wxStatusBar *arg1 = (wxStatusBar *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; + int arg3 = (int) -1 ; long arg4 = (long) wxST_SIZEGRIP ; wxString const &arg5_defvalue = wxPyStatusLineNameStr ; wxString *arg5 = (wxString *) &arg5_defvalue ; @@ -5118,13 +5150,15 @@ static PyObject *_wrap_StatusBar_Create(PyObject *self, PyObject *args, PyObject (char *) "self",(char *) "parent",(char *) "id",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OO:StatusBar_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOO:StatusBar_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxStatusBar, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } if (obj3) { arg4 = (long) SWIG_AsLong(obj3); if (PyErr_Occurred()) SWIG_fail; @@ -6734,7 +6768,7 @@ static PyObject *_wrap_SashLayoutNameStr_get() { static PyObject *_wrap_new_SashWindow(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; + int arg2 = (int) -1 ; wxPoint const &arg3_defvalue = wxDefaultPosition ; wxPoint *arg3 = (wxPoint *) &arg3_defvalue ; wxSize const &arg4_defvalue = wxDefaultSize ; @@ -6756,11 +6790,13 @@ static PyObject *_wrap_new_SashWindow(PyObject *self, PyObject *args, PyObject * (char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOO:new_SashWindow",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOO:new_SashWindow",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (obj2) { { arg3 = &temp3; @@ -6834,7 +6870,7 @@ static PyObject *_wrap_SashWindow_Create(PyObject *self, PyObject *args, PyObjec PyObject *resultobj; wxSashWindow *arg1 = (wxSashWindow *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; + int arg3 = (int) -1 ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -6857,13 +6893,15 @@ static PyObject *_wrap_SashWindow_Create(PyObject *self, PyObject *args, PyObjec (char *) "self",(char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:SashWindow_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOO:SashWindow_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxSashWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } if (obj3) { { arg4 = &temp4; @@ -8158,7 +8196,7 @@ static PyObject * CalculateLayoutEvent_swigregister(PyObject *self, PyObject *ar static PyObject *_wrap_new_SashLayoutWindow(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; + int arg2 = (int) -1 ; wxPoint const &arg3_defvalue = wxDefaultPosition ; wxPoint *arg3 = (wxPoint *) &arg3_defvalue ; wxSize const &arg4_defvalue = wxDefaultSize ; @@ -8180,11 +8218,13 @@ static PyObject *_wrap_new_SashLayoutWindow(PyObject *self, PyObject *args, PyOb (char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOO:new_SashLayoutWindow",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOO:new_SashLayoutWindow",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (obj2) { { arg3 = &temp3; @@ -8258,7 +8298,7 @@ static PyObject *_wrap_SashLayoutWindow_Create(PyObject *self, PyObject *args, P PyObject *resultobj; wxSashLayoutWindow *arg1 = (wxSashLayoutWindow *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; + int arg3 = (int) -1 ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -8281,13 +8321,15 @@ static PyObject *_wrap_SashLayoutWindow_Create(PyObject *self, PyObject *args, P (char *) "self",(char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:SashLayoutWindow_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOO:SashLayoutWindow_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxSashLayoutWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } if (obj3) { { arg4 = &temp4; @@ -12526,7 +12568,7 @@ static PyObject *_wrap_new_MultiChoiceDialog(PyObject *self, PyObject *args, PyO wxString *arg2 = 0 ; wxString *arg3 = 0 ; int arg4 = (int) 0 ; - wxString *arg5 = (wxString *) 0 ; + wxString *arg5 = (wxString *) NULL ; long arg6 = (long) wxCHOICEDLG_STYLE ; wxPoint const &arg7_defvalue = wxDefaultPosition ; wxPoint *arg7 = (wxPoint *) &arg7_defvalue ; @@ -14555,8 +14597,9 @@ static PyObject * FindReplaceDialog_swigregister(PyObject *self, PyObject *args) static PyObject *_wrap_new_MDIParentFrame(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; - wxString *arg3 = 0 ; + int arg2 = (int) (int)-1 ; + wxString const &arg3_defvalue = wxPyEmptyString ; + wxString *arg3 = (wxString *) &arg3_defvalue ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -14580,15 +14623,19 @@ static PyObject *_wrap_new_MDIParentFrame(PyObject *self, PyObject *args, PyObje (char *) "parent",(char *) "id",(char *) "title",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:new_MDIParentFrame",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOO:new_MDIParentFrame",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int const) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; - { - arg3 = wxString_in_helper(obj2); - if (arg3 == NULL) SWIG_fail; - temp3 = True; + if (obj1) { + arg2 = (int const) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj2) { + { + arg3 = wxString_in_helper(obj2); + if (arg3 == NULL) SWIG_fail; + temp3 = True; + } } if (obj3) { { @@ -14671,8 +14718,9 @@ static PyObject *_wrap_MDIParentFrame_Create(PyObject *self, PyObject *args, PyO PyObject *resultobj; wxMDIParentFrame *arg1 = (wxMDIParentFrame *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; - wxString *arg4 = 0 ; + int arg3 = (int) (int)-1 ; + wxString const &arg4_defvalue = wxPyEmptyString ; + wxString *arg4 = (wxString *) &arg4_defvalue ; wxPoint const &arg5_defvalue = wxDefaultPosition ; wxPoint *arg5 = (wxPoint *) &arg5_defvalue ; wxSize const &arg6_defvalue = wxDefaultSize ; @@ -14697,17 +14745,21 @@ static PyObject *_wrap_MDIParentFrame_Create(PyObject *self, PyObject *args, PyO (char *) "self",(char *) "parent",(char *) "id",(char *) "title",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOOO:MDIParentFrame_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOO:MDIParentFrame_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxMDIParentFrame, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int const) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; - { - arg4 = wxString_in_helper(obj3); - if (arg4 == NULL) SWIG_fail; - temp4 = True; + if (obj2) { + arg3 = (int const) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj3) { + { + arg4 = wxString_in_helper(obj3); + if (arg4 == NULL) SWIG_fail; + temp4 = True; + } } if (obj4) { { @@ -15069,8 +15121,9 @@ static PyObject * MDIParentFrame_swigregister(PyObject *self, PyObject *args) { static PyObject *_wrap_new_MDIChildFrame(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxMDIParentFrame *arg1 = (wxMDIParentFrame *) 0 ; - int arg2 ; - wxString *arg3 = 0 ; + int arg2 = (int) (int)-1 ; + wxString const &arg3_defvalue = wxPyEmptyString ; + wxString *arg3 = (wxString *) &arg3_defvalue ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -15094,15 +15147,19 @@ static PyObject *_wrap_new_MDIChildFrame(PyObject *self, PyObject *args, PyObjec (char *) "parent",(char *) "id",(char *) "title",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:new_MDIChildFrame",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOOO:new_MDIChildFrame",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxMDIParentFrame, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int const) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; - { - arg3 = wxString_in_helper(obj2); - if (arg3 == NULL) SWIG_fail; - temp3 = True; + if (obj1) { + arg2 = (int const) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj2) { + { + arg3 = wxString_in_helper(obj2); + if (arg3 == NULL) SWIG_fail; + temp3 = True; + } } if (obj3) { { @@ -15189,8 +15246,9 @@ static PyObject *_wrap_MDIChildFrame_Create(PyObject *self, PyObject *args, PyOb PyObject *resultobj; wxMDIChildFrame *arg1 = (wxMDIChildFrame *) 0 ; wxMDIParentFrame *arg2 = (wxMDIParentFrame *) 0 ; - int arg3 ; - wxString *arg4 = 0 ; + int arg3 = (int) (int)-1 ; + wxString const &arg4_defvalue = wxPyEmptyString ; + wxString *arg4 = (wxString *) &arg4_defvalue ; wxPoint const &arg5_defvalue = wxDefaultPosition ; wxPoint *arg5 = (wxPoint *) &arg5_defvalue ; wxSize const &arg6_defvalue = wxDefaultSize ; @@ -15215,17 +15273,21 @@ static PyObject *_wrap_MDIChildFrame_Create(PyObject *self, PyObject *args, PyOb (char *) "self",(char *) "parent",(char *) "id",(char *) "title",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|OOOO:MDIChildFrame_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOOO:MDIChildFrame_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxMDIChildFrame, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxMDIParentFrame, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int const) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; - { - arg4 = wxString_in_helper(obj3); - if (arg4 == NULL) SWIG_fail; - temp4 = True; + if (obj2) { + arg3 = (int const) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj3) { + { + arg4 = wxString_in_helper(obj3); + if (arg4 == NULL) SWIG_fail; + temp4 = True; + } } if (obj4) { { @@ -15476,7 +15538,7 @@ static PyObject * MDIClientWindow_swigregister(PyObject *self, PyObject *args) { static PyObject *_wrap_new_PyWindow(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; + int arg2 = (int) (int)-1 ; wxPoint const &arg3_defvalue = wxDefaultPosition ; wxPoint *arg3 = (wxPoint *) &arg3_defvalue ; wxSize const &arg4_defvalue = wxDefaultSize ; @@ -15498,11 +15560,13 @@ static PyObject *_wrap_new_PyWindow(PyObject *self, PyObject *args, PyObject *kw (char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOO:new_PyWindow",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOO:new_PyWindow",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int const) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; + if (obj1) { + arg2 = (int const) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (obj2) { { arg3 = &temp3; @@ -16319,7 +16383,7 @@ static PyObject * PyWindow_swigregister(PyObject *self, PyObject *args) { static PyObject *_wrap_new_PyPanel(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; + int arg2 = (int) (int)-1 ; wxPoint const &arg3_defvalue = wxDefaultPosition ; wxPoint *arg3 = (wxPoint *) &arg3_defvalue ; wxSize const &arg4_defvalue = wxDefaultSize ; @@ -16341,11 +16405,13 @@ static PyObject *_wrap_new_PyPanel(PyObject *self, PyObject *args, PyObject *kwa (char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOO:new_PyPanel",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOO:new_PyPanel",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int const) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; + if (obj1) { + arg2 = (int const) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (obj2) { { arg3 = &temp3; @@ -17162,7 +17228,7 @@ static PyObject * PyPanel_swigregister(PyObject *self, PyObject *args) { static PyObject *_wrap_new_PyScrolledWindow(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; + int arg2 = (int) (int)-1 ; wxPoint const &arg3_defvalue = wxDefaultPosition ; wxPoint *arg3 = (wxPoint *) &arg3_defvalue ; wxSize const &arg4_defvalue = wxDefaultSize ; @@ -17184,11 +17250,13 @@ static PyObject *_wrap_new_PyScrolledWindow(PyObject *self, PyObject *args, PyOb (char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOO:new_PyScrolledWindow",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOO:new_PyScrolledWindow",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int const) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; + if (obj1) { + arg2 = (int const) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (obj2) { { arg3 = &temp3; diff --git a/wxPython/src/msw/grid.py b/wxPython/src/msw/grid.py index ddf9fe322c..30ddf3efca 100644 --- a/wxPython/src/msw/grid.py +++ b/wxPython/src/msw/grid.py @@ -1217,8 +1217,8 @@ class Grid(_windows.ScrolledWindow): return "<%s.%s; proxy of C++ wxGrid instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=WANTS_CHARS, + __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=WANTS_CHARS, String name=PanelNameStr) -> Grid """ newobj = _grid.new_Grid(*args, **kwargs) @@ -1229,8 +1229,8 @@ class Grid(_windows.ScrolledWindow): def Create(*args, **kwargs): """ - Create(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=WANTS_CHARS, + Create(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=WANTS_CHARS, String name=PanelNameStr) -> bool """ return _grid.Grid_Create(*args, **kwargs) diff --git a/wxPython/src/msw/grid_wrap.cpp b/wxPython/src/msw/grid_wrap.cpp index 5e66409680..a3bdc54010 100644 --- a/wxPython/src/msw/grid_wrap.cpp +++ b/wxPython/src/msw/grid_wrap.cpp @@ -8017,7 +8017,7 @@ static PyObject * GridCellCoords_swigregister(PyObject *self, PyObject *args) { static PyObject *_wrap_new_Grid(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; + int arg2 = (int) -1 ; wxPoint const &arg3_defvalue = wxDefaultPosition ; wxPoint *arg3 = (wxPoint *) &arg3_defvalue ; wxSize const &arg4_defvalue = wxDefaultSize ; @@ -8039,11 +8039,13 @@ static PyObject *_wrap_new_Grid(PyObject *self, PyObject *args, PyObject *kwargs (char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOO:new_Grid",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOO:new_Grid",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (obj2) { { arg3 = &temp3; @@ -8121,7 +8123,7 @@ static PyObject *_wrap_Grid_Create(PyObject *self, PyObject *args, PyObject *kwa PyObject *resultobj; wxGrid *arg1 = (wxGrid *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; + int arg3 = (int) -1 ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -8144,13 +8146,15 @@ static PyObject *_wrap_Grid_Create(PyObject *self, PyObject *args, PyObject *kwa (char *) "self",(char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:Grid_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOO:Grid_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxGrid, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } if (obj3) { { arg4 = &temp4; diff --git a/wxPython/wxPython/_core.py b/wxPython/wxPython/_core.py index d0468cb020..0a794240c6 100644 --- a/wxPython/wxPython/_core.py +++ b/wxPython/wxPython/_core.py @@ -986,8 +986,8 @@ wxControlWithItems = wx._core.ControlWithItems wxControlWithItemsPtr = wx._core.ControlWithItemsPtr wxSizerItem = wx._core.SizerItem wxSizerItemPtr = wx._core.SizerItemPtr -wxSizerItemSpacer = wx._core.SizerItemSpacer wxSizerItemWindow = wx._core.SizerItemWindow +wxSizerItemSpacer = wx._core.SizerItemSpacer wxSizerItemSizer = wx._core.SizerItemSizer wxSizer = wx._core.Sizer wxSizerPtr = wx._core.SizerPtr -- 2.45.2