]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/wizard.i
Added bakefile for the OGL contrib
[wxWidgets.git] / wxPython / src / wizard.i
index 217923d391bd521662ce910bbd45233c14a509b5..e63443348fa36c1a5837a4efc6e97d0ed51bd36d 100644 (file)
 %import controls.i
 
 
+//----------------------------------------------------------------------
+%{
+    // Put some wx default wxChar* values into wxStrings.
+    static const wxString wxPyEmptyString(wxT(""));
+%}
 //----------------------------------------------------------------------
 
 enum {
@@ -38,7 +43,8 @@ enum {
     wxEVT_WIZARD_PAGE_CHANGED,
     wxEVT_WIZARD_PAGE_CHANGING,
     wxEVT_WIZARD_CANCEL,
-    wxEVT_WIZARD_HELP
+    wxEVT_WIZARD_HELP,
+    wxEVT_WIZARD_FINISHED
 };
 
 
@@ -56,6 +62,9 @@ def EVT_WIZARD_CANCEL(win, id, func):
 def EVT_WIZARD_HELP(win, id, func):
     win.Connect(id, -1, wxEVT_WIZARD_HELP, func)
 
+def EVT_WIZARD_FINISHED(win, id, func):
+    win.Connect(id, -1, wxEVT_WIZARD_FINISHED, func)
+
 "
 
 //----------------------------------------------------------------------
@@ -97,9 +106,17 @@ public:
 //                  const char* resource = NULL);
 //     %name(wxPreWizardPage)wxWizardPage();
 
-    bool Create(wxWizard *parent,
-                const wxBitmap& bitmap = wxNullBitmap,
-                const char* resource = NULL);
+    %addmethods {
+        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);
+        }
+    }
+
 
     // these functions are used by the wizard to show another page when the
     // user chooses "Back" or "Next" button
@@ -197,14 +214,29 @@ 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
-    wxPyWizardPage(wxWizard *parent,
-                 const wxBitmap& bitmap = wxNullBitmap,
-                 const char* resource = NULL);
+    %addmethods {
+        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);
+        }
+    }
+
     %name(wxPrePyWizardPage)wxPyWizardPage();
 
-    bool Create(wxWizard *parent,
-                const wxBitmap& bitmap = wxNullBitmap,
-                const char* resource = NULL);
+    %addmethods {
+        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);
+        }
+    }
 
     void _setCallbackInfo(PyObject* self, PyObject* _class);
     %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyWizardPage)"
@@ -333,6 +365,9 @@ public:
     // page first and return FALSE without changing the page if
     // TransferDataFromWindow() returns FALSE - otherwise, returns TRUE
     bool ShowPage(wxWizardPage *page, bool goingForward = TRUE);
+
+    bool HasNextPage(wxWizardPage* page);
+    bool HasPrevPage(wxWizardPage* page);
 };