From 2b9048c56f0aa04b2adbb7813f9698abdda15184 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Sat, 31 Jan 2004 01:18:37 +0000 Subject: [PATCH] %addtofunc --> %pythonAppend Also used %pythonPrepend to provide backwards compatibility for a few parameter name changes. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25422 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/contrib/gizmos/gizmos.i | 32 ++++---- wxPython/contrib/glcanvas/glcanvas.i | 4 +- wxPython/contrib/iewin/iewin.i | 2 +- wxPython/contrib/ogl/_oglbasic.i | 4 +- wxPython/contrib/ogl/_oglcanvas.i | 2 +- wxPython/contrib/ogl/_oglshapes.i | 14 ++-- wxPython/contrib/ogl/_oglshapes2.i | 10 +-- wxPython/contrib/xrc/_xmlhandler.i | 2 +- wxPython/contrib/xrc/_xmlres.i | 4 +- wxPython/contrib/xrc/_xmlsub.i | 2 +- wxPython/src/_app.i | 2 +- wxPython/src/_artprov.i | 2 +- wxPython/src/_button.i | 8 +- wxPython/src/_checkbox.i | 4 +- wxPython/src/_choice.i | 4 +- wxPython/src/_cmndlgs.i | 22 ++--- wxPython/src/_colour.i | 9 ++- wxPython/src/_combobox.i | 4 +- wxPython/src/_control.i | 4 +- wxPython/src/_cshelp.i | 2 +- wxPython/src/_dataobj.i | 6 +- wxPython/src/_dc.i | 4 +- wxPython/src/_defs.i | 9 ++- wxPython/src/_dirctrl.i | 8 +- wxPython/src/_dnd.i | 6 +- wxPython/src/_event.i | 4 +- wxPython/src/_filesys.i | 2 +- wxPython/src/_font.i | 2 +- wxPython/src/_gauge.i | 4 +- wxPython/src/_listbox.i | 8 +- wxPython/src/_listctrl.i | 12 +-- wxPython/src/_log.i | 2 +- wxPython/src/_mdi.i | 12 +-- wxPython/src/_menu.i | 4 +- wxPython/src/_notebook.i | 12 +-- wxPython/src/_panel.i | 8 +- wxPython/src/_popupwin.i | 8 +- wxPython/src/_printfw.i | 18 ++--- wxPython/src/_process.i | 2 +- wxPython/src/_pycontrol.i | 2 +- wxPython/src/_pywindows.i | 4 +- wxPython/src/_radio.i | 14 ++-- wxPython/src/_sashwin.i | 8 +- wxPython/src/_scrolbar.i | 4 +- wxPython/src/_sizers.i | 10 +-- wxPython/src/_slider.i | 12 +-- wxPython/src/_spin.i | 8 +- wxPython/src/_splitter.i | 10 ++- wxPython/src/_statctrls.i | 16 ++-- wxPython/src/_statusbar.i | 4 +- wxPython/src/_stockobjs.i | 117 ++++++++++++++------------- wxPython/src/_textctrl.i | 7 +- wxPython/src/_tglbtn.i | 4 +- wxPython/src/_timer.i | 2 +- wxPython/src/_tipwin.i | 2 +- wxPython/src/_toolbar.i | 4 +- wxPython/src/_toplvl.i | 16 ++-- wxPython/src/_treectrl.i | 4 +- wxPython/src/_validator.i | 4 +- wxPython/src/_vscroll.i | 12 +-- wxPython/src/_window.i | 4 +- wxPython/src/calendar.i | 4 +- wxPython/src/grid.i | 44 +++++----- wxPython/src/html.i | 14 ++-- wxPython/src/wizard.i | 12 +-- 65 files changed, 313 insertions(+), 297 deletions(-) diff --git a/wxPython/contrib/gizmos/gizmos.i b/wxPython/contrib/gizmos/gizmos.i index dedee2bc62..ef15215c46 100644 --- a/wxPython/contrib/gizmos/gizmos.i +++ b/wxPython/contrib/gizmos/gizmos.i @@ -135,8 +135,8 @@ public: class wxDynamicSashWindow : public wxWindow { public: - %addtofunc wxDynamicSashWindow "self._setOORInfo(self)" - %addtofunc wxDynamicSashWindow() "" + %pythonAppend wxDynamicSashWindow "self._setOORInfo(self)" + %pythonAppend wxDynamicSashWindow() "" wxDynamicSashWindow(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, @@ -174,8 +174,8 @@ enum { class wxEditableListBox : public wxPanel { public: - %addtofunc wxEditableListBox "self._setOORInfo(self)" - %addtofunc wxEditableListBox() "" + %pythonAppend wxEditableListBox "self._setOORInfo(self)" + %pythonAppend wxEditableListBox() "" wxEditableListBox(wxWindow *parent, wxWindowID id, const wxString& label, @@ -224,8 +224,8 @@ public: class wxRemotelyScrolledTreeCtrl: public wxPyTreeCtrl { public: - %addtofunc wxRemotelyScrolledTreeCtrl "self._setOORInfo(self)" - %addtofunc wxRemotelyScrolledTreeCtrl() "" + %pythonAppend wxRemotelyScrolledTreeCtrl "self._setOORInfo(self)" + %pythonAppend wxRemotelyScrolledTreeCtrl() "" wxRemotelyScrolledTreeCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, @@ -295,8 +295,8 @@ public: %name(TreeCompanionWindow) class wxPyTreeCompanionWindow: public wxWindow { public: - %addtofunc wxPyTreeCompanionWindow "self._setOORInfo(self);self._setCallbackInfo(self, TreeCompanionWindow)" - %addtofunc wxPyTreeCompanionWindow() "" + %pythonAppend wxPyTreeCompanionWindow "self._setOORInfo(self);self._setCallbackInfo(self, TreeCompanionWindow)" + %pythonAppend wxPyTreeCompanionWindow() "" wxPyTreeCompanionWindow(wxWindow* parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, @@ -320,8 +320,8 @@ public: class wxThinSplitterWindow: public wxSplitterWindow { public: - %addtofunc wxThinSplitterWindow "self._setOORInfo(self)" - %addtofunc wxThinSplitterWindow() "" + %pythonAppend wxThinSplitterWindow "self._setOORInfo(self)" + %pythonAppend wxThinSplitterWindow() "" wxThinSplitterWindow(wxWindow* parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, @@ -343,8 +343,8 @@ public: class wxSplitterScrolledWindow: public wxScrolledWindow { public: - %addtofunc wxSplitterScrolledWindow "self._setOORInfo(self)" - %addtofunc wxSplitterScrolledWindow() "" + %pythonAppend wxSplitterScrolledWindow "self._setOORInfo(self)" + %pythonAppend wxSplitterScrolledWindow() "" wxSplitterScrolledWindow(wxWindow* parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, @@ -372,8 +372,8 @@ enum wxLEDValueAlign class wxLEDNumberCtrl : public wxControl { public: - %addtofunc wxLEDNumberCtrl "self._setOORInfo(self)" - %addtofunc wxLEDNumberCtrl() "" + %pythonAppend wxLEDNumberCtrl "self._setOORInfo(self)" + %pythonAppend wxLEDNumberCtrl() "" wxLEDNumberCtrl(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, @@ -485,8 +485,8 @@ IMPLEMENT_ABSTRACT_CLASS(wxPyTreeListCtrl, wxTreeListCtrl) %name(TreeListCtrl) class wxPyTreeListCtrl : public wxControl { public: - %addtofunc wxPyTreeListCtrl "self._setOORInfo(self);self._setCallbackInfo(self, TreeListCtrl)" - %addtofunc wxPyTreeListCtrl() "" + %pythonAppend wxPyTreeListCtrl "self._setOORInfo(self);self._setCallbackInfo(self, TreeListCtrl)" + %pythonAppend wxPyTreeListCtrl() "" wxPyTreeListCtrl(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, diff --git a/wxPython/contrib/glcanvas/glcanvas.i b/wxPython/contrib/glcanvas/glcanvas.i index 197387eba8..6f6f3708fa 100644 --- a/wxPython/contrib/glcanvas/glcanvas.i +++ b/wxPython/contrib/glcanvas/glcanvas.i @@ -116,7 +116,7 @@ enum { class wxGLCanvas : public wxWindow { public: - %addtofunc wxGLCanvas "self._setOORInfo(self)" + %pythonAppend wxGLCanvas "self._setOORInfo(self)" wxGLCanvas(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, @@ -124,7 +124,7 @@ public: int *attribList = NULL, const wxPalette& palette = wxNullPalette); - %addtofunc wxGLCanvas "val._setOORInfo(val)" + %pythonAppend wxGLCanvas "val._setOORInfo(val)" %name(GLCanvasWithContext) wxGLCanvas( wxWindow *parent, const wxGLContext *shared = NULL, diff --git a/wxPython/contrib/iewin/iewin.i b/wxPython/contrib/iewin/iewin.i index 45e48f9629..01764566aa 100644 --- a/wxPython/contrib/iewin/iewin.i +++ b/wxPython/contrib/iewin/iewin.i @@ -75,7 +75,7 @@ enum wxIEHtmlRefreshLevel { class wxIEHtmlWin : public wxWindow /* wxActiveX */ { public: - %addtofunc wxIEHtmlWin "self._setOORInfo(self)" + %pythonAppend wxIEHtmlWin "self._setOORInfo(self)" wxIEHtmlWin(wxWindow * parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, diff --git a/wxPython/contrib/ogl/_oglbasic.i b/wxPython/contrib/ogl/_oglbasic.i index 5cbdfa7b7b..77b308fbe2 100644 --- a/wxPython/contrib/ogl/_oglbasic.i +++ b/wxPython/contrib/ogl/_oglbasic.i @@ -81,7 +81,7 @@ public: class wxPyShapeEvtHandler : public wxObject { public: - %addtofunc wxPyShapeEvtHandler "self._setOORandCallbackInfo(PyShapeEvtHandler)" + %pythonAppend wxPyShapeEvtHandler "self._setOORandCallbackInfo(PyShapeEvtHandler)" wxPyShapeEvtHandler(wxPyShapeEvtHandler *prev = NULL, wxPyShape *shape = NULL); @@ -145,7 +145,7 @@ public: class wxPyShape : public wxPyShapeEvtHandler { public: - %addtofunc wxPyShape "self._setOORandCallbackInfo(PyShapeEvtHandler)" + %pythonAppend wxPyShape "self._setOORandCallbackInfo(PyShapeEvtHandler)" wxPyShape(wxPyShapeCanvas *can = NULL); diff --git a/wxPython/contrib/ogl/_oglcanvas.i b/wxPython/contrib/ogl/_oglcanvas.i index 0521778e83..7dcf7ca4f8 100644 --- a/wxPython/contrib/ogl/_oglcanvas.i +++ b/wxPython/contrib/ogl/_oglcanvas.i @@ -101,7 +101,7 @@ public: class wxPyShapeCanvas : public wxScrolledWindow { public: - %addtofunc wxPyShapeEvtHandler "self._setOORandCallbackInfo(PyShapeEvtHandler)" + %pythonAppend wxPyShapeEvtHandler "self._setOORandCallbackInfo(PyShapeEvtHandler)" wxPyShapeCanvas(wxWindow* parent = NULL, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, diff --git a/wxPython/contrib/ogl/_oglshapes.i b/wxPython/contrib/ogl/_oglshapes.i index ef27d7bba3..18e28fcc5c 100644 --- a/wxPython/contrib/ogl/_oglshapes.i +++ b/wxPython/contrib/ogl/_oglshapes.i @@ -124,7 +124,7 @@ public: class wxPyRectangleShape : public wxPyShape { public: - %addtofunc wxPyRectangleShape "self._setOORandCallbackInfo(PyRectangleShape)" + %pythonAppend wxPyRectangleShape "self._setOORandCallbackInfo(PyRectangleShape)" wxPyRectangleShape(double width = 0.0, double height = 0.0); void _setCallbackInfo(PyObject* self, PyObject* _class); @@ -172,7 +172,7 @@ public: class wxPyControlPoint : public wxPyRectangleShape { public: - %addtofunc wxPyControlPoint "self._setOORandCallbackInfo(PyControlPoint)" + %pythonAppend wxPyControlPoint "self._setOORandCallbackInfo(PyControlPoint)" wxPyControlPoint(wxPyShapeCanvas *the_canvas = NULL, wxPyShape *object = NULL, @@ -223,7 +223,7 @@ public: class wxPyBitmapShape : public wxPyRectangleShape { public: - %addtofunc wxPyBitmapShape "self._setOORandCallbackInfo(PyBitmapShape)" + %pythonAppend wxPyBitmapShape "self._setOORandCallbackInfo(PyBitmapShape)" wxPyBitmapShape(); @@ -273,7 +273,7 @@ public: class wxPyDrawnShape : public wxPyRectangleShape { public: - %addtofunc wxPyDrawnShape "self._setOORandCallbackInfo(PyDrawnShape)" + %pythonAppend wxPyDrawnShape "self._setOORandCallbackInfo(PyDrawnShape)" wxPyDrawnShape(); @@ -378,7 +378,7 @@ public: class wxPyCompositeShape : public wxPyRectangleShape { public: - %addtofunc wxPyCompositeShape "self._setOORandCallbackInfo(PyCompositeShape)" + %pythonAppend wxPyCompositeShape "self._setOORandCallbackInfo(PyCompositeShape)" wxPyCompositeShape(); @@ -476,7 +476,7 @@ public: class wxPyDividedShape : public wxPyRectangleShape { public: - %addtofunc wxPyDividedShape "self._setOORandCallbackInfo(PyDividedShape)" + %pythonAppend wxPyDividedShape "self._setOORandCallbackInfo(PyDividedShape)" wxPyDividedShape(double width = 0.0, double height = 0.0); @@ -526,7 +526,7 @@ public: class wxPyDivisionShape : public wxPyCompositeShape { public: - %addtofunc wxPyDivisionShape "self._setOORandCallbackInfo(PyDivisionShape)" + %pythonAppend wxPyDivisionShape "self._setOORandCallbackInfo(PyDivisionShape)" wxPyDivisionShape(); diff --git a/wxPython/contrib/ogl/_oglshapes2.i b/wxPython/contrib/ogl/_oglshapes2.i index 8a8a570003..15c92da329 100644 --- a/wxPython/contrib/ogl/_oglshapes2.i +++ b/wxPython/contrib/ogl/_oglshapes2.i @@ -22,7 +22,7 @@ class wxPyEllipseShape : public wxPyShape { public: - %addtofunc wxPyEllipseShape "self._setOORandCallbackInfo(PyEllipseShape)" + %pythonAppend wxPyEllipseShape "self._setOORandCallbackInfo(PyEllipseShape)" wxPyEllipseShape(double width = 0.0, double height = 0.0); @@ -66,7 +66,7 @@ public: class wxPyCircleShape : public wxPyEllipseShape { public: - %addtofunc wxPyCircleShape "self._setOORandCallbackInfo(PyCircleShape)" + %pythonAppend wxPyCircleShape "self._setOORandCallbackInfo(PyCircleShape)" wxPyCircleShape(double width = 0.0); @@ -141,7 +141,7 @@ public: class wxPyLineShape : public wxPyShape { public: - %addtofunc wxPyLineShape "self._setOORandCallbackInfo(PyLineShape)" + %pythonAppend wxPyLineShape "self._setOORandCallbackInfo(PyLineShape)" wxPyLineShape(); @@ -254,7 +254,7 @@ public: class wxPyPolygonShape : public wxPyShape { public: - %addtofunc wxPyPolygonShape "self._setOORandCallbackInfo(PyPolygonShape)" + %pythonAppend wxPyPolygonShape "self._setOORandCallbackInfo(PyPolygonShape)" wxPyPolygonShape(); @@ -364,7 +364,7 @@ public: class wxPyTextShape : public wxPyRectangleShape { public: - %addtofunc wxPyTextShape "self._setOORandCallbackInfo(PyTextShape)" + %pythonAppend wxPyTextShape "self._setOORandCallbackInfo(PyTextShape)" wxPyTextShape(double width = 0.0, double height = 0.0); diff --git a/wxPython/contrib/xrc/_xmlhandler.i b/wxPython/contrib/xrc/_xmlhandler.i index 223bc2f62e..018d20777a 100644 --- a/wxPython/contrib/xrc/_xmlhandler.i +++ b/wxPython/contrib/xrc/_xmlhandler.i @@ -140,7 +140,7 @@ IMP_PYCALLBACK_BOOL_NODE_pure(wxPyXmlResourceHandler, wxXmlResourceHandler, CanH %name(XmlResourceHandler) class wxPyXmlResourceHandler : public wxObject { public: - %addtofunc wxPyXmlResourceHandler "self._setCallbackInfo(self, XmlResourceHandler)" + %pythonAppend wxPyXmlResourceHandler "self._setCallbackInfo(self, XmlResourceHandler)" wxPyXmlResourceHandler() : wxXmlResourceHandler() {} //~wxPyXmlResourceHandler(); diff --git a/wxPython/contrib/xrc/_xmlres.i b/wxPython/contrib/xrc/_xmlres.i index 912d89e25a..fca287e729 100644 --- a/wxPython/contrib/xrc/_xmlres.i +++ b/wxPython/contrib/xrc/_xmlres.i @@ -44,9 +44,9 @@ class wxXmlResource : public wxObject { public: - %addtofunc wxXmlResource(const wxString& filemask, int flags) "self.InitAllHandlers()" + %pythonAppend wxXmlResource(const wxString& filemask, int flags) "self.InitAllHandlers()" - %addtofunc wxXmlResource(int flags) "val.InitAllHandlers()" + %pythonAppend wxXmlResource(int flags) "val.InitAllHandlers()" // Ctors. // Flags: wxXRC_USE_LOCALE diff --git a/wxPython/contrib/xrc/_xmlsub.i b/wxPython/contrib/xrc/_xmlsub.i index fdd338ac3c..2722305c27 100644 --- a/wxPython/contrib/xrc/_xmlsub.i +++ b/wxPython/contrib/xrc/_xmlsub.i @@ -34,7 +34,7 @@ IMP_PYCALLBACK_OBJECT_STRING_pure(wxPyXmlSubclassFactory, wxXmlSubclassFactory, %name(XmlSubclassFactory)class wxPyXmlSubclassFactory { public: - %addtofunc wxPyXmlSubclassFactory "self._setCallbackInfo(self, XmlSubclassFactory)" + %pythonAppend wxPyXmlSubclassFactory "self._setCallbackInfo(self, XmlSubclassFactory)" wxPyXmlSubclassFactory(); void _setCallbackInfo(PyObject* self, PyObject* _class); }; diff --git a/wxPython/src/_app.i b/wxPython/src/_app.i index b938ac52ef..cee7c9a804 100644 --- a/wxPython/src/_app.i +++ b/wxPython/src/_app.i @@ -44,7 +44,7 @@ enum class wxPyApp : public wxEvtHandler { public: - %addtofunc wxPyApp + %pythonAppend wxPyApp "self._setCallbackInfo(self, PyApp) self._setOORInfo(self)"; diff --git a/wxPython/src/_artprov.i b/wxPython/src/_artprov.i index 648b49fb69..4e8091e701 100644 --- a/wxPython/src/_artprov.i +++ b/wxPython/src/_artprov.i @@ -106,7 +106,7 @@ public: { public: - %addtofunc wxPyArtProvider "self._setCallbackInfo(self, ArtProvider)" + %pythonAppend wxPyArtProvider "self._setCallbackInfo(self, ArtProvider)" wxPyArtProvider(); void _setCallbackInfo(PyObject* self, PyObject* _class); diff --git a/wxPython/src/_button.i b/wxPython/src/_button.i index b83e1599c9..882d41e9c7 100644 --- a/wxPython/src/_button.i +++ b/wxPython/src/_button.i @@ -51,8 +51,8 @@ RefDoc(wxButton, " class wxButton : public wxControl { public: - %addtofunc wxButton "self._setOORInfo(self)" - %addtofunc wxButton() "" + %pythonAppend wxButton "self._setOORInfo(self)" + %pythonAppend wxButton() "" DocStr(wxButton, "Create and show a button."); @@ -102,8 +102,8 @@ DocStr(wxBitmapButton, "A Buttont that contains a bitmap."); class wxBitmapButton : public wxButton { public: - %addtofunc wxBitmapButton "self._setOORInfo(self)" - %addtofunc wxBitmapButton() "" + %pythonAppend wxBitmapButton "self._setOORInfo(self)" + %pythonAppend wxBitmapButton() "" DocStr(wxBitmapButton, "Create and show a button.") wxBitmapButton(wxWindow* parent, wxWindowID id, const wxBitmap& bitmap, diff --git a/wxPython/src/_checkbox.i b/wxPython/src/_checkbox.i index 479c210060..7d2b4a1fce 100644 --- a/wxPython/src/_checkbox.i +++ b/wxPython/src/_checkbox.i @@ -47,8 +47,8 @@ enum wxCheckBoxState class wxCheckBox : public wxControl { public: - %addtofunc wxCheckBox "self._setOORInfo(self)" - %addtofunc wxCheckBox() "" + %pythonAppend wxCheckBox "self._setOORInfo(self)" + %pythonAppend wxCheckBox() "" wxCheckBox(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, diff --git a/wxPython/src/_choice.i b/wxPython/src/_choice.i index 49eec5186f..9b818a61f0 100644 --- a/wxPython/src/_choice.i +++ b/wxPython/src/_choice.i @@ -24,8 +24,8 @@ MAKE_CONST_WXSTRING(ChoiceNameStr); class wxChoice : public wxControlWithItems { public: - %addtofunc wxChoice "self._setOORInfo(self)" - %addtofunc wxChoice() "" + %pythonAppend wxChoice "self._setOORInfo(self)" + %pythonAppend wxChoice() "" wxChoice(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, diff --git a/wxPython/src/_cmndlgs.i b/wxPython/src/_cmndlgs.i index e6ae880860..59c2f3805f 100644 --- a/wxPython/src/_cmndlgs.i +++ b/wxPython/src/_cmndlgs.i @@ -42,7 +42,7 @@ public: class wxColourDialog : public wxDialog { public: - %addtofunc wxColourDialog "self._setOORInfo(self)" + %pythonAppend wxColourDialog "self._setOORInfo(self)" wxColourDialog(wxWindow* parent, wxColourData* data = NULL); @@ -55,7 +55,7 @@ public: class wxDirDialog : public wxDialog { public: - %addtofunc wxDirDialog "self._setOORInfo(self)" + %pythonAppend wxDirDialog "self._setOORInfo(self)" wxDirDialog(wxWindow* parent, const wxString& message = wxPyDirSelectorPromptStr, @@ -79,7 +79,7 @@ public: class wxFileDialog : public wxDialog { public: - %addtofunc wxFileDialog "self._setOORInfo(self)" + %pythonAppend wxFileDialog "self._setOORInfo(self)" wxFileDialog(wxWindow* parent, const wxString& message = wxPyFileSelectorPromptStr, @@ -150,7 +150,7 @@ enum { wxCHOICEDLG_STYLE }; class wxMultiChoiceDialog : public wxDialog { public: - %addtofunc wxMultiChoiceDialog "self._setOORInfo(self)" + %pythonAppend wxMultiChoiceDialog "self._setOORInfo(self)" wxMultiChoiceDialog(wxWindow *parent, const wxString& message, @@ -174,7 +174,7 @@ public: class wxSingleChoiceDialog : public wxDialog { public: - %addtofunc wxSingleChoiceDialog "self._setOORInfo(self)" + %pythonAppend wxSingleChoiceDialog "self._setOORInfo(self)" %extend { // TODO: ignoring clientData for now... FIX THIS @@ -202,7 +202,7 @@ public: class wxTextEntryDialog : public wxDialog { public: - %addtofunc wxTextEntryDialog "self._setOORInfo(self)" + %pythonAppend wxTextEntryDialog "self._setOORInfo(self)" wxTextEntryDialog(wxWindow* parent, const wxString& message, @@ -241,7 +241,7 @@ public: class wxFontDialog : public wxDialog { public: - %addtofunc wxFontDialog "self._setOORInfo(self)" + %pythonAppend wxFontDialog "self._setOORInfo(self)" wxFontDialog(wxWindow* parent, const wxFontData& data); @@ -254,7 +254,7 @@ public: class wxMessageDialog : public wxDialog { public: - %addtofunc wxMessageDialog "self._setOORInfo(self)" + %pythonAppend wxMessageDialog "self._setOORInfo(self)" wxMessageDialog(wxWindow* parent, const wxString& message, @@ -269,7 +269,7 @@ public: class wxProgressDialog : public wxFrame { public: - %addtofunc wxProgressDialog "self._setOORInfo(self)" + %pythonAppend wxProgressDialog "self._setOORInfo(self)" wxProgressDialog(const wxString& title, const wxString& message, @@ -368,8 +368,8 @@ public: class wxFindReplaceDialog : public wxDialog { public: - %addtofunc wxFindReplaceDialog "self._setOORInfo(self)" - %addtofunc wxFindReplaceDialog() "" + %pythonAppend wxFindReplaceDialog "self._setOORInfo(self)" + %pythonAppend wxFindReplaceDialog() "" wxFindReplaceDialog(wxWindow *parent, wxFindReplaceData *data, diff --git a/wxPython/src/_colour.i b/wxPython/src/_colour.i index f16e701c48..a7db6a67ad 100644 --- a/wxPython/src/_colour.i +++ b/wxPython/src/_colour.i @@ -82,10 +82,11 @@ public: } }; -// %pythoncode { -// Color = Colour -// NamedColor = NamedColour -// } +%pythoncode { + Color = Colour + NamedColor = NamedColour + ColorRGB = ColourRGB +} //--------------------------------------------------------------------------- diff --git a/wxPython/src/_combobox.i b/wxPython/src/_combobox.i index a9da630a68..835d2e2be0 100644 --- a/wxPython/src/_combobox.i +++ b/wxPython/src/_combobox.i @@ -28,8 +28,8 @@ class wxComboBox : public wxControl, public wxItemContainer #endif { public: - %addtofunc wxComboBox "self._setOORInfo(self)" - %addtofunc wxComboBox() "" + %pythonAppend wxComboBox "self._setOORInfo(self)" + %pythonAppend wxComboBox() "" wxComboBox(wxWindow* parent, wxWindowID id, const wxString& value = wxPyEmptyString, diff --git a/wxPython/src/_control.i b/wxPython/src/_control.i index 1035fbb4f7..69c67f3da3 100644 --- a/wxPython/src/_control.i +++ b/wxPython/src/_control.i @@ -28,8 +28,8 @@ MAKE_CONST_WXSTRING(ControlNameStr); class wxControl : public wxWindow { public: - %addtofunc wxControl "self._setOORInfo(self)" - %addtofunc wxControl() "" + %pythonAppend wxControl "self._setOORInfo(self)" + %pythonAppend wxControl() "" wxControl(wxWindow *parent, wxWindowID id, diff --git a/wxPython/src/_cshelp.i b/wxPython/src/_cshelp.i index f328744847..21fbcbfda9 100644 --- a/wxPython/src/_cshelp.i +++ b/wxPython/src/_cshelp.i @@ -75,7 +75,7 @@ public: class wxContextHelpButton : public wxBitmapButton { public: - %addtofunc wxContextHelpButton "self._setOORInfo(self)" + %pythonAppend wxContextHelpButton "self._setOORInfo(self)" wxContextHelpButton(wxWindow* parent, wxWindowID id = wxID_CONTEXT_HELP, const wxPoint& pos = wxDefaultPosition, diff --git a/wxPython/src/_dataobj.i b/wxPython/src/_dataobj.i index 8dacc168d8..60b4a88421 100644 --- a/wxPython/src/_dataobj.i +++ b/wxPython/src/_dataobj.i @@ -222,7 +222,7 @@ bool wxPyDataObjectSimple::SetData(size_t len, const void *buf) const{ // Now define it for SWIG class wxPyDataObjectSimple : public wxDataObjectSimple { public: - %addtofunc wxPyDataObjectSimple "self._setCallbackInfo(self, PyDataObjectSimple)" + %pythonAppend wxPyDataObjectSimple "self._setCallbackInfo(self, PyDataObjectSimple)" wxPyDataObjectSimple(const wxDataFormat& format = wxFormatInvalid); void _setCallbackInfo(PyObject* self, PyObject* _class); @@ -281,7 +281,7 @@ IMP_PYCALLBACK__STRING(wxPyTextDataObject, wxTextDataObject, SetText); // Now define it for SWIG class wxPyTextDataObject : public wxTextDataObject { public: - %addtofunc wxPyTextDataObject "self._setCallbackInfo(self, PyTextDataObject)" + %pythonAppend wxPyTextDataObject "self._setCallbackInfo(self, PyTextDataObject)" wxPyTextDataObject(const wxString& text = wxPyEmptyString); void _setCallbackInfo(PyObject* self, PyObject* _class); @@ -344,7 +344,7 @@ void wxPyBitmapDataObject::SetBitmap(const wxBitmap& bitmap) { // Now define it for SWIG class wxPyBitmapDataObject : public wxBitmapDataObject { public: - %addtofunc wxPyBitmapDataObject "self._setCallbackInfo(self, PyBitmapDataObject)" + %pythonAppend wxPyBitmapDataObject "self._setCallbackInfo(self, PyBitmapDataObject)" wxPyBitmapDataObject(const wxBitmap& bitmap = wxNullBitmap); void _setCallbackInfo(PyObject* self, PyObject* _class); diff --git a/wxPython/src/_dc.i b/wxPython/src/_dc.i index def4b15852..466b5469a5 100644 --- a/wxPython/src/_dc.i +++ b/wxPython/src/_dc.i @@ -558,9 +558,9 @@ public: class wxBufferedDC : public wxMemoryDC { public: - %addtofunc wxBufferedDC( wxDC *dc, const wxBitmap &buffer ) + %pythonAppend wxBufferedDC( wxDC *dc, const wxBitmap &buffer ) "self._dc = args[0] # save a ref so the other dc will not be deleted before self"; - %addtofunc wxBufferedDC( wxDC *dc, const wxSize &area ) + %pythonAppend wxBufferedDC( wxDC *dc, const wxSize &area ) "val._dc = args[0] # save a ref so the other dc will not be deleted before self"; // Construct a wxBufferedDC using a user supplied buffer. diff --git a/wxPython/src/_defs.i b/wxPython/src/_defs.i index d7818e8883..16ee858096 100644 --- a/wxPython/src/_defs.i +++ b/wxPython/src/_defs.i @@ -40,13 +40,14 @@ typedef unsigned char byte; //---------------------------------------------------------------------- // Various SWIG macros and such -#define %addtofunc %feature("addtofunc") +#define %pythonAppend %feature("pythonappend") +#define %pythonPrepend %feature("pythonprepend") #define %kwargs %feature("kwargs") #define %nokwargs %feature("nokwargs") -#ifndef %shadow -#define %shadow %insert("shadow") -#endif +//#ifndef %shadow +//#define %shadow %insert("shadow") +//#endif #ifndef %pythoncode #define %pythoncode %insert("python") diff --git a/wxPython/src/_dirctrl.i b/wxPython/src/_dirctrl.i index 8d207caf65..b9b7699ba4 100644 --- a/wxPython/src/_dirctrl.i +++ b/wxPython/src/_dirctrl.i @@ -57,8 +57,8 @@ public: class wxGenericDirCtrl: public wxControl { public: - %addtofunc wxGenericDirCtrl "self._setOORInfo(self)" - %addtofunc wxGenericDirCtrl() "" + %pythonAppend wxGenericDirCtrl "self._setOORInfo(self)" + %pythonAppend wxGenericDirCtrl() "" wxGenericDirCtrl(wxWindow *parent, const wxWindowID id = -1, const wxString& dir = wxPyDirDialogDefaultFolderStr, @@ -137,8 +137,8 @@ public: class wxDirFilterListCtrl: public wxChoice { public: - %addtofunc wxDirFilterListCtrl "self._setOORInfo(self)" - %addtofunc wxDirFilterListCtrl() "" + %pythonAppend wxDirFilterListCtrl "self._setOORInfo(self)" + %pythonAppend wxDirFilterListCtrl() "" wxDirFilterListCtrl(wxGenericDirCtrl* parent, const wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, diff --git a/wxPython/src/_dnd.i b/wxPython/src/_dnd.i index 19a9494430..c109240212 100644 --- a/wxPython/src/_dnd.i +++ b/wxPython/src/_dnd.i @@ -118,7 +118,7 @@ IMP_PYCALLBACK_BOOL_INTINT(wxPyDropTarget, wxDropTarget, OnDrop); %name(DropTarget) class wxPyDropTarget // : public wxDropTarget { public: - %addtofunc wxPyDropTarget + %pythonAppend wxPyDropTarget "self._setCallbackInfo(self, DropTarget)" %apply SWIGTYPE *DISOWN { wxDataObject *dataObject }; @@ -180,7 +180,7 @@ IMP_PYCALLBACK_BOOL_INTINT(wxPyTextDropTarget, wxTextDropTarget, OnDrop); %name(TextDropTarget) class wxPyTextDropTarget : public wxPyDropTarget { public: - %addtofunc wxPyTextDropTarget "self._setCallbackInfo(self, TextDropTarget)" + %pythonAppend wxPyTextDropTarget "self._setCallbackInfo(self, TextDropTarget)" wxPyTextDropTarget(); void _setCallbackInfo(PyObject* self, PyObject* _class); @@ -241,7 +241,7 @@ IMP_PYCALLBACK_BOOL_INTINT(wxPyFileDropTarget, wxFileDropTarget, OnDrop); %name(FileDropTarget) class wxPyFileDropTarget : public wxPyDropTarget { public: - %addtofunc wxPyFileDropTarget "self._setCallbackInfo(self, FileDropTarget)" + %pythonAppend wxPyFileDropTarget "self._setCallbackInfo(self, FileDropTarget)" wxPyFileDropTarget(); void _setCallbackInfo(PyObject* self, PyObject* _class); diff --git a/wxPython/src/_event.i b/wxPython/src/_event.i index 3ddc61936a..115650bc6d 100644 --- a/wxPython/src/_event.i +++ b/wxPython/src/_event.i @@ -1211,7 +1211,7 @@ public: class wxPyEvent : public wxEvent { public: - %addtofunc wxPyEvent "self.SetSelf(self)" + %pythonAppend wxPyEvent "self.SetSelf(self)" wxPyEvent(int winid=0, wxEventType commandType = wxEVT_NULL ); ~wxPyEvent(); @@ -1223,7 +1223,7 @@ public: class wxPyCommandEvent : public wxCommandEvent { public: - %addtofunc wxPyCommandEvent "self.SetSelf(self)" + %pythonAppend wxPyCommandEvent "self.SetSelf(self)" wxPyCommandEvent(wxEventType commandType = wxEVT_NULL, int id=0); ~wxPyCommandEvent(); diff --git a/wxPython/src/_filesys.i b/wxPython/src/_filesys.i index feb4026650..87e95b556e 100644 --- a/wxPython/src/_filesys.i +++ b/wxPython/src/_filesys.i @@ -95,7 +95,7 @@ public: %name(FileSystemHandler) class wxPyFileSystemHandler : public wxFileSystemHandler { public: - %addtofunc wxPyFileSystemHandler "self._setCallbackInfo(self, FileSystemHandler)"; + %pythonAppend wxPyFileSystemHandler "self._setCallbackInfo(self, FileSystemHandler)"; wxPyFileSystemHandler(); diff --git a/wxPython/src/_font.i b/wxPython/src/_font.i index fc4d975bbf..833c37b9b4 100644 --- a/wxPython/src/_font.i +++ b/wxPython/src/_font.i @@ -523,7 +523,7 @@ IMP_PYCALLBACK_BOOL_STRINGSTRING(wxPyFontEnumerator, wxFontEnumerator, OnFontEnc %name(FontEnumerator) class wxPyFontEnumerator { public: - %addtofunc wxPyFontEnumerator "self._setCallbackInfo(self, FontEnumerator, 0)" + %pythonAppend wxPyFontEnumerator "self._setCallbackInfo(self, FontEnumerator, 0)" wxPyFontEnumerator(); ~wxPyFontEnumerator(); diff --git a/wxPython/src/_gauge.i b/wxPython/src/_gauge.i index 9171ca3dcf..264683d27a 100644 --- a/wxPython/src/_gauge.i +++ b/wxPython/src/_gauge.i @@ -31,8 +31,8 @@ enum { class wxGauge : public wxControl { public: - %addtofunc wxGauge "self._setOORInfo(self)" - %addtofunc wxGauge() "" + %pythonAppend wxGauge "self._setOORInfo(self)" + %pythonAppend wxGauge() "" wxGauge(wxWindow* parent, wxWindowID id, int range, const wxPoint& pos = wxDefaultPosition, diff --git a/wxPython/src/_listbox.i b/wxPython/src/_listbox.i index 234eaddc2a..3b2fb7ddd3 100644 --- a/wxPython/src/_listbox.i +++ b/wxPython/src/_listbox.i @@ -29,8 +29,8 @@ MAKE_CONST_WXSTRING(ListBoxNameStr); class wxListBox : public wxControlWithItems { public: - %addtofunc wxListBox "self._setOORInfo(self)" - %addtofunc wxListBox() "" + %pythonAppend wxListBox "self._setOORInfo(self)" + %pythonAppend wxListBox() "" wxListBox(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, @@ -114,8 +114,8 @@ public: class wxCheckListBox : public wxListBox { public: - %addtofunc wxCheckListBox "self._setOORInfo(self)" - %addtofunc wxCheckListBox() "" + %pythonAppend wxCheckListBox "self._setOORInfo(self)" + %pythonAppend wxCheckListBox() "" wxCheckListBox(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, diff --git a/wxPython/src/_listctrl.i b/wxPython/src/_listctrl.i index 60f6ba3edc..1ecb636b6d 100644 --- a/wxPython/src/_listctrl.i +++ b/wxPython/src/_listctrl.i @@ -401,8 +401,8 @@ IMP_PYCALLBACK_LISTATTR_LONG(wxPyListCtrl, wxListCtrl, OnGetItemAttr); %name(ListCtrl)class wxPyListCtrl : public wxControl { public: - %addtofunc wxPyListCtrl "self._setOORInfo(self);self._setCallbackInfo(self, ListCtrl)" - %addtofunc wxPyListCtrl() "" + %pythonAppend wxPyListCtrl "self._setOORInfo(self);self._setCallbackInfo(self, ListCtrl)" + %pythonAppend wxPyListCtrl() "" wxPyListCtrl(wxWindow* parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, @@ -427,7 +427,7 @@ public: bool SetBackgroundColour(const wxColour& col); // Gets information about this column - %addtofunc GetColumn "if val is not None: val.thisown = 1"; // %newobject doesn't work with OOR typemap + %pythonAppend GetColumn "if val is not None: val.thisown = 1"; // %newobject doesn't work with OOR typemap %extend { wxListItem* GetColumn(int col) { wxListItem item; @@ -470,7 +470,7 @@ public: #endif // Gets information about the item - %addtofunc GetItem "if val is not None: val.thisown = 1"; // %newobject doesn't work with OOR typemap + %pythonAppend GetItem "if val is not None: val.thisown = 1"; // %newobject doesn't work with OOR typemap %extend { wxListItem* GetItem(long itemId, int col=0) { wxListItem* info = new wxListItem; @@ -776,8 +776,8 @@ public: class wxListView : public wxPyListCtrl { public: - %addtofunc wxListView "self._setOORInfo(self)" - %addtofunc wxListView() "" + %pythonAppend wxListView "self._setOORInfo(self)" + %pythonAppend wxListView() "" wxListView( wxWindow *parent, wxWindowID id = -1, diff --git a/wxPython/src/_log.i b/wxPython/src/_log.i index 4a3b7e26b8..7960ba69f2 100644 --- a/wxPython/src/_log.i +++ b/wxPython/src/_log.i @@ -281,7 +281,7 @@ public: // Now tell SWIG about it class wxPyLog : public wxLog { public: - %addtofunc wxPyLog "self._setCallbackInfo(self, PyLog)" + %pythonAppend wxPyLog "self._setCallbackInfo(self, PyLog)" wxPyLog(); diff --git a/wxPython/src/_mdi.i b/wxPython/src/_mdi.i index 1ccaa7a177..daf66d111a 100644 --- a/wxPython/src/_mdi.i +++ b/wxPython/src/_mdi.i @@ -35,8 +35,8 @@ class wxMDIParentFrame : public wxFrame { public: - %addtofunc wxMDIParentFrame "self._setOORInfo(self)" - %addtofunc wxMDIParentFrame() "" + %pythonAppend wxMDIParentFrame "self._setOORInfo(self)" + %pythonAppend wxMDIParentFrame() "" wxMDIParentFrame(wxWindow *parent, const wxWindowID id, @@ -80,8 +80,8 @@ public: class wxMDIChildFrame : public wxFrame { public: - %addtofunc wxMDIChildFrame "self._setOORInfo(self)" - %addtofunc wxMDIChildFrame() "" + %pythonAppend wxMDIChildFrame "self._setOORInfo(self)" + %pythonAppend wxMDIChildFrame() "" wxMDIChildFrame(wxMDIParentFrame* parent, const wxWindowID id, @@ -111,8 +111,8 @@ public: class wxMDIClientWindow : public wxWindow { public: - %addtofunc wxMDIClientWindow "self._setOORInfo(self)" - %addtofunc wxMDIClientWindow() "" + %pythonAppend wxMDIClientWindow "self._setOORInfo(self)" + %pythonAppend wxMDIClientWindow() "" wxMDIClientWindow(wxMDIParentFrame* parent, long style = 0); %name(PreMDIClientWindow)wxMDIClientWindow(); diff --git a/wxPython/src/_menu.i b/wxPython/src/_menu.i index 8144d66ace..02dc200a3c 100644 --- a/wxPython/src/_menu.i +++ b/wxPython/src/_menu.i @@ -20,7 +20,7 @@ class wxMenu : public wxEvtHandler { public: - %addtofunc wxMenu "self._setOORInfo(self)" + %pythonAppend wxMenu "self._setOORInfo(self)" wxMenu(const wxString& title = wxPyEmptyString, long style = 0); @@ -206,7 +206,7 @@ public: class wxMenuBar : public wxWindow { public: - %addtofunc wxMenuBar "self._setOORInfo(self)" + %pythonAppend wxMenuBar "self._setOORInfo(self)" wxMenuBar(long style = 0); diff --git a/wxPython/src/_notebook.i b/wxPython/src/_notebook.i index 5cfb313667..a01000f65a 100644 --- a/wxPython/src/_notebook.i +++ b/wxPython/src/_notebook.i @@ -159,8 +159,8 @@ enum { class wxNotebook : public wxBookCtrl { public: - %addtofunc wxNotebook "self._setOORInfo(self)" - %addtofunc wxNotebook() "" + %pythonAppend wxNotebook "self._setOORInfo(self)" + %pythonAppend wxNotebook() "" wxNotebook(wxWindow *parent, wxWindowID id, @@ -283,8 +283,8 @@ enum class wxListbook : public wxBookCtrl { public: - %addtofunc wxListbook "self._setOORInfo(self)" - %addtofunc wxListbook() "" + %pythonAppend wxListbook "self._setOORInfo(self)" + %pythonAppend wxListbook() "" wxListbook(wxWindow *parent, wxWindowID id, @@ -332,7 +332,7 @@ public: class wxBookCtrlSizer: public wxSizer { public: - %addtofunc wxBookCtrlSizer "self._setOORInfo(self)" + %pythonAppend wxBookCtrlSizer "self._setOORInfo(self)" wxBookCtrlSizer( wxBookCtrl *nb ); @@ -344,7 +344,7 @@ public: class wxNotebookSizer: public wxSizer { public: - %addtofunc wxNotebookSizer "self._setOORInfo(self)" + %pythonAppend wxNotebookSizer "self._setOORInfo(self)" wxNotebookSizer( wxNotebook *nb ); diff --git a/wxPython/src/_panel.i b/wxPython/src/_panel.i index f318d26caf..76a7fb4d5f 100644 --- a/wxPython/src/_panel.i +++ b/wxPython/src/_panel.i @@ -25,8 +25,8 @@ class wxPanel : public wxWindow { public: - %addtofunc wxPanel "self._setOORInfo(self)" - %addtofunc wxPanel() "" + %pythonAppend wxPanel "self._setOORInfo(self)" + %pythonAppend wxPanel() "" wxPanel(wxWindow* parent, const wxWindowID id=-1, @@ -58,8 +58,8 @@ public: class wxScrolledWindow : public wxPanel { public: - %addtofunc wxScrolledWindow "self._setOORInfo(self)" - %addtofunc wxScrolledWindow() "" + %pythonAppend wxScrolledWindow "self._setOORInfo(self)" + %pythonAppend wxScrolledWindow() "" wxScrolledWindow(wxWindow* parent, const wxWindowID id = -1, diff --git a/wxPython/src/_popupwin.i b/wxPython/src/_popupwin.i index 330b1dc3cb..38ae99eda9 100644 --- a/wxPython/src/_popupwin.i +++ b/wxPython/src/_popupwin.i @@ -28,8 +28,8 @@ // combobox popups and such. class wxPopupWindow : public wxWindow { public: - %addtofunc wxPopupWindow "self._setOORInfo(self)" - %addtofunc wxPopupWindow() "" + %pythonAppend wxPopupWindow "self._setOORInfo(self)" + %pythonAppend wxPopupWindow() "" wxPopupWindow(wxWindow *parent, int flags = wxBORDER_NONE); %name(PrePopupWindow)wxPopupWindow(); @@ -79,8 +79,8 @@ IMP_PYCALLBACK_BOOL_(wxPyPopupTransientWindow, wxPopupTransientWindow, CanDismis %name(PopupTransientWindow) class wxPyPopupTransientWindow : public wxPopupWindow { public: - %addtofunc wxPyPopupTransientWindow "self._setOORInfo(self);self._setCallbackInfo(self, PopupTransientWindow)" - %addtofunc wxPyPopupTransientWindow() "" + %pythonAppend wxPyPopupTransientWindow "self._setOORInfo(self);self._setCallbackInfo(self, PopupTransientWindow)" + %pythonAppend wxPyPopupTransientWindow() "" wxPyPopupTransientWindow(wxWindow *parent, int style = wxBORDER_NONE); %name(PrePopupTransientWindow)wxPyPopupTransientWindow(); diff --git a/wxPython/src/_printfw.i b/wxPython/src/_printfw.i index 55ddfca1b1..48708018bc 100644 --- a/wxPython/src/_printfw.i +++ b/wxPython/src/_printfw.i @@ -147,7 +147,7 @@ public: class wxPageSetupDialog : public wxDialog { public: - %addtofunc wxPageSetupDialog "self._setOORInfo(self)" + %pythonAppend wxPageSetupDialog "self._setOORInfo(self)" wxPageSetupDialog(wxWindow* parent, wxPageSetupDialogData* data = NULL); @@ -213,7 +213,7 @@ public: class wxPrintDialog : public wxDialog { public: - %addtofunc wxPrintDialog "self._setOORInfo(self)" + %pythonAppend wxPrintDialog "self._setOORInfo(self)" wxPrintDialog(wxWindow* parent, wxPrintDialogData* data = NULL); @@ -320,7 +320,7 @@ IMP_PYCALLBACK_BOOL_INT(wxPyPrintout, wxPrintout, HasPage); // Now define the custom class for SWIGging %name(Printout) class wxPyPrintout : public wxObject { public: - %addtofunc wxPyPrintout "self._setCallbackInfo(self, Printout)" + %pythonAppend wxPyPrintout "self._setCallbackInfo(self, Printout)" wxPyPrintout(const wxString& title = wxPyPrintoutTitleStr); //~wxPyPrintout(); wxPrintPreview object takes ownership... @@ -374,7 +374,7 @@ public: class wxPreviewCanvas: public wxScrolledWindow { public: - %addtofunc wxPreviewCanvas "self._setOORInfo(self)" + %pythonAppend wxPreviewCanvas "self._setOORInfo(self)" wxPreviewCanvas(wxPrintPreview *preview, wxWindow *parent, @@ -387,7 +387,7 @@ public: class wxPreviewFrame : public wxFrame { public: - %addtofunc wxPreviewFrame "self._setOORInfo(self)" + %pythonAppend wxPreviewFrame "self._setOORInfo(self)" wxPreviewFrame(wxPrintPreview* preview, wxFrame* parent, const wxString& title, const wxPoint& pos = wxDefaultPosition, @@ -427,7 +427,7 @@ enum { class wxPreviewControlBar: public wxPanel { public: - %addtofunc wxPreviewControlBar "self._setOORInfo(self)" + %pythonAppend wxPreviewControlBar "self._setOORInfo(self)" wxPreviewControlBar(wxPrintPreview *preview, long buttons, @@ -580,7 +580,7 @@ IMP_PYCALLBACK_VOID_ (wxPyPrintPreview, wxPrintPreview, DetermineScaling) class wxPyPrintPreview : public wxPrintPreview { public: - %addtofunc wxPyPrintPreview "self._setCallbackInfo(self, PyPrintPreview)" + %pythonAppend wxPyPrintPreview "self._setCallbackInfo(self, PyPrintPreview)" wxPyPrintPreview(wxPyPrintout* printout, wxPyPrintout* printoutForPrinting, @@ -635,7 +635,7 @@ IMP_PYCALLBACK_VOID_(wxPyPreviewFrame, wxPreviewFrame, CreateControlBar); class wxPyPreviewFrame : public wxPreviewFrame { public: - %addtofunc wxPyPreviewFrame "self._setCallbackInfo(self, PyPreviewFrame); self._setOORInfo(self)" + %pythonAppend wxPyPreviewFrame "self._setCallbackInfo(self, PyPreviewFrame); self._setOORInfo(self)" wxPyPreviewFrame(wxPrintPreview* preview, wxFrame* parent, const wxString& title, @@ -689,7 +689,7 @@ IMP_PYCALLBACK_VOID_INT(wxPyPreviewControlBar, wxPreviewControlBar, SetZoomContr class wxPyPreviewControlBar : public wxPreviewControlBar { public: - %addtofunc wxPyPreviewControlBar "self._setCallbackInfo(self, PyPreviewControlBar); self._setOORInfo(self)" + %pythonAppend wxPyPreviewControlBar "self._setCallbackInfo(self, PyPreviewControlBar); self._setOORInfo(self)" wxPyPreviewControlBar(wxPrintPreview *preview, long buttons, diff --git a/wxPython/src/_process.i b/wxPython/src/_process.i index b3e1155429..642a03134e 100644 --- a/wxPython/src/_process.i +++ b/wxPython/src/_process.i @@ -89,7 +89,7 @@ public: static wxPyProcess *Open(const wxString& cmd, int flags = wxEXEC_ASYNC); - %addtofunc wxPyProcess "self._setCallbackInfo(self, Process)" + %pythonAppend wxPyProcess "self._setCallbackInfo(self, Process)" wxPyProcess(wxEvtHandler *parent = NULL, int id = -1); void _setCallbackInfo(PyObject* self, PyObject* _class); diff --git a/wxPython/src/_pycontrol.i b/wxPython/src/_pycontrol.i index 868e9b5143..98ff833b67 100644 --- a/wxPython/src/_pycontrol.i +++ b/wxPython/src/_pycontrol.i @@ -95,7 +95,7 @@ IMP_PYCALLBACK_VOID_WXWINBASE(wxPyControl, wxControl, RemoveChild); class wxPyControl : public wxControl { public: - %addtofunc wxPyControl "self._setOORInfo(self); self._setCallbackInfo(self, PyControl)" + %pythonAppend wxPyControl "self._setOORInfo(self); self._setCallbackInfo(self, PyControl)" wxPyControl(wxWindow* parent, const wxWindowID id, const wxPoint& pos = wxDefaultPosition, diff --git a/wxPython/src/_pywindows.i b/wxPython/src/_pywindows.i index 74d5be5e30..bac5f0d3f7 100644 --- a/wxPython/src/_pywindows.i +++ b/wxPython/src/_pywindows.i @@ -125,7 +125,7 @@ IMP_PYCALLBACK_VOID_WXWINBASE(wxPyWindow, wxWindow, RemoveChild); class wxPyWindow : public wxWindow { public: - %addtofunc wxPyWindow "self._setOORInfo(self); self._setCallbackInfo(self, PyWindow)" + %pythonAppend wxPyWindow "self._setOORInfo(self); self._setCallbackInfo(self, PyWindow)" wxPyWindow(wxWindow* parent, const wxWindowID id, const wxPoint& pos = wxDefaultPosition, @@ -250,7 +250,7 @@ IMP_PYCALLBACK_VOID_WXWINBASE(wxPyPanel, wxPanel, RemoveChild); class wxPyPanel : public wxPanel { public: - %addtofunc wxPyPanel "self._setOORInfo(self); self._setCallbackInfo(self, PyPanel)" + %pythonAppend wxPyPanel "self._setOORInfo(self); self._setCallbackInfo(self, PyPanel)" wxPyPanel(wxWindow* parent, const wxWindowID id, const wxPoint& pos = wxDefaultPosition, diff --git a/wxPython/src/_radio.i b/wxPython/src/_radio.i index aaced88af9..e6974a375f 100644 --- a/wxPython/src/_radio.i +++ b/wxPython/src/_radio.i @@ -24,12 +24,14 @@ MAKE_CONST_WXSTRING(RadioButtonNameStr); class wxRadioBox : public wxControl { public: - %addtofunc wxRadioBox "self._setOORInfo(self)" - %addtofunc wxRadioBox() "" + %pythonPrepend wxRadioBox "if kwargs.has_key('point'): kwargs['pos'] = kwargs['point']" + %pythonPrepend wxRadioBox() "" + %pythonAppend wxRadioBox "self._setOORInfo(self)" + %pythonAppend wxRadioBox() "" wxRadioBox(wxWindow* parent, wxWindowID id, const wxString& label, - const wxPoint& point = wxDefaultPosition, + const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, int choices = 0, wxString* choices_array = NULL, int majorDimension = 0, @@ -40,7 +42,7 @@ public: bool Create(wxWindow* parent, wxWindowID id, const wxString& label, - const wxPoint& point = wxDefaultPosition, + const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, int choices = 0, wxString* choices_array = NULL, int majorDimension = 0, @@ -91,8 +93,8 @@ public: class wxRadioButton : public wxControl { public: - %addtofunc wxRadioButton "self._setOORInfo(self)" - %addtofunc wxRadioButton() "" + %pythonAppend wxRadioButton "self._setOORInfo(self)" + %pythonAppend wxRadioButton() "" wxRadioButton(wxWindow* parent, wxWindowID id, const wxString& label, diff --git a/wxPython/src/_sashwin.i b/wxPython/src/_sashwin.i index da6752c285..eb2d828ac9 100644 --- a/wxPython/src/_sashwin.i +++ b/wxPython/src/_sashwin.i @@ -51,8 +51,8 @@ enum wxSashEdgePosition { class wxSashWindow: public wxWindow { public: - %addtofunc wxSashWindow "self._setOORInfo(self)" - %addtofunc wxSashWindow() "" + %pythonAppend wxSashWindow "self._setOORInfo(self)" + %pythonAppend wxSashWindow() "" wxSashWindow(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, @@ -237,8 +237,8 @@ public: class wxSashLayoutWindow: public wxSashWindow { public: - %addtofunc wxSashLayoutWindow "self._setOORInfo(self)" - %addtofunc wxSashLayoutWindow() "" + %pythonAppend wxSashLayoutWindow "self._setOORInfo(self)" + %pythonAppend wxSashLayoutWindow() "" wxSashLayoutWindow(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, diff --git a/wxPython/src/_scrolbar.i b/wxPython/src/_scrolbar.i index 5a32c1503f..8155c4502e 100644 --- a/wxPython/src/_scrolbar.i +++ b/wxPython/src/_scrolbar.i @@ -22,8 +22,8 @@ MAKE_CONST_WXSTRING(ScrollBarNameStr); class wxScrollBar : public wxControl { public: - %addtofunc wxScrollBar "self._setOORInfo(self)" - %addtofunc wxScrollBar() "" + %pythonAppend wxScrollBar "self._setOORInfo(self)" + %pythonAppend wxScrollBar() "" wxScrollBar(wxWindow* parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, diff --git a/wxPython/src/_sizers.i b/wxPython/src/_sizers.i index b4da96010a..9263606e54 100644 --- a/wxPython/src/_sizers.i +++ b/wxPython/src/_sizers.i @@ -382,7 +382,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxPySizer, wxSizer); class wxPySizer : public wxSizer { public: - %addtofunc wxPySizer "self._setCallbackInfo(self, PySizer);self._setOORInfo(self)" + %pythonAppend wxPySizer "self._setCallbackInfo(self, PySizer);self._setOORInfo(self)" wxPySizer(); void _setCallbackInfo(PyObject* self, PyObject* _class); @@ -394,7 +394,7 @@ public: class wxBoxSizer : public wxSizer { public: - %addtofunc wxBoxSizer "self._setOORInfo(self)" + %pythonAppend wxBoxSizer "self._setOORInfo(self)" wxBoxSizer(int orient = wxHORIZONTAL); @@ -409,7 +409,7 @@ public: class wxStaticBoxSizer : public wxBoxSizer { public: - %addtofunc wxStaticBoxSizer "self._setOORInfo(self)" + %pythonAppend wxStaticBoxSizer "self._setOORInfo(self)" wxStaticBoxSizer(wxStaticBox *box, int orient = wxHORIZONTAL); @@ -424,7 +424,7 @@ public: class wxGridSizer: public wxSizer { public: - %addtofunc wxGridSizer "self._setOORInfo(self)" + %pythonAppend wxGridSizer "self._setOORInfo(self)" wxGridSizer( int rows=1, int cols=0, int vgap=0, int hgap=0 ); @@ -460,7 +460,7 @@ enum wxFlexSizerGrowMode class wxFlexGridSizer: public wxGridSizer { public: - %addtofunc wxFlexGridSizer "self._setOORInfo(self)" + %pythonAppend wxFlexGridSizer "self._setOORInfo(self)" wxFlexGridSizer( int rows=1, int cols=0, int vgap=0, int hgap=0 ); diff --git a/wxPython/src/_slider.i b/wxPython/src/_slider.i index 21bae7b0ed..4ed28e4ff0 100644 --- a/wxPython/src/_slider.i +++ b/wxPython/src/_slider.i @@ -27,12 +27,14 @@ MAKE_CONST_WXSTRING(SliderNameStr); class wxSlider : public wxControl { public: - %addtofunc wxSlider "self._setOORInfo(self)" - %addtofunc wxSlider() "" + %pythonPrepend wxSlider "if kwargs.has_key('point'): kwargs['pos'] = kwargs['point']" + %pythonPrepend wxSlider() "" + %pythonAppend wxSlider "self._setOORInfo(self)" + %pythonAppend wxSlider() "" wxSlider(wxWindow* parent, wxWindowID id, int value, int minValue, int maxValue, - const wxPoint& point = wxDefaultPosition, + const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSL_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, @@ -41,7 +43,7 @@ public: bool Create(wxWindow* parent, wxWindowID id, int value, int minValue, int maxValue, - const wxPoint& point = wxDefaultPosition, + const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSL_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, @@ -71,7 +73,7 @@ public: virtual void SetThumbLength(int lenPixels); virtual int GetThumbLength() const; - virtual void SetTickFreq(int n, int pos); + virtual void SetTickFreq(int n, int pos=1); virtual int GetTickFreq() const; virtual void ClearTicks(); virtual void SetTick(int tickPos); diff --git a/wxPython/src/_spin.i b/wxPython/src/_spin.i index 36a921eb3d..1b100a21e5 100644 --- a/wxPython/src/_spin.i +++ b/wxPython/src/_spin.i @@ -41,8 +41,8 @@ enum { class wxSpinButton : public wxControl { public: - %addtofunc wxSpinButton "self._setOORInfo(self)" - %addtofunc wxSpinButton() "" + %pythonAppend wxSpinButton "self._setOORInfo(self)" + %pythonAppend wxSpinButton() "" wxSpinButton(wxWindow* parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, @@ -80,8 +80,8 @@ public: class wxSpinCtrl : public wxControl { public: - %addtofunc wxSpinCtrl "self._setOORInfo(self)" - %addtofunc wxSpinCtrl() "" + %pythonAppend wxSpinCtrl "self._setOORInfo(self)" + %pythonAppend wxSpinCtrl() "" wxSpinCtrl(wxWindow *parent, wxWindowID id = -1, diff --git a/wxPython/src/_splitter.i b/wxPython/src/_splitter.i index 0c3a7fb6de..5f839f6287 100644 --- a/wxPython/src/_splitter.i +++ b/wxPython/src/_splitter.i @@ -53,18 +53,20 @@ enum class wxSplitterWindow: public wxWindow { public: - %addtofunc wxSplitterWindow "self._setOORInfo(self)" - %addtofunc wxSplitterWindow() "" + %pythonPrepend wxSplitterWindow "if kwargs.has_key('point'): kwargs['pos'] = kwargs['point']" + %pythonPrepend wxSplitterWindow() "" + %pythonAppend wxSplitterWindow "self._setOORInfo(self)" + %pythonAppend wxSplitterWindow() "" wxSplitterWindow(wxWindow* parent, wxWindowID id, - const wxPoint& point = wxDefaultPosition, + const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style=wxSP_3D, const wxString& name = wxPySplitterNameStr); %name(PreSplitterWindow)wxSplitterWindow(); bool Create(wxWindow* parent, wxWindowID id, - const wxPoint& point = wxDefaultPosition, + const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style=wxSP_3D, const wxString& name = wxPySplitterNameStr); diff --git a/wxPython/src/_statctrls.i b/wxPython/src/_statctrls.i index 097e0f314d..63dc0fe569 100644 --- a/wxPython/src/_statctrls.i +++ b/wxPython/src/_statctrls.i @@ -25,8 +25,8 @@ MAKE_CONST_WXSTRING(StaticTextNameStr); class wxStaticBox : public wxControl { public: - %addtofunc wxStaticBox "self._setOORInfo(self)" - %addtofunc wxStaticBox() "" + %pythonAppend wxStaticBox "self._setOORInfo(self)" + %pythonAppend wxStaticBox() "" wxStaticBox(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, @@ -49,8 +49,8 @@ public: class wxStaticLine : public wxControl { public: - %addtofunc wxStaticLine "self._setOORInfo(self)" - %addtofunc wxStaticLine() "" + %pythonAppend wxStaticLine "self._setOORInfo(self)" + %pythonAppend wxStaticLine() "" wxStaticLine( wxWindow *parent, wxWindowID id, const wxPoint &pos = wxDefaultPosition, @@ -79,8 +79,8 @@ public: class wxStaticText : public wxControl { public: - %addtofunc wxStaticText "self._setOORInfo(self)" - %addtofunc wxStaticText() "" + %pythonAppend wxStaticText "self._setOORInfo(self)" + %pythonAppend wxStaticText() "" wxStaticText(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, @@ -101,8 +101,8 @@ public: class wxStaticBitmap : public wxControl { public: - %addtofunc wxStaticText "self._setOORInfo(self)" - %addtofunc wxStaticText() "" + %pythonAppend wxStaticText "self._setOORInfo(self)" + %pythonAppend wxStaticText() "" wxStaticBitmap(wxWindow* parent, wxWindowID id, const wxBitmap& bitmap, diff --git a/wxPython/src/_statusbar.i b/wxPython/src/_statusbar.i index 48ef90034f..6888f583bd 100644 --- a/wxPython/src/_statusbar.i +++ b/wxPython/src/_statusbar.i @@ -26,8 +26,8 @@ class wxStatusBar : public wxWindow { public: - %addtofunc wxStatusBar "self._setOORInfo(self)" - %addtofunc wxStatusBar() "" + %pythonAppend wxStatusBar "self._setOORInfo(self)" + %pythonAppend wxStatusBar() "" wxStatusBar(wxWindow* parent, wxWindowID id = -1, long style = wxST_SIZEGRIP, diff --git a/wxPython/src/_stockobjs.i b/wxPython/src/_stockobjs.i index 3abd60a2e2..12aa013492 100644 --- a/wxPython/src/_stockobjs.i +++ b/wxPython/src/_stockobjs.i @@ -17,6 +17,63 @@ %newgroup +// See also wxPy_ReinitStockObjects in helpers.cpp +%immutable; + +wxFont* const wxNORMAL_FONT; +wxFont* const wxSMALL_FONT; +wxFont* const wxITALIC_FONT; +wxFont* const wxSWISS_FONT; + +wxPen* const wxRED_PEN; +wxPen* const wxCYAN_PEN; +wxPen* const wxGREEN_PEN; +wxPen* const wxBLACK_PEN; +wxPen* const wxWHITE_PEN; +wxPen* const wxTRANSPARENT_PEN; +wxPen* const wxBLACK_DASHED_PEN; +wxPen* const wxGREY_PEN; +wxPen* const wxMEDIUM_GREY_PEN; +wxPen* const wxLIGHT_GREY_PEN; + +wxBrush* const wxBLUE_BRUSH; +wxBrush* const wxGREEN_BRUSH; +wxBrush* const wxWHITE_BRUSH; +wxBrush* const wxBLACK_BRUSH; +wxBrush* const wxTRANSPARENT_BRUSH; +wxBrush* const wxCYAN_BRUSH; +wxBrush* const wxRED_BRUSH; +wxBrush* const wxGREY_BRUSH; +wxBrush* const wxMEDIUM_GREY_BRUSH; +wxBrush* const wxLIGHT_GREY_BRUSH; + +wxColour* const wxBLACK; +wxColour* const wxWHITE; +wxColour* const wxRED; +wxColour* const wxBLUE; +wxColour* const wxGREEN; +wxColour* const wxCYAN; +wxColour* const wxLIGHT_GREY; + +wxCursor* const wxSTANDARD_CURSOR; +wxCursor* const wxHOURGLASS_CURSOR; +wxCursor* const wxCROSS_CURSOR; + + +const wxBitmap wxNullBitmap; +const wxIcon wxNullIcon; +const wxCursor wxNullCursor; +const wxPen wxNullPen; +const wxBrush wxNullBrush; +const wxPalette wxNullPalette; +const wxFont wxNullFont; +const wxColour wxNullColour; + +%mutable; + + +//--------------------------------------------------------------------------- + class wxPenList : public wxObject { public: @@ -80,65 +137,10 @@ public: %newgroup -// %typemap(varout) wxFont* { -// // my typemap -// $result = SWIG_NewPointerObj((void *) $1, $1_descriptor, 0); -// } - // See also wxPy_ReinitStockObjects in helpers.cpp %immutable; -wxFont* const wxNORMAL_FONT; -wxFont* const wxSMALL_FONT; -wxFont* const wxITALIC_FONT; -wxFont* const wxSWISS_FONT; - -wxPen* const wxRED_PEN; -wxPen* const wxCYAN_PEN; -wxPen* const wxGREEN_PEN; -wxPen* const wxBLACK_PEN; -wxPen* const wxWHITE_PEN; -wxPen* const wxTRANSPARENT_PEN; -wxPen* const wxBLACK_DASHED_PEN; -wxPen* const wxGREY_PEN; -wxPen* const wxMEDIUM_GREY_PEN; -wxPen* const wxLIGHT_GREY_PEN; - -wxBrush* const wxBLUE_BRUSH; -wxBrush* const wxGREEN_BRUSH; -wxBrush* const wxWHITE_BRUSH; -wxBrush* const wxBLACK_BRUSH; -wxBrush* const wxTRANSPARENT_BRUSH; -wxBrush* const wxCYAN_BRUSH; -wxBrush* const wxRED_BRUSH; -wxBrush* const wxGREY_BRUSH; -wxBrush* const wxMEDIUM_GREY_BRUSH; -wxBrush* const wxLIGHT_GREY_BRUSH; - -wxColour* const wxBLACK; -wxColour* const wxWHITE; -wxColour* const wxRED; -wxColour* const wxBLUE; -wxColour* const wxGREEN; -wxColour* const wxCYAN; -wxColour* const wxLIGHT_GREY; - -wxCursor* const wxSTANDARD_CURSOR; -wxCursor* const wxHOURGLASS_CURSOR; -wxCursor* const wxCROSS_CURSOR; - - -const wxBitmap wxNullBitmap; -const wxIcon wxNullIcon; -const wxCursor wxNullCursor; -const wxPen wxNullPen; -const wxBrush wxNullBrush; -const wxPalette wxNullPalette; -const wxFont wxNullFont; -const wxColour wxNullColour; - - wxFontList* const wxTheFontList; wxPenList* const wxThePenList; wxBrushList* const wxTheBrushList; @@ -149,3 +151,8 @@ wxColourDatabase* const wxTheColourDatabase; //--------------------------------------------------------------------------- +%pythoncode { NullColor = NullColour } + + + + diff --git a/wxPython/src/_textctrl.i b/wxPython/src/_textctrl.i index 3a36c5e3e5..7ec0cae829 100644 --- a/wxPython/src/_textctrl.i +++ b/wxPython/src/_textctrl.i @@ -102,7 +102,8 @@ public: const wxColour& colBack = wxNullColour, const wxFont& font = wxNullFont, wxTextAttrAlignment alignment = wxTEXT_ALIGNMENT_DEFAULT); - + ~wxTextAttr(); + // operations void Init(); @@ -153,8 +154,8 @@ public: class wxTextCtrl : public wxControl { public: - %addtofunc wxTextCtrl "self._setOORInfo(self)" - %addtofunc wxTextCtrl() "" + %pythonAppend wxTextCtrl "self._setOORInfo(self)" + %pythonAppend wxTextCtrl() "" wxTextCtrl(wxWindow* parent, wxWindowID id, const wxString& value = wxPyEmptyString, diff --git a/wxPython/src/_tglbtn.i b/wxPython/src/_tglbtn.i index a0a755e0de..cc36561c4e 100644 --- a/wxPython/src/_tglbtn.i +++ b/wxPython/src/_tglbtn.i @@ -53,8 +53,8 @@ public: class wxToggleButton : public wxControl { public: - %addtofunc wxToggleButton "self._setOORInfo(self)" - %addtofunc wxToggleButton() "" + %pythonAppend wxToggleButton "self._setOORInfo(self)" + %pythonAppend wxToggleButton() "" wxToggleButton(wxWindow *parent, wxWindowID id, diff --git a/wxPython/src/_timer.i b/wxPython/src/_timer.i index b0d2dae880..a82aa5a626 100644 --- a/wxPython/src/_timer.i +++ b/wxPython/src/_timer.i @@ -40,7 +40,7 @@ IMP_PYCALLBACK__(wxPyTimer, wxTimer, Notify); %name(Timer) class wxPyTimer : public wxEvtHandler { public: - %addtofunc wxPyTimer "self._setCallbackInfo(self, Timer)" + %pythonAppend wxPyTimer "self._setCallbackInfo(self, Timer)" // if you don't call SetOwner() or provide an owner in the contstructor // then you must override Notify() inorder to receive the timer diff --git a/wxPython/src/_tipwin.i b/wxPython/src/_tipwin.i index cb9b941879..1cb3e5cc5e 100644 --- a/wxPython/src/_tipwin.i +++ b/wxPython/src/_tipwin.i @@ -31,7 +31,7 @@ class wxTipWindow : #endif { public: - %addtofunc wxTipWindow "self._setOORInfo(self)" + %pythonAppend wxTipWindow "self._setOORInfo(self)" %extend { wxTipWindow(wxWindow *parent, diff --git a/wxPython/src/_toolbar.i b/wxPython/src/_toolbar.i index f377951263..4286bb886f 100644 --- a/wxPython/src/_toolbar.i +++ b/wxPython/src/_toolbar.i @@ -386,8 +386,8 @@ public: class wxToolBar : public wxToolBarBase { public: - %addtofunc wxToolBar "self._setOORInfo(self)" - %addtofunc wxToolBar() "" + %pythonAppend wxToolBar "self._setOORInfo(self)" + %pythonAppend wxToolBar() "" wxToolBar(wxWindow *parent, wxWindowID id, diff --git a/wxPython/src/_toplvl.i b/wxPython/src/_toplvl.i index 1e23183f42..fc1f7a25a5 100644 --- a/wxPython/src/_toplvl.i +++ b/wxPython/src/_toplvl.i @@ -109,8 +109,8 @@ public: class wxFrame : public wxTopLevelWindow { public: - %addtofunc wxFrame "self._setOORInfo(self)" - %addtofunc wxFrame() "" + %pythonAppend wxFrame "self._setOORInfo(self)" + %pythonAppend wxFrame() "" wxFrame(wxWindow* parent, const wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, @@ -216,8 +216,8 @@ public: class wxDialog : public wxTopLevelWindow { public: - %addtofunc wxDialog "self._setOORInfo(self)" - %addtofunc wxDialog() "" + %pythonAppend wxDialog "self._setOORInfo(self)" + %pythonAppend wxDialog() "" wxDialog(wxWindow* parent, const wxWindowID id, @@ -280,8 +280,8 @@ public: class wxMiniFrame : public wxFrame { public: - %addtofunc wxMiniFrame "self._setOORInfo(self)" - %addtofunc wxMiniFrame() "" + %pythonAppend wxMiniFrame "self._setOORInfo(self)" + %pythonAppend wxMiniFrame() "" wxMiniFrame(wxWindow* parent, const wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, @@ -315,7 +315,7 @@ enum { class wxSplashScreenWindow: public wxWindow { public: - %addtofunc wxSplashScreenWindow "self._setOORInfo(self)" + %pythonAppend wxSplashScreenWindow "self._setOORInfo(self)" wxSplashScreenWindow(const wxBitmap& bitmap, wxWindow* parent, wxWindowID id, @@ -330,7 +330,7 @@ public: class wxSplashScreen : public wxFrame { public: - %addtofunc wxSplashScreen "self._setOORInfo(self)" + %pythonAppend wxSplashScreen "self._setOORInfo(self)" wxSplashScreen(const wxBitmap& bitmap, long splashStyle, int milliseconds, wxWindow* parent, wxWindowID id, diff --git a/wxPython/src/_treectrl.i b/wxPython/src/_treectrl.i index 5bbec4256f..bf455ec4ae 100644 --- a/wxPython/src/_treectrl.i +++ b/wxPython/src/_treectrl.i @@ -318,8 +318,8 @@ IMPLEMENT_ABSTRACT_CLASS(wxPyTreeCtrl, wxTreeCtrl); %name(TreeCtrl)class wxPyTreeCtrl : public wxControl { public: - %addtofunc wxPyTreeCtrl "self._setOORInfo(self);self._setCallbackInfo(self, TreeCtrl)" - %addtofunc wxPyTreeCtrl() "" + %pythonAppend wxPyTreeCtrl "self._setOORInfo(self);self._setCallbackInfo(self, TreeCtrl)" + %pythonAppend wxPyTreeCtrl() "" wxPyTreeCtrl(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, diff --git a/wxPython/src/_validator.i b/wxPython/src/_validator.i index 10da1778a5..2951244f36 100644 --- a/wxPython/src/_validator.i +++ b/wxPython/src/_validator.i @@ -32,7 +32,7 @@ class wxValidator : public wxEvtHandler { public: - %addtofunc wxValidator "self._setOORInfo(self)" + %pythonAppend wxValidator "self._setOORInfo(self)" wxValidator(); //~wxValidator(); @@ -73,7 +73,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxPyValidator, wxValidator); class wxPyValidator : public wxValidator { public: - %addtofunc wxPyValidator " + %pythonAppend wxPyValidator " self._setCallbackInfo(self, PyValidator, 1) self._setOORInfo(self)" wxPyValidator(); diff --git a/wxPython/src/_vscroll.i b/wxPython/src/_vscroll.i index 19a1a26d11..90b84d9012 100644 --- a/wxPython/src/_vscroll.i +++ b/wxPython/src/_vscroll.i @@ -128,8 +128,8 @@ IMP_PYCALLBACK_COORD_const (wxPyVScrolledWindow, wxVScrolledWindow, Est %name(VScrolledWindow) class wxPyVScrolledWindow : public wxPanel { public: - %addtofunc wxPyVScrolledWindow "self._setOORInfo(self); self._setCallbackInfo(self, VScrolledWindow)" - %addtofunc wxPyVScrolledWindow() "" + %pythonAppend wxPyVScrolledWindow "self._setOORInfo(self); self._setCallbackInfo(self, VScrolledWindow)" + %pythonAppend wxPyVScrolledWindow() "" wxPyVScrolledWindow(wxWindow *parent, @@ -285,8 +285,8 @@ IMP_PYCALLBACK__DCRECTSIZET_const (wxPyVListBox, wxVListBox, OnDrawBackground %name(VListBox) class wxPyVListBox : public wxPyVScrolledWindow { public: - %addtofunc wxPyVListBox "self._setOORInfo(self);self._setCallbackInfo(self, VListBox)" - %addtofunc wxPyVListBox() "" + %pythonAppend wxPyVListBox "self._setOORInfo(self);self._setCallbackInfo(self, VListBox)" + %pythonAppend wxPyVListBox() "" wxPyVListBox(wxWindow *parent, @@ -481,8 +481,8 @@ IMP_PYCALLBACK_STRING_SIZET (wxPyHtmlListBox, wxHtmlListBox, OnGetItemMarkup %name(HtmlListBox) class wxPyHtmlListBox : public wxPyVListBox { public: - %addtofunc wxPyHtmlListBox "self._setOORInfo(self);self._setCallbackInfo(self, HtmlListBox)" - %addtofunc wxPyHtmlListBox() "" + %pythonAppend wxPyHtmlListBox "self._setOORInfo(self);self._setCallbackInfo(self, HtmlListBox)" + %pythonAppend wxPyHtmlListBox() "" // normal constructor which calls Create() internally diff --git a/wxPython/src/_window.i b/wxPython/src/_window.i index 3ffc44537d..d6d9ad156e 100644 --- a/wxPython/src/_window.i +++ b/wxPython/src/_window.i @@ -26,8 +26,8 @@ MAKE_CONST_WXSTRING(PanelNameStr); class wxWindow : public wxEvtHandler { public: - %addtofunc wxWindow "self._setOORInfo(self)" - %addtofunc wxWindow() "" + %pythonAppend wxWindow "self._setOORInfo(self)" + %pythonAppend wxWindow() "" wxWindow(wxWindow* parent, const wxWindowID id, const wxPoint& pos = wxDefaultPosition, diff --git a/wxPython/src/calendar.i b/wxPython/src/calendar.i index df3df17bc9..c867596721 100644 --- a/wxPython/src/calendar.i +++ b/wxPython/src/calendar.i @@ -143,8 +143,8 @@ MAKE_CONST_WXSTRING(CalendarNameStr); class wxCalendarCtrl : public wxControl { public: - %addtofunc wxCalendarCtrl "self._setOORInfo(self)" - %addtofunc wxCalendarCtrl() "" + %pythonAppend wxCalendarCtrl "self._setOORInfo(self)" + %pythonAppend wxCalendarCtrl() "" wxCalendarCtrl(wxWindow *parent, wxWindowID id, diff --git a/wxPython/src/grid.i b/wxPython/src/grid.i index cebed93efa..c4adcb1b93 100644 --- a/wxPython/src/grid.i +++ b/wxPython/src/grid.i @@ -649,7 +649,7 @@ IMP_PYCALLBACK__STRING( wxPyGridCellRenderer, wxGridCellRenderer, SetParameters) // Let SWIG know about it so it can create the Python version class wxPyGridCellRenderer : public wxGridCellRenderer { public: - %addtofunc wxPyGridCellRenderer "self._setCallbackInfo(self, PyGridCellRenderer);self._setOORInfo(self)" + %pythonAppend wxPyGridCellRenderer "self._setCallbackInfo(self, PyGridCellRenderer);self._setOORInfo(self)" wxPyGridCellRenderer(); void _setCallbackInfo(PyObject* self, PyObject* _class); @@ -663,7 +663,7 @@ public: class wxGridCellStringRenderer : public wxGridCellRenderer { public: - %addtofunc wxGridCellStringRenderer "self._setOORInfo(self)" + %pythonAppend wxGridCellStringRenderer "self._setOORInfo(self)" wxGridCellStringRenderer(); }; @@ -671,7 +671,7 @@ public: class wxGridCellNumberRenderer : public wxGridCellStringRenderer { public: - %addtofunc wxGridCellNumberRenderer "self._setOORInfo(self)" + %pythonAppend wxGridCellNumberRenderer "self._setOORInfo(self)" wxGridCellNumberRenderer(); }; @@ -679,7 +679,7 @@ public: class wxGridCellFloatRenderer : public wxGridCellStringRenderer { public: - %addtofunc wxGridCellFloatRenderer "self._setOORInfo(self)" + %pythonAppend wxGridCellFloatRenderer "self._setOORInfo(self)" wxGridCellFloatRenderer(int width = -1, int precision = -1); int GetWidth() const; @@ -692,7 +692,7 @@ public: class wxGridCellBoolRenderer : public wxGridCellRenderer { public: - %addtofunc wxGridCellBoolRenderer "self._setOORInfo(self)" + %pythonAppend wxGridCellBoolRenderer "self._setOORInfo(self)" wxGridCellBoolRenderer(); }; @@ -700,7 +700,7 @@ public: class wxGridCellDateTimeRenderer : public wxGridCellStringRenderer { public: - %addtofunc wxGridCellDateTimeRenderer "self._setOORInfo(self)" + %pythonAppend wxGridCellDateTimeRenderer "self._setOORInfo(self)" wxGridCellDateTimeRenderer(wxString outformat = wxPyDateTimeFormatStr, wxString informat = wxPyDateTimeFormatStr); }; @@ -709,7 +709,7 @@ public: class wxGridCellEnumRenderer : public wxGridCellStringRenderer { public: - %addtofunc wxGridCellEnumRenderer "self._setOORInfo(self)" + %pythonAppend wxGridCellEnumRenderer "self._setOORInfo(self)" wxGridCellEnumRenderer( const wxString& choices = wxPyEmptyString ); }; @@ -717,7 +717,7 @@ public: class wxGridCellAutoWrapStringRenderer : public wxGridCellStringRenderer { public: - %addtofunc wxGridCellAutoWrapStringRenderer "self._setOORInfo(self)" + %pythonAppend wxGridCellAutoWrapStringRenderer "self._setOORInfo(self)" wxGridCellAutoWrapStringRenderer(); }; @@ -897,7 +897,7 @@ IMP_PYCALLBACK_STRING__constpure(wxPyGridCellEditor, wxGridCellEditor, GetValue) // Let SWIG know about it so it can create the Python version class wxPyGridCellEditor : public wxGridCellEditor { public: - %addtofunc wxPyGridCellEditor "self._setCallbackInfo(self, PyGridCellEditor);self._setOORInfo(self)" + %pythonAppend wxPyGridCellEditor "self._setCallbackInfo(self, PyGridCellEditor);self._setOORInfo(self)" wxPyGridCellEditor(); void _setCallbackInfo(PyObject* self, PyObject* _class); @@ -919,7 +919,7 @@ public: class wxGridCellTextEditor : public wxGridCellEditor { public: - %addtofunc wxGridCellTextEditor "self._setOORInfo(self)" + %pythonAppend wxGridCellTextEditor "self._setOORInfo(self)" wxGridCellTextEditor(); virtual wxString GetValue(); }; @@ -928,7 +928,7 @@ public: class wxGridCellNumberEditor : public wxGridCellTextEditor { public: - %addtofunc wxGridCellNumberEditor "self._setOORInfo(self)" + %pythonAppend wxGridCellNumberEditor "self._setOORInfo(self)" wxGridCellNumberEditor(int min = -1, int max = -1); virtual wxString GetValue(); }; @@ -937,7 +937,7 @@ public: class wxGridCellFloatEditor : public wxGridCellTextEditor { public: - %addtofunc wxGridCellFloatEditor "self._setOORInfo(self)" + %pythonAppend wxGridCellFloatEditor "self._setOORInfo(self)" wxGridCellFloatEditor(); virtual wxString GetValue(); }; @@ -946,7 +946,7 @@ public: class wxGridCellBoolEditor : public wxGridCellEditor { public: - %addtofunc wxGridCellBoolEditor "self._setOORInfo(self)" + %pythonAppend wxGridCellBoolEditor "self._setOORInfo(self)" wxGridCellBoolEditor(); virtual wxString GetValue(); }; @@ -954,7 +954,7 @@ public: class wxGridCellChoiceEditor : public wxGridCellEditor { public: - %addtofunc wxGridCellChoiceEditor "self._setOORInfo(self)" + %pythonAppend wxGridCellChoiceEditor "self._setOORInfo(self)" wxGridCellChoiceEditor(int choices = 0, const wxString* choices_array = NULL, bool allowOthers = False); @@ -965,7 +965,7 @@ public: class wxGridCellEnumEditor : public wxGridCellChoiceEditor { public: - %addtofunc wxGridCellEnumEditor "self._setOORInfo(self)" + %pythonAppend wxGridCellEnumEditor "self._setOORInfo(self)" wxGridCellEnumEditor( const wxString& choices = wxPyEmptyString ); virtual wxString GetValue(); }; @@ -974,7 +974,7 @@ public: class wxGridCellAutoWrapStringEditor : public wxGridCellTextEditor { public: - %addtofunc wxGridCellAutoWrapStringEditor "self._setOORInfo(self)" + %pythonAppend wxGridCellAutoWrapStringEditor "self._setOORInfo(self)" wxGridCellAutoWrapStringEditor(); virtual wxString GetValue(); }; @@ -1003,7 +1003,7 @@ public: } } - %addtofunc wxGridCellAttr "self._setOORInfo(self)" + %pythonAppend wxGridCellAttr "self._setOORInfo(self)" wxGridCellAttr(wxGridCellAttr *attrDefault = NULL); @@ -1057,7 +1057,7 @@ public: class wxGridCellAttrProvider { public: - %addtofunc wxGridCellAttrProvider "self._setOORInfo(self)" + %pythonAppend wxGridCellAttrProvider "self._setOORInfo(self)" wxGridCellAttrProvider(); // ???? virtual ~wxGridCellAttrProvider(); @@ -1100,7 +1100,7 @@ public: class wxPyGridCellAttrProvider : public wxGridCellAttrProvider { public: - %addtofunc wxPyGridCellAttrProvider "self._setCallbackInfo(self, PyGridCellAttrProvider)" + %pythonAppend wxPyGridCellAttrProvider "self._setCallbackInfo(self, PyGridCellAttrProvider)" wxPyGridCellAttrProvider(); void _setCallbackInfo(PyObject* self, PyObject* _class); @@ -1314,7 +1314,7 @@ public: class wxPyGridTableBase : public wxGridTableBase { public: - %addtofunc wxPyGridTableBase "self._setCallbackInfo(self, PyGridTableBase);self._setOORInfo(self)" + %pythonAppend wxPyGridTableBase "self._setCallbackInfo(self, PyGridTableBase);self._setOORInfo(self)" wxPyGridTableBase(); void _setCallbackInfo(PyObject* self, PyObject* _class); @@ -1349,7 +1349,7 @@ public: class wxGridStringTable : public wxGridTableBase { public: - %addtofunc wxGridStringTable "self._setOORInfo(self)" + %pythonAppend wxGridStringTable "self._setOORInfo(self)" wxGridStringTable( int numRows=0, int numCols=0 ); }; @@ -1533,7 +1533,7 @@ typedef wxGrid::wxGridSelectionModes WXGRIDSELECTIONMODES; class wxGrid : public wxScrolledWindow { public: - %addtofunc wxGrid "self._setOORInfo(self)" + %pythonAppend wxGrid "self._setOORInfo(self)" wxGrid( wxWindow *parent, wxWindowID id, diff --git a/wxPython/src/html.i b/wxPython/src/html.i index 5c2e764a1f..8682499057 100644 --- a/wxPython/src/html.i +++ b/wxPython/src/html.i @@ -249,7 +249,7 @@ IMP_PYCALLBACK_BOOL_TAG_pure(wxPyHtmlTagHandler, wxHtmlTagHandler, HandleTag); %name(HtmlTagHandler) class wxPyHtmlTagHandler : public wxObject { public: - %addtofunc wxPyHtmlTagHandler "self._setCallbackInfo(self, HtmlTagHandler)" + %pythonAppend wxPyHtmlTagHandler "self._setCallbackInfo(self, HtmlTagHandler)" wxPyHtmlTagHandler(); void _setCallbackInfo(PyObject* self, PyObject* _class); @@ -287,7 +287,7 @@ IMP_PYCALLBACK_BOOL_TAG_pure(wxPyHtmlWinTagHandler, wxHtmlWinTagHandler, HandleT %name(HtmlWinTagHandler) class wxPyHtmlWinTagHandler : public wxPyHtmlTagHandler { public: - %addtofunc wxPyHtmlWinTagHandler "self._setCallbackInfo(self, HtmlWinTagHandler)" + %pythonAppend wxPyHtmlWinTagHandler "self._setCallbackInfo(self, HtmlWinTagHandler)" wxPyHtmlWinTagHandler(); void _setCallbackInfo(PyObject* self, PyObject* _class); @@ -667,7 +667,7 @@ IMPLEMENT_ABSTRACT_CLASS(wxPyHtmlFilter, wxHtmlFilter); %name(HtmlFilter) class wxPyHtmlFilter : public wxObject { public: - %addtofunc wxPyHtmlFilter "self._setCallbackInfo(self, HtmlFilter)" + %pythonAppend wxPyHtmlFilter "self._setCallbackInfo(self, HtmlFilter)" wxPyHtmlFilter(); void _setCallbackInfo(PyObject* self, PyObject* _class); @@ -778,8 +778,8 @@ wxHtmlOpeningStatus wxPyHtmlWindow::OnOpeningURL(wxHtmlURLType type, %name(HtmlWindow) class wxPyHtmlWindow : public wxScrolledWindow { public: - %addtofunc wxPyHtmlWindow "self._setCallbackInfo(self, HtmlWindow); self._setOORInfo(self)" - %addtofunc wxPyHtmlWindow() "" + %pythonAppend wxPyHtmlWindow "self._setCallbackInfo(self, HtmlWindow); self._setOORInfo(self)" + %pythonAppend wxPyHtmlWindow() "" wxPyHtmlWindow(wxWindow *parent, int id = -1, const wxPoint& pos = wxDefaultPosition, @@ -1087,7 +1087,7 @@ public: class wxHtmlHelpFrame : public wxFrame { public: - %addtofunc wxHtmlHelpFrame "self._setOORInfo(self)" + %pythonAppend wxHtmlHelpFrame "self._setOORInfo(self)" wxHtmlHelpFrame(wxWindow* parent, int wxWindowID, const wxString& title = wxPyEmptyString, @@ -1124,7 +1124,7 @@ enum { class wxHtmlHelpController : public wxEvtHandler { public: - %addtofunc wxHtmlHelpController "self._setOORInfo(self)" + %pythonAppend wxHtmlHelpController "self._setOORInfo(self)" wxHtmlHelpController(int style = wxHF_DEFAULTSTYLE); ~wxHtmlHelpController(); diff --git a/wxPython/src/wizard.i b/wxPython/src/wizard.i index 0eac0cdb21..542abb0b85 100644 --- a/wxPython/src/wizard.i +++ b/wxPython/src/wizard.i @@ -196,8 +196,8 @@ IMP_PYCALLBACK_VOID_WXWINBASE(wxPyWizardPage, wxWizardPage, RemoveChild); class wxPyWizardPage : public wxWizardPage { public: - %addtofunc wxPyWizardPage "self._setCallbackInfo(self, PyWizardPage);self._setOORInfo(self)" - %addtofunc wxPyWizardPage() "" + %pythonAppend wxPyWizardPage "self._setCallbackInfo(self, PyWizardPage);self._setOORInfo(self)" + %pythonAppend wxPyWizardPage() "" // ctor accepts an optional bitmap which will be used for this page instead // of the default one for this wizard (should be of the same size). Notice @@ -274,8 +274,8 @@ class wxWizardPageSimple : public wxWizardPage { public: - %addtofunc wxWizardPageSimple "self._setOORInfo(self)" - %addtofunc wxWizardPageSimple() "" + %pythonAppend wxWizardPageSimple "self._setOORInfo(self)" + %pythonAppend wxWizardPageSimple() "" // ctor takes the previous and next pages wxWizardPageSimple(wxWizard *parent, @@ -305,8 +305,8 @@ public: class wxWizard : public wxDialog { public: - %addtofunc wxWizard "self._setOORInfo(self)" - %addtofunc wxWizard() "" + %pythonAppend wxWizard "self._setOORInfo(self)" + %pythonAppend wxWizard() "" // ctor wxWizard(wxWindow *parent, -- 2.45.2