]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xrc/xh_wizrd.cpp
Include order is wxprec.h=>defs.h=>platform.h=>setup.h so remove explicit setup.h...
[wxWidgets.git] / src / xrc / xh_wizrd.cpp
index 958845ba649550aa4e0dea7ada47d0b0ce213e1f..9016e921d87976d80cc2529467022e9dd87f1edd 100644 (file)
@@ -7,10 +7,6 @@
 // Copyright:   (c) 2000 Vaclav Slavik
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 // Copyright:   (c) 2000 Vaclav Slavik
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
-#pragma implementation "xh_wizrd.h"
-#endif
 
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
     #pragma hdrstop
 #endif
 
     #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"
 
 
 #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);
 
 wxWizardXmlHandler::wxWizardXmlHandler() : wxXmlResourceHandler()
 {
     m_wizard = NULL;
     m_lastSimplePage = NULL;
     XRC_ADD_STYLE(wxWIZARD_EX_HELPBUTTON);
+    AddWindowStyles();
 }
 
 wxObject *wxWizardXmlHandler::DoCreateResource()
 }
 
 wxObject *wxWizardXmlHandler::DoCreateResource()
-{ 
+{
     if (m_class == wxT("wxWizard"))
     {
         XRC_MAKE_INSTANCE(wiz, wxWizard)
     if (m_class == wxT("wxWizard"))
     {
         XRC_MAKE_INSTANCE(wiz, wxWizard)
@@ -58,6 +56,8 @@ wxObject *wxWizardXmlHandler::DoCreateResource()
     else
     {
         wxWizardPage *page = NULL;
     else
     {
         wxWizardPage *page = NULL;
+        wxUnusedVar(page);
+
         if (m_class == wxT("wxWizardPageSimple"))
         {
             XRC_MAKE_INSTANCE(p, wxWizardPageSimple)
         if (m_class == wxT("wxWizardPageSimple"))
         {
             XRC_MAKE_INSTANCE(p, wxWizardPageSimple)
@@ -89,11 +89,11 @@ wxObject *wxWizardXmlHandler::DoCreateResource()
 
 bool wxWizardXmlHandler::CanHandle(wxXmlNode *node)
 {
 
 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")))
            );
 }
 
            (m_wizard != NULL &&
                 (IsOfClass(node, wxT("wxWizardPage")) ||
                  IsOfClass(node, wxT("wxWizardPageSimple")))
            );
 }
 
-#endif // wxUSE_WIZARDDLG
+#endif // wxUSE_XRC && wxUSE_WIZARDDLG