X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a7a014180017908d32f0af32ebfa140fdc82b390..fe45b493dcc42fea4ad4f781a4fb7844d2e95fd0:/wxPython/src/wizard.i diff --git a/wxPython/src/wizard.i b/wxPython/src/wizard.i index 009477ea1f..5ff034f4db 100644 --- a/wxPython/src/wizard.i +++ b/wxPython/src/wizard.i @@ -32,8 +32,6 @@ or pages." %pythoncode { wx = _core } %pythoncode { __docfilter__ = wx.__DocFilter(globals()) } -%include _wizard_rename.i - MAKE_CONST_WXSTRING_NOSWIG(EmptyString); //---------------------------------------------------------------------- @@ -72,9 +70,12 @@ public: // False otherwise and for EVT_WIZARD_PAGE_CHANGED return True if we came // from the previous page and False if we returned from the next one // (this function doesn't make sense for CANCEL events) - bool GetDirection() const { return m_direction; } + bool GetDirection() const; + + wxWizardPage* GetPage() const; - wxWizardPage* GetPage() const { return m_page; } + %property(Direction, GetDirection, doc="See `GetDirection`"); + %property(Page, GetPage, doc="See `GetPage`"); }; @@ -94,20 +95,11 @@ public: // // that no other parameters are needed because the wizard will resize and // // reposition the page anyhow // wxWizardPage(wxWizard *parent, -// const wxBitmap& bitmap = wxNullBitmap, -// const char* resource = NULL); +// const wxBitmap& bitmap = wxNullBitmap); // %RenameCtor(PreWizardPage, wxWizardPage()); - %extend { - bool Create(wxWizard *parent, - const wxBitmap& bitmap = wxNullBitmap, - const wxString& resource = wxPyEmptyString) { - wxChar* res = NULL; - if (resource.Length()) - res = (wxChar*)resource.c_str(); - return self->Create(parent, bitmap, res); - } - } + bool Create(wxWizard *parent, + const wxBitmap& bitmap = wxNullBitmap); // these functions are used by the wizard to show another page when the @@ -120,6 +112,10 @@ public: // dynamically or to do something even more fancy. It's ok to return // wxNullBitmap from here - the default one will be used then. virtual wxBitmap GetBitmap() const; + + %property(Bitmap, GetBitmap, doc="See `GetBitmap`"); + %property(Next, GetNext, doc="See `GetNext`"); + %property(Prev, GetPrev, doc="See `GetPrev`"); }; @@ -130,9 +126,8 @@ class wxPyWizardPage : public wxWizardPage { public: wxPyWizardPage() : wxWizardPage() {} wxPyWizardPage(wxWizard *parent, - const wxBitmap& bitmap = wxNullBitmap, - const wxChar* resource = NULL) - : wxWizardPage(parent, bitmap, resource) {} + const wxBitmap& bitmap = wxNullBitmap) + : wxWizardPage(parent, bitmap) {} DEC_PYCALLBACK_WIZPG__pure(GetPrev); DEC_PYCALLBACK_WIZPG__pure(GetNext); @@ -205,7 +200,7 @@ MustHaveApp(wxPyWizardPage); class wxPyWizardPage : public wxWizardPage { public: - %pythonAppend wxPyWizardPage "self._setCallbackInfo(self, PyWizardPage);self._setOORInfo(self)" + %pythonAppend wxPyWizardPage "self._setOORInfo(self);" setCallbackInfo(PyWizardPage) %pythonAppend wxPyWizardPage() "" %typemap(out) wxPyWizardPage*; // turn off this typemap @@ -213,32 +208,16 @@ public: // of the default one for this wizard (should be of the same size). Notice // that no other parameters are needed because the wizard will resize and // reposition the page anyhow - %extend { - wxPyWizardPage(wxWizard *parent, - const wxBitmap* bitmap = &wxNullBitmap, - const wxString* resource = &wxPyEmptyString) { - wxChar* res = NULL; - if (resource->Length()) - res = (wxChar*)resource->c_str(); - return new wxPyWizardPage(parent, *bitmap, res); - } - } + wxPyWizardPage(wxWizard *parent, + const wxBitmap& bitmap = wxNullBitmap); %RenameCtor(PrePyWizardPage, wxPyWizardPage()); // Turn it back on again %typemap(out) wxPyWizardPage* { $result = wxPyMake_wxObject($1, $owner); } - %extend { - bool Create(wxWizard *parent, - const wxBitmap& bitmap = wxNullBitmap, - const wxString& resource = wxPyEmptyString) { - wxChar* res = NULL; - if (resource.Length()) - res = (wxChar*)resource.c_str(); - return self->Create(parent, bitmap, res); - } - } + bool Create(wxWizard *parent, + const wxBitmap& bitmap = wxNullBitmap); void _setCallbackInfo(PyObject* self, PyObject* _class); @@ -323,15 +302,13 @@ public: wxWizardPageSimple(wxWizard *parent, wxWizardPage *prev = NULL, wxWizardPage *next = NULL, - const wxBitmap& bitmap = wxNullBitmap, - const wxChar* resource = NULL); + const wxBitmap& bitmap = wxNullBitmap); %RenameCtor(PreWizardPageSimple, wxWizardPageSimple()); bool Create(wxWizard *parent = NULL, wxWizardPage *prev = NULL, wxWizardPage *next = NULL, - const wxBitmap& bitmap = wxNullBitmap, - const wxChar* resource = NULL); + const wxBitmap& bitmap = wxNullBitmap); // the pointers may be also set later - but before starting the wizard void SetPrev(wxWizardPage *prev); @@ -403,7 +380,7 @@ public: virtual void SetBorder(int border); // is the wizard running? - bool IsRunning() const { return m_page != NULL; } + bool IsRunning() const; // show the prev/next page, but call TransferDataFromWindow on the current // page first and return False without changing the page if @@ -412,6 +389,10 @@ public: bool HasNextPage(wxWizardPage* page); bool HasPrevPage(wxWizardPage* page); + + %property(CurrentPage, GetCurrentPage, doc="See `GetCurrentPage`"); + %property(PageAreaSizer, GetPageAreaSizer, doc="See `GetPageAreaSizer`"); + %property(PageSize, GetPageSize, SetPageSize, doc="See `GetPageSize` and `SetPageSize`"); };