X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e5db28fd7cda3943b41e86a731c65358284bb0ce..4f433feff9251ded00bba26b633f93e660cd44c4:/src/xrc/xh_wizrd.cpp?ds=sidebyside diff --git a/src/xrc/xh_wizrd.cpp b/src/xrc/xh_wizrd.cpp index 958845ba64..8a758a1ad5 100644 --- a/src/xrc/xh_wizrd.cpp +++ b/src/xrc/xh_wizrd.cpp @@ -7,8 +7,8 @@ // Copyright: (c) 2000 Vaclav Slavik // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ + +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "xh_wizrd.h" #endif @@ -19,22 +19,24 @@ #pragma hdrstop #endif -#if wxUSE_WIZARDDLG +#if wxUSE_XRC && wxUSE_WIZARDDLG #include "wx/xrc/xh_wizrd.h" #include "wx/log.h" #include "wx/wizard.h" +IMPLEMENT_DYNAMIC_CLASS(wxWizardXmlHandler, wxXmlResourceHandler) wxWizardXmlHandler::wxWizardXmlHandler() : wxXmlResourceHandler() { m_wizard = NULL; m_lastSimplePage = NULL; XRC_ADD_STYLE(wxWIZARD_EX_HELPBUTTON); + AddWindowStyles(); } wxObject *wxWizardXmlHandler::DoCreateResource() -{ +{ if (m_class == wxT("wxWizard")) { XRC_MAKE_INSTANCE(wiz, wxWizard) @@ -58,6 +60,8 @@ wxObject *wxWizardXmlHandler::DoCreateResource() else { wxWizardPage *page = NULL; + wxUnusedVar(page); + if (m_class == wxT("wxWizardPageSimple")) { XRC_MAKE_INSTANCE(p, wxWizardPageSimple) @@ -89,11 +93,11 @@ wxObject *wxWizardXmlHandler::DoCreateResource() bool wxWizardXmlHandler::CanHandle(wxXmlNode *node) { - return IsOfClass(node, wxT("wxWizard")) || + return IsOfClass(node, wxT("wxWizard")) || (m_wizard != NULL && (IsOfClass(node, wxT("wxWizardPage")) || IsOfClass(node, wxT("wxWizardPageSimple"))) ); } -#endif // wxUSE_WIZARDDLG +#endif // wxUSE_XRC && wxUSE_WIZARDDLG