X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..625cb8c0b1ac12f26265cae2c69d7f510de0edb1:/src/generic/wizard.cpp diff --git a/src/generic/wizard.cpp b/src/generic/wizard.cpp index cd776451c2..acc1f274e7 100644 --- a/src/generic/wizard.cpp +++ b/src/generic/wizard.cpp @@ -28,6 +28,8 @@ #pragma hdrstop #endif +#if wxUSE_WIZARDDLG + #ifndef WX_PRECOMP #include "wx/dynarray.h" #include "wx/intl.h" @@ -49,6 +51,10 @@ WX_DEFINE_ARRAY(wxPanel *, wxArrayPages); // event tables and such // ---------------------------------------------------------------------------- +DEFINE_EVENT_TYPE(wxEVT_WIZARD_PAGE_CHANGED) +DEFINE_EVENT_TYPE(wxEVT_WIZARD_PAGE_CHANGING) +DEFINE_EVENT_TYPE(wxEVT_WIZARD_CANCEL) + BEGIN_EVENT_TABLE(wxWizard, wxDialog) EVT_BUTTON(wxID_CANCEL, wxWizard::OnCancel) EVT_BUTTON(-1, wxWizard::OnBackOrNext) @@ -221,7 +227,7 @@ bool wxWizard::ShowPage(wxWizardPage *page, bool goingForward) bool btnLabelWasNext = TRUE; // and this tells us whether we already had the default bitmap before - bool bmpWasDefault = TRUE; + int bmpWasDefault; if ( m_page ) { @@ -239,6 +245,11 @@ bool wxWizard::ShowPage(wxWizardPage *page, bool goingForward) btnLabelWasNext = m_page->GetNext() != (wxWizardPage *)NULL; bmpWasDefault = !m_page->GetBitmap().Ok(); } + else // no previous page + { + // always set the bitmap + bmpWasDefault = -1; + } // set the new one m_page = page; @@ -262,7 +273,7 @@ bool wxWizard::ShowPage(wxWizardPage *page, bool goingForward) m_page->Show(); // change the bitmap if necessary (and if we have it at all) - bool bmpIsDefault = !m_page->GetBitmap().Ok(); + int bmpIsDefault = !m_page->GetBitmap().Ok(); if ( m_statbmp && (bmpIsDefault != bmpWasDefault) ) { wxBitmap bmp; @@ -389,3 +400,4 @@ wxWizardEvent::wxWizardEvent(wxEventType type, int id, bool direction) m_direction = direction; } +#endif // wxUSE_WIZARDDLG