]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/wizard.cpp
compilation fix for wxUSE_RESOURCE_LOADING_IN_MSW == 0
[wxWidgets.git] / src / generic / wizard.cpp
index c438b292c5132a0112831d5b85eefdb2d464db75..01304347cf8ac99a68af881288453dcdf9df5dc8 100644 (file)
 
 #include "wx/wizard.h"
 
-// ----------------------------------------------------------------------------
-// simple types
-// ----------------------------------------------------------------------------
-
-WX_DEFINE_ARRAY(wxPanel *, wxArrayPages);
-
 // ----------------------------------------------------------------------------
 // event tables and such
 // ----------------------------------------------------------------------------
@@ -57,6 +51,7 @@ WX_DEFINE_ARRAY(wxPanel *, wxArrayPages);
 DEFINE_EVENT_TYPE(wxEVT_WIZARD_PAGE_CHANGED)
 DEFINE_EVENT_TYPE(wxEVT_WIZARD_PAGE_CHANGING)
 DEFINE_EVENT_TYPE(wxEVT_WIZARD_CANCEL)
+DEFINE_EVENT_TYPE(wxEVT_WIZARD_FINISHED)
 DEFINE_EVENT_TYPE(wxEVT_WIZARD_HELP)
 
 BEGIN_EVENT_TABLE(wxWizard, wxDialog)
@@ -68,6 +63,7 @@ BEGIN_EVENT_TABLE(wxWizard, wxDialog)
     EVT_WIZARD_PAGE_CHANGED(-1, wxWizard::OnWizEvent)
     EVT_WIZARD_PAGE_CHANGING(-1, wxWizard::OnWizEvent)
     EVT_WIZARD_CANCEL(-1, wxWizard::OnWizEvent)
+    EVT_WIZARD_FINISHED(-1, wxWizard::OnWizEvent)
     EVT_WIZARD_HELP(-1, wxWizard::OnWizEvent)
 END_EVENT_TABLE()
 
@@ -365,6 +361,11 @@ bool wxWizard::ShowPage(wxWizardPage *page, bool goingForward)
     {
         // terminate successfully
         EndModal(wxID_OK);
+        if ( !IsModal() )
+         {
+           wxWizardEvent event(wxEVT_WIZARD_FINISHED, GetId(),FALSE, 0);
+           (void)GetEventHandler()->ProcessEvent(event);
+         }
         return TRUE;
     }