From f5e3d9463b3e3d24fcf6e9be53d4b7befab7b0a0 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 29 Nov 2005 00:54:02 +0000 Subject: [PATCH] guard grid XRC handler by #if wxUSE_GRID git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36278 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/xrc/xh_grid.h | 14 ++++++++------ src/xrc/xh_grid.cpp | 6 +++--- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/include/wx/xrc/xh_grid.h b/include/wx/xrc/xh_grid.h index 762ae2de1c..f42f3b828a 100644 --- a/include/wx/xrc/xh_grid.h +++ b/include/wx/xrc/xh_grid.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: xh_grid.h +// Name: wx/xh_grid.h // Purpose: XML resource handler for the grid control // Author: Agron Selimaj // Created: 2005/08/11 @@ -17,18 +17,20 @@ #include "wx/xrc/xmlres.h" -#if wxUSE_XRC +#if wxUSE_XRC && wxUSE_GRID class WXDLLIMPEXP_XRC wxGridXmlHandler : public wxXmlResourceHandler { -DECLARE_DYNAMIC_CLASS(wxGridXmlHandler) public: - wxGridXmlHandler(); + wxGridXmlHandler(); + virtual wxObject *DoCreateResource(); virtual bool CanHandle(wxXmlNode *node); -}; -#endif // wxUSE_XRC +private: + DECLARE_DYNAMIC_CLASS(wxGridXmlHandler) +}; +#endif // wxUSE_XRC && wxUSE_GRID #endif // _WX_XH_GRD_H_ diff --git a/src/xrc/xh_grid.cpp b/src/xrc/xh_grid.cpp index a5cea99ad7..e3031ee27f 100644 --- a/src/xrc/xh_grid.cpp +++ b/src/xrc/xh_grid.cpp @@ -15,7 +15,7 @@ #pragma hdrstop #endif -#if wxUSE_XRC +#if wxUSE_XRC && wxUSE_GRID #include "wx/xrc/xh_grid.h" #include "wx/grid.h" @@ -23,7 +23,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxGridXmlHandler, wxXmlResourceHandler) wxGridXmlHandler::wxGridXmlHandler() -: wxXmlResourceHandler() + : wxXmlResourceHandler() { AddWindowStyles(); } @@ -48,4 +48,4 @@ bool wxGridXmlHandler::CanHandle(wxXmlNode *node) return IsOfClass(node, wxT("wxGrid")); } -#endif // wxUSE_XRC +#endif // wxUSE_XRC && wxUSE_GRID -- 2.45.2