From be4d9c1faf22d57098d17a578d218514598c9ce5 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 17 Dec 1998 18:07:15 +0000 Subject: [PATCH] wxPython 0.5.2 Minor fixes and SWIG code generation for RR's changes. MSW and GTK versions are much closer now! git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1221 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- utils/wxPython/src/gdi.i | 8 ++ utils/wxPython/src/msw/controls.cpp | 4 + utils/wxPython/src/msw/controls2.cpp | 108 +++++++++++++-------------- utils/wxPython/src/msw/controls2.py | 14 ++-- utils/wxPython/src/msw/frames.cpp | 3 - utils/wxPython/src/msw/gdi.cpp | 36 +++++++++ utils/wxPython/src/msw/gdi.py | 3 + utils/wxPython/src/msw/stattool.cpp | 60 +++++++-------- utils/wxPython/src/msw/stattool.py | 6 +- utils/wxPython/src/msw/windows.cpp | 54 ++++++-------- utils/wxPython/src/msw/windows.py | 6 +- utils/wxPython/src/msw/windows2.cpp | 30 ++++++++ utils/wxPython/src/msw/windows2.py | 3 + utils/wxPython/src/msw/wx.cpp | 26 ++----- utils/wxPython/src/msw/wx.py | 22 +----- utils/wxPython/src/windows2.i | 7 ++ 16 files changed, 223 insertions(+), 167 deletions(-) diff --git a/utils/wxPython/src/gdi.i b/utils/wxPython/src/gdi.i index 5d5efc3ba6..9509803bc2 100644 --- a/utils/wxPython/src/gdi.i +++ b/utils/wxPython/src/gdi.i @@ -405,10 +405,12 @@ public: //--------------------------------------------------------------------------- +#ifndef __WXMSW__ class wxPostScriptDC : public wxDC { public: wxPostScriptDC(const wxString& output, bool interactive = TRUE, wxWindow* win = NULL); }; +#endif //--------------------------------------------------------------------------- @@ -503,7 +505,13 @@ public: ///////////////////////////////////////////////////////////////////////////// // // $Log$ +// Revision 1.10 1998/12/17 18:05:50 RD +// wxPython 0.5.2 +// Minor fixes and SWIG code generation for RR's changes. MSW and GTK +// versions are much closer now! +// // Revision 1.9 1998/12/17 14:07:37 RR +// // Removed minor differences between wxMSW and wxGTK // // Revision 1.8 1998/12/16 22:10:54 RD diff --git a/utils/wxPython/src/msw/controls.cpp b/utils/wxPython/src/msw/controls.cpp index df26cc2d69..f842a1fae6 100644 --- a/utils/wxPython/src/msw/controls.cpp +++ b/utils/wxPython/src/msw/controls.cpp @@ -63,6 +63,10 @@ extern PyObject *SWIG_newvarlink(void); #endif #endif +#ifdef __WXGTK__ +#include +#endif + static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; if (!target) { diff --git a/utils/wxPython/src/msw/controls2.cpp b/utils/wxPython/src/msw/controls2.cpp index d4315fa1a3..592585147b 100644 --- a/utils/wxPython/src/msw/controls2.cpp +++ b/utils/wxPython/src/msw/controls2.cpp @@ -783,6 +783,29 @@ static PyObject *_wrap_wxListCtrl_EndEditLabel(PyObject *self, PyObject *args) { return _resultobj; } +#define wxListCtrl_GetEditControl(_swigobj) (_swigobj->GetEditControl()) +static PyObject *_wrap_wxListCtrl_GetEditControl(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxTextCtrl * _result; + wxListCtrl * _arg0; + char * _argc0 = 0; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxListCtrl_GetEditControl",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_GetEditControl. Expected _wxListCtrl_p."); + return NULL; + } + } + _result = (wxTextCtrl *)wxListCtrl_GetEditControl(_arg0); + SWIG_MakePtr(_ptemp, (char *) _result,"_wxTextCtrl_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + #define wxListCtrl_EnsureVisible(_swigobj,_swigarg0) (_swigobj->EnsureVisible(_swigarg0)) static PyObject *_wrap_wxListCtrl_EnsureVisible(PyObject *self, PyObject *args) { PyObject * _resultobj; @@ -970,29 +993,6 @@ static PyObject *_wrap_wxListCtrl_GetCountPerPage(PyObject *self, PyObject *args return _resultobj; } -#define wxListCtrl_GetEditControl(_swigobj) (_swigobj->GetEditControl()) -static PyObject *_wrap_wxListCtrl_GetEditControl(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxTextCtrl * _result; - wxListCtrl * _arg0; - char * _argc0 = 0; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxListCtrl_GetEditControl",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_GetEditControl. Expected _wxListCtrl_p."); - return NULL; - } - } - _result = (wxTextCtrl *)wxListCtrl_GetEditControl(_arg0); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxTextCtrl_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - #define wxListCtrl_GetImageList(_swigobj,_swigarg0) (_swigobj->GetImageList(_swigarg0)) static PyObject *_wrap_wxListCtrl_GetImageList(PyObject *self, PyObject *args) { PyObject * _resultobj; @@ -1286,6 +1286,35 @@ static PyObject *_wrap_wxListCtrl_GetTextColour(PyObject *self, PyObject *args) return _resultobj; } +#define wxListCtrl_SetTextColour(_swigobj,_swigarg0) (_swigobj->SetTextColour(_swigarg0)) +static PyObject *_wrap_wxListCtrl_SetTextColour(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxListCtrl * _arg0; + wxColour * _arg1; + char * _argc0 = 0; + char * _argc1 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"ss:wxListCtrl_SetTextColour",&_argc0,&_argc1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_SetTextColour. Expected _wxListCtrl_p."); + return NULL; + } + } + if (_argc1) { + if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxColour_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxListCtrl_SetTextColour. Expected _wxColour_p."); + return NULL; + } + } + wxListCtrl_SetTextColour(_arg0,*_arg1); + Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxListCtrl_GetTopItem(_swigobj) (_swigobj->GetTopItem()) static PyObject *_wrap_wxListCtrl_GetTopItem(PyObject *self, PyObject *args) { PyObject * _resultobj; @@ -1898,35 +1927,6 @@ static PyObject *_wrap_wxListCtrl_SetSingleStyle(PyObject *self, PyObject *args) return _resultobj; } -#define wxListCtrl_SetTextColour(_swigobj,_swigarg0) (_swigobj->SetTextColour(_swigarg0)) -static PyObject *_wrap_wxListCtrl_SetTextColour(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxListCtrl * _arg0; - wxColour * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxListCtrl_SetTextColour",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxListCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_SetTextColour. Expected _wxListCtrl_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxColour_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxListCtrl_SetTextColour. Expected _wxColour_p."); - return NULL; - } - } - wxListCtrl_SetTextColour(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - #define wxListCtrl_SetWindowStyleFlag(_swigobj,_swigarg0) (_swigobj->SetWindowStyleFlag(_swigarg0)) static PyObject *_wrap_wxListCtrl_SetWindowStyleFlag(PyObject *self, PyObject *args) { PyObject * _resultobj; @@ -3886,7 +3886,6 @@ static PyMethodDef controls2cMethods[] = { { "delete_wxTreeItemId", _wrap_delete_wxTreeItemId, 1 }, { "new_wxTreeItemId", _wrap_new_wxTreeItemId, 1 }, { "wxListCtrl_SetWindowStyleFlag", _wrap_wxListCtrl_SetWindowStyleFlag, 1 }, - { "wxListCtrl_SetTextColour", _wrap_wxListCtrl_SetTextColour, 1 }, { "wxListCtrl_SetSingleStyle", _wrap_wxListCtrl_SetSingleStyle, 1 }, { "wxListCtrl_SetItemText", _wrap_wxListCtrl_SetItemText, 1 }, { "wxListCtrl_SetItemState", _wrap_wxListCtrl_SetItemState, 1 }, @@ -3908,6 +3907,7 @@ static PyMethodDef controls2cMethods[] = { { "wxListCtrl_InsertColumnWithInfo", _wrap_wxListCtrl_InsertColumnWithInfo, 1 }, { "wxListCtrl_HitTest", _wrap_wxListCtrl_HitTest, 1 }, { "wxListCtrl_GetTopItem", _wrap_wxListCtrl_GetTopItem, 1 }, + { "wxListCtrl_SetTextColour", _wrap_wxListCtrl_SetTextColour, 1 }, { "wxListCtrl_GetTextColour", _wrap_wxListCtrl_GetTextColour, 1 }, { "wxListCtrl_GetSelectedItemCount", _wrap_wxListCtrl_GetSelectedItemCount, 1 }, { "wxListCtrl_GetNextItem", _wrap_wxListCtrl_GetNextItem, 1 }, @@ -3920,7 +3920,6 @@ static PyMethodDef controls2cMethods[] = { { "wxListCtrl_GetItem", _wrap_wxListCtrl_GetItem, 1 }, { "wxListCtrl_GetItemData", _wrap_wxListCtrl_GetItemData, 1 }, { "wxListCtrl_GetImageList", _wrap_wxListCtrl_GetImageList, 1 }, - { "wxListCtrl_GetEditControl", _wrap_wxListCtrl_GetEditControl, 1 }, { "wxListCtrl_GetCountPerPage", _wrap_wxListCtrl_GetCountPerPage, 1 }, { "wxListCtrl_GetColumnWidth", _wrap_wxListCtrl_GetColumnWidth, 1 }, { "wxListCtrl_GetColumn", _wrap_wxListCtrl_GetColumn, 1 }, @@ -3928,6 +3927,7 @@ static PyMethodDef controls2cMethods[] = { { "wxListCtrl_FindItemData", _wrap_wxListCtrl_FindItemData, 1 }, { "wxListCtrl_FindItem", _wrap_wxListCtrl_FindItem, 1 }, { "wxListCtrl_EnsureVisible", _wrap_wxListCtrl_EnsureVisible, 1 }, + { "wxListCtrl_GetEditControl", _wrap_wxListCtrl_GetEditControl, 1 }, { "wxListCtrl_EndEditLabel", _wrap_wxListCtrl_EndEditLabel, 1 }, { "wxListCtrl_EditLabel", _wrap_wxListCtrl_EditLabel, 1 }, { "wxListCtrl_ClearAll", _wrap_wxListCtrl_ClearAll, 1 }, diff --git a/utils/wxPython/src/msw/controls2.py b/utils/wxPython/src/msw/controls2.py index ac552d120d..2ec2d3f516 100644 --- a/utils/wxPython/src/msw/controls2.py +++ b/utils/wxPython/src/msw/controls2.py @@ -163,6 +163,10 @@ class wxListCtrlPtr(wxControlPtr): def EndEditLabel(self,arg0): val = controls2c.wxListCtrl_EndEditLabel(self.this,arg0) return val + def GetEditControl(self): + val = controls2c.wxListCtrl_GetEditControl(self.this) + val = wxTextCtrlPtr(val) + return val def EnsureVisible(self,arg0): val = controls2c.wxListCtrl_EnsureVisible(self.this,arg0) return val @@ -184,10 +188,6 @@ class wxListCtrlPtr(wxControlPtr): def GetCountPerPage(self): val = controls2c.wxListCtrl_GetCountPerPage(self.this) return val - def GetEditControl(self): - val = controls2c.wxListCtrl_GetEditControl(self.this) - val = wxTextCtrlPtr(val) - return val def GetImageList(self,arg0): val = controls2c.wxListCtrl_GetImageList(self.this,arg0) return val @@ -232,6 +232,9 @@ class wxListCtrlPtr(wxControlPtr): val = wxColourPtr(val) val.thisown = 1 return val + def SetTextColour(self,arg0): + val = controls2c.wxListCtrl_SetTextColour(self.this,arg0.this) + return val def GetTopItem(self): val = controls2c.wxListCtrl_GetTopItem(self.this) return val @@ -295,9 +298,6 @@ class wxListCtrlPtr(wxControlPtr): def SetSingleStyle(self,arg0,*args): val = apply(controls2c.wxListCtrl_SetSingleStyle,(self.this,arg0,)+args) return val - def SetTextColour(self,arg0): - val = controls2c.wxListCtrl_SetTextColour(self.this,arg0.this) - return val def SetWindowStyleFlag(self,arg0): val = controls2c.wxListCtrl_SetWindowStyleFlag(self.this,arg0) return val diff --git a/utils/wxPython/src/msw/frames.cpp b/utils/wxPython/src/msw/frames.cpp index efc6009033..8bfd4884aa 100644 --- a/utils/wxPython/src/msw/frames.cpp +++ b/utils/wxPython/src/msw/frames.cpp @@ -54,10 +54,7 @@ extern PyObject *SWIG_newvarlink(void); #define SWIG_name "framesc" #include "helpers.h" - -#ifdef __WXMSW__ #include -#endif static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; diff --git a/utils/wxPython/src/msw/gdi.cpp b/utils/wxPython/src/msw/gdi.cpp index f587c5cb86..c636f9321e 100644 --- a/utils/wxPython/src/msw/gdi.cpp +++ b/utils/wxPython/src/msw/gdi.cpp @@ -55,6 +55,9 @@ extern PyObject *SWIG_newvarlink(void); #include "helpers.h" #include +#ifndef __WXMSW__ +#include +#endif static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; @@ -3459,6 +3462,38 @@ static PyObject *_wrap_wxDC_EndPage(PyObject *self, PyObject *args) { return _resultobj; } +#define wxDC_FloodFill(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->FloodFill(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_wxDC_FloodFill(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxDC * _arg0; + long _arg1; + long _arg2; + wxColour * _arg3; + int _arg4 = (wxFLOOD_SURFACE); + char * _argc0 = 0; + char * _argc3 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"slls|i:wxDC_FloodFill",&_argc0,&_arg1,&_arg2,&_argc3,&_arg4)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_FloodFill. Expected _wxDC_p."); + return NULL; + } + } + if (_argc3) { + if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_wxColour_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxDC_FloodFill. Expected _wxColour_p."); + return NULL; + } + } + wxDC_FloodFill(_arg0,_arg1,_arg2,*_arg3,_arg4); + Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxDC_GetBackground(_swigobj) (_swigobj->GetBackground()) static PyObject *_wrap_wxDC_GetBackground(PyObject *self, PyObject *args) { PyObject * _resultobj; @@ -5165,6 +5200,7 @@ static PyMethodDef gdicMethods[] = { { "wxDC_GetCharHeight", _wrap_wxDC_GetCharHeight, 1 }, { "wxDC_GetBrush", _wrap_wxDC_GetBrush, 1 }, { "wxDC_GetBackground", _wrap_wxDC_GetBackground, 1 }, + { "wxDC_FloodFill", _wrap_wxDC_FloodFill, 1 }, { "wxDC_EndPage", _wrap_wxDC_EndPage, 1 }, { "wxDC_EndDrawing", _wrap_wxDC_EndDrawing, 1 }, { "wxDC_EndDoc", _wrap_wxDC_EndDoc, 1 }, diff --git a/utils/wxPython/src/msw/gdi.py b/utils/wxPython/src/msw/gdi.py index 5852c85e3b..3f2305b969 100644 --- a/utils/wxPython/src/msw/gdi.py +++ b/utils/wxPython/src/msw/gdi.py @@ -422,6 +422,9 @@ class wxDCPtr : def EndPage(self): val = gdic.wxDC_EndPage(self.this) return val + def FloodFill(self,arg0,arg1,arg2,*args): + val = apply(gdic.wxDC_FloodFill,(self.this,arg0,arg1,arg2.this,)+args) + return val def GetBackground(self): val = gdic.wxDC_GetBackground(self.this) val = wxBrushPtr(val) diff --git a/utils/wxPython/src/msw/stattool.cpp b/utils/wxPython/src/msw/stattool.cpp index 204c421302..f8400f3421 100644 --- a/utils/wxPython/src/msw/stattool.cpp +++ b/utils/wxPython/src/msw/stattool.cpp @@ -1129,6 +1129,35 @@ static PyObject *_wrap_wxToolBar_GetToolBitmapSize(PyObject *self, PyObject *arg return _resultobj; } +#define wxToolBar_SetToolBitmapSize(_swigobj,_swigarg0) (_swigobj->SetToolBitmapSize(_swigarg0)) +static PyObject *_wrap_wxToolBar_SetToolBitmapSize(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxToolBar * _arg0; + wxSize * _arg1; + char * _argc0 = 0; + char * _argc1 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"ss:wxToolBar_SetToolBitmapSize",&_argc0,&_argc1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxToolBar_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolBar_SetToolBitmapSize. Expected _wxToolBar_p."); + return NULL; + } + } + if (_argc1) { + if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxSize_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxToolBar_SetToolBitmapSize. Expected _wxSize_p."); + return NULL; + } + } + wxToolBar_SetToolBitmapSize(_arg0,*_arg1); + Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxToolBar_GetMaxSize(_swigobj) (_swigobj->GetMaxSize()) static PyObject *_wrap_wxToolBar_GetMaxSize(PyObject *self, PyObject *args) { PyObject * _resultobj; @@ -1313,35 +1342,6 @@ static PyObject *_wrap_wxToolBar_Realize(PyObject *self, PyObject *args) { return _resultobj; } -#define wxToolBar_SetToolBitmapSize(_swigobj,_swigarg0) (_swigobj->SetToolBitmapSize(_swigarg0)) -static PyObject *_wrap_wxToolBar_SetToolBitmapSize(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxToolBar * _arg0; - wxSize * _arg1; - char * _argc0 = 0; - char * _argc1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"ss:wxToolBar_SetToolBitmapSize",&_argc0,&_argc1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxToolBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolBar_SetToolBitmapSize. Expected _wxToolBar_p."); - return NULL; - } - } - if (_argc1) { - if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxToolBar_SetToolBitmapSize. Expected _wxSize_p."); - return NULL; - } - } - wxToolBar_SetToolBitmapSize(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - #define wxToolBar_SetToolLongHelp(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetToolLongHelp(_swigarg0,_swigarg1)) static PyObject *_wrap_wxToolBar_SetToolLongHelp(PyObject *self, PyObject *args) { PyObject * _resultobj; @@ -1517,7 +1517,6 @@ static PyMethodDef stattoolcMethods[] = { { "wxToolBar_SetMargins", _wrap_wxToolBar_SetMargins, 1 }, { "wxToolBar_SetToolShortHelp", _wrap_wxToolBar_SetToolShortHelp, 1 }, { "wxToolBar_SetToolLongHelp", _wrap_wxToolBar_SetToolLongHelp, 1 }, - { "wxToolBar_SetToolBitmapSize", _wrap_wxToolBar_SetToolBitmapSize, 1 }, { "wxToolBar_Realize", _wrap_wxToolBar_Realize, 1 }, { "wxToolBar_GetToolState", _wrap_wxToolBar_GetToolState, 1 }, { "wxToolBar_GetToolShortHelp", _wrap_wxToolBar_GetToolShortHelp, 1 }, @@ -1526,6 +1525,7 @@ static PyMethodDef stattoolcMethods[] = { { "wxToolBar_GetToolLongHelp", _wrap_wxToolBar_GetToolLongHelp, 1 }, { "wxToolBar_GetToolEnabled", _wrap_wxToolBar_GetToolEnabled, 1 }, { "wxToolBar_GetMaxSize", _wrap_wxToolBar_GetMaxSize, 1 }, + { "wxToolBar_SetToolBitmapSize", _wrap_wxToolBar_SetToolBitmapSize, 1 }, { "wxToolBar_GetToolBitmapSize", _wrap_wxToolBar_GetToolBitmapSize, 1 }, { "wxToolBar_GetToolSize", _wrap_wxToolBar_GetToolSize, 1 }, { "wxToolBar_FindToolForPosition", _wrap_wxToolBar_FindToolForPosition, 1 }, diff --git a/utils/wxPython/src/msw/stattool.py b/utils/wxPython/src/msw/stattool.py index 550d3d9a22..3d2b88649a 100644 --- a/utils/wxPython/src/msw/stattool.py +++ b/utils/wxPython/src/msw/stattool.py @@ -203,6 +203,9 @@ class wxToolBarPtr(wxControlPtr): val = wxSizePtr(val) val.thisown = 1 return val + def SetToolBitmapSize(self,arg0): + val = stattoolc.wxToolBar_SetToolBitmapSize(self.this,arg0.this) + return val def GetMaxSize(self): val = stattoolc.wxToolBar_GetMaxSize(self.this) val = wxSizePtr(val) @@ -229,9 +232,6 @@ class wxToolBarPtr(wxControlPtr): def Realize(self): val = stattoolc.wxToolBar_Realize(self.this) return val - def SetToolBitmapSize(self,arg0): - val = stattoolc.wxToolBar_SetToolBitmapSize(self.this,arg0.this) - return val def SetToolLongHelp(self,arg0,arg1): val = stattoolc.wxToolBar_SetToolLongHelp(self.this,arg0,arg1) return val diff --git a/utils/wxPython/src/msw/windows.cpp b/utils/wxPython/src/msw/windows.cpp index fc4520a99e..7b28e68d5c 100644 --- a/utils/wxPython/src/msw/windows.cpp +++ b/utils/wxPython/src/msw/windows.cpp @@ -54,15 +54,7 @@ extern PyObject *SWIG_newvarlink(void); #define SWIG_name "windowsc" #include "helpers.h" - -#ifdef __WXMSW__ - // wxGTK defines wxMenuItem inside menu.h #include -#endif - -#ifdef __WXMSW__ -#include -#endif static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; @@ -4340,27 +4332,6 @@ static PyObject *_wrap_wxMenuItem_SetName(PyObject *self, PyObject *args) { return _resultobj; } -#define wxMenuItem_DeleteSubMenu(_swigobj) (_swigobj->DeleteSubMenu()) -static PyObject *_wrap_wxMenuItem_DeleteSubMenu(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxMenuItem * _arg0; - char * _argc0 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"s:wxMenuItem_DeleteSubMenu",&_argc0)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuItem_DeleteSubMenu. Expected _wxMenuItem_p."); - return NULL; - } - } - wxMenuItem_DeleteSubMenu(_arg0); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - #define wxMenuItem_GetName(_swigobj) (_swigobj->GetName()) static PyObject *_wrap_wxMenuItem_GetName(PyObject *self, PyObject *args) { PyObject * _resultobj; @@ -4491,13 +4462,34 @@ static PyObject *_wrap_wxMenuItem_Check(PyObject *self, PyObject *args) { return _resultobj; } +#define wxMenuItem_DeleteSubMenu(_swigobj) (_swigobj->DeleteSubMenu()) +static PyObject *_wrap_wxMenuItem_DeleteSubMenu(PyObject *self, PyObject *args) { + PyObject * _resultobj; + wxMenuItem * _arg0; + char * _argc0 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"s:wxMenuItem_DeleteSubMenu",&_argc0)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxMenuItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuItem_DeleteSubMenu. Expected _wxMenuItem_p."); + return NULL; + } + } + wxMenuItem_DeleteSubMenu(_arg0); + Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + static PyMethodDef windowscMethods[] = { + { "wxMenuItem_DeleteSubMenu", _wrap_wxMenuItem_DeleteSubMenu, 1 }, { "wxMenuItem_Check", _wrap_wxMenuItem_Check, 1 }, { "wxMenuItem_Enable", _wrap_wxMenuItem_Enable, 1 }, { "wxMenuItem_SetHelp", _wrap_wxMenuItem_SetHelp, 1 }, { "wxMenuItem_GetHelp", _wrap_wxMenuItem_GetHelp, 1 }, { "wxMenuItem_GetName", _wrap_wxMenuItem_GetName, 1 }, - { "wxMenuItem_DeleteSubMenu", _wrap_wxMenuItem_DeleteSubMenu, 1 }, { "wxMenuItem_SetName", _wrap_wxMenuItem_SetName, 1 }, { "wxMenuItem_GetSubMenu", _wrap_wxMenuItem_GetSubMenu, 1 }, { "wxMenuItem_GetId", _wrap_wxMenuItem_GetId, 1 }, @@ -4696,6 +4688,7 @@ SWIGEXPORT(void,initwindowsc)() { SWIG_RegisterMapping("_class_wxRealPoint","_wxRealPoint",0); SWIG_RegisterMapping("_wxPrinterDC","_class_wxPrinterDC",0); SWIG_RegisterMapping("_class_wxMenuItem","_wxMenuItem",0); + SWIG_RegisterMapping("_class_wxPostScriptDC","_wxPostScriptDC",0); SWIG_RegisterMapping("_wxPanel","_class_wxDialog",SwigwxDialogTowxPanel); SWIG_RegisterMapping("_wxPanel","_wxDialog",SwigwxDialogTowxPanel); SWIG_RegisterMapping("_wxPanel","_class_wxPanel",0); @@ -4759,6 +4752,7 @@ SWIGEXPORT(void,initwindowsc)() { SWIG_RegisterMapping("_class_wxWindowDC","_wxWindowDC",0); SWIG_RegisterMapping("_class_wxAcceleratorEntry","_wxAcceleratorEntry",0); SWIG_RegisterMapping("_class_wxCursor","_wxCursor",0); + SWIG_RegisterMapping("_wxPostScriptDC","_class_wxPostScriptDC",0); SWIG_RegisterMapping("_wxScrolledWindow","_class_wxScrolledWindow",0); SWIG_RegisterMapping("_unsigned_char","_byte",0); SWIG_RegisterMapping("_class_wxMetaFileDC","_wxMetaFileDC",0); diff --git a/utils/wxPython/src/msw/windows.py b/utils/wxPython/src/msw/windows.py index eb705781e7..bc234b094f 100644 --- a/utils/wxPython/src/msw/windows.py +++ b/utils/wxPython/src/msw/windows.py @@ -621,9 +621,6 @@ class wxMenuItemPtr : def SetName(self,arg0): val = windowsc.wxMenuItem_SetName(self.this,arg0) return val - def DeleteSubMenu(self): - val = windowsc.wxMenuItem_DeleteSubMenu(self.this) - return val def GetName(self): val = windowsc.wxMenuItem_GetName(self.this) return val @@ -639,6 +636,9 @@ class wxMenuItemPtr : def Check(self,*args): val = apply(windowsc.wxMenuItem_Check,(self.this,)+args) return val + def DeleteSubMenu(self): + val = windowsc.wxMenuItem_DeleteSubMenu(self.this) + return val def __repr__(self): return "" class wxMenuItem(wxMenuItemPtr): diff --git a/utils/wxPython/src/msw/windows2.cpp b/utils/wxPython/src/msw/windows2.cpp index 2c08b2472f..10f6fbe8a7 100644 --- a/utils/wxPython/src/msw/windows2.cpp +++ b/utils/wxPython/src/msw/windows2.cpp @@ -3435,7 +3435,37 @@ static PyObject *_wrap_wxTaskBarIcon_RemoveIcon(PyObject *self, PyObject *args) return _resultobj; } +#define wxTaskBarIcon_PopupMenu(_swigobj,_swigarg0) (_swigobj->PopupMenu(_swigarg0)) +static PyObject *_wrap_wxTaskBarIcon_PopupMenu(PyObject *self, PyObject *args) { + PyObject * _resultobj; + bool _result; + wxTaskBarIcon * _arg0; + wxMenu * _arg1; + char * _argc0 = 0; + char * _argc1 = 0; + + self = self; + if(!PyArg_ParseTuple(args,"ss:wxTaskBarIcon_PopupMenu",&_argc0,&_argc1)) + return NULL; + if (_argc0) { + if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTaskBarIcon_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTaskBarIcon_PopupMenu. Expected _wxTaskBarIcon_p."); + return NULL; + } + } + if (_argc1) { + if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxMenu_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTaskBarIcon_PopupMenu. Expected _wxMenu_p."); + return NULL; + } + } + _result = (bool )wxTaskBarIcon_PopupMenu(_arg0,_arg1); + _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + static PyMethodDef windows2cMethods[] = { + { "wxTaskBarIcon_PopupMenu", _wrap_wxTaskBarIcon_PopupMenu, 1 }, { "wxTaskBarIcon_RemoveIcon", _wrap_wxTaskBarIcon_RemoveIcon, 1 }, { "wxTaskBarIcon_SetIcon", _wrap_wxTaskBarIcon_SetIcon, 1 }, { "delete_wxTaskBarIcon", _wrap_delete_wxTaskBarIcon, 1 }, diff --git a/utils/wxPython/src/msw/windows2.py b/utils/wxPython/src/msw/windows2.py index 5ecbbc5443..496f8557f8 100644 --- a/utils/wxPython/src/msw/windows2.py +++ b/utils/wxPython/src/msw/windows2.py @@ -539,6 +539,9 @@ class wxTaskBarIconPtr(wxEvtHandlerPtr): def RemoveIcon(self): val = windows2c.wxTaskBarIcon_RemoveIcon(self.this) return val + def PopupMenu(self,arg0): + val = windows2c.wxTaskBarIcon_PopupMenu(self.this,arg0.this) + return val def __repr__(self): return "" class wxTaskBarIcon(wxTaskBarIconPtr): diff --git a/utils/wxPython/src/msw/wx.cpp b/utils/wxPython/src/msw/wx.cpp index 635923af56..99687defe9 100644 --- a/utils/wxPython/src/msw/wx.cpp +++ b/utils/wxPython/src/msw/wx.cpp @@ -33,24 +33,10 @@ * and things like that. * * $Log$ - * Revision 1.1 1998/12/15 20:44:01 RD - * Changed the import semantics from "from wxPython import *" to "from - * wxPython.wx import *" This is for people who are worried about - * namespace pollution, they can use "from wxPython import wx" and then - * prefix all the wxPython identifiers with "wx." - * - * Added wxTaskbarIcon for wxMSW. - * - * Made the events work for wxGrid. - * - * Added wxConfig. - * - * Added wxMiniFrame for wxGTK, (untested.) - * - * Changed many of the args and return values that were pointers to gdi - * objects to references to reflect changes in the wxWindows API. - * - * Other assorted fixes and additions. + * Revision 1.2 1998/12/17 18:07:12 RD + * wxPython 0.5.2 + * Minor fixes and SWIG code generation for RR's changes. MSW and GTK + * versions are much closer now! * ************************************************************************/ @@ -1739,7 +1725,7 @@ SWIGEXPORT(void,initwxc)() { PyDict_SetItemString(d,"wxEVT_COMMAND_TAB_SEL_CHANGING", PyInt_FromLong((long) wxEVT_COMMAND_TAB_SEL_CHANGING)); PyDict_SetItemString(d,"wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED", PyInt_FromLong((long) wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED)); PyDict_SetItemString(d,"wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING", PyInt_FromLong((long) wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING)); - PyDict_SetItemString(d,"__version__", PyString_FromString("0.4.5")); + PyDict_SetItemString(d,"__version__", PyString_FromString("0.5.2")); PyDict_SetItemString(d,"cvar", SWIG_globals); SWIG_addvarlink(SWIG_globals,"wxPyDefaultPosition",_wrap_wxPyDefaultPosition_get, _wrap_wxPyDefaultPosition_set); SWIG_addvarlink(SWIG_globals,"wxPyDefaultSize",_wrap_wxPyDefaultSize_get, _wrap_wxPyDefaultSize_set); @@ -1814,6 +1800,7 @@ SWIGEXPORT(void,initwxc)() { SWIG_RegisterMapping("_class_wxPaintEvent","_wxPaintEvent",0); SWIG_RegisterMapping("_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0); SWIG_RegisterMapping("_class_wxStatusBar","_wxStatusBar",0); + SWIG_RegisterMapping("_class_wxPostScriptDC","_wxPostScriptDC",0); SWIG_RegisterMapping("_wxPanel","_class_wxPanel",0); SWIG_RegisterMapping("_wxInitDialogEvent","_class_wxInitDialogEvent",0); SWIG_RegisterMapping("_wxCheckBox","_class_wxCheckBox",0); @@ -1939,6 +1926,7 @@ SWIGEXPORT(void,initwxc)() { SWIG_RegisterMapping("_class_wxToolBarTool","_wxToolBarTool",0); SWIG_RegisterMapping("_class_wxAcceleratorEntry","_wxAcceleratorEntry",0); SWIG_RegisterMapping("_class_wxCursor","_wxCursor",0); + SWIG_RegisterMapping("_wxPostScriptDC","_class_wxPostScriptDC",0); SWIG_RegisterMapping("_wxScrolledWindow","_class_wxScrolledWindow",0); SWIG_RegisterMapping("_wxTreeItemId","_class_wxTreeItemId",0); SWIG_RegisterMapping("_unsigned_char","_byte",0); diff --git a/utils/wxPython/src/msw/wx.py b/utils/wxPython/src/msw/wx.py index f01ea55ea0..bd0f3b3f70 100644 --- a/utils/wxPython/src/msw/wx.py +++ b/utils/wxPython/src/msw/wx.py @@ -1189,24 +1189,10 @@ class wxApp(wxPyApp): #---------------------------------------------------------------------------- # # $Log$ -# Revision 1.1 1998/12/15 20:44:04 RD -# Changed the import semantics from "from wxPython import *" to "from -# wxPython.wx import *" This is for people who are worried about -# namespace pollution, they can use "from wxPython import wx" and then -# prefix all the wxPython identifiers with "wx." -# -# Added wxTaskbarIcon for wxMSW. -# -# Made the events work for wxGrid. -# -# Added wxConfig. -# -# Added wxMiniFrame for wxGTK, (untested.) -# -# Changed many of the args and return values that were pointers to gdi -# objects to references to reflect changes in the wxWindows API. -# -# Other assorted fixes and additions. +# Revision 1.2 1998/12/17 18:07:15 RD +# wxPython 0.5.2 +# Minor fixes and SWIG code generation for RR's changes. MSW and GTK +# versions are much closer now! # # Revision 1.7 1998/11/25 08:45:21 RD # diff --git a/utils/wxPython/src/windows2.i b/utils/wxPython/src/windows2.i index 57dd0d69f7..e499a0c6db 100644 --- a/utils/wxPython/src/windows2.i +++ b/utils/wxPython/src/windows2.i @@ -324,6 +324,8 @@ public: bool SetIcon(const wxIcon& icon, const char* tooltip = ""); bool RemoveIcon(void); + bool PopupMenu(wxMenu *menu); + }; #endif @@ -331,6 +333,11 @@ public: ///////////////////////////////////////////////////////////////////////////// // // $Log$ +// Revision 1.8 1998/12/17 18:05:53 RD +// wxPython 0.5.2 +// Minor fixes and SWIG code generation for RR's changes. MSW and GTK +// versions are much closer now! +// // Revision 1.7 1998/12/15 20:41:25 RD // Changed the import semantics from "from wxPython import *" to "from // wxPython.wx import *" This is for people who are worried about -- 2.45.2