diff --git a/wxPython/demo/GridSimple.py b/wxPython/demo/GridSimple.py index 5f23c26dc8..f816e7a3f4 100644 --- a/wxPython/demo/GridSimple.py +++ b/wxPython/demo/GridSimple.py @@ -30,6 +30,9 @@ class SimpleGrid(wxGrid): # you can set cell attributes for the whole row (or column) self.SetRowAttr(5, attr) + self.SetColLabelValue(0, "Custom") + self.SetColLabelValue(1, "column") + self.SetColLabelValue(2, "labels") # test all the events EVT_GRID_CELL_LEFT_CLICK(self, self.OnCellLeftClick) diff --git a/wxPython/distrib/wxPython.WSM b/wxPython/distrib/wxPython.WSM index 9205dd5512..863771d4a9 100644 Binary files a/wxPython/distrib/wxPython.WSM and b/wxPython/distrib/wxPython.WSM differ diff --git a/wxPython/src/__version__.py b/wxPython/src/__version__.py index d1f4e8a4f6..2ca00768cd 100644 --- a/wxPython/src/__version__.py +++ b/wxPython/src/__version__.py @@ -1 +1 @@ -ver = '2.1.16' +ver = '2.2.0' diff --git a/wxPython/src/clip_dnd.i b/wxPython/src/clip_dnd.i index a9ff1f6f94..8feb9e8786 100644 --- a/wxPython/src/clip_dnd.i +++ b/wxPython/src/clip_dnd.i @@ -317,8 +317,9 @@ public: return list; } } - - //void AddFile(const wxString &filename); +#ifdef __WXMSW__ + void AddFile(const wxString &filename); +#endif }; diff --git a/wxPython/src/events.i b/wxPython/src/events.i index 6ca6f66c18..d0c6713c0b 100644 --- a/wxPython/src/events.i +++ b/wxPython/src/events.i @@ -75,7 +75,8 @@ class wxCommandEvent : public wxEvent { public: wxCommandEvent(int commandEventType = 0, int id = 0); - bool Checked(); + bool IsChecked(); + %name(Checked)bool IsChecked(); long GetExtraLong(); int GetInt(); int GetSelection(); diff --git a/wxPython/src/mdi.i b/wxPython/src/mdi.i index 6fc5ed554a..abbba857e7 100644 --- a/wxPython/src/mdi.i +++ b/wxPython/src/mdi.i @@ -55,6 +55,9 @@ public: // TODO: This isn't handled by the standard event-table system... //wxMDIClientWindow* OnCreateClient(); + wxMenu* GetWindowMenu(); + void SetWindowMenu(wxMenu* menu); + #ifdef __WXMSW__ void SetToolBar(wxToolBar* toolbar); #endif diff --git a/wxPython/src/msw/clip_dnd.cpp b/wxPython/src/msw/clip_dnd.cpp index 4ff3c2d667..abf56480c1 100644 --- a/wxPython/src/msw/clip_dnd.cpp +++ b/wxPython/src/msw/clip_dnd.cpp @@ -1679,6 +1679,46 @@ static PyObject *_wrap_wxFileDataObject_GetFilenames(PyObject *self, PyObject *a return _resultobj; } +#define wxFileDataObject_AddFile(_swigobj,_swigarg0) (_swigobj->AddFile(_swigarg0)) +static PyObject *_wrap_wxFileDataObject_AddFile(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFileDataObject * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","filename", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileDataObject_AddFile",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileDataObject_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFileDataObject_AddFile. Expected _wxFileDataObject_p."); + return NULL; + } + } +{ + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFileDataObject_AddFile(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + static void *SwigwxCustomDataObjectTowxDataObjectSimple(void *ptr) { wxCustomDataObject *src; wxDataObjectSimple *dest; @@ -3297,6 +3337,7 @@ static PyMethodDef clip_dndcMethods[] = { { "wxCustomDataObject_SetData", (PyCFunction) _wrap_wxCustomDataObject_SetData, METH_VARARGS | METH_KEYWORDS }, { "wxCustomDataObject_TakeData", (PyCFunction) _wrap_wxCustomDataObject_TakeData, METH_VARARGS | METH_KEYWORDS }, { "new_wxCustomDataObject", (PyCFunction) _wrap_new_wxCustomDataObject, METH_VARARGS | METH_KEYWORDS }, + { "wxFileDataObject_AddFile", (PyCFunction) _wrap_wxFileDataObject_AddFile, METH_VARARGS | METH_KEYWORDS }, { "wxFileDataObject_GetFilenames", (PyCFunction) _wrap_wxFileDataObject_GetFilenames, METH_VARARGS | METH_KEYWORDS }, { "new_wxFileDataObject", (PyCFunction) _wrap_new_wxFileDataObject, METH_VARARGS | METH_KEYWORDS }, { "wxPyBitmapDataObject__setSelf", (PyCFunction) _wrap_wxPyBitmapDataObject__setSelf, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/msw/clip_dnd.py b/wxPython/src/msw/clip_dnd.py index 3e9416a13d..8be9ceb3a4 100644 --- a/wxPython/src/msw/clip_dnd.py +++ b/wxPython/src/msw/clip_dnd.py @@ -219,6 +219,9 @@ class wxFileDataObjectPtr(wxDataObjectSimplePtr): def GetFilenames(self, *_args, **_kwargs): val = apply(clip_dndc.wxFileDataObject_GetFilenames,(self,) + _args, _kwargs) return val + def AddFile(self, *_args, **_kwargs): + val = apply(clip_dndc.wxFileDataObject_AddFile,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxFileDataObject(wxFileDataObjectPtr): diff --git a/wxPython/src/msw/events.cpp b/wxPython/src/msw/events.cpp index 55ff3f82d4..fc50c1c4e4 100644 --- a/wxPython/src/msw/events.cpp +++ b/wxPython/src/msw/events.cpp @@ -764,8 +764,8 @@ static PyObject *_wrap_new_wxCommandEvent(PyObject *self, PyObject *args, PyObje return _resultobj; } -#define wxCommandEvent_Checked(_swigobj) (_swigobj->Checked()) -static PyObject *_wrap_wxCommandEvent_Checked(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxCommandEvent_IsChecked(_swigobj) (_swigobj->IsChecked()) +static PyObject *_wrap_wxCommandEvent_IsChecked(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _result; wxCommandEvent * _arg0; @@ -773,18 +773,18 @@ static PyObject *_wrap_wxCommandEvent_Checked(PyObject *self, PyObject *args, Py char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCommandEvent_Checked",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCommandEvent_IsChecked",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCommandEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCommandEvent_Checked. Expected _wxCommandEvent_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCommandEvent_IsChecked. Expected _wxCommandEvent_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxCommandEvent_Checked(_arg0); + _result = (bool )wxCommandEvent_IsChecked(_arg0); wxPy_END_ALLOW_THREADS; } _resultobj = Py_BuildValue("i",_result); @@ -5214,7 +5214,8 @@ static PyMethodDef eventscMethods[] = { { "wxCommandEvent_GetSelection", (PyCFunction) _wrap_wxCommandEvent_GetSelection, METH_VARARGS | METH_KEYWORDS }, { "wxCommandEvent_GetInt", (PyCFunction) _wrap_wxCommandEvent_GetInt, METH_VARARGS | METH_KEYWORDS }, { "wxCommandEvent_GetExtraLong", (PyCFunction) _wrap_wxCommandEvent_GetExtraLong, METH_VARARGS | METH_KEYWORDS }, - { "wxCommandEvent_Checked", (PyCFunction) _wrap_wxCommandEvent_Checked, METH_VARARGS | METH_KEYWORDS }, + { "wxCommandEvent_Checked", (PyCFunction) _wrap_wxCommandEvent_IsChecked, METH_VARARGS | METH_KEYWORDS }, + { "wxCommandEvent_IsChecked", (PyCFunction) _wrap_wxCommandEvent_IsChecked, METH_VARARGS | METH_KEYWORDS }, { "new_wxCommandEvent", (PyCFunction) _wrap_new_wxCommandEvent, METH_VARARGS | METH_KEYWORDS }, { "wxCloseEvent_SetCanVeto", (PyCFunction) _wrap_wxCloseEvent_SetCanVeto, METH_VARARGS | METH_KEYWORDS }, { "wxCloseEvent_GetVeto", (PyCFunction) _wrap_wxCloseEvent_GetVeto, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/msw/events.py b/wxPython/src/msw/events.py index e5ca31ceb0..bea61f2861 100644 --- a/wxPython/src/msw/events.py +++ b/wxPython/src/msw/events.py @@ -105,6 +105,9 @@ class wxCommandEventPtr(wxEventPtr): def __init__(self,this): self.this = this self.thisown = 0 + def IsChecked(self, *_args, **_kwargs): + val = apply(eventsc.wxCommandEvent_IsChecked,(self,) + _args, _kwargs) + return val def Checked(self, *_args, **_kwargs): val = apply(eventsc.wxCommandEvent_Checked,(self,) + _args, _kwargs) return val diff --git a/wxPython/src/msw/mdi.cpp b/wxPython/src/msw/mdi.cpp index 178767f380..beb1536cea 100644 --- a/wxPython/src/msw/mdi.cpp +++ b/wxPython/src/msw/mdi.cpp @@ -408,6 +408,76 @@ static PyObject *_wrap_wxMDIParentFrame_GetToolBar(PyObject *self, PyObject *arg return _resultobj; } +#define wxMDIParentFrame_GetWindowMenu(_swigobj) (_swigobj->GetWindowMenu()) +static PyObject *_wrap_wxMDIParentFrame_GetWindowMenu(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxMenu * _result; + wxMDIParentFrame * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMDIParentFrame_GetWindowMenu",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMDIParentFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMDIParentFrame_GetWindowMenu. Expected _wxMDIParentFrame_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxMenu *)wxMDIParentFrame_GetWindowMenu(_arg0); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxMenu_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxMDIParentFrame_SetWindowMenu(_swigobj,_swigarg0) (_swigobj->SetWindowMenu(_swigarg0)) +static PyObject *_wrap_wxMDIParentFrame_SetWindowMenu(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxMDIParentFrame * _arg0; + wxMenu * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","menu", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxMDIParentFrame_SetWindowMenu",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMDIParentFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMDIParentFrame_SetWindowMenu. Expected _wxMDIParentFrame_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxMenu_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMDIParentFrame_SetWindowMenu. Expected _wxMenu_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxMDIParentFrame_SetWindowMenu(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxMDIParentFrame_SetToolBar(_swigobj,_swigarg0) (_swigobj->SetToolBar(_swigarg0)) static PyObject *_wrap_wxMDIParentFrame_SetToolBar(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -706,6 +776,8 @@ static PyMethodDef mdicMethods[] = { { "new_wxMDIChildFrame", (PyCFunction) _wrap_new_wxMDIChildFrame, METH_VARARGS | METH_KEYWORDS }, { "wxMDIParentFrame_Tile", (PyCFunction) _wrap_wxMDIParentFrame_Tile, METH_VARARGS | METH_KEYWORDS }, { "wxMDIParentFrame_SetToolBar", (PyCFunction) _wrap_wxMDIParentFrame_SetToolBar, METH_VARARGS | METH_KEYWORDS }, + { "wxMDIParentFrame_SetWindowMenu", (PyCFunction) _wrap_wxMDIParentFrame_SetWindowMenu, METH_VARARGS | METH_KEYWORDS }, + { "wxMDIParentFrame_GetWindowMenu", (PyCFunction) _wrap_wxMDIParentFrame_GetWindowMenu, METH_VARARGS | METH_KEYWORDS }, { "wxMDIParentFrame_GetToolBar", (PyCFunction) _wrap_wxMDIParentFrame_GetToolBar, METH_VARARGS | METH_KEYWORDS }, { "wxMDIParentFrame_GetClientWindow", (PyCFunction) _wrap_wxMDIParentFrame_GetClientWindow, METH_VARARGS | METH_KEYWORDS }, { "wxMDIParentFrame_GetActiveChild", (PyCFunction) _wrap_wxMDIParentFrame_GetActiveChild, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/msw/mdi.py b/wxPython/src/msw/mdi.py index 0569d10921..b42676e001 100644 --- a/wxPython/src/msw/mdi.py +++ b/wxPython/src/msw/mdi.py @@ -45,6 +45,13 @@ class wxMDIParentFramePtr(wxFramePtr): val = apply(mdic.wxMDIParentFrame_GetToolBar,(self,) + _args, _kwargs) if val: val = wxWindowPtr(val) return val + def GetWindowMenu(self, *_args, **_kwargs): + val = apply(mdic.wxMDIParentFrame_GetWindowMenu,(self,) + _args, _kwargs) + if val: val = wxMenuPtr(val) + return val + def SetWindowMenu(self, *_args, **_kwargs): + val = apply(mdic.wxMDIParentFrame_SetWindowMenu,(self,) + _args, _kwargs) + return val def SetToolBar(self, *_args, **_kwargs): val = apply(mdic.wxMDIParentFrame_SetToolBar,(self,) + _args, _kwargs) return val diff --git a/wxPython/src/msw/printfw.cpp b/wxPython/src/msw/printfw.cpp index b6d6548a70..00aea76a57 100644 --- a/wxPython/src/msw/printfw.cpp +++ b/wxPython/src/msw/printfw.cpp @@ -1552,13 +1552,12 @@ static PyObject *_wrap_wxPageSetupDialogData_SetMinMarginBottomRight(PyObject *s static PyObject *_wrap_wxPageSetupDialogData_SetPaperId(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPageSetupDialogData * _arg0; - wxPaperSize * _arg1; + wxPaperSize _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; char *_kwnames[] = { "self","id", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPageSetupDialogData_SetPaperId",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxPageSetupDialogData_SetPaperId",_kwnames,&_argo0,&_arg1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -1567,16 +1566,9 @@ static PyObject *_wrap_wxPageSetupDialogData_SetPaperId(PyObject *self, PyObject return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPaperSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPageSetupDialogData_SetPaperId. Expected _wxPaperSize_p."); - return NULL; - } - } { wxPy_BEGIN_ALLOW_THREADS; - wxPageSetupDialogData_SetPaperId(_arg0,*_arg1); + wxPageSetupDialogData_SetPaperId(_arg0,_arg1); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); diff --git a/wxPython/src/msw/windows.cpp b/wxPython/src/msw/windows.cpp index 2e4ca5bf6c..66532bc801 100644 --- a/wxPython/src/msw/windows.cpp +++ b/wxPython/src/msw/windows.cpp @@ -1110,6 +1110,62 @@ static PyObject *_wrap_wxWindow_CenterOnParent(PyObject *self, PyObject *args, P return _resultobj; } +#define wxWindow_CentreOnScreen(_swigobj,_swigarg0) (_swigobj->CentreOnScreen(_swigarg0)) +static PyObject *_wrap_wxWindow_CentreOnScreen(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _arg0; + int _arg1 = (int ) wxBOTH; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","direction", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxWindow_CentreOnScreen",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_CentreOnScreen. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxWindow_CentreOnScreen(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxWindow_CenterOnScreen(_swigobj,_swigarg0) (_swigobj->CenterOnScreen(_swigarg0)) +static PyObject *_wrap_wxWindow_CenterOnScreen(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _arg0; + int _arg1 = (int ) wxBOTH; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","direction", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxWindow_CenterOnScreen",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_CenterOnScreen. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxWindow_CenterOnScreen(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxWindow_ClientToScreenXY(_swigobj,_swigarg0,_swigarg1) (_swigobj->ClientToScreen(_swigarg0,_swigarg1)) static PyObject *_wrap_wxWindow_ClientToScreenXY(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -9226,6 +9282,8 @@ static PyMethodDef windowscMethods[] = { { "wxWindow_Close", (PyCFunction) _wrap_wxWindow_Close, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_ClientToScreen", (PyCFunction) _wrap_wxWindow_ClientToScreen, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_ClientToScreenXY", (PyCFunction) _wrap_wxWindow_ClientToScreenXY, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_CenterOnScreen", (PyCFunction) _wrap_wxWindow_CenterOnScreen, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_CentreOnScreen", (PyCFunction) _wrap_wxWindow_CentreOnScreen, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_CenterOnParent", (PyCFunction) _wrap_wxWindow_CenterOnParent, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_CentreOnParent", (PyCFunction) _wrap_wxWindow_CentreOnParent, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_Centre", (PyCFunction) _wrap_wxWindow_Centre, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/msw/windows.py b/wxPython/src/msw/windows.py index f9db9758b1..6028fe3d55 100644 --- a/wxPython/src/msw/windows.py +++ b/wxPython/src/msw/windows.py @@ -139,6 +139,12 @@ class wxWindowPtr(wxEvtHandlerPtr): def CenterOnParent(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_CenterOnParent,(self,) + _args, _kwargs) return val + def CentreOnScreen(self, *_args, **_kwargs): + val = apply(windowsc.wxWindow_CentreOnScreen,(self,) + _args, _kwargs) + return val + def CenterOnScreen(self, *_args, **_kwargs): + val = apply(windowsc.wxWindow_CenterOnScreen,(self,) + _args, _kwargs) + return val def ClientToScreenXY(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_ClientToScreenXY,(self,) + _args, _kwargs) return val diff --git a/wxPython/src/printfw.i b/wxPython/src/printfw.i index c10fad5b2c..d849726c21 100644 --- a/wxPython/src/printfw.i +++ b/wxPython/src/printfw.i @@ -132,7 +132,7 @@ public: void SetMarginBottomRight(const wxPoint& pt); void SetMinMarginTopLeft(const wxPoint& pt); void SetMinMarginBottomRight(const wxPoint& pt); - void SetPaperId(wxPaperSize& id); + void SetPaperId(wxPaperSize id); void SetPaperSize(const wxSize& size); void SetPrintData(const wxPrintData& printData); }; diff --git a/wxPython/src/windows.i b/wxPython/src/windows.i index 1867774874..6e95e8e5ab 100644 --- a/wxPython/src/windows.i +++ b/wxPython/src/windows.i @@ -207,6 +207,8 @@ public: void Centre(int direction = wxBOTH); void CentreOnParent(int direction = wxBOTH ); void CenterOnParent(int direction = wxBOTH ); + void CentreOnScreen(int direction = wxBOTH ); + void CenterOnScreen(int direction = wxBOTH ); // (uses apply'ed INOUT typemap, see above) %name(ClientToScreenXY)void ClientToScreen(int* x, int* y);