Applied patch [ 642162 ] restore wxWizard wxEVT_WIZARD_FINISHED

Restore the wxWizard wxEVT_WIZARD_FINISHED
event, which was sent when the FINISHED button was
pressed and the wizard was finished. When the
wxWizard is modal this event is not needed. However,
when the wizard is non-modal this is the only way to
determine that the wizard has finished.

Scott Pleiter


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@18136 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2002-12-09 09:46:16 +00:00
parent e5c923ce11
commit ee950b94e2
4 changed files with 13 additions and 0 deletions

View File

@@ -57,6 +57,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 +69,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 +367,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;
}