From: Vadim Zeitlin Date: Tue, 3 Oct 2006 14:53:40 +0000 (+0000) Subject: fixes for compilation with wxUSE_XXX==0 and some other minor fixes (patch 1569904) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/dd47af27e12ee66b3e9eed6f1711e516f36dc837 fixes for compilation with wxUSE_XXX==0 and some other minor fixes (patch 1569904) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41590 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/xrc/xh_bmp.h b/include/wx/xrc/xh_bmp.h index 70b22eee29..da40ac9426 100644 --- a/include/wx/xrc/xh_bmp.h +++ b/include/wx/xrc/xh_bmp.h @@ -13,10 +13,12 @@ #include "wx/xrc/xmlres.h" +#if wxUSE_XRC class WXDLLIMPEXP_XRC wxBitmapXmlHandler : public wxXmlResourceHandler { -DECLARE_DYNAMIC_CLASS(wxBitmapXmlHandler) + DECLARE_DYNAMIC_CLASS(wxBitmapXmlHandler) + public: wxBitmapXmlHandler(); virtual wxObject *DoCreateResource(); @@ -25,12 +27,14 @@ public: class WXDLLIMPEXP_XRC wxIconXmlHandler : public wxXmlResourceHandler { -DECLARE_DYNAMIC_CLASS(wxIconXmlHandler) + DECLARE_DYNAMIC_CLASS(wxIconXmlHandler) + public: wxIconXmlHandler(); virtual wxObject *DoCreateResource(); virtual bool CanHandle(wxXmlNode *node); }; +#endif // wxUSE_XRC #endif // _WX_XH_BMP_H_ diff --git a/include/wx/xrc/xh_bmpbt.h b/include/wx/xrc/xh_bmpbt.h index c44c9ea571..ec72f2670a 100644 --- a/include/wx/xrc/xh_bmpbt.h +++ b/include/wx/xrc/xh_bmpbt.h @@ -11,22 +11,20 @@ #ifndef _WX_XH_BMPBT_H_ #define _WX_XH_BMPBT_H_ -#include "wx/defs.h" - -#if wxUSE_XRC - #include "wx/xrc/xmlres.h" +#if wxUSE_XRC && wxUSE_BMPBUTTON + class WXDLLIMPEXP_XRC wxBitmapButtonXmlHandler : public wxXmlResourceHandler { -DECLARE_DYNAMIC_CLASS(wxBitmapButtonXmlHandler) + DECLARE_DYNAMIC_CLASS(wxBitmapButtonXmlHandler) + public: wxBitmapButtonXmlHandler(); virtual wxObject *DoCreateResource(); virtual bool CanHandle(wxXmlNode *node); }; -#endif // wxUSE_XRC - +#endif // wxUSE_XRC && wxUSE_BMPBUTTON #endif // _WX_XH_BMPBT_H_ diff --git a/include/wx/xrc/xh_bmpcbox.h b/include/wx/xrc/xh_bmpcbox.h index 4772ac5937..5b5e0624ef 100644 --- a/include/wx/xrc/xh_bmpcbox.h +++ b/include/wx/xrc/xh_bmpcbox.h @@ -13,22 +13,24 @@ #include "wx/xrc/xmlres.h" -#if wxUSE_BITMAPCOMBOBOX +#if wxUSE_XRC && wxUSE_BITMAPCOMBOBOX class WXDLLIMPEXP_ADV wxBitmapComboBox; class WXDLLIMPEXP_XRC wxBitmapComboBoxXmlHandler : public wxXmlResourceHandler { DECLARE_DYNAMIC_CLASS(wxBitmapComboBoxXmlHandler) + public: wxBitmapComboBoxXmlHandler(); virtual wxObject *DoCreateResource(); virtual bool CanHandle(wxXmlNode *node); + private: wxBitmapComboBox* m_combobox; bool m_isInside; }; -#endif +#endif // wxUSE_XRC && wxUSE_BITMAPCOMBOBOX #endif // _WX_XH_BMPCBOX_H_ diff --git a/include/wx/xrc/xh_bttn.h b/include/wx/xrc/xh_bttn.h index 93eb21258a..88018268b6 100644 --- a/include/wx/xrc/xh_bttn.h +++ b/include/wx/xrc/xh_bttn.h @@ -13,14 +13,18 @@ #include "wx/xrc/xmlres.h" +#if wxUSE_XRC && wxUSE_BUTTON + class WXDLLIMPEXP_XRC wxButtonXmlHandler : public wxXmlResourceHandler { -DECLARE_DYNAMIC_CLASS(wxButtonXmlHandler) + DECLARE_DYNAMIC_CLASS(wxButtonXmlHandler) + public: wxButtonXmlHandler(); virtual wxObject *DoCreateResource(); virtual bool CanHandle(wxXmlNode *node); }; +#endif // wxUSE_XRC && wxUSE_BUTTON #endif // _WX_XH_BTTN_H_ diff --git a/include/wx/xrc/xh_cald.h b/include/wx/xrc/xh_cald.h index d508d0bc42..c8a1fea175 100644 --- a/include/wx/xrc/xh_cald.h +++ b/include/wx/xrc/xh_cald.h @@ -11,15 +11,14 @@ #ifndef _WX_XH_CALD_H_ #define _WX_XH_CALD_H_ -#include "wx/defs.h" +#include "wx/xrc/xmlres.h" #if wxUSE_XRC && wxUSE_CALENDARCTRL -#include "wx/xrc/xmlres.h" - class WXDLLIMPEXP_XRC wxCalendarCtrlXmlHandler : public wxXmlResourceHandler { -DECLARE_DYNAMIC_CLASS(wxCalendarCtrlXmlHandler) + DECLARE_DYNAMIC_CLASS(wxCalendarCtrlXmlHandler) + public: wxCalendarCtrlXmlHandler(); virtual wxObject *DoCreateResource(); diff --git a/include/wx/xrc/xh_chckb.h b/include/wx/xrc/xh_chckb.h index 03b4e7f954..b58f5920b5 100644 --- a/include/wx/xrc/xh_chckb.h +++ b/include/wx/xrc/xh_chckb.h @@ -11,15 +11,14 @@ #ifndef _WX_XH_CHCKB_H_ #define _WX_XH_CHCKB_H_ -#include "wx/defs.h" +#include "wx/xrc/xmlres.h" #if wxUSE_XRC && wxUSE_CHECKBOX -#include "wx/xrc/xmlres.h" - class WXDLLIMPEXP_XRC wxCheckBoxXmlHandler : public wxXmlResourceHandler { -DECLARE_DYNAMIC_CLASS(wxCheckBoxXmlHandler) + DECLARE_DYNAMIC_CLASS(wxCheckBoxXmlHandler) + public: wxCheckBoxXmlHandler(); virtual wxObject *DoCreateResource(); diff --git a/include/wx/xrc/xh_chckl.h b/include/wx/xrc/xh_chckl.h index 20747587f3..a76f6a7587 100644 --- a/include/wx/xrc/xh_chckl.h +++ b/include/wx/xrc/xh_chckl.h @@ -11,19 +11,19 @@ #ifndef _WX_XH_CHCKL_H_ #define _WX_XH_CHCKL_H_ -#include "wx/defs.h" +#include "wx/xrc/xmlres.h" #if wxUSE_XRC && wxUSE_CHECKLISTBOX -#include "wx/xrc/xmlres.h" - class WXDLLIMPEXP_XRC wxCheckListBoxXmlHandler : public wxXmlResourceHandler { -DECLARE_DYNAMIC_CLASS(wxCheckListBoxXmlHandler) + DECLARE_DYNAMIC_CLASS(wxCheckListBoxXmlHandler) + public: wxCheckListBoxXmlHandler(); virtual wxObject *DoCreateResource(); virtual bool CanHandle(wxXmlNode *node); + private: bool m_insideBox; wxArrayString strList; diff --git a/include/wx/xrc/xh_choic.h b/include/wx/xrc/xh_choic.h index 1fb1fddc1a..da44862fd6 100644 --- a/include/wx/xrc/xh_choic.h +++ b/include/wx/xrc/xh_choic.h @@ -11,19 +11,19 @@ #ifndef _WX_XH_CHOIC_H_ #define _WX_XH_CHOIC_H_ -#include "wx/defs.h" +#include "wx/xrc/xmlres.h" #if wxUSE_XRC && wxUSE_CHOICE -#include "wx/xrc/xmlres.h" - class WXDLLIMPEXP_XRC wxChoiceXmlHandler : public wxXmlResourceHandler { -DECLARE_DYNAMIC_CLASS(wxChoiceXmlHandler) + DECLARE_DYNAMIC_CLASS(wxChoiceXmlHandler) + public: wxChoiceXmlHandler(); virtual wxObject *DoCreateResource(); virtual bool CanHandle(wxXmlNode *node); + private: bool m_insideBox; wxArrayString strList; diff --git a/include/wx/xrc/xh_choicbk.h b/include/wx/xrc/xh_choicbk.h index fd6bfb03c5..bc9be5b905 100644 --- a/include/wx/xrc/xh_choicbk.h +++ b/include/wx/xrc/xh_choicbk.h @@ -9,17 +9,16 @@ #ifndef _WX_XH_CHOICEBK_H_ #define _WX_XH_CHOICEBK_H_ -#include "wx/defs.h" +#include "wx/xrc/xmlres.h" #if wxUSE_XRC && wxUSE_CHOICEBOOK -#include "wx/xrc/xmlres.h" - class WXDLLEXPORT wxChoicebook; class WXDLLIMPEXP_XRC wxChoicebookXmlHandler : public wxXmlResourceHandler { -DECLARE_DYNAMIC_CLASS(wxChoicebookXmlHandler) + DECLARE_DYNAMIC_CLASS(wxChoicebookXmlHandler) + public: wxChoicebookXmlHandler(); virtual wxObject *DoCreateResource(); diff --git a/include/wx/xrc/xh_clrpicker.h b/include/wx/xrc/xh_clrpicker.h index fb364c41a8..dfaa356b40 100644 --- a/include/wx/xrc/xh_clrpicker.h +++ b/include/wx/xrc/xh_clrpicker.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: wx/xrc/xh_clrpicker.cpp +// Name: wx/xrc/xh_clrpicker.h // Purpose: XML resource handler for wxColourPickerCtrl // Author: Francesco Montorsi // Created: 2006-04-17 @@ -13,17 +13,18 @@ #include "wx/xrc/xmlres.h" -#if wxUSE_COLOURPICKERCTRL +#if wxUSE_XRC && wxUSE_COLOURPICKERCTRL class WXDLLIMPEXP_XRC wxColourPickerCtrlXmlHandler : public wxXmlResourceHandler { -DECLARE_DYNAMIC_CLASS(wxColourPickerCtrlXmlHandler) + DECLARE_DYNAMIC_CLASS(wxColourPickerCtrlXmlHandler) + public: wxColourPickerCtrlXmlHandler(); virtual wxObject *DoCreateResource(); virtual bool CanHandle(wxXmlNode *node); }; -#endif // wxUSE_COLOURPICKERCTRL +#endif // wxUSE_XRC && wxUSE_COLOURPICKERCTRL #endif // _WX_XH_CLRPICKERCTRL_H_ diff --git a/include/wx/xrc/xh_combo.h b/include/wx/xrc/xh_combo.h index bd47f22d34..7f190fffe8 100644 --- a/include/wx/xrc/xh_combo.h +++ b/include/wx/xrc/xh_combo.h @@ -13,20 +13,22 @@ #include "wx/xrc/xmlres.h" -#if wxUSE_COMBOBOX +#if wxUSE_XRC && wxUSE_COMBOBOX class WXDLLIMPEXP_XRC wxComboBoxXmlHandler : public wxXmlResourceHandler { -DECLARE_DYNAMIC_CLASS(wxComboBoxXmlHandler) + DECLARE_DYNAMIC_CLASS(wxComboBoxXmlHandler) + public: wxComboBoxXmlHandler(); virtual wxObject *DoCreateResource(); virtual bool CanHandle(wxXmlNode *node); + private: bool m_insideBox; wxArrayString strList; }; -#endif +#endif // wxUSE_XRC && wxUSE_COMBOBOX #endif // _WX_XH_COMBO_H_ diff --git a/include/wx/xrc/xh_datectrl.h b/include/wx/xrc/xh_datectrl.h index 336f3ec93e..57d554477b 100644 --- a/include/wx/xrc/xh_datectrl.h +++ b/include/wx/xrc/xh_datectrl.h @@ -13,17 +13,18 @@ #include "wx/xrc/xmlres.h" -#if wxUSE_DATEPICKCTRL +#if wxUSE_XRC && wxUSE_DATEPICKCTRL class WXDLLIMPEXP_XRC wxDateCtrlXmlHandler : public wxXmlResourceHandler { -DECLARE_DYNAMIC_CLASS(wxDateCtrlXmlHandler) + DECLARE_DYNAMIC_CLASS(wxDateCtrlXmlHandler) + public: wxDateCtrlXmlHandler(); virtual wxObject *DoCreateResource(); virtual bool CanHandle(wxXmlNode *node); }; -#endif // wxUSE_DATEPICKCTRL +#endif // wxUSE_XRC && wxUSE_DATEPICKCTRL #endif // _WX_XH_DATECTRL_H_ diff --git a/include/wx/xrc/xh_dirpicker.h b/include/wx/xrc/xh_dirpicker.h index dd8a49bcf3..fe97a269eb 100644 --- a/include/wx/xrc/xh_dirpicker.h +++ b/include/wx/xrc/xh_dirpicker.h @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: wx/xrc/xh_clrpicker.cpp -// Purpose: XML resource handler for wxColourPickerCtrl +// Name: wx/xrc/xh_dirpicker.h +// Purpose: XML resource handler for wxDirPickerCtrl // Author: Francesco Montorsi // Created: 2006-04-17 // RCS-ID: $Id$ @@ -13,17 +13,18 @@ #include "wx/xrc/xmlres.h" -#if wxUSE_DIRPICKERCTRL +#if wxUSE_XRC && wxUSE_DIRPICKERCTRL class WXDLLIMPEXP_XRC wxDirPickerCtrlXmlHandler : public wxXmlResourceHandler { -DECLARE_DYNAMIC_CLASS(wxDirPickerCtrlXmlHandler) + DECLARE_DYNAMIC_CLASS(wxDirPickerCtrlXmlHandler) + public: wxDirPickerCtrlXmlHandler(); virtual wxObject *DoCreateResource(); virtual bool CanHandle(wxXmlNode *node); }; -#endif // wxUSE_DIRPICKERCTRL +#endif // wxUSE_XRC && wxUSE_DIRPICKERCTRL #endif // _WX_XH_DIRPICKERCTRL_H_ diff --git a/include/wx/xrc/xh_dlg.h b/include/wx/xrc/xh_dlg.h index 014db51a8d..42d6d4aeab 100644 --- a/include/wx/xrc/xh_dlg.h +++ b/include/wx/xrc/xh_dlg.h @@ -13,14 +13,18 @@ #include "wx/xrc/xmlres.h" +#if wxUSE_XRC + class WXDLLIMPEXP_XRC wxDialogXmlHandler : public wxXmlResourceHandler { -DECLARE_DYNAMIC_CLASS(wxDialogXmlHandler) + DECLARE_DYNAMIC_CLASS(wxDialogXmlHandler) + public: wxDialogXmlHandler(); virtual wxObject *DoCreateResource(); virtual bool CanHandle(wxXmlNode *node); }; +#endif // wxUSE_XRC #endif // _WX_XH_DLG_H_ diff --git a/include/wx/xrc/xh_filepicker.h b/include/wx/xrc/xh_filepicker.h index 47673b0734..22c39270e0 100644 --- a/include/wx/xrc/xh_filepicker.h +++ b/include/wx/xrc/xh_filepicker.h @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: wx/xrc/xh_clrpicker.cpp -// Purpose: XML resource handler for wxColourPickerCtrl +// Name: wx/xrc/xh_filepicker.h +// Purpose: XML resource handler for wxFilePickerCtrl // Author: Francesco Montorsi // Created: 2006-04-17 // RCS-ID: $Id$ @@ -13,17 +13,18 @@ #include "wx/xrc/xmlres.h" -#if wxUSE_FILEPICKERCTRL +#if wxUSE_XRC && wxUSE_FILEPICKERCTRL class WXDLLIMPEXP_XRC wxFilePickerCtrlXmlHandler : public wxXmlResourceHandler { -DECLARE_DYNAMIC_CLASS(wxFilePickerCtrlXmlHandler) + DECLARE_DYNAMIC_CLASS(wxFilePickerCtrlXmlHandler) + public: wxFilePickerCtrlXmlHandler(); virtual wxObject *DoCreateResource(); virtual bool CanHandle(wxXmlNode *node); }; -#endif // wxUSE_FILEPICKERCTRL +#endif // wxUSE_XRC && wxUSE_FILEPICKERCTRL #endif // _WX_XH_FILEPICKERCTRL_H_ diff --git a/include/wx/xrc/xh_fontpicker.h b/include/wx/xrc/xh_fontpicker.h index 7ea0c9bb4b..d0dc8e915f 100644 --- a/include/wx/xrc/xh_fontpicker.h +++ b/include/wx/xrc/xh_fontpicker.h @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: wx/xrc/xh_clrpicker.cpp -// Purpose: XML resource handler for wxColourPickerCtrl +// Name: wx/xrc/xh_fontpicker.h +// Purpose: XML resource handler for wxFontPickerCtrl // Author: Francesco Montorsi // Created: 2006-04-17 // RCS-ID: $Id$ @@ -13,17 +13,18 @@ #include "wx/xrc/xmlres.h" -#if wxUSE_FONTPICKERCTRL +#if wxUSE_XRC && wxUSE_FONTPICKERCTRL class WXDLLIMPEXP_XRC wxFontPickerCtrlXmlHandler : public wxXmlResourceHandler { -DECLARE_DYNAMIC_CLASS(wxFontPickerCtrlXmlHandler) + DECLARE_DYNAMIC_CLASS(wxFontPickerCtrlXmlHandler) + public: wxFontPickerCtrlXmlHandler(); virtual wxObject *DoCreateResource(); virtual bool CanHandle(wxXmlNode *node); }; -#endif // wxUSE_FONTPICKERCTRL +#endif // wxUSE_XRC && wxUSE_FONTPICKERCTRL #endif // _WX_XH_FONTPICKERCTRL_H_ diff --git a/include/wx/xrc/xh_frame.h b/include/wx/xrc/xh_frame.h index bd04eb92f4..ab17fe4635 100644 --- a/include/wx/xrc/xh_frame.h +++ b/include/wx/xrc/xh_frame.h @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: wx/xrc/xh_frame.h -// Purpose: XML resource handler for dialogs +// Purpose: XML resource handler for wxFrame // Author: Vaclav Slavik & Aleks. // Created: 2000/03/05 // RCS-ID: $Id$ @@ -13,14 +13,18 @@ #include "wx/xrc/xmlres.h" +#if wxUSE_XRC + class WXDLLIMPEXP_XRC wxFrameXmlHandler : public wxXmlResourceHandler { -DECLARE_DYNAMIC_CLASS(wxFrameXmlHandler) + DECLARE_DYNAMIC_CLASS(wxFrameXmlHandler) + public: wxFrameXmlHandler(); virtual wxObject *DoCreateResource(); virtual bool CanHandle(wxXmlNode *node); }; +#endif // wxUSE_XRC #endif // _WX_XH_FRAME_H_ diff --git a/include/wx/xrc/xh_gauge.h b/include/wx/xrc/xh_gauge.h index d3df783ac1..9aa45d921a 100644 --- a/include/wx/xrc/xh_gauge.h +++ b/include/wx/xrc/xh_gauge.h @@ -11,12 +11,9 @@ #ifndef _WX_XH_GAUGE_H_ #define _WX_XH_GAUGE_H_ -#include "wx/defs.h" - -#if wxUSE_GAUGE - #include "wx/xrc/xmlres.h" +#if wxUSE_XRC && wxUSE_GAUGE class WXDLLIMPEXP_XRC wxGaugeXmlHandler : public wxXmlResourceHandler { @@ -32,6 +29,6 @@ public: virtual bool CanHandle(wxXmlNode *node); }; -#endif +#endif // wxUSE_XRC && wxUSE_GAUGE #endif // _WX_XH_GAUGE_H_ diff --git a/include/wx/xrc/xh_gdctl.h b/include/wx/xrc/xh_gdctl.h index 9fae7b3dca..a62e13858b 100644 --- a/include/wx/xrc/xh_gdctl.h +++ b/include/wx/xrc/xh_gdctl.h @@ -13,17 +13,18 @@ #include "wx/xrc/xmlres.h" -#if wxUSE_DIRDLG +#if wxUSE_XRC && wxUSE_DIRDLG class WXDLLIMPEXP_XRC wxGenericDirCtrlXmlHandler : public wxXmlResourceHandler { -DECLARE_DYNAMIC_CLASS(wxGenericDirCtrlXmlHandler) + DECLARE_DYNAMIC_CLASS(wxGenericDirCtrlXmlHandler) + public: wxGenericDirCtrlXmlHandler(); virtual wxObject *DoCreateResource(); virtual bool CanHandle(wxXmlNode *node); }; -#endif +#endif // wxUSE_XRC && wxUSE_DIRDLG #endif // _WX_XH_GDCTL_H_ diff --git a/include/wx/xrc/xh_grid.h b/include/wx/xrc/xh_grid.h index ca4d4e14c7..f4e07e14dd 100644 --- a/include/wx/xrc/xh_grid.h +++ b/include/wx/xrc/xh_grid.h @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: wx/xrc/xh_grid.h -// Purpose: XML resource handler for the grid control +// Purpose: XML resource handler for wxGrid // Author: Agron Selimaj // Created: 2005/08/11 // RCS-ID: $Id$ @@ -17,14 +17,13 @@ class WXDLLIMPEXP_XRC wxGridXmlHandler : public wxXmlResourceHandler { + DECLARE_DYNAMIC_CLASS(wxGridXmlHandler) + public: wxGridXmlHandler(); virtual wxObject *DoCreateResource(); virtual bool CanHandle(wxXmlNode *node); - -private: - DECLARE_DYNAMIC_CLASS(wxGridXmlHandler) }; #endif // wxUSE_XRC && wxUSE_GRID diff --git a/include/wx/xrc/xh_html.h b/include/wx/xrc/xh_html.h index 5879d3c76c..1f94fcf8c3 100644 --- a/include/wx/xrc/xh_html.h +++ b/include/wx/xrc/xh_html.h @@ -13,19 +13,18 @@ #include "wx/xrc/xmlres.h" -#include "wx/defs.h" - -#if wxUSE_HTML +#if wxUSE_XRC && wxUSE_HTML class WXDLLIMPEXP_XRC wxHtmlWindowXmlHandler : public wxXmlResourceHandler { -DECLARE_DYNAMIC_CLASS(wxHtmlWindowXmlHandler) + DECLARE_DYNAMIC_CLASS(wxHtmlWindowXmlHandler) + public: wxHtmlWindowXmlHandler(); virtual wxObject *DoCreateResource(); virtual bool CanHandle(wxXmlNode *node); }; -#endif +#endif // wxUSE_XRC && wxUSE_HTML -#endif // _WX_XH_SLIDER_H_ +#endif // _WX_XH_HTML_H_ diff --git a/include/wx/xrc/xh_hyperlink.h b/include/wx/xrc/xh_hyperlink.h index 407f5da223..d4e6a49957 100644 --- a/include/wx/xrc/xh_hyperlink.h +++ b/include/wx/xrc/xh_hyperlink.h @@ -12,15 +12,15 @@ #ifndef _WX_XH_HYPERLINKH__ #define _WX_XH_HYPERLINKH__ -#include "wx/defs.h" - -#if wxUSE_HYPERLINKCTRL - -#include "wx/hyperlink.h" #include "wx/xrc/xmlres.h" +#if wxUSE_XRC && wxUSE_HYPERLINKCTRL + class WXDLLIMPEXP_XRC wxHyperlinkCtrlXmlHandler : public wxXmlResourceHandler { + // Register with wxWindows' dynamic class subsystem. + DECLARE_DYNAMIC_CLASS(wxHyperlinkCtrlXmlHandler) + public: // Constructor. wxHyperlinkCtrlXmlHandler(); @@ -30,10 +30,8 @@ public: // Returns true if we know how to create a control for the given node. virtual bool CanHandle(wxXmlNode *node); - - // Register with wxWindows' dynamic class subsystem. - DECLARE_DYNAMIC_CLASS(wxHyperlinkCtrlXmlHandler) }; -#endif // wxUSE_HYPERLINKCTRL +#endif // wxUSE_XRC && wxUSE_HYPERLINKCTRL + #endif // _WX_XH_HYPERLINKH__ diff --git a/include/wx/xrc/xh_listb.h b/include/wx/xrc/xh_listb.h index 3b366967dd..43cfcb54ce 100644 --- a/include/wx/xrc/xh_listb.h +++ b/include/wx/xrc/xh_listb.h @@ -13,20 +13,22 @@ #include "wx/xrc/xmlres.h" -#if wxUSE_LISTBOX +#if wxUSE_XRC && wxUSE_LISTBOX class WXDLLIMPEXP_XRC wxListBoxXmlHandler : public wxXmlResourceHandler { -DECLARE_DYNAMIC_CLASS(wxListBoxXmlHandler) + DECLARE_DYNAMIC_CLASS(wxListBoxXmlHandler) + public: wxListBoxXmlHandler(); virtual wxObject *DoCreateResource(); virtual bool CanHandle(wxXmlNode *node); + private: bool m_insideBox; wxArrayString strList; }; -#endif +#endif // wxUSE_XRC && wxUSE_LISTBOX #endif // _WX_XH_LISTB_H_ diff --git a/include/wx/xrc/xh_listbk.h b/include/wx/xrc/xh_listbk.h index c9207ed458..7a4675c028 100644 --- a/include/wx/xrc/xh_listbk.h +++ b/include/wx/xrc/xh_listbk.h @@ -11,13 +11,14 @@ #include "wx/xrc/xmlres.h" -#if wxUSE_LISTBOOK +#if wxUSE_XRC && wxUSE_LISTBOOK class WXDLLEXPORT wxListbook; class WXDLLIMPEXP_XRC wxListbookXmlHandler : public wxXmlResourceHandler { -DECLARE_DYNAMIC_CLASS(wxListbookXmlHandler) + DECLARE_DYNAMIC_CLASS(wxListbookXmlHandler) + public: wxListbookXmlHandler(); virtual wxObject *DoCreateResource(); @@ -28,6 +29,6 @@ private: wxListbook *m_listbook; }; -#endif +#endif // wxUSE_XRC && wxUSE_LISTBOOK #endif // _WX_XH_LISTBK_H_ diff --git a/include/wx/xrc/xh_listc.h b/include/wx/xrc/xh_listc.h index a4028ec723..25847467f1 100644 --- a/include/wx/xrc/xh_listc.h +++ b/include/wx/xrc/xh_listc.h @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: wx/xrc/xh_listc.h -// Purpose: XML resource handler for wxCalendarCtrl +// Purpose: XML resource handler for wxListCtrl // Author: Brian Gavin // Created: 2000/09/09 // RCS-ID: $Id$ @@ -13,14 +13,18 @@ #include "wx/xrc/xmlres.h" +#if wxUSE_XRC && wxUSE_LISTCTRL + class WXDLLIMPEXP_XRC wxListCtrlXmlHandler : public wxXmlResourceHandler { -DECLARE_DYNAMIC_CLASS(wxListCtrlXmlHandler) + DECLARE_DYNAMIC_CLASS(wxListCtrlXmlHandler) + public: wxListCtrlXmlHandler(); virtual wxObject *DoCreateResource(); virtual bool CanHandle(wxXmlNode *node); }; +#endif // wxUSE_XRC && wxUSE_LISTCTRL #endif // _WX_XH_LISTC_H_ diff --git a/include/wx/xrc/xh_mdi.h b/include/wx/xrc/xh_mdi.h index 3ee7fbe973..06eeffc340 100644 --- a/include/wx/xrc/xh_mdi.h +++ b/include/wx/xrc/xh_mdi.h @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: wx/xrc/xh_mdi.h -// Purpose: XML resource handler for dialogs +// Purpose: XML resource handler for wxMDI // Author: David M. Falkinder & Vaclav Slavik // Created: 14/02/2005 // RCS-ID: $Id$ @@ -13,12 +13,14 @@ #include "wx/xrc/xmlres.h" -#if wxUSE_MDI +#if wxUSE_XRC && wxUSE_MDI class WXDLLIMPEXP_CORE wxWindow; class WXDLLIMPEXP_XRC wxMdiXmlHandler : public wxXmlResourceHandler { + DECLARE_DYNAMIC_CLASS(wxMdiXmlHandler) + public: wxMdiXmlHandler(); virtual wxObject *DoCreateResource(); @@ -26,10 +28,8 @@ public: private: wxWindow *CreateFrame(); - - DECLARE_DYNAMIC_CLASS(wxMdiXmlHandler) }; -#endif // wxUSE_MDI +#endif // wxUSE_XRC && wxUSE_MDI #endif // _WX_XH_MDI_H_ diff --git a/include/wx/xrc/xh_menu.h b/include/wx/xrc/xh_menu.h index 6766a2c29a..ee7c1ab7d8 100644 --- a/include/wx/xrc/xh_menu.h +++ b/include/wx/xrc/xh_menu.h @@ -13,9 +13,12 @@ #include "wx/xrc/xmlres.h" +#if wxUSE_XRC && wxUSE_MENUS + class WXDLLIMPEXP_XRC wxMenuXmlHandler : public wxXmlResourceHandler { -DECLARE_DYNAMIC_CLASS(wxMenuXmlHandler) + DECLARE_DYNAMIC_CLASS(wxMenuXmlHandler) + public: wxMenuXmlHandler(); virtual wxObject *DoCreateResource(); @@ -28,11 +31,13 @@ private: class WXDLLIMPEXP_XRC wxMenuBarXmlHandler : public wxXmlResourceHandler { DECLARE_DYNAMIC_CLASS(wxMenuBarXmlHandler) - public: - wxMenuBarXmlHandler(); - virtual wxObject *DoCreateResource(); - virtual bool CanHandle(wxXmlNode *node); + +public: + wxMenuBarXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); }; +#endif // wxUSE_XRC && wxUSE_MENUS #endif // _WX_XH_MENU_H_ diff --git a/include/wx/xrc/xh_notbk.h b/include/wx/xrc/xh_notbk.h index 2f547b07f4..1cbb9e5dd0 100644 --- a/include/wx/xrc/xh_notbk.h +++ b/include/wx/xrc/xh_notbk.h @@ -12,13 +12,14 @@ #include "wx/xrc/xmlres.h" -#if wxUSE_NOTEBOOK +#if wxUSE_XRC && wxUSE_NOTEBOOK class WXDLLEXPORT wxNotebook; class WXDLLIMPEXP_XRC wxNotebookXmlHandler : public wxXmlResourceHandler { -DECLARE_DYNAMIC_CLASS(wxNotebookXmlHandler) + DECLARE_DYNAMIC_CLASS(wxNotebookXmlHandler) + public: wxNotebookXmlHandler(); virtual wxObject *DoCreateResource(); @@ -29,6 +30,6 @@ private: wxNotebook *m_notebook; }; -#endif +#endif // wxUSE_XRC && wxUSE_NOTEBOOK #endif // _WX_XH_NOTBK_H_ diff --git a/include/wx/xrc/xh_odcombo.h b/include/wx/xrc/xh_odcombo.h index 7febc5590c..9d7b4fa377 100644 --- a/include/wx/xrc/xh_odcombo.h +++ b/include/wx/xrc/xh_odcombo.h @@ -13,20 +13,23 @@ #include "wx/xrc/xmlres.h" -#if wxUSE_ODCOMBOBOX +#if wxUSE_XRC && wxUSE_ODCOMBOBOX class WXDLLIMPEXP_XRC wxOwnerDrawnComboBoxXmlHandler : public wxXmlResourceHandler { -DECLARE_DYNAMIC_CLASS(wxOwnerDrawnComboBoxXmlHandler) + DECLARE_DYNAMIC_CLASS(wxOwnerDrawnComboBoxXmlHandler) + public: wxOwnerDrawnComboBoxXmlHandler(); virtual wxObject *DoCreateResource(); virtual bool CanHandle(wxXmlNode *node); + private: bool m_insideBox; wxArrayString strList; }; -#endif +#endif // wxUSE_XRC && wxUSE_ODCOMBOBOX #endif // _WX_XH_ODCOMBO_H_ + diff --git a/include/wx/xrc/xh_panel.h b/include/wx/xrc/xh_panel.h index da7f213206..9c1bfc0378 100644 --- a/include/wx/xrc/xh_panel.h +++ b/include/wx/xrc/xh_panel.h @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: wx/xrc/xh_panel.h -// Purpose: XML resource handler for panels +// Purpose: XML resource handler for wxPanel // Author: Vaclav Slavik // Created: 2000/03/05 // RCS-ID: $Id$ @@ -13,14 +13,18 @@ #include "wx/xrc/xmlres.h" +#if wxUSE_XRC + class WXDLLIMPEXP_XRC wxPanelXmlHandler : public wxXmlResourceHandler { -DECLARE_DYNAMIC_CLASS(wxPanelXmlHandler) + DECLARE_DYNAMIC_CLASS(wxPanelXmlHandler) + public: wxPanelXmlHandler(); virtual wxObject *DoCreateResource(); virtual bool CanHandle(wxXmlNode *node); }; +#endif // wxUSE_XRC #endif // _WX_XH_PANEL_H_ diff --git a/include/wx/xrc/xh_radbt.h b/include/wx/xrc/xh_radbt.h index 59a9c9239e..889a4bde14 100644 --- a/include/wx/xrc/xh_radbt.h +++ b/include/wx/xrc/xh_radbt.h @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: wx/xrc/xh_radbt.h -// Purpose: XML resource handler for radio buttons +// Purpose: XML resource handler for wxRadioButton // Author: Bob Mitchell // Created: 2000/03/21 // RCS-ID: $Id$ @@ -12,19 +12,19 @@ #define _WX_XH_RADBT_H_ #include "wx/xrc/xmlres.h" -#include "wx/defs.h" -#if wxUSE_RADIOBOX +#if wxUSE_XRC && wxUSE_RADIOBTN class WXDLLIMPEXP_XRC wxRadioButtonXmlHandler : public wxXmlResourceHandler { -DECLARE_DYNAMIC_CLASS(wxRadioButtonXmlHandler) + DECLARE_DYNAMIC_CLASS(wxRadioButtonXmlHandler) + public: wxRadioButtonXmlHandler(); virtual wxObject *DoCreateResource(); virtual bool CanHandle(wxXmlNode *node); }; -#endif +#endif // wxUSE_XRC && wxUSE_RADIOBOX -#endif // _WX_XH_RADIOBUTTON_H_ +#endif // _WX_XH_RADBT_H_ diff --git a/include/wx/xrc/xh_radbx.h b/include/wx/xrc/xh_radbx.h index 508883350d..94ee62498d 100644 --- a/include/wx/xrc/xh_radbx.h +++ b/include/wx/xrc/xh_radbx.h @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: wx/xrc/xh_radbx.h -// Purpose: XML resource handler for radio box +// Purpose: XML resource handler for wxRadioBox // Author: Bob Mitchell // Created: 2000/03/21 // RCS-ID: $Id$ @@ -13,15 +13,17 @@ #include "wx/xrc/xmlres.h" -#if wxUSE_RADIOBOX +#if wxUSE_XRC && wxUSE_RADIOBOX class WXDLLIMPEXP_XRC wxRadioBoxXmlHandler : public wxXmlResourceHandler { -DECLARE_DYNAMIC_CLASS(wxRadioBoxXmlHandler) + DECLARE_DYNAMIC_CLASS(wxRadioBoxXmlHandler) + public: wxRadioBoxXmlHandler(); virtual wxObject *DoCreateResource(); virtual bool CanHandle(wxXmlNode *node); + private: bool m_insideBox; @@ -36,6 +38,6 @@ private: wxArrayInt helptextSpecified; }; -#endif // wxUSE_RADIOBOX +#endif // wxUSE_XRC && wxUSE_RADIOBOX #endif // _WX_XH_RADBX_H_ diff --git a/include/wx/xrc/xh_scrol.h b/include/wx/xrc/xh_scrol.h index bc3f8a1c8f..3f2899045e 100644 --- a/include/wx/xrc/xh_scrol.h +++ b/include/wx/xrc/xh_scrol.h @@ -12,9 +12,8 @@ #define _WX_XH_SCROL_H_ #include "wx/xrc/xmlres.h" -#include "wx/defs.h" - +#if wxUSE_XRC && wxUSE_SCROLLBAR class WXDLLIMPEXP_XRC wxScrollBarXmlHandler : public wxXmlResourceHandler { @@ -32,5 +31,6 @@ public: virtual bool CanHandle(wxXmlNode *node); }; +#endif // wxUSE_XRC && wxUSE_SCROLLBAR #endif // _WX_XH_SCROL_H_ diff --git a/include/wx/xrc/xh_scwin.h b/include/wx/xrc/xh_scwin.h index c30c082166..64723dc446 100644 --- a/include/wx/xrc/xh_scwin.h +++ b/include/wx/xrc/xh_scwin.h @@ -12,18 +12,19 @@ #define _WX_XH_SCWIN_H_ #include "wx/xrc/xmlres.h" -#include "wx/defs.h" - +#if wxUSE_XRC class WXDLLIMPEXP_XRC wxScrolledWindowXmlHandler : public wxXmlResourceHandler { -DECLARE_DYNAMIC_CLASS(wxScrolledWindowXmlHandler) + DECLARE_DYNAMIC_CLASS(wxScrolledWindowXmlHandler) + public: wxScrolledWindowXmlHandler(); virtual wxObject *DoCreateResource(); virtual bool CanHandle(wxXmlNode *node); }; +#endif // wxUSE_XRC #endif // _WX_XH_SCWIN_H_ diff --git a/include/wx/xrc/xh_sizer.h b/include/wx/xrc/xh_sizer.h index c960d36383..04fb8e6f85 100644 --- a/include/wx/xrc/xh_sizer.h +++ b/include/wx/xrc/xh_sizer.h @@ -12,15 +12,18 @@ #define _WX_XH_SIZER_H_ #include "wx/xrc/xmlres.h" + +#if wxUSE_XRC + #include "wx/sizer.h" #include "wx/gbsizer.h" - class WXDLLEXPORT wxSizer; class WXDLLIMPEXP_XRC wxSizerXmlHandler : public wxXmlResourceHandler { -DECLARE_DYNAMIC_CLASS(wxSizerXmlHandler) + DECLARE_DYNAMIC_CLASS(wxSizerXmlHandler) + public: wxSizerXmlHandler(); virtual wxObject *DoCreateResource(); @@ -51,10 +54,13 @@ private: void AddSizerItem(wxSizerItem* sitem); }; +#if wxUSE_BUTTON class WXDLLIMPEXP_XRC wxStdDialogButtonSizerXmlHandler : public wxXmlResourceHandler { + DECLARE_DYNAMIC_CLASS(wxStdDialogButtonSizerXmlHandler) + public: wxStdDialogButtonSizerXmlHandler(); virtual wxObject *DoCreateResource(); @@ -63,9 +69,10 @@ public: private: bool m_isInside; wxStdDialogButtonSizer *m_parentSizer; - - DECLARE_DYNAMIC_CLASS(wxStdDialogButtonSizerXmlHandler) }; +#endif // wxUSE_BUTTON + +#endif // wxUSE_XRC #endif // _WX_XH_SIZER_H_ diff --git a/include/wx/xrc/xh_slidr.h b/include/wx/xrc/xh_slidr.h index fef7cb8066..345c03b6a5 100644 --- a/include/wx/xrc/xh_slidr.h +++ b/include/wx/xrc/xh_slidr.h @@ -12,9 +12,8 @@ #define _WX_XH_SLIDR_H_ #include "wx/xrc/xmlres.h" -#include "wx/defs.h" -#if wxUSE_SLIDER +#if wxUSE_XRC && wxUSE_SLIDER class WXDLLIMPEXP_XRC wxSliderXmlHandler : public wxXmlResourceHandler { @@ -32,6 +31,6 @@ public: virtual bool CanHandle(wxXmlNode *node); }; -#endif +#endif // wxUSE_XRC && wxUSE_SLIDER -#endif // _WX_XH_SLIDER_H_ +#endif // _WX_XH_SLIDR_H_ diff --git a/include/wx/xrc/xh_spin.h b/include/wx/xrc/xh_spin.h index f48065f039..c2b23b1b50 100644 --- a/include/wx/xrc/xh_spin.h +++ b/include/wx/xrc/xh_spin.h @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: wx/xrc/xh_spin.h -// Purpose: XML resource handler for wxSpinButton +// Purpose: XML resource handler for wxSpinButton and wxSpinCtrl // Author: Bob Mitchell // Created: 2000/03/21 // RCS-ID: $Id$ @@ -12,9 +12,11 @@ #define _WX_XH_SPIN_H_ #include "wx/xrc/xmlres.h" -#include "wx/defs.h" + +#if wxUSE_XRC #if wxUSE_SPINBTN + class WXDLLIMPEXP_XRC wxSpinButtonXmlHandler : public wxXmlResourceHandler { DECLARE_DYNAMIC_CLASS(wxSpinButtonXmlHandler) @@ -30,9 +32,12 @@ public: virtual wxObject *DoCreateResource(); virtual bool CanHandle(wxXmlNode *node); }; -#endif + +#endif // wxUSE_SPINBTN + #if wxUSE_SPINCTRL + class WXDLLIMPEXP_XRC wxSpinCtrlXmlHandler : public wxXmlResourceHandler { DECLARE_DYNAMIC_CLASS(wxSpinCtrlXmlHandler) @@ -48,6 +53,9 @@ public: virtual wxObject *DoCreateResource(); virtual bool CanHandle(wxXmlNode *node); }; -#endif + +#endif // wxUSE_SPINCTRL + +#endif // wxUSE_XRC #endif // _WX_XH_SPIN_H_ diff --git a/include/wx/xrc/xh_split.h b/include/wx/xrc/xh_split.h index 8068151380..0ad4a27788 100644 --- a/include/wx/xrc/xh_split.h +++ b/include/wx/xrc/xh_split.h @@ -13,13 +13,18 @@ #include "wx/xrc/xmlres.h" +#if wxUSE_XRC && wxUSE_SPLITTER + class WXDLLIMPEXP_XRC wxSplitterWindowXmlHandler : public wxXmlResourceHandler { -DECLARE_DYNAMIC_CLASS(wxSplitterWindowXmlHandler) + DECLARE_DYNAMIC_CLASS(wxSplitterWindowXmlHandler) + public: wxSplitterWindowXmlHandler(); virtual wxObject *DoCreateResource(); virtual bool CanHandle(wxXmlNode *node); }; +#endif // wxUSE_XRC && wxUSE_SPLITTER + #endif // _WX_XH_SPLIT_H_ diff --git a/include/wx/xrc/xh_statbar.h b/include/wx/xrc/xh_statbar.h index 9bd2c7d278..1a2787b125 100644 --- a/include/wx/xrc/xh_statbar.h +++ b/include/wx/xrc/xh_statbar.h @@ -13,13 +13,18 @@ #include "wx/xrc/xmlres.h" +#if wxUSE_XRC && wxUSE_STATUSBAR + class WXDLLIMPEXP_XRC wxStatusBarXmlHandler : public wxXmlResourceHandler { -DECLARE_DYNAMIC_CLASS(wxStatusBarXmlHandler) - public: - wxStatusBarXmlHandler(); - virtual wxObject *DoCreateResource(); - virtual bool CanHandle(wxXmlNode *node); + DECLARE_DYNAMIC_CLASS(wxStatusBarXmlHandler) + +public: + wxStatusBarXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); }; +#endif // wxUSE_XRC && wxUSE_STATUSBAR + #endif // _WX_XH_STATBAR_H_ diff --git a/include/wx/xrc/xh_stbmp.h b/include/wx/xrc/xh_stbmp.h index a7184540eb..5b222c1d34 100644 --- a/include/wx/xrc/xh_stbmp.h +++ b/include/wx/xrc/xh_stbmp.h @@ -13,15 +13,18 @@ #include "wx/xrc/xmlres.h" +#if wxUSE_XRC && wxUSE_STATBMP class WXDLLIMPEXP_XRC wxStaticBitmapXmlHandler : public wxXmlResourceHandler { -DECLARE_DYNAMIC_CLASS(wxStaticBitmapXmlHandler) + DECLARE_DYNAMIC_CLASS(wxStaticBitmapXmlHandler) + public: wxStaticBitmapXmlHandler(); virtual wxObject *DoCreateResource(); virtual bool CanHandle(wxXmlNode *node); }; +#endif // wxUSE_XRC && wxUSE_STATBMP #endif // _WX_XH_STBMP_H_ diff --git a/include/wx/xrc/xh_stbox.h b/include/wx/xrc/xh_stbox.h index 229f67a568..fb7b484521 100644 --- a/include/wx/xrc/xh_stbox.h +++ b/include/wx/xrc/xh_stbox.h @@ -13,15 +13,18 @@ #include "wx/xrc/xmlres.h" +#if wxUSE_XRC && wxUSE_STATBOX class WXDLLIMPEXP_XRC wxStaticBoxXmlHandler : public wxXmlResourceHandler { -DECLARE_DYNAMIC_CLASS(wxStaticBoxXmlHandler) + DECLARE_DYNAMIC_CLASS(wxStaticBoxXmlHandler) + public: wxStaticBoxXmlHandler(); virtual wxObject *DoCreateResource(); virtual bool CanHandle(wxXmlNode *node); }; +#endif // wxUSE_XRC && wxUSE_STATBOX #endif // _WX_XH_STBOX_H_ diff --git a/include/wx/xrc/xh_stlin.h b/include/wx/xrc/xh_stlin.h index f6b38196ff..d995001dfe 100644 --- a/include/wx/xrc/xh_stlin.h +++ b/include/wx/xrc/xh_stlin.h @@ -13,17 +13,18 @@ #include "wx/xrc/xmlres.h" -#if wxUSE_STATLINE +#if wxUSE_XRC && wxUSE_STATLINE class WXDLLIMPEXP_XRC wxStaticLineXmlHandler : public wxXmlResourceHandler { -DECLARE_DYNAMIC_CLASS(wxStaticLineXmlHandler) + DECLARE_DYNAMIC_CLASS(wxStaticLineXmlHandler) + public: wxStaticLineXmlHandler(); virtual wxObject *DoCreateResource(); virtual bool CanHandle(wxXmlNode *node); }; -#endif +#endif // wxUSE_XRC && wxUSE_STATLINE #endif // _WX_XH_STLIN_H_ diff --git a/include/wx/xrc/xh_sttxt.h b/include/wx/xrc/xh_sttxt.h index 672706df22..87d0d49a41 100644 --- a/include/wx/xrc/xh_sttxt.h +++ b/include/wx/xrc/xh_sttxt.h @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: wx/xrc/xh_sttxt.h -// Purpose: XML resource handler for wxStaticBitmap +// Purpose: XML resource handler for wxStaticText // Author: Bob Mitchell // Created: 2000/03/21 // RCS-ID: $Id$ @@ -13,15 +13,18 @@ #include "wx/xrc/xmlres.h" +#if wxUSE_XRC && wxUSE_STATTEXT class WXDLLIMPEXP_XRC wxStaticTextXmlHandler : public wxXmlResourceHandler { -DECLARE_DYNAMIC_CLASS(wxStaticTextXmlHandler) + DECLARE_DYNAMIC_CLASS(wxStaticTextXmlHandler) + public: wxStaticTextXmlHandler(); virtual wxObject *DoCreateResource(); virtual bool CanHandle(wxXmlNode *node); }; +#endif // wxUSE_XRC && wxUSE_STATTEXT -#endif // _WX_XH_STBMP_H_ +#endif // _WX_XH_STTXT_H_ diff --git a/include/wx/xrc/xh_text.h b/include/wx/xrc/xh_text.h index f755b2ea5f..63c3769c66 100644 --- a/include/wx/xrc/xh_text.h +++ b/include/wx/xrc/xh_text.h @@ -13,15 +13,18 @@ #include "wx/xrc/xmlres.h" +#if wxUSE_XRC && wxUSE_TEXTCTRL class WXDLLIMPEXP_XRC wxTextCtrlXmlHandler : public wxXmlResourceHandler { -DECLARE_DYNAMIC_CLASS(wxTextCtrlXmlHandler) + DECLARE_DYNAMIC_CLASS(wxTextCtrlXmlHandler) + public: wxTextCtrlXmlHandler(); virtual wxObject *DoCreateResource(); virtual bool CanHandle(wxXmlNode *node); }; +#endif // wxUSE_XRC && wxUSE_TEXTCTRL #endif // _WX_XH_TEXT_H_ diff --git a/include/wx/xrc/xh_tglbtn.h b/include/wx/xrc/xh_tglbtn.h index af4e2668dc..a37287e69b 100644 --- a/include/wx/xrc/xh_tglbtn.h +++ b/include/wx/xrc/xh_tglbtn.h @@ -12,20 +12,19 @@ #define _WX_XH_TGLBTN_H_ #include "wx/xrc/xmlres.h" -#include "wx/defs.h" -#if wxUSE_TOGGLEBTN +#if wxUSE_XRC && wxUSE_TOGGLEBTN class WXDLLIMPEXP_XRC wxToggleButtonXmlHandler : public wxXmlResourceHandler { -DECLARE_DYNAMIC_CLASS(wxToggleButtonXmlHandler) + DECLARE_DYNAMIC_CLASS(wxToggleButtonXmlHandler) + public: wxToggleButtonXmlHandler(); virtual wxObject *DoCreateResource(); virtual bool CanHandle(wxXmlNode *node); }; -#endif - +#endif // wxUSE_XRC && wxUSE_TOGGLEBTN #endif // _WX_XH_TGLBTN_H_ diff --git a/include/wx/xrc/xh_toolb.h b/include/wx/xrc/xh_toolb.h index 4afaef27a8..c836af30cb 100644 --- a/include/wx/xrc/xh_toolb.h +++ b/include/wx/xrc/xh_toolb.h @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: wx/xrc/xh_toolb.h -// Purpose: XML resource handler for wxBoxSizer +// Purpose: XML resource handler for wxToolBar // Author: Vaclav Slavik // Created: 2000/08/11 // RCS-ID: $Id$ @@ -13,13 +13,14 @@ #include "wx/xrc/xmlres.h" -#if wxUSE_TOOLBAR +#if wxUSE_XRC && wxUSE_TOOLBAR class WXDLLEXPORT wxToolBar; class WXDLLIMPEXP_XRC wxToolBarXmlHandler : public wxXmlResourceHandler { -DECLARE_DYNAMIC_CLASS(wxToolBarXmlHandler) + DECLARE_DYNAMIC_CLASS(wxToolBarXmlHandler) + public: wxToolBarXmlHandler(); virtual wxObject *DoCreateResource(); @@ -30,6 +31,6 @@ private: wxToolBar *m_toolbar; }; -#endif +#endif // wxUSE_XRC && wxUSE_TOOLBAR -#endif // _WX_XH_TOOLBAR_H_ +#endif // _WX_XH_TOOLB_H_ diff --git a/include/wx/xrc/xh_tree.h b/include/wx/xrc/xh_tree.h index 03c98df832..6fa595fa68 100644 --- a/include/wx/xrc/xh_tree.h +++ b/include/wx/xrc/xh_tree.h @@ -13,14 +13,18 @@ #include "wx/xrc/xmlres.h" +#if wxUSE_XRC && wxUSE_TREECTRL + class WXDLLIMPEXP_XRC wxTreeCtrlXmlHandler : public wxXmlResourceHandler { -DECLARE_DYNAMIC_CLASS(wxTreeCtrlXmlHandler) + DECLARE_DYNAMIC_CLASS(wxTreeCtrlXmlHandler) + public: wxTreeCtrlXmlHandler(); virtual wxObject *DoCreateResource(); virtual bool CanHandle(wxXmlNode *node); }; +#endif // wxUSE_XRC && wxUSE_TREECTRL #endif // _WX_XH_TREE_H_ diff --git a/include/wx/xrc/xh_treebk.h b/include/wx/xrc/xh_treebk.h index 9082c5eb49..903dad1e37 100644 --- a/include/wx/xrc/xh_treebk.h +++ b/include/wx/xrc/xh_treebk.h @@ -12,9 +12,9 @@ #include "wx/xrc/xmlres.h" -#if wxUSE_TREEBOOK +#if wxUSE_XRC && wxUSE_TREEBOOK -#include "wx/treebook.h" +class WXDLLEXPORT wxTreebook; #include "wx/dynarray.h" WX_DEFINE_USER_EXPORTED_ARRAY_SIZE_T(size_t, wxArrayTbkPageIndexes, @@ -30,6 +30,8 @@ WX_DEFINE_USER_EXPORTED_ARRAY_SIZE_T(size_t, wxArrayTbkPageIndexes, // it cannot be greater than the previous page depth plus one class WXDLLIMPEXP_XRC wxTreebookXmlHandler : public wxXmlResourceHandler { + DECLARE_DYNAMIC_CLASS(wxTreebookXmlHandler) + public: wxTreebookXmlHandler(); virtual wxObject *DoCreateResource(); @@ -39,8 +41,6 @@ private: wxTreebook *m_tbk; wxArrayTbkPageIndexes m_treeContext; bool m_isInside; - - DECLARE_DYNAMIC_CLASS(wxTreebookXmlHandler) }; @@ -78,6 +78,6 @@ private: // ... // -#endif // wxUSE_TREEBOOK +#endif // wxUSE_XRC && wxUSE_TREEBOOK #endif // _WX_XH_TREEBK_H_ diff --git a/include/wx/xrc/xh_unkwn.h b/include/wx/xrc/xh_unkwn.h index 7573119386..c0e4ea3504 100644 --- a/include/wx/xrc/xh_unkwn.h +++ b/include/wx/xrc/xh_unkwn.h @@ -13,15 +13,18 @@ #include "wx/xrc/xmlres.h" +#if wxUSE_XRC class WXDLLIMPEXP_XRC wxUnknownWidgetXmlHandler : public wxXmlResourceHandler { -DECLARE_DYNAMIC_CLASS(wxUnknownWidgetXmlHandler) + DECLARE_DYNAMIC_CLASS(wxUnknownWidgetXmlHandler) + public: wxUnknownWidgetXmlHandler(); virtual wxObject *DoCreateResource(); virtual bool CanHandle(wxXmlNode *node); }; +#endif // wxUSE_XRC #endif // _WX_XH_UNKWN_H_ diff --git a/include/wx/xrc/xh_wizrd.h b/include/wx/xrc/xh_wizrd.h index b16053f2e6..5342ee665b 100644 --- a/include/wx/xrc/xh_wizrd.h +++ b/include/wx/xrc/xh_wizrd.h @@ -9,17 +9,19 @@ ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_XH_WIZRD_H_ -#define _WX_XH_WIZRDL_H_ +#define _WX_XH_WIZRD_H_ #include "wx/xrc/xmlres.h" -#if wxUSE_WIZARDDLG +#if wxUSE_XRC && wxUSE_WIZARDDLG -#include "wx/wizard.h" +class WXDLLEXPORT wxWizard; +class WXDLLEXPORT wxWizardPageSimple; class WXDLLIMPEXP_XRC wxWizardXmlHandler : public wxXmlResourceHandler { -DECLARE_DYNAMIC_CLASS(wxWizardXmlHandler) + DECLARE_DYNAMIC_CLASS(wxWizardXmlHandler) + public: wxWizardXmlHandler(); virtual wxObject *DoCreateResource(); @@ -30,6 +32,6 @@ private: wxWizardPageSimple *m_lastSimplePage; }; -#endif +#endif // wxUSE_XRC && wxUSE_WIZARDDLG -#endif // _WX_XH_PANEL_H_ +#endif // _WX_XH_WIZRD_H_ diff --git a/src/xrc/xh_bttn.cpp b/src/xrc/xh_bttn.cpp index 397c6dbe47..d103e1ada3 100644 --- a/src/xrc/xh_bttn.cpp +++ b/src/xrc/xh_bttn.cpp @@ -15,7 +15,7 @@ #pragma hdrstop #endif -#if wxUSE_XRC +#if wxUSE_XRC && wxUSE_BUTTON #include "wx/xrc/xh_bttn.h" @@ -60,4 +60,4 @@ bool wxButtonXmlHandler::CanHandle(wxXmlNode *node) return IsOfClass(node, wxT("wxButton")); } -#endif // wxUSE_XRC +#endif // wxUSE_XRC && wxUSE_BUTTON diff --git a/src/xrc/xh_chckl.cpp b/src/xrc/xh_chckl.cpp index 04fb3b78da..f4e354ec5e 100644 --- a/src/xrc/xh_chckl.cpp +++ b/src/xrc/xh_chckl.cpp @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: src/xrc/xh_chckl.cpp -// Purpose: XRC resource for wxCheckList +// Purpose: XRC resource for wxCheckListBox // Author: Bob Mitchell // Created: 2000/03/21 // RCS-ID: $Id$ diff --git a/src/xrc/xh_hyperlink.cpp b/src/xrc/xh_hyperlink.cpp index a5a0cd3eb8..b19f47e8be 100644 --- a/src/xrc/xh_hyperlink.cpp +++ b/src/xrc/xh_hyperlink.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: src/xrc/hyperlink.cpp +// Name: src/xrc/xh_hyperlink.cpp // Purpose: Hyperlink control // Author: David Norris // Modified by: Ryan Norton, Francesco Montorsi diff --git a/src/xrc/xh_mdi.cpp b/src/xrc/xh_mdi.cpp index be0882245f..d98e5409f7 100644 --- a/src/xrc/xh_mdi.cpp +++ b/src/xrc/xh_mdi.cpp @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: src/xrc/xh_mdi.cpp -// Purpose: XRC resource for dialogs +// Purpose: XRC resource for wxMDI // Author: David M. Falkinder & Vaclav Slavik // Created: 14/02/2005 // RCS-ID: $Id$ diff --git a/src/xrc/xh_menu.cpp b/src/xrc/xh_menu.cpp index ee8530d615..217b155c02 100644 --- a/src/xrc/xh_menu.cpp +++ b/src/xrc/xh_menu.cpp @@ -15,7 +15,7 @@ #pragma hdrstop #endif -#if wxUSE_XRC +#if wxUSE_XRC && wxUSE_MENUS #include "wx/xrc/xh_menu.h" @@ -149,4 +149,4 @@ bool wxMenuBarXmlHandler::CanHandle(wxXmlNode *node) return IsOfClass(node, wxT("wxMenuBar")); } -#endif // wxUSE_XRC +#endif // wxUSE_XRC && wxUSE_MENUS diff --git a/src/xrc/xh_sizer.cpp b/src/xrc/xh_sizer.cpp index d3cccfcf94..d8652b6113 100644 --- a/src/xrc/xh_sizer.cpp +++ b/src/xrc/xh_sizer.cpp @@ -377,6 +377,7 @@ void wxSizerXmlHandler::AddSizerItem(wxSizerItem* sitem) //----------------------------------------------------------------------------- // wxStdDialogButtonSizerXmlHandler //----------------------------------------------------------------------------- +#if wxUSE_BUTTON IMPLEMENT_DYNAMIC_CLASS(wxStdDialogButtonSizerXmlHandler, wxXmlResourceHandler) @@ -438,5 +439,6 @@ bool wxStdDialogButtonSizerXmlHandler::CanHandle(wxXmlNode *node) return (!m_isInside && IsOfClass(node, wxT("wxStdDialogButtonSizer"))) || (m_isInside && IsOfClass(node, wxT("button"))); } +#endif // wxUSE_BUTTON #endif // wxUSE_XRC diff --git a/src/xrc/xh_spin.cpp b/src/xrc/xh_spin.cpp index d7a2b589de..15e878c3d3 100644 --- a/src/xrc/xh_spin.cpp +++ b/src/xrc/xh_spin.cpp @@ -15,7 +15,7 @@ #pragma hdrstop #endif -#if wxUSE_XRC +#if wxUSE_XRC #include "wx/xrc/xh_spin.h" diff --git a/src/xrc/xh_split.cpp b/src/xrc/xh_split.cpp index f1dc831246..be23b871f5 100644 --- a/src/xrc/xh_split.cpp +++ b/src/xrc/xh_split.cpp @@ -15,7 +15,7 @@ #pragma hdrstop #endif -#if wxUSE_XRC +#if wxUSE_XRC && wxUSE_SPLITTER #include "wx/xrc/xh_split.h" @@ -107,4 +107,4 @@ bool wxSplitterWindowXmlHandler::CanHandle(wxXmlNode *node) return IsOfClass(node, wxT("wxSplitterWindow")); } -#endif // wxUSE_XRC +#endif // wxUSE_XRC && wxUSE_SPLITTER diff --git a/src/xrc/xh_tglbtn.cpp b/src/xrc/xh_tglbtn.cpp index 205f9e0d7a..91f433d8a9 100644 --- a/src/xrc/xh_tglbtn.cpp +++ b/src/xrc/xh_tglbtn.cpp @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: xh_tglbtn.cpp -// Purpose: XRC resource for wxCheckBox +// Purpose: XRC resource for wxToggleButton // Author: Bob Mitchell // Created: 2000/03/21 // RCS-ID: $Id$ diff --git a/src/xrc/xh_toolb.cpp b/src/xrc/xh_toolb.cpp index f89cc657c1..83b7a67584 100644 --- a/src/xrc/xh_toolb.cpp +++ b/src/xrc/xh_toolb.cpp @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: src/xrc/xh_toolb.cpp -// Purpose: XRC resource for wxBoxSizer +// Purpose: XRC resource for wxToolBar // Author: Vaclav Slavik // Created: 2000/08/11 // RCS-ID: $Id$ diff --git a/src/xrc/xmlrsall.cpp b/src/xrc/xmlrsall.cpp index 73df95c094..c87da9a592 100644 --- a/src/xrc/xmlrsall.cpp +++ b/src/xrc/xmlrsall.cpp @@ -22,24 +22,46 @@ void wxXmlResource::InitAllHandlers() { + // these are the handlers, which we always have + AddHandler(new wxUnknownWidgetXmlHandler); AddHandler(new wxBitmapXmlHandler); AddHandler(new wxIconXmlHandler); - AddHandler(new wxMenuXmlHandler); - AddHandler(new wxMenuBarXmlHandler); AddHandler(new wxDialogXmlHandler); AddHandler(new wxPanelXmlHandler); AddHandler(new wxSizerXmlHandler); + AddHandler(new wxFrameXmlHandler); + AddHandler(new wxScrolledWindowXmlHandler); + + // these are configurable handlers +#if wxUSE_MENUS + AddHandler(new wxMenuXmlHandler); + AddHandler(new wxMenuBarXmlHandler); +#endif +#if wxUSE_BUTTON AddHandler(new wxStdDialogButtonSizerXmlHandler); AddHandler(new wxButtonXmlHandler); +#endif +#if wxUSE_BMPBUTTON AddHandler(new wxBitmapButtonXmlHandler); +#endif +#if wxUSE_STATTEXT AddHandler(new wxStaticTextXmlHandler); +#endif +#if wxUSE_STATBOX AddHandler(new wxStaticBoxXmlHandler); +#endif +#if wxUSE_STATBMP AddHandler(new wxStaticBitmapXmlHandler); +#endif +#if wxUSE_TREECTRL AddHandler(new wxTreeCtrlXmlHandler); +#endif #if wxUSE_CALENDARCTRL AddHandler(new wxCalendarCtrlXmlHandler); #endif +#if wxUSE_LISTCTRL AddHandler(new wxListCtrlXmlHandler); +#endif #if wxUSE_CHECKLISTBOX AddHandler(new wxCheckListBoxXmlHandler); #endif @@ -72,6 +94,8 @@ void wxXmlResource::InitAllHandlers() #endif #if wxUSE_RADIOBOX AddHandler(new wxRadioBoxXmlHandler); +#endif +#if wxUSE_RADIOBTN AddHandler(new wxRadioButtonXmlHandler); #endif #if wxUSE_COMBOBOX @@ -95,7 +119,9 @@ void wxXmlResource::InitAllHandlers() #if wxUSE_TREEBOOK AddHandler(new wxTreebookXmlHandler); #endif +#if wxUSE_TEXTCTRL AddHandler(new wxTextCtrlXmlHandler); +#endif #if wxUSE_LISTBOX AddHandler(new wxListBoxXmlHandler); #endif @@ -105,13 +131,12 @@ void wxXmlResource::InitAllHandlers() #if wxUSE_STATLINE AddHandler(new wxStaticLineXmlHandler); #endif - AddHandler(new wxUnknownWidgetXmlHandler); #if wxUSE_DIRDLG AddHandler(new wxGenericDirCtrlXmlHandler); #endif - AddHandler(new wxFrameXmlHandler); - AddHandler(new wxScrolledWindowXmlHandler); +#if wxUSE_SPLITTER AddHandler(new wxSplitterWindowXmlHandler); +#endif #if wxUSE_WIZARDDLG AddHandler(new wxWizardXmlHandler); #endif