]> git.saurik.com Git - wxWidgets.git/commitdiff
wxWizardPage now handled by OOR
authorRobin Dunn <robin@alldunn.com>
Wed, 21 Aug 2002 21:46:53 +0000 (21:46 +0000)
committerRobin Dunn <robin@alldunn.com>
Wed, 21 Aug 2002 21:46:53 +0000 (21:46 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16666 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/demo/wxWizard.py
wxPython/src/msw/wizard.cpp
wxPython/src/msw/wizard.py
wxPython/src/my_typemaps.i

index 97f47a75c1177574ec600791efe3b19abc9dcb08..053567fadc4dce4e8279c3530c5cff60135efd28 100644 (file)
@@ -19,6 +19,9 @@ class TitledPage(wxWizardPageSimple):
 
 
 
+#----------------------------------------------------------------------
+
+
 #----------------------------------------------------------------------
 
 class TestPanel(wxPanel):
@@ -28,9 +31,12 @@ class TestPanel(wxPanel):
         self.log = log
         wxPanel.__init__(self, parent, -1)
 
-        b = wxButton(self, -1, "Run Simple Wizard", pos=(50,50))
+        b = wxButton(self, -1, "Run Simple Wizard", pos=(50, 50))
         EVT_BUTTON(self, b.GetId(), self.OnRunSimpleWizard)
 
+        b = wxButton(self, -1, "Run Dynamic Wizard", pos=(50, 100))
+        EVT_BUTTON(self, b.GetId(), self.OnRunDynamicWizard)
+
         EVT_WIZARD_PAGE_CHANGED(self, self.ID_wiz, self.OnWizPageChanged)
         EVT_WIZARD_PAGE_CHANGING(self, self.ID_wiz, self.OnWizPageChanging)
         EVT_WIZARD_CANCEL(self, self.ID_wiz, self.OnWizCancel)
@@ -41,14 +47,18 @@ class TestPanel(wxPanel):
             dir = "forward"
         else:
             dir = "backward"
-        self.log.write("OnWizPageChanged: %s, %s\n" % (dir, evt.GetPage()))
+        page = evt.GetPage()
+        self.log.write("OnWizPageChanged: %s, %s\n" % (dir, page.__class__))
+
 
     def OnWizPageChanging(self, evt):
         if evt.GetDirection():
             dir = "forward"
         else:
             dir = "backward"
-        self.log.write("OnWizPageChanging: %s, %s\n" % (dir, evt.GetPage()))
+        page = evt.GetPage()
+        self.log.write("OnWizPageChanging: %s, %s\n" % (dir, page.__class__))
+
 
     def OnWizCancel(self, evt):
         pass
@@ -67,7 +77,7 @@ class TestPanel(wxPanel):
 This wizard is totally useless, but is meant to show how to
 chain simple wizard pages together in a non-dynamic manner.
 IOW, the order of the pages never changes, and so the
-wxWizardPageSimple class can be used for the pages."""))
+wxWizardPageSimple class can easily be used for the pages."""))
         wizard.FitToPage(page1)
 
         # Use the convenience Chain function to connect the pages
@@ -81,6 +91,10 @@ wxWizardPageSimple class can be used for the pages."""))
             wxMessageBox("Wizard was cancelled", "That's all folks!")
 
 
+
+    def OnRunDynamicWizard(self, evt):
+        pass
+
 #----------------------------------------------------------------------
 
 def runTest(frame, nb, log):
index 3fd67fb3d66fc680787908ca45cbf4bff95a50be..9f43004ac844f3a8ba8819359749a4b2c5e7c108 100644 (file)
@@ -266,7 +266,6 @@ static PyObject *_wrap_wxWizardEvent_GetPage(PyObject *self, PyObject *args, PyO
     wxWizardEvent * _arg0;
     PyObject * _argo0 = 0;
     char *_kwnames[] = { "self", NULL };
-    char _ptemp[128];
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxWizardEvent_GetPage",_kwnames,&_argo0)) 
@@ -284,13 +283,7 @@ static PyObject *_wrap_wxWizardEvent_GetPage(PyObject *self, PyObject *args, PyO
 
     wxPyEndAllowThreads(__tstate);
     if (PyErr_Occurred()) return NULL;
-}    if (_result) {
-        SWIG_MakePtr(_ptemp, (char *) _result,"_wxWizardPage_p");
-        _resultobj = Py_BuildValue("s",_ptemp);
-    } else {
-        Py_INCREF(Py_None);
-        _resultobj = Py_None;
-    }
+}{ _resultobj = wxPyMake_wxObject(_result); }
     return _resultobj;
 }
 
@@ -408,7 +401,6 @@ static PyObject *_wrap_wxWizardPage_GetPrev(PyObject *self, PyObject *args, PyOb
     wxWizardPage * _arg0;
     PyObject * _argo0 = 0;
     char *_kwnames[] = { "self", NULL };
-    char _ptemp[128];
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxWizardPage_GetPrev",_kwnames,&_argo0)) 
@@ -426,13 +418,7 @@ static PyObject *_wrap_wxWizardPage_GetPrev(PyObject *self, PyObject *args, PyOb
 
     wxPyEndAllowThreads(__tstate);
     if (PyErr_Occurred()) return NULL;
-}    if (_result) {
-        SWIG_MakePtr(_ptemp, (char *) _result,"_wxWizardPage_p");
-        _resultobj = Py_BuildValue("s",_ptemp);
-    } else {
-        Py_INCREF(Py_None);
-        _resultobj = Py_None;
-    }
+}{ _resultobj = wxPyMake_wxObject(_result); }
     return _resultobj;
 }
 
@@ -443,7 +429,6 @@ static PyObject *_wrap_wxWizardPage_GetNext(PyObject *self, PyObject *args, PyOb
     wxWizardPage * _arg0;
     PyObject * _argo0 = 0;
     char *_kwnames[] = { "self", NULL };
-    char _ptemp[128];
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxWizardPage_GetNext",_kwnames,&_argo0)) 
@@ -461,13 +446,7 @@ static PyObject *_wrap_wxWizardPage_GetNext(PyObject *self, PyObject *args, PyOb
 
     wxPyEndAllowThreads(__tstate);
     if (PyErr_Occurred()) return NULL;
-}    if (_result) {
-        SWIG_MakePtr(_ptemp, (char *) _result,"_wxWizardPage_p");
-        _resultobj = Py_BuildValue("s",_ptemp);
-    } else {
-        Py_INCREF(Py_None);
-        _resultobj = Py_None;
-    }
+}{ _resultobj = wxPyMake_wxObject(_result); }
     return _resultobj;
 }
 
@@ -1902,7 +1881,6 @@ static PyObject *_wrap_wxWizard_GetCurrentPage(PyObject *self, PyObject *args, P
     wxWizard * _arg0;
     PyObject * _argo0 = 0;
     char *_kwnames[] = { "self", NULL };
-    char _ptemp[128];
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxWizard_GetCurrentPage",_kwnames,&_argo0)) 
@@ -1920,13 +1898,7 @@ static PyObject *_wrap_wxWizard_GetCurrentPage(PyObject *self, PyObject *args, P
 
     wxPyEndAllowThreads(__tstate);
     if (PyErr_Occurred()) return NULL;
-}    if (_result) {
-        SWIG_MakePtr(_ptemp, (char *) _result,"_wxWizardPage_p");
-        _resultobj = Py_BuildValue("s",_ptemp);
-    } else {
-        Py_INCREF(Py_None);
-        _resultobj = Py_None;
-    }
+}{ _resultobj = wxPyMake_wxObject(_result); }
     return _resultobj;
 }
 
index 959bc00345342899a6406be496fe5ff0528e59ae..3891696b44d2204226024e3c3139c4f1419c0dc1 100644 (file)
@@ -42,7 +42,6 @@ class wxWizardEventPtr(wxNotifyEventPtr):
         return val
     def GetPage(self, *_args, **_kwargs):
         val = apply(wizardc.wxWizardEvent_GetPage,(self,) + _args, _kwargs)
-        if val: val = wxWizardPagePtr(val) 
         return val
     def __repr__(self):
         return "<C wxWizardEvent instance at %s>" % (self.this,)
@@ -66,11 +65,9 @@ class wxWizardPagePtr(wxPanelPtr):
         return val
     def GetPrev(self, *_args, **_kwargs):
         val = apply(wizardc.wxWizardPage_GetPrev,(self,) + _args, _kwargs)
-        if val: val = wxWizardPagePtr(val) 
         return val
     def GetNext(self, *_args, **_kwargs):
         val = apply(wizardc.wxWizardPage_GetNext,(self,) + _args, _kwargs)
-        if val: val = wxWizardPagePtr(val) 
         return val
     def GetBitmap(self, *_args, **_kwargs):
         val = apply(wizardc.wxWizardPage_GetBitmap,(self,) + _args, _kwargs)
@@ -218,7 +215,6 @@ class wxWizardPtr(wxDialogPtr):
         return val
     def GetCurrentPage(self, *_args, **_kwargs):
         val = apply(wizardc.wxWizard_GetCurrentPage,(self,) + _args, _kwargs)
-        if val: val = wxWizardPagePtr(val) 
         return val
     def SetPageSize(self, *_args, **_kwargs):
         val = apply(wizardc.wxWizard_SetPageSize,(self,) + _args, _kwargs)
index 91fb0ada9600bb03569f0012d065e3b5cdc63fbe..7f5ccb9443923a83ff83bc3b00642e57d69431fc 100644 (file)
@@ -401,6 +401,7 @@ $function
 %typemap(python, out) wxTreeCtrl*               { $target = wxPyMake_wxObject($source); }
 %typemap(python, out) wxWindow*                 { $target = wxPyMake_wxObject($source); }
 %typemap(python, out) wxHtmlWindow*             { $target = wxPyMake_wxObject($source); }
+%typemap(python, out) wxWizardPage*             { $target = wxPyMake_wxObject($source); }
 
 %typemap(python, out) wxSizer*                  { $target = wxPyMake_wxSizer($source); }