From d34ad9ea8910361e3d8443ddda0ee5554dc6480d Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 30 Oct 2006 22:23:22 +0000 Subject: [PATCH] a better compilation fix git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42780 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/collpane.h | 9 ++++----- include/wx/xrc/xh_collpane.h | 6 +++--- src/xrc/xh_collpane.cpp | 6 +++++- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/include/wx/collpane.h b/include/wx/collpane.h index a52383bd6c..ca8f6881bb 100644 --- a/include/wx/collpane.h +++ b/include/wx/collpane.h @@ -95,11 +95,10 @@ typedef void (wxEvtHandler::*wxCollapsiblePaneEventFunction)(wxCollapsiblePaneEv #else #include "wx/generic/collpaneg.h" - // use a typedef and not a #define to avoid problems with XRC forward declarations - typedef wxGenericCollapsiblePane wxCollapsiblePane; + // use #define and not a typedef to allow forward declaring the class + #define wxCollapsiblePane wxGenericCollapsiblePane #endif -#endif // wxUSE_COLLPANE +#endif // wxUSE_COLLPANE -#endif - // _WX_COLLAPSABLE_PANE_H_BASE_ +#endif // _WX_COLLAPSABLE_PANE_H_BASE_ diff --git a/include/wx/xrc/xh_collpane.h b/include/wx/xrc/xh_collpane.h index b08b36821f..2837ea3dfd 100644 --- a/include/wx/xrc/xh_collpane.h +++ b/include/wx/xrc/xh_collpane.h @@ -15,12 +15,10 @@ #if wxUSE_XRC && wxUSE_COLLPANE -#include "wx/collpane.h" +class WXDLLIMPEXP_ADV wxCollapsiblePane; class WXDLLIMPEXP_XRC wxCollapsiblePaneXmlHandler : public wxXmlResourceHandler { - DECLARE_DYNAMIC_CLASS(wxCollapsiblePaneXmlHandler) - public: wxCollapsiblePaneXmlHandler(); virtual wxObject *DoCreateResource(); @@ -29,6 +27,8 @@ public: private: bool m_isInside; wxCollapsiblePane *m_collpane; + + DECLARE_DYNAMIC_CLASS(wxCollapsiblePaneXmlHandler) }; #endif // wxUSE_XRC && wxUSE_COLLPANE diff --git a/src/xrc/xh_collpane.cpp b/src/xrc/xh_collpane.cpp index c8b489b3bc..7134ccd2ab 100644 --- a/src/xrc/xh_collpane.cpp +++ b/src/xrc/xh_collpane.cpp @@ -17,8 +17,12 @@ #if wxUSE_XRC && wxUSE_COLLPANE +#ifndef WX_PRECOMP + #include "wx/log.h" +#endif + +#include "wx/collpane.h" #include "wx/xrc/xh_collpane.h" -#include "wx/log.h" IMPLEMENT_DYNAMIC_CLASS(wxCollapsiblePaneXmlHandler, wxXmlResourceHandler)