X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b2dc104421c340091342156d6b01f61f1ccff438..42f8298f6f42d5d63bb3caf65682b7d9d9f8b702:/wxPython/src/wizard.i diff --git a/wxPython/src/wizard.i b/wxPython/src/wizard.i index 0eac0cdb21..e2add09da9 100644 --- a/wxPython/src/wizard.i +++ b/wxPython/src/wizard.i @@ -10,7 +10,12 @@ // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// -%module wizard +%define DOCSTRING +"`Wizard` is a dialog class that guides the user through a sequence of steps, +or pages." +%enddef + +%module(package="wx", docstring=DOCSTRING) wizard %{ #include "wx/wxPython/wxPython.h" @@ -24,7 +29,8 @@ //---------------------------------------------------------------------- %import windows.i -%pythoncode { wx = core } +%pythoncode { wx = _core } +%pythoncode { __docfilter__ = wx.__DocFilter(globals()) } %include _wizard_rename.i @@ -59,7 +65,7 @@ class wxWizardEvent : public wxNotifyEvent public: wxWizardEvent(wxEventType type = wxEVT_NULL, int id = -1, - bool direction = True, + bool direction = true, wxWizardPage* page = NULL); // for EVT_WIZARD_PAGE_CHANGING, return True if we're going forward or @@ -79,6 +85,7 @@ public: // // Other than GetNext/Prev() functions, wxWizardPage is just a panel and may be // used as such (i.e. controls may be placed directly on it &c). +MustHaveApp(wxWizardPage); class wxWizardPage : public wxPanel { public: @@ -89,7 +96,7 @@ public: // wxWizardPage(wxWizard *parent, // const wxBitmap& bitmap = wxNullBitmap, // const char* resource = NULL); -// %name(PreWizardPage)wxWizardPage(); +// %RenameCtor(PreWizardPage, wxWizardPage()); %extend { bool Create(wxWizard *parent, @@ -193,11 +200,14 @@ IMP_PYCALLBACK_VOID_WXWINBASE(wxPyWizardPage, wxWizardPage, RemoveChild); +MustHaveApp(wxPyWizardPage); + 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() "" + %typemap(out) wxPyWizardPage*; // turn off this typemap // 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 @@ -214,7 +224,10 @@ public: } } - %name(PrePyWizardPage)wxPyWizardPage(); + %RenameCtor(PrePyWizardPage, wxPyWizardPage()); + + // Turn it back on again + %typemap(out) wxPyWizardPage* { $result = wxPyMake_wxObject($1, $owner); } %extend { bool Create(wxWizard *parent, @@ -270,12 +283,13 @@ public: // OTOH, it is also possible to dynamicly decide which page to return (i.e. // depending on the user's choices) as the wizard sample shows - in order to do // this, you must derive from wxWizardPage directly. +MustHaveApp(wxWizardPageSimple); 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, @@ -283,7 +297,7 @@ public: wxWizardPage *next = NULL, const wxBitmap& bitmap = wxNullBitmap, const wxChar* resource = NULL); - %name(PreWizardPageSimple)wxWizardPageSimple(); + %RenameCtor(PreWizardPageSimple, wxWizardPageSimple()); bool Create(wxWizard *parent = NULL, wxWizardPage *prev = NULL, @@ -302,11 +316,13 @@ public: //---------------------------------------------------------------------- +MustHaveApp(wxWizard); + class wxWizard : public wxDialog { public: - %addtofunc wxWizard "self._setOORInfo(self)" - %addtofunc wxWizard() "" + %pythonAppend wxWizard "self._setOORInfo(self)" + %pythonAppend wxWizard() "" // ctor wxWizard(wxWindow *parent, @@ -315,7 +331,7 @@ public: const wxBitmap& bitmap = wxNullBitmap, const wxPoint& pos = wxDefaultPosition, long style = wxDEFAULT_DIALOG_STYLE); - %name(PreWizard)wxWizard(); + %RenameCtor(PreWizard, wxWizard()); bool Create(wxWindow *parent, int id = -1, @@ -364,7 +380,7 @@ public: // show the prev/next page, but call TransferDataFromWindow on the current // page first and return False without changing the page if // TransferDataFromWindow() returns False - otherwise, returns True - bool ShowPage(wxWizardPage *page, bool goingForward = True); + bool ShowPage(wxWizardPage *page, bool goingForward = true); bool HasNextPage(wxWizardPage* page); bool HasPrevPage(wxWizardPage* page);