X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2b5f62a0b2db198609b45dec622a018dae37008e..f0834140313212fc54d09e28d21a95476d6545f2:/src/generic/wizard.cpp diff --git a/src/generic/wizard.cpp b/src/generic/wizard.cpp index c438b292c5..01304347cf 100644 --- a/src/generic/wizard.cpp +++ b/src/generic/wizard.cpp @@ -44,12 +44,6 @@ #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; }