From: Václav Slavík Date: Sat, 9 Jun 2001 22:18:45 +0000 (+0000) Subject: changed wxXML to XRC, wx/xml/*.h->wx/xrc/*.h X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/999d9a9f795cfc745681989ae0f30e531cde059f?ds=inline changed wxXML to XRC, wx/xml/*.h->wx/xrc/*.h git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10489 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/contrib/configure b/contrib/configure index d5805d8ee4..5f5ab2decd 100755 --- a/contrib/configure +++ b/contrib/configure @@ -817,7 +817,7 @@ trap 'rm -fr `echo " src/ogl/Makefile src/mmedia/Makefile src/stc/Makefile - src/xml/Makefile + src/xrc/Makefile src/canvas/Makefile src/gizmos/Makefile src/plot/Makefile @@ -834,7 +834,8 @@ trap 'rm -fr `echo " samples/gizmos/Makefile samples/gizmos/multicell/Makefile samples/gizmos/splittree/Makefile - samples/xml/Makefile + samples/gizmos/editlbox/Makefile + samples/xrc/Makefile samples/plot/Makefile samples/applet/Makefile utils/Makefile @@ -924,7 +925,7 @@ CONFIG_FILES=\${CONFIG_FILES-"Makefile src/ogl/Makefile src/mmedia/Makefile src/stc/Makefile - src/xml/Makefile + src/xrc/Makefile src/canvas/Makefile src/gizmos/Makefile src/plot/Makefile @@ -941,7 +942,8 @@ CONFIG_FILES=\${CONFIG_FILES-"Makefile samples/gizmos/Makefile samples/gizmos/multicell/Makefile samples/gizmos/splittree/Makefile - samples/xml/Makefile + samples/gizmos/editlbox/Makefile + samples/xrc/Makefile samples/plot/Makefile samples/applet/Makefile utils/Makefile diff --git a/contrib/configure.in b/contrib/configure.in index c6399802e2..bf39a34e41 100644 --- a/contrib/configure.in +++ b/contrib/configure.in @@ -42,7 +42,7 @@ AC_OUTPUT([ src/ogl/Makefile src/mmedia/Makefile src/stc/Makefile - src/xml/Makefile + src/xrc/Makefile src/canvas/Makefile src/gizmos/Makefile src/plot/Makefile @@ -59,7 +59,8 @@ AC_OUTPUT([ samples/gizmos/Makefile samples/gizmos/multicell/Makefile samples/gizmos/splittree/Makefile - samples/xml/Makefile + samples/gizmos/editlbox/Makefile + samples/xrc/Makefile samples/plot/Makefile samples/applet/Makefile utils/Makefile diff --git a/contrib/include/wx/xml/xh_all.h b/contrib/include/wx/xml/xh_all.h deleted file mode 100644 index a659665bd9..0000000000 --- a/contrib/include/wx/xml/xh_all.h +++ /dev/null @@ -1,49 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: xh_all.h -// Purpose: includes all xh_*.h files -// Author: Vaclav Slavik -// Created: 2000/03/05 -// RCS-ID: $Id$ -// Copyright: (c) 2000 Vaclav Slavik -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_XH_ALL_H_ -#define _WX_XH_ALL_H_ - - -// Existing handlers: - -#include "wx/xml/xh_menu.h" -#include "wx/xml/xh_panel.h" -#include "wx/xml/xh_dlg.h" -#include "wx/xml/xh_bttn.h" -#include "wx/xml/xh_chckb.h" -#include "wx/xml/xh_gauge.h" -#include "wx/xml/xh_html.h" -#include "wx/xml/xh_spin.h" -#include "wx/xml/xh_sttxt.h" -#include "wx/xml/xh_slidr.h" -#include "wx/xml/xh_radbt.h" -#include "wx/xml/xh_radbx.h" -#include "wx/xml/xh_combo.h" -#include "wx/xml/xh_chckl.h" -#include "wx/xml/xh_choic.h" -#include "wx/xml/xh_sizer.h" -#include "wx/xml/xh_stbmp.h" -#include "wx/xml/xh_notbk.h" -#include "wx/xml/xh_text.h" -#include "wx/xml/xh_listb.h" -#include "wx/xml/xh_toolb.h" -#include "wx/xml/xh_bmpbt.h" -#include "wx/xml/xh_stbox.h" -#include "wx/xml/xh_scrol.h" -#include "wx/xml/xh_tree.h" -#include "wx/xml/xh_cald.h" -#include "wx/xml/xh_listc.h" -#include "wx/xml/xh_stlin.h" -#include "wx/xml/xh_bmp.h" -#include "wx/xml/xh_unkwn.h" -#include "wx/xml/xh_frame.h" - -#endif // _WX_XMLRES_H_ diff --git a/contrib/include/wx/xml/xh_bmp.h b/contrib/include/wx/xml/xh_bmp.h deleted file mode 100644 index 91a4d0280e..0000000000 --- a/contrib/include/wx/xml/xh_bmp.h +++ /dev/null @@ -1,38 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: xh_bmp.h -// Purpose: XML resource handler for wxBitmap and wxIcon -// Author: Vaclav Slavik -// Created: 2000/09/00 -// RCS-ID: $Id$ -// Copyright: (c) 2000 Vaclav Slavik -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_XH_BMP_H_ -#define _WX_XH_BMP_H_ - -#ifdef __GNUG__ -#pragma interface "xh_bmp.h" -#endif - -#include "wx/xml/xmlres.h" - - -class WXXMLDLLEXPORT wxBitmapXmlHandler : public wxXmlResourceHandler -{ -public: - wxBitmapXmlHandler(); - virtual wxObject *DoCreateResource(); - virtual bool CanHandle(wxXmlNode *node); -}; - -class WXXMLDLLEXPORT wxIconXmlHandler : public wxXmlResourceHandler -{ -public: - wxIconXmlHandler(); - virtual wxObject *DoCreateResource(); - virtual bool CanHandle(wxXmlNode *node); -}; - - -#endif // _WX_XH_BMP_H_ diff --git a/contrib/include/wx/xml/xh_bmpbt.h b/contrib/include/wx/xml/xh_bmpbt.h deleted file mode 100644 index 5da3190191..0000000000 --- a/contrib/include/wx/xml/xh_bmpbt.h +++ /dev/null @@ -1,30 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: xh_bmpbt.h -// Purpose: XML resource handler for bitmap buttons -// Author: Brian Gavin -// Created: 2000/03/05 -// RCS-ID: $Id$ -// Copyright: (c) 2000 Brian Gavin -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_XH_BMPBT_H_ -#define _WX_XH_BMPBT_H_ - -#ifdef __GNUG__ -#pragma interface "xh_bmpbt.h" -#endif - -#include "wx/xml/xmlres.h" - - -class WXXMLDLLEXPORT wxBitmapButtonXmlHandler : public wxXmlResourceHandler -{ -public: - wxBitmapButtonXmlHandler(); - virtual wxObject *DoCreateResource(); - virtual bool CanHandle(wxXmlNode *node); -}; - - -#endif // _WX_XH_BMPBT_H_ diff --git a/contrib/include/wx/xml/xh_bttn.h b/contrib/include/wx/xml/xh_bttn.h deleted file mode 100644 index 5e5df78b69..0000000000 --- a/contrib/include/wx/xml/xh_bttn.h +++ /dev/null @@ -1,29 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: xh_bttn.h -// Purpose: XML resource handler for buttons -// Author: Vaclav Slavik -// Created: 2000/03/05 -// RCS-ID: $Id$ -// Copyright: (c) 2000 Vaclav Slavik -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_XH_BTTN_H_ -#define _WX_XH_BTTN_H_ - -#ifdef __GNUG__ -#pragma interface "xh_bttn.h" -#endif - -#include "wx/xml/xmlres.h" - -class WXXMLDLLEXPORT wxButtonXmlHandler : public wxXmlResourceHandler -{ -public: - wxButtonXmlHandler(); - virtual wxObject *DoCreateResource(); - virtual bool CanHandle(wxXmlNode *node); -}; - - -#endif // _WX_XH_BTTN_H_ diff --git a/contrib/include/wx/xml/xh_cald.h b/contrib/include/wx/xml/xh_cald.h deleted file mode 100644 index 60b7f618f0..0000000000 --- a/contrib/include/wx/xml/xh_cald.h +++ /dev/null @@ -1,29 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: xh_cald.h -// Purpose: XML resource handler for wxCalendarCtrl -// Author: Brian Gavin -// Created: 2000/09/09 -// RCS-ID: $Id$ -// Copyright: (c) 2000 Brian Gavin -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_XH_CALD_H_ -#define _WX_XH_CALD_H_ - -#ifdef __GNUG__ -#pragma interface "xh_cald.h" -#endif - -#include "wx/xml/xmlres.h" - -class WXXMLDLLEXPORT wxCalendarCtrlXmlHandler : public wxXmlResourceHandler -{ -public: - wxCalendarCtrlXmlHandler(); - virtual wxObject *DoCreateResource(); - virtual bool CanHandle(wxXmlNode *node); -}; - - -#endif // _WX_XH_CALD_H_ diff --git a/contrib/include/wx/xml/xh_chckb.h b/contrib/include/wx/xml/xh_chckb.h deleted file mode 100644 index e28f3502b3..0000000000 --- a/contrib/include/wx/xml/xh_chckb.h +++ /dev/null @@ -1,35 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: xh_chckb.h -// Purpose: XML resource handler for wxCheckBox -// Author: Bob Mitchell -// Created: 2000/03/21 -// RCS-ID: $Id$ -// Copyright: (c) 2000 Bob Mitchell and Verant Interactive -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_XH_CHCKB_H_ -#define _WX_XH_CHCKB_H_ - -#ifdef __GNUG__ -#pragma interface "xh_chckb.h" -#endif - -#include "wx/xml/xmlres.h" -#include "wx/defs.h" - -#if wxUSE_CHECKBOX - -class WXXMLDLLEXPORT wxCheckBoxXmlHandler : public wxXmlResourceHandler -{ -public: - wxCheckBoxXmlHandler(); - virtual wxObject *DoCreateResource(); - virtual bool CanHandle(wxXmlNode *node); -}; - -#endif - - -#endif // _WX_XH_CHECKBOX_H_ - diff --git a/contrib/include/wx/xml/xh_chckl.h b/contrib/include/wx/xml/xh_chckl.h deleted file mode 100644 index 9c42fa20be..0000000000 --- a/contrib/include/wx/xml/xh_chckl.h +++ /dev/null @@ -1,33 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: xh_chckl.h -// Purpose: XML resource handler for wxCheckListBox -// Author: Bob Mitchell -// Created: 2000/03/21 -// RCS-ID: $Id$ -// Copyright: (c) 2000 Bob Mitchell and Verant Interactive -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_XH_CHCKL_H_ -#define _WX_XH_CHCKL_H_ - -#ifdef __GNUG__ -#pragma interface "xh_chckl.h" -#endif - -#include "wx/xml/xmlres.h" - -class WXXMLDLLEXPORT wxCheckListXmlHandler : public wxXmlResourceHandler -{ -public: - wxCheckListXmlHandler(); - virtual wxObject *DoCreateResource(); - virtual bool CanHandle(wxXmlNode *node); -private: - bool m_insideBox; - wxArrayString strList; -}; - - - -#endif // _WX_XH_CHECKLIST_H_ diff --git a/contrib/include/wx/xml/xh_choic.h b/contrib/include/wx/xml/xh_choic.h deleted file mode 100644 index 16a2e1a428..0000000000 --- a/contrib/include/wx/xml/xh_choic.h +++ /dev/null @@ -1,32 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: xh_choic.h -// Purpose: XML resource handler for wxChoice -// Author: Bob Mitchell -// Created: 2000/03/21 -// RCS-ID: $Id$ -// Copyright: (c) 2000 Bob Mitchell and Verant Interactive -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_XH_CHOIC_H_ -#define _WX_XH_CHOIC_H_ - -#ifdef __GNUG__ -#pragma interface "xh_choic.h" -#endif - -#include "wx/xml/xmlres.h" - -class WXXMLDLLEXPORT wxChoiceXmlHandler : public wxXmlResourceHandler -{ -public: - wxChoiceXmlHandler(); - virtual wxObject *DoCreateResource(); - virtual bool CanHandle(wxXmlNode *node); -private: - bool m_insideBox; - wxArrayString strList; -}; - - -#endif // _WX_XH_CHOIC_H_ diff --git a/contrib/include/wx/xml/xh_combo.h b/contrib/include/wx/xml/xh_combo.h deleted file mode 100644 index 2c5dc402e2..0000000000 --- a/contrib/include/wx/xml/xh_combo.h +++ /dev/null @@ -1,35 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: xh_combo.h -// Purpose: XML resource handler for wxComboBox -// Author: Bob Mitchell -// Created: 2000/03/21 -// RCS-ID: $Id$ -// Copyright: (c) 2000 Bob Mitchell and Verant Interactive -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_XH_COMBO_H_ -#define _WX_XH_COMBO_H_ - -#ifdef __GNUG__ -#pragma interface "xh_combo.h" -#endif - -#include "wx/xml/xmlres.h" - -#if wxUSE_COMBOBOX - -class WXXMLDLLEXPORT wxComboBoxXmlHandler : public wxXmlResourceHandler -{ -public: - wxComboBoxXmlHandler(); - virtual wxObject *DoCreateResource(); - virtual bool CanHandle(wxXmlNode *node); -private: - bool m_insideBox; - wxArrayString strList; -}; - -#endif - -#endif // _WX_XH_COMBO_H_ diff --git a/contrib/include/wx/xml/xh_dlg.h b/contrib/include/wx/xml/xh_dlg.h deleted file mode 100644 index 135e126eb0..0000000000 --- a/contrib/include/wx/xml/xh_dlg.h +++ /dev/null @@ -1,29 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: xh_dlg.h -// Purpose: XML resource handler for dialogs -// Author: Vaclav Slavik -// Created: 2000/03/05 -// RCS-ID: $Id$ -// Copyright: (c) 2000 Vaclav Slavik -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_XH_DLG_H_ -#define _WX_XH_DLG_H_ - -#ifdef __GNUG__ -#pragma interface "xh_dlg.h" -#endif - -#include "wx/xml/xmlres.h" - -class WXXMLDLLEXPORT wxDialogXmlHandler : public wxXmlResourceHandler -{ -public: - wxDialogXmlHandler(); - virtual wxObject *DoCreateResource(); - virtual bool CanHandle(wxXmlNode *node); -}; - - -#endif // _WX_XH_DLG_H_ diff --git a/contrib/include/wx/xml/xh_frame.h b/contrib/include/wx/xml/xh_frame.h deleted file mode 100644 index f5b3bb1bef..0000000000 --- a/contrib/include/wx/xml/xh_frame.h +++ /dev/null @@ -1,29 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: xh_frame.h -// Purpose: XML resource handler for dialogs -// Author: Vaclav Slavik & Aleks. -// Created: 2000/03/05 -// RCS-ID: $Id$ -// Copyright: (c) 2000 Vaclav Slavik -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_XH_FRAME_H_ -#define _WX_XH_FRAME_H_ - -#ifdef __GNUG__ -#pragma interface "xh_frame.h" -#endif - -#include "wx/xml/xmlres.h" - -class WXXMLDLLEXPORT wxFrameXmlHandler : public wxXmlResourceHandler -{ -public: - wxFrameXmlHandler(); - virtual wxObject *DoCreateResource(); - virtual bool CanHandle(wxXmlNode *node); -}; - - -#endif // _WX_XH_FRAME_H_ diff --git a/contrib/include/wx/xml/xh_gauge.h b/contrib/include/wx/xml/xh_gauge.h deleted file mode 100644 index 8dfcccf7db..0000000000 --- a/contrib/include/wx/xml/xh_gauge.h +++ /dev/null @@ -1,40 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: xh_gauge.h -// Purpose: XML resource handler for wxGauge -// Author: Bob Mitchell -// Created: 2000/03/21 -// RCS-ID: $Id$ -// Copyright: (c) 2000 Bob Mitchell and Verant Interactive -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_XH_GAUGE_H_ -#define _WX_XH_GAUGE_H_ - -#ifdef __GNUG__ -#pragma interface "xh_gauge.h" -#endif - -#include "wx/defs.h" - -#if wxUSE_GAUGE - -#include "wx/xml/xmlres.h" - - -class WXXMLDLLEXPORT wxGaugeXmlHandler : public wxXmlResourceHandler -{ - enum - { - wxGAUGE_DEFAULT_RANGE = 100 - }; - -public: - wxGaugeXmlHandler(); - virtual wxObject *DoCreateResource(); - virtual bool CanHandle(wxXmlNode *node); -}; - -#endif - -#endif // _WX_XH_GAUGE_H_ diff --git a/contrib/include/wx/xml/xh_html.h b/contrib/include/wx/xml/xh_html.h deleted file mode 100644 index cf1a0603ca..0000000000 --- a/contrib/include/wx/xml/xh_html.h +++ /dev/null @@ -1,34 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: xh_html.h -// Purpose: XML resource handler for wxHtmlWindow -// Author: Bob Mitchell -// Created: 2000/03/21 -// RCS-ID: $Id$ -// Copyright: (c) 2000 Bob Mitchell and Verant Interactive -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_XH_HTML_H_ -#define _WX_XH_HTML_H_ - -#ifdef __GNUG__ -#pragma interface "xh_html.h" -#endif - -#include "wx/xml/xmlres.h" - -#include "wx/defs.h" - -#if wxUSE_HTML - -class WXXMLDLLEXPORT wxHtmlWindowXmlHandler : public wxXmlResourceHandler -{ -public: - wxHtmlWindowXmlHandler(); - virtual wxObject *DoCreateResource(); - virtual bool CanHandle(wxXmlNode *node); -}; - -#endif - -#endif // _WX_XH_SLIDER_H_ diff --git a/contrib/include/wx/xml/xh_listb.h b/contrib/include/wx/xml/xh_listb.h deleted file mode 100644 index 5a7d8d24a2..0000000000 --- a/contrib/include/wx/xml/xh_listb.h +++ /dev/null @@ -1,35 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: xh_listb.h -// Purpose: XML resource handler for wxListbox -// Author: Bob Mitchell & Vaclav Slavik -// Created: 2000/07/29 -// RCS-ID: $Id$ -// Copyright: (c) 2000 Bob Mitchell & Vaclav Slavik -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_XH_LISTB_H_ -#define _WX_XH_LISTB_H_ - -#ifdef __GNUG__ -#pragma interface "xh_listb.h" -#endif - -#include "wx/xml/xmlres.h" - -#if wxUSE_LISTBOX - -class WXXMLDLLEXPORT wxListBoxXmlHandler : public wxXmlResourceHandler -{ -public: - wxListBoxXmlHandler(); - virtual wxObject *DoCreateResource(); - virtual bool CanHandle(wxXmlNode *node); -private: - bool m_insideBox; - wxArrayString strList; -}; - -#endif - -#endif // _WX_XH_LISTB_H_ diff --git a/contrib/include/wx/xml/xh_listc.h b/contrib/include/wx/xml/xh_listc.h deleted file mode 100644 index 77d184a6e4..0000000000 --- a/contrib/include/wx/xml/xh_listc.h +++ /dev/null @@ -1,29 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: xh_listc.h -// Purpose: XML resource handler for wxCalendarCtrl -// Author: Brian Gavin -// Created: 2000/09/09 -// RCS-ID: $Id$ -// Copyright: (c) 2000 Brian Gavin -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_XH_LISTC_H_ -#define _WX_XH_LISTC_H_ - -#ifdef __GNUG__ -#pragma interface "xh_listc.h" -#endif - -#include "wx/xml/xmlres.h" - -class WXXMLDLLEXPORT wxListCtrlXmlHandler : public wxXmlResourceHandler -{ -public: - wxListCtrlXmlHandler(); - virtual wxObject *DoCreateResource(); - virtual bool CanHandle(wxXmlNode *node); -}; - - -#endif // _WX_XH_LISTC_H_ diff --git a/contrib/include/wx/xml/xh_menu.h b/contrib/include/wx/xml/xh_menu.h deleted file mode 100644 index 070e9b2de5..0000000000 --- a/contrib/include/wx/xml/xh_menu.h +++ /dev/null @@ -1,40 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: xh_menu.h -// Purpose: XML resource handler for menus/menubars -// Author: Vaclav Slavik -// Created: 2000/03/05 -// RCS-ID: $Id$ -// Copyright: (c) 2000 Vaclav Slavik -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_XH_MENU_H_ -#define _WX_XH_MENU_H_ - -#ifdef __GNUG__ -#pragma interface "xh_menu.h" -#endif - -#include "wx/xml/xmlres.h" - -class WXXMLDLLEXPORT wxMenuXmlHandler : public wxXmlResourceHandler -{ -public: - wxMenuXmlHandler(); - virtual wxObject *DoCreateResource(); - virtual bool CanHandle(wxXmlNode *node); - -private: - bool m_insideMenu; -}; - -class WXXMLDLLEXPORT wxMenuBarXmlHandler : public wxXmlResourceHandler -{ - public: - wxMenuBarXmlHandler(); - virtual wxObject *DoCreateResource(); - virtual bool CanHandle(wxXmlNode *node); -}; - - -#endif // _WX_XH_MENU_H_ diff --git a/contrib/include/wx/xml/xh_notbk.h b/contrib/include/wx/xml/xh_notbk.h deleted file mode 100644 index 5ee74d85fd..0000000000 --- a/contrib/include/wx/xml/xh_notbk.h +++ /dev/null @@ -1,37 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: xh_notbk.h -// Purpose: XML resource handler for wxNotebook -// Author: Vaclav Slavik -// RCS-ID: $Id$ -// Copyright: (c) 2000 Vaclav Slavik -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_XH_NOTBK_H_ -#define _WX_XH_NOTBK_H_ - -#ifdef __GNUG__ -#pragma interface "xh_notbk.h" -#endif - -#include "wx/xml/xmlres.h" - -#if wxUSE_NOTEBOOK - -class WXDLLEXPORT wxNotebook; - -class WXXMLDLLEXPORT wxNotebookXmlHandler : public wxXmlResourceHandler -{ -public: - wxNotebookXmlHandler(); - virtual wxObject *DoCreateResource(); - virtual bool CanHandle(wxXmlNode *node); - -private: - bool m_isInside; - wxNotebook *m_notebook; -}; - -#endif - -#endif // _WX_XH_NOTBK_H_ diff --git a/contrib/include/wx/xml/xh_panel.h b/contrib/include/wx/xml/xh_panel.h deleted file mode 100644 index fd5afdc5c9..0000000000 --- a/contrib/include/wx/xml/xh_panel.h +++ /dev/null @@ -1,29 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: xh_panel.h -// Purpose: XML resource handler for panels -// Author: Vaclav Slavik -// Created: 2000/03/05 -// RCS-ID: $Id$ -// Copyright: (c) 2000 Vaclav Slavik -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_XH_PANEL_H_ -#define _WX_XH_PANEL_H_ - -#ifdef __GNUG__ -#pragma interface "xh_panel.h" -#endif - -#include "wx/xml/xmlres.h" - -class WXXMLDLLEXPORT wxPanelXmlHandler : public wxXmlResourceHandler -{ -public: - wxPanelXmlHandler(); - virtual wxObject *DoCreateResource(); - virtual bool CanHandle(wxXmlNode *node); -}; - - -#endif // _WX_XH_PANEL_H_ diff --git a/contrib/include/wx/xml/xh_radbt.h b/contrib/include/wx/xml/xh_radbt.h deleted file mode 100644 index 0658ff5f6f..0000000000 --- a/contrib/include/wx/xml/xh_radbt.h +++ /dev/null @@ -1,33 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: xh_radbt.h -// Purpose: XML resource handler for radio buttons -// Author: Bob Mitchell -// Created: 2000/03/21 -// RCS-ID: $Id$ -// Copyright: (c) 2000 Bob Mitchell and Verant Interactive -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_XH_RADBT_H_ -#define _WX_XH_RADBT_H_ - -#ifdef __GNUG__ -#pragma interface "xh_radbt.h" -#endif - -#include "wx/xml/xmlres.h" -#include "wx/defs.h" - -#if wxUSE_RADIOBOX - -class WXXMLDLLEXPORT wxRadioButtonXmlHandler : public wxXmlResourceHandler -{ -public: - wxRadioButtonXmlHandler(); - virtual wxObject *DoCreateResource(); - virtual bool CanHandle(wxXmlNode *node); -}; - -#endif - -#endif // _WX_XH_RADIOBUTTON_H_ diff --git a/contrib/include/wx/xml/xh_radbx.h b/contrib/include/wx/xml/xh_radbx.h deleted file mode 100644 index 7343d39f66..0000000000 --- a/contrib/include/wx/xml/xh_radbx.h +++ /dev/null @@ -1,35 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: xh_radbx.h -// Purpose: XML resource handler for radio box -// Author: Bob Mitchell -// Created: 2000/03/21 -// RCS-ID: $Id$ -// Copyright: (c) 2000 Bob Mitchell and Verant Interactive -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_XH_RADBX_H_ -#define _WX_XH_RADBX_H_ - -#ifdef __GNUG__ -#pragma interface "xh_radbx.h" -#endif - -#include "wx/xml/xmlres.h" - -#if wxUSE_RADIOBOX - -class WXXMLDLLEXPORT wxRadioBoxXmlHandler : public wxXmlResourceHandler -{ -public: - wxRadioBoxXmlHandler(); - virtual wxObject *DoCreateResource(); - virtual bool CanHandle(wxXmlNode *node); -private: - bool m_insideBox; - wxArrayString strList; -}; - -#endif - -#endif // _WX_XH_RADBX_H_ diff --git a/contrib/include/wx/xml/xh_scrol.h b/contrib/include/wx/xml/xh_scrol.h deleted file mode 100644 index a190117556..0000000000 --- a/contrib/include/wx/xml/xh_scrol.h +++ /dev/null @@ -1,39 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: xh_scrol.h -// Purpose: XML resource handler for wxScrollBar -// Author: Brian Gavin -// Created: 2000/09/09 -// RCS-ID: $Id$ -// Copyright: (c) 2000 Brian Gavin -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_XH_SCROL_H_ -#define _WX_XH_SCROL_H_ - -#ifdef __GNUG__ -#pragma interface "xh_scrol.h" -#endif - -#include "wx/xml/xmlres.h" -#include "wx/defs.h" - - - -class WXXMLDLLEXPORT wxScrollBarXmlHandler : public wxXmlResourceHandler -{ - enum - { - wxSL_DEFAULT_VALUE = 0, - wxSL_DEFAULT_MIN = 0, - wxSL_DEFAULT_MAX = 100 - }; - -public: - wxScrollBarXmlHandler(); - virtual wxObject *DoCreateResource(); - virtual bool CanHandle(wxXmlNode *node); -}; - - -#endif // _WX_XH_SCROL_H_ diff --git a/contrib/include/wx/xml/xh_sizer.h b/contrib/include/wx/xml/xh_sizer.h deleted file mode 100644 index 7210672bb2..0000000000 --- a/contrib/include/wx/xml/xh_sizer.h +++ /dev/null @@ -1,38 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: xh_sizer.h -// Purpose: XML resource handler for wxBoxSizer -// Author: Vaclav Slavik -// Created: 2000/04/24 -// RCS-ID: $Id$ -// Copyright: (c) 2000 Vaclav Slavik -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_XH_SIZER_H_ -#define _WX_XH_SIZER_H_ - -#ifdef __GNUG__ -#pragma interface "xh_sizer.h" -#endif - -#include "wx/xml/xmlres.h" - - -class WXDLLEXPORT wxSizer; - -class WXXMLDLLEXPORT wxSizerXmlHandler : public wxXmlResourceHandler -{ -public: - wxSizerXmlHandler(); - virtual wxObject *DoCreateResource(); - virtual bool CanHandle(wxXmlNode *node); - -private: - bool m_isInside; - wxSizer *m_parentSizer; - - bool IsSizerNode(wxXmlNode *node); -}; - - -#endif // _WX_XH_BOXSIZER_H_ diff --git a/contrib/include/wx/xml/xh_slidr.h b/contrib/include/wx/xml/xh_slidr.h deleted file mode 100644 index 45be53ae66..0000000000 --- a/contrib/include/wx/xml/xh_slidr.h +++ /dev/null @@ -1,40 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: xh_slidr.h -// Purpose: XML resource handler for wxSlider -// Author: Bob Mitchell -// Created: 2000/03/21 -// RCS-ID: $Id$ -// Copyright: (c) 2000 Bob Mitchell and Verant Interactive -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_XH_SLIDR_H_ -#define _WX_XH_SLIDR_H_ - -#ifdef __GNUG__ -#pragma interface "xh_slidr.h" -#endif - -#include "wx/xml/xmlres.h" -#include "wx/defs.h" - -#if wxUSE_SLIDER - -class WXXMLDLLEXPORT wxSliderXmlHandler : public wxXmlResourceHandler -{ - enum - { - wxSL_DEFAULT_VALUE = 0, - wxSL_DEFAULT_MIN = 0, - wxSL_DEFAULT_MAX = 100 - }; - -public: - wxSliderXmlHandler(); - virtual wxObject *DoCreateResource(); - virtual bool CanHandle(wxXmlNode *node); -}; - -#endif - -#endif // _WX_XH_SLIDER_H_ diff --git a/contrib/include/wx/xml/xh_spin.h b/contrib/include/wx/xml/xh_spin.h deleted file mode 100644 index 871a249f06..0000000000 --- a/contrib/include/wx/xml/xh_spin.h +++ /dev/null @@ -1,55 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: xh_spin.h -// Purpose: XML resource handler for wxSpinButton -// Author: Bob Mitchell -// Created: 2000/03/21 -// RCS-ID: $Id$ -// Copyright: (c) 2000 Bob Mitchell and Verant Interactive -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_XH_SPIN_H_ -#define _WX_XH_SPIN_H_ - -#ifdef __GNUG__ -#pragma interface "xh_spin.h" -#endif - -#include "wx/xml/xmlres.h" -#include "wx/defs.h" - -#if wxUSE_SPINBTN -class WXXMLDLLEXPORT wxSpinButtonXmlHandler : public wxXmlResourceHandler -{ - enum - { - wxSP_DEFAULT_VALUE = 0, - wxSP_DEFAULT_MIN = 0, - wxSP_DEFAULT_MAX = 100 - }; - -public: - wxSpinButtonXmlHandler(); - virtual wxObject *DoCreateResource(); - virtual bool CanHandle(wxXmlNode *node); -}; -#endif - -#if wxUSE_SPINCTRL -class WXXMLDLLEXPORT wxSpinCtrlXmlHandler : public wxXmlResourceHandler -{ - enum - { - wxSP_DEFAULT_VALUE = 0, - wxSP_DEFAULT_MIN = 0, - wxSP_DEFAULT_MAX = 100 - }; - -public: - wxSpinCtrlXmlHandler(); - virtual wxObject *DoCreateResource(); - virtual bool CanHandle(wxXmlNode *node); -}; -#endif - -#endif // _WX_XH_SPIN_H_ diff --git a/contrib/include/wx/xml/xh_stbmp.h b/contrib/include/wx/xml/xh_stbmp.h deleted file mode 100644 index 1fa07a405e..0000000000 --- a/contrib/include/wx/xml/xh_stbmp.h +++ /dev/null @@ -1,30 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: xh_stbmp.h -// Purpose: XML resource handler for wxStaticBitmap -// Author: Vaclav Slavik -// Created: 2000/04/22 -// RCS-ID: $Id$ -// Copyright: (c) 2000 Vaclav Slavik -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_XH_STBMP_H_ -#define _WX_XH_STBMP_H_ - -#ifdef __GNUG__ -#pragma interface "xh_stbmp.h" -#endif - -#include "wx/xml/xmlres.h" - - -class WXXMLDLLEXPORT wxStaticBitmapXmlHandler : public wxXmlResourceHandler -{ -public: - wxStaticBitmapXmlHandler(); - virtual wxObject *DoCreateResource(); - virtual bool CanHandle(wxXmlNode *node); -}; - - -#endif // _WX_XH_STBMP_H_ diff --git a/contrib/include/wx/xml/xh_stbox.h b/contrib/include/wx/xml/xh_stbox.h deleted file mode 100644 index f4055a2abf..0000000000 --- a/contrib/include/wx/xml/xh_stbox.h +++ /dev/null @@ -1,30 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: xh_stbox.h -// Purpose: XML resource handler for wxStaticBox -// Author: Brian Gavin -// Created: 2000/09/00 -// RCS-ID: $Id$ -// Copyright: (c) 2000 Brian Gavin -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_XH_STBOX_H_ -#define _WX_XH_STBOX_H_ - -#ifdef __GNUG__ -#pragma interface "xh_stbox.h" -#endif - -#include "wx/xml/xmlres.h" - - -class WXXMLDLLEXPORT wxStaticBoxXmlHandler : public wxXmlResourceHandler -{ -public: - wxStaticBoxXmlHandler(); - virtual wxObject *DoCreateResource(); - virtual bool CanHandle(wxXmlNode *node); -}; - - -#endif // _WX_XH_STBOX_H_ diff --git a/contrib/include/wx/xml/xh_stlin.h b/contrib/include/wx/xml/xh_stlin.h deleted file mode 100644 index cad1234c41..0000000000 --- a/contrib/include/wx/xml/xh_stlin.h +++ /dev/null @@ -1,32 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: xh_stlin.h -// Purpose: XML resource handler for wxStaticLine -// Author: Vaclav Slavik -// Created: 2000/09/00 -// RCS-ID: $Id$ -// Copyright: (c) 2000 Vaclav Slavik -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_XH_STLIN_H_ -#define _WX_XH_STLIN_H_ - -#ifdef __GNUG__ -#pragma interface "xh_stlin.h" -#endif - -#include "wx/xml/xmlres.h" - -#if wxUSE_STATLINE - -class WXXMLDLLEXPORT wxStaticLineXmlHandler : public wxXmlResourceHandler -{ -public: - wxStaticLineXmlHandler(); - virtual wxObject *DoCreateResource(); - virtual bool CanHandle(wxXmlNode *node); -}; - -#endif - -#endif // _WX_XH_STLIN_H_ diff --git a/contrib/include/wx/xml/xh_sttxt.h b/contrib/include/wx/xml/xh_sttxt.h deleted file mode 100644 index 713f29d443..0000000000 --- a/contrib/include/wx/xml/xh_sttxt.h +++ /dev/null @@ -1,30 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: xh_sttxt.h -// Purpose: XML resource handler for wxStaticBitmap -// Author: Bob Mitchell -// Created: 2000/03/21 -// RCS-ID: $Id$ -// Copyright: (c) 2000 Bob Mitchell -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_XH_STTXT_H_ -#define _WX_XH_STTXT_H_ - -#ifdef __GNUG__ -#pragma interface "xh_sttxt.h" -#endif - -#include "wx/xml/xmlres.h" - - -class WXXMLDLLEXPORT wxStaticTextXmlHandler : public wxXmlResourceHandler -{ -public: - wxStaticTextXmlHandler(); - virtual wxObject *DoCreateResource(); - virtual bool CanHandle(wxXmlNode *node); -}; - - -#endif // _WX_XH_STBMP_H_ diff --git a/contrib/include/wx/xml/xh_text.h b/contrib/include/wx/xml/xh_text.h deleted file mode 100644 index db8bbb5b7c..0000000000 --- a/contrib/include/wx/xml/xh_text.h +++ /dev/null @@ -1,30 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: xh_text.h -// Purpose: XML resource handler for wxTextCtrl -// Author: Aleksandras Gluchovas -// Created: 2000/03/21 -// RCS-ID: $Id$ -// Copyright: (c) 2000 Aleksandras Gluchovas -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_XH_TEXT_H_ -#define _WX_XH_TEXT_H_ - -#ifdef __GNUG__ -#pragma interface "xh_text.h" -#endif - -#include "wx/xml/xmlres.h" - - -class WXXMLDLLEXPORT wxTextCtrlXmlHandler : public wxXmlResourceHandler -{ -public: - wxTextCtrlXmlHandler(); - virtual wxObject *DoCreateResource(); - virtual bool CanHandle(wxXmlNode *node); -}; - - -#endif // _WX_XH_TEXT_H_ diff --git a/contrib/include/wx/xml/xh_toolb.h b/contrib/include/wx/xml/xh_toolb.h deleted file mode 100644 index 426b58cc64..0000000000 --- a/contrib/include/wx/xml/xh_toolb.h +++ /dev/null @@ -1,38 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: xh_toolb.h -// Purpose: XML resource handler for wxBoxSizer -// Author: Vaclav Slavik -// Created: 2000/08/11 -// RCS-ID: $Id$ -// Copyright: (c) 2000 Vaclav Slavik -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_XH_TOOLB_H_ -#define _WX_XH_TOOLB_H_ - -#ifdef __GNUG__ -#pragma interface "xh_toolb.h" -#endif - -#include "wx/xml/xmlres.h" - -#if wxUSE_TOOLBAR - -class WXDLLEXPORT wxToolBar; - -class WXXMLDLLEXPORT wxToolBarXmlHandler : public wxXmlResourceHandler -{ -public: - wxToolBarXmlHandler(); - virtual wxObject *DoCreateResource(); - virtual bool CanHandle(wxXmlNode *node); - -private: - bool m_isInside; - wxToolBar *m_toolbar; -}; - -#endif - -#endif // _WX_XH_TOOLBAR_H_ diff --git a/contrib/include/wx/xml/xh_tree.h b/contrib/include/wx/xml/xh_tree.h deleted file mode 100644 index 9c3fe46a1a..0000000000 --- a/contrib/include/wx/xml/xh_tree.h +++ /dev/null @@ -1,29 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: xh_tree.h -// Purpose: XML resource handler for wxTreeCtrl -// Author: Brian Gavin -// Created: 2000/09/09 -// RCS-ID: $Id$ -// Copyright: (c) 2000 Brian Gavin -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_XH_TREE_H_ -#define _WX_XH_TREE_H_ - -#ifdef __GNUG__ -#pragma interface "xh_tree.h" -#endif - -#include "wx/xml/xmlres.h" - -class WXXMLDLLEXPORT wxTreeCtrlXmlHandler : public wxXmlResourceHandler -{ -public: - wxTreeCtrlXmlHandler(); - virtual wxObject *DoCreateResource(); - virtual bool CanHandle(wxXmlNode *node); -}; - - -#endif // _WX_XH_TREE_H_ diff --git a/contrib/include/wx/xml/xh_unkwn.h b/contrib/include/wx/xml/xh_unkwn.h deleted file mode 100644 index 1506345ffd..0000000000 --- a/contrib/include/wx/xml/xh_unkwn.h +++ /dev/null @@ -1,30 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: xh_unkwn.h -// Purpose: XML resource handler for unkown widget -// Author: Vaclav Slavik -// Created: 2000/03/05 -// RCS-ID: $Id$ -// Copyright: (c) 2000 Vaclav Slavik -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_XH_UNKWN_H_ -#define _WX_XH_UNKWN_H_ - -#ifdef __GNUG__ -#pragma interface "xh_unkwn.h" -#endif - -#include "wx/xml/xmlres.h" - - -class WXXMLDLLEXPORT wxUnknownWidgetXmlHandler : public wxXmlResourceHandler -{ -public: - wxUnknownWidgetXmlHandler(); - virtual wxObject *DoCreateResource(); - virtual bool CanHandle(wxXmlNode *node); -}; - - -#endif // _WX_XH_UNKWN_H_ diff --git a/contrib/include/wx/xml/xml.h b/contrib/include/wx/xml/xml.h deleted file mode 100644 index de3b3fe7ed..0000000000 --- a/contrib/include/wx/xml/xml.h +++ /dev/null @@ -1,264 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: xml.h -// Purpose: wxXmlDocument - XML parser & data holder class -// Author: Vaclav Slavik -// Created: 2000/03/05 -// RCS-ID: $Id$ -// Copyright: (c) 2000 Vaclav Slavik -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_XML_H_ -#define _WX_XML_H_ - -#ifdef __GNUG__ -#pragma interface "xml.h" -#endif - -#include "wx/defs.h" -#include "wx/string.h" -#include "wx/object.h" -#include "wx/list.h" - -#ifdef WXXMLISDLL -#define WXXMLDLLEXPORT WXDLLEXPORT -#else -#define WXXMLDLLEXPORT -#endif - -class WXXMLDLLEXPORT wxXmlNode; -class WXXMLDLLEXPORT wxXmlProperty; -class WXXMLDLLEXPORT wxXmlDocument; -class WXXMLDLLEXPORT wxXmlIOHandler; -class WXDLLEXPORT wxInputStream; -class WXDLLEXPORT wxOutputStream; - - -// Represents XML node type. -enum wxXmlNodeType -{ - // note: values are synchronized with xmlElementType from libxml - wxXML_ELEMENT_NODE = 1, - wxXML_ATTRIBUTE_NODE = 2, - wxXML_TEXT_NODE = 3, - wxXML_CDATA_SECTION_NODE = 4, - wxXML_ENTITY_REF_NODE = 5, - wxXML_ENTITY_NODE = 6, - wxXML_PI_NODE = 7, - wxXML_COMMENT_NODE = 8, - wxXML_DOCUMENT_NODE = 9, - wxXML_DOCUMENT_TYPE_NODE = 10, - wxXML_DOCUMENT_FRAG_NODE = 11, - wxXML_NOTATION_NODE = 12, - wxXML_HTML_DOCUMENT_NODE = 13 -}; - - -// Types of XML files: - -enum wxXmlIOType -{ - wxXML_IO_AUTO = 0, // detect it automatically - wxXML_IO_EXPAT, // use Expat to load from text/xml document - wxXML_IO_TEXT_OUTPUT, // generic saver into text/xml - wxXML_IO_BIN, // save in binary uncompressed proprietary format - wxXML_IO_BINZ // svae in binary zlib-compressed proprietary format -}; - - -// Represents node property(ies). -// Example: in "src" is property with value -// "hello.gif" and "id" is prop. with value "3". - -class WXXMLDLLEXPORT wxXmlProperty -{ -public: - wxXmlProperty() : m_next(NULL) {} - wxXmlProperty(const wxString& name, const wxString& value, - wxXmlProperty *next) - : m_name(name), m_value(value), m_next(next) {} - ~wxXmlProperty() { delete m_next; } - - wxString GetName() const { return m_name; } - wxString GetValue() const { return m_value; } - wxXmlProperty *GetNext() const { return m_next; } - - void SetName(const wxString& name) { m_name = name; } - void SetValue(const wxString& value) { m_value = value; } - void SetNext(wxXmlProperty *next) { m_next = next; } - -private: - wxString m_name; - wxString m_value; - wxXmlProperty *m_next; -}; - - - -// Represents node in XML document. Node has name and may have content -// and properties. Most common node types are wxXML_TEXT_NODE (name and props -// are irrelevant) and wxXML_ELEMENT_NODE (e.g. in hi there is -// element with name="title", irrelevant content and one child (wxXML_TEXT_NODE -// with content="hi"). -// -// If wxUSE_UNICODE is 0, all strings are encoded in UTF-8 encoding (same as -// ASCII for characters 0-127). You can use wxMBConvUTF8 to convert then to -// desired encoding: -// -// wxCSConv myConv("iso8859-2"); -// wxString s(cMB2WC(node->GetContent().c_str()), myConv); - -class WXXMLDLLEXPORT wxXmlNode -{ -public: - wxXmlNode() : m_properties(NULL), m_parent(NULL), - m_children(NULL), m_next(NULL) {} - wxXmlNode(wxXmlNode *parent,wxXmlNodeType type, - const wxString& name, const wxString& content, - wxXmlProperty *props, wxXmlNode *next); - ~wxXmlNode() { delete m_properties; delete m_next; delete m_children; } - - // copy ctor & operator=. Note that this does NOT copy syblings - // and parent pointer, i.e. m_parent and m_next will be NULL - // after using copy ctor and are never unmodified by operator=. - // On the other hand, it DOES copy children and properties. - wxXmlNode(const wxXmlNode& node); - wxXmlNode& operator=(const wxXmlNode& node); - - // user-friendly creation: - wxXmlNode(wxXmlNodeType type, const wxString& name, - const wxString& content = wxEmptyString); - void AddChild(wxXmlNode *child); - void InsertChild(wxXmlNode *child, wxXmlNode *before_node); - bool RemoveChild(wxXmlNode *child); - void AddProperty(const wxString& name, const wxString& value); - bool DeleteProperty(const wxString& name); - - // access methods: - wxXmlNodeType GetType() const { return m_type; } - wxString GetName() const { return m_name; } - wxString GetContent() const { return m_content; } - - wxXmlNode *GetParent() const { return m_parent; } - wxXmlNode *GetNext() const { return m_next; } - wxXmlNode *GetChildren() const { return m_children; } - - wxXmlProperty *GetProperties() const { return m_properties; } - bool GetPropVal(const wxString& propName, wxString *value) const; - wxString GetPropVal(const wxString& propName, - const wxString& defaultVal) const; - bool HasProp(const wxString& propName) const; - - void SetType(wxXmlNodeType type) { m_type = type; } - void SetName(const wxString& name) { m_name = name; } - void SetContent(const wxString& con) { m_content = con; } - - void SetParent(wxXmlNode *parent) { m_parent = parent; } - void SetNext(wxXmlNode *next) { m_next = next; } - void SetChildren(wxXmlNode *child) { m_children = child; } - - void SetProperties(wxXmlProperty *prop) { m_properties = prop; } - void AddProperty(wxXmlProperty *prop); - -private: - wxXmlNodeType m_type; - wxString m_name; - wxString m_content; - wxXmlProperty *m_properties; - wxXmlNode *m_parent, *m_children, *m_next; - - void DoCopy(const wxXmlNode& node); -}; - - - - - - - -// This class holds XML data/document as parsed by libxml. Note that -// internal representation is independant on libxml and you can use -// it without libxml (see Load/SaveBinary). - -class WXXMLDLLEXPORT wxXmlDocument : public wxObject -{ -public: - wxXmlDocument() : wxObject(), m_version(wxT("1.0")), m_root(NULL) {} - wxXmlDocument(const wxString& filename, - wxXmlIOType io_type = wxXML_IO_AUTO); - wxXmlDocument(wxInputStream& stream, - wxXmlIOType io_type = wxXML_IO_AUTO); - ~wxXmlDocument() { delete m_root; } - - wxXmlDocument(const wxXmlDocument& doc); - wxXmlDocument& operator=(const wxXmlDocument& doc); - - // Parses .xml file and loads data. Returns TRUE on success, FALSE - // otherwise. - // NOTE: Any call to this method will result into linking against libxml - // and app's binary size will grow by ca. 250kB - bool Load(const wxString& filename, wxXmlIOType io_type = wxXML_IO_AUTO); - bool Load(wxInputStream& stream, wxXmlIOType io_type = wxXML_IO_AUTO); - - // Saves document as .xml file. - bool Save(const wxString& filename, - wxXmlIOType io_type = wxXML_IO_TEXT_OUTPUT) const; - bool Save(wxOutputStream& stream, - wxXmlIOType io_type = wxXML_IO_TEXT_OUTPUT) const; - - bool IsOk() const { return m_root != NULL; } - - // Returns root node of the document. - wxXmlNode *GetRoot() const { return m_root; } - - // Returns version of document (may be empty). - wxString GetVersion() const { return m_version; } - // Returns encoding of document (may be empty). - // Note: this is the encoding original fail was saved in, *not* the - // encoding of in-memory representation! Data in wxXmlNode are always - // stored in wchar_t (in Unicode build) or UTF-8 encoded - // (if wxUSE_UNICODE is 0). - wxString GetEncoding() const { return m_encoding; } - - // Write-access methods: - void SetRoot(wxXmlNode *node) { delete m_root ; m_root = node; } - void SetVersion(const wxString& version) { m_version = version; } - void SetEncoding(const wxString& encoding) { m_encoding = encoding; } - - static void AddHandler(wxXmlIOHandler *handler); - static void CleanUpHandlers(); - static void InitStandardHandlers(); - -protected: - static wxList *sm_handlers; - -private: - wxString m_version, m_encoding; - wxXmlNode *m_root; - - void DoCopy(const wxXmlDocument& doc); -}; - - - -// wxXmlIOHandler takes care of loading and/or saving XML data. -// see xmlio.h for available handlers - -class WXXMLDLLEXPORT wxXmlIOHandler : public wxObject -{ - public: - wxXmlIOHandler() {} - - virtual wxXmlIOType GetType() = 0; - virtual bool CanLoad(wxInputStream& stream) = 0; - virtual bool CanSave() = 0; - - virtual bool Load(wxInputStream& stream, wxXmlDocument& doc) = 0; - virtual bool Save(wxOutputStream& stream, const wxXmlDocument& doc) = 0; -}; - - - -void wxXmlInitXmlModule(); - -#endif // _WX_XML_H_ diff --git a/contrib/include/wx/xml/xmlio.h b/contrib/include/wx/xml/xmlio.h deleted file mode 100644 index a38e8a54c5..0000000000 --- a/contrib/include/wx/xml/xmlio.h +++ /dev/null @@ -1,83 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: xmlio.h -// Purpose: wxXmlIOHandler - XML I/O classes -// Author: Vaclav Slavik -// Created: 2000/07/24 -// RCS-ID: $Id$ -// Copyright: (c) 2000 Vaclav Slavik -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_XMLIO_H_ -#define _WX_XMLIO_H_ - -#ifdef __GNUG__ -#pragma interface "xmlio.h" -#endif - -#include "wx/defs.h" -#include "wx/string.h" -#include "wx/xml/xml.h" - - -class WXXMLDLLEXPORT wxXmlIOHandlerExpat : public wxXmlIOHandler -{ -public: - virtual wxXmlIOType GetType() { return wxXML_IO_EXPAT; } - virtual bool CanLoad(wxInputStream& stream); - virtual bool CanSave() { return FALSE; } - - virtual bool Load(wxInputStream& stream, wxXmlDocument& doc); - virtual bool Save(wxOutputStream& stream, const wxXmlDocument& doc) { (void)stream; (void)doc; return FALSE; } -}; - - -class WXXMLDLLEXPORT wxXmlIOHandlerWriter : public wxXmlIOHandler -{ -public: - virtual wxXmlIOType GetType() { return wxXML_IO_TEXT_OUTPUT; } - virtual bool CanLoad(wxInputStream& stream) { (void)stream; return FALSE; } - virtual bool CanSave() { return TRUE; } - - virtual bool Load(wxInputStream& stream, wxXmlDocument& doc) { (void)stream; (void)doc; return FALSE; } - virtual bool Save(wxOutputStream& stream, const wxXmlDocument& doc); -}; - - -class WXXMLDLLEXPORT wxXmlIOHandlerBin : public wxXmlIOHandler -{ -public: - wxXmlIOHandlerBin() {} - - virtual wxXmlIOType GetType() { return wxXML_IO_BIN; } - virtual bool CanLoad(wxInputStream& stream); - virtual bool CanSave() { return TRUE; } - - virtual bool Load(wxInputStream& stream, wxXmlDocument& doc); - virtual bool Save(wxOutputStream& stream, const wxXmlDocument& doc); - -protected: - wxString ReadHeader(wxInputStream& stream); - void WriteHeader(wxOutputStream& stream, const wxString& header); -}; - - - -#if wxUSE_ZLIB - -class WXXMLDLLEXPORT wxXmlIOHandlerBinZ : public wxXmlIOHandlerBin -{ -public: - wxXmlIOHandlerBinZ() {} - - virtual wxXmlIOType GetType() { return wxXML_IO_BINZ; } - virtual bool CanLoad(wxInputStream& stream); - - virtual bool Load(wxInputStream& stream, wxXmlDocument& doc); - virtual bool Save(wxOutputStream& stream, const wxXmlDocument& doc); -}; - -#endif - - -#endif // _WX_XMLIO_H_ diff --git a/contrib/include/wx/xml/xmlres.h b/contrib/include/wx/xml/xmlres.h deleted file mode 100644 index 172de3007f..0000000000 --- a/contrib/include/wx/xml/xmlres.h +++ /dev/null @@ -1,358 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: xmlres.h -// Purpose: XML resources -// Author: Vaclav Slavik -// Created: 2000/03/05 -// RCS-ID: $Id$ -// Copyright: (c) 2000 Vaclav Slavik -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_XMLRES_H_ -#define _WX_XMLRES_H_ - -#ifdef __GNUG__ -#pragma interface "xmlres.h" -#endif - -#include "wx/defs.h" -#include "wx/string.h" -#include "wx/dynarray.h" -#include "wx/datetime.h" -#include "wx/list.h" -#include "wx/gdicmn.h" -#include "wx/filesys.h" -#include "wx/bitmap.h" -#include "wx/icon.h" - -#include "wx/xml/xml.h" - -class WXDLLEXPORT wxMenu; -class WXDLLEXPORT wxMenuBar; -class WXDLLEXPORT wxDialog; -class WXDLLEXPORT wxPanel; -class WXDLLEXPORT wxWindow; -class WXDLLEXPORT wxFrame; -class WXDLLEXPORT wxToolBar; - -class WXXMLDLLEXPORT wxXmlResourceHandler; - - -// These macros indicate current version of XML resources (this information is -// encoded in root node of XRC file as "version" property). -// -// Rules for increasing version number: -// - change it only if you made incompatible change to the format. Addition of new -// attribute to control handler is _not_ incompatible change, because older -// versions of the library may ignore it. -// - if you change version number, follow these steps: -// - set major, minor and release numbers to respective version numbers of -// the wxWindows library (see wx/version.h) -// - reset revision to 0 unless the first three are same as before, in which -// case you should increase revision by one -#define WX_XMLRES_CURRENT_VERSION_MAJOR 2 -#define WX_XMLRES_CURRENT_VERSION_MINOR 3 -#define WX_XMLRES_CURRENT_VERSION_RELEASE 0 -#define WX_XMLRES_CURRENT_VERSION_REVISION 1 -#define WX_XMLRES_CURRENT_VERSION_STRING "2.3.0.1" - -#define WX_XMLRES_CURRENT_VERSION \ - (WX_XMLRES_CURRENT_VERSION_MAJOR * 256*256*256 + \ - WX_XMLRES_CURRENT_VERSION_MINOR * 256*256 + \ - WX_XMLRES_CURRENT_VERSION_RELEASE * 256 + \ - WX_XMLRES_CURRENT_VERSION_REVISION) - -class WXXMLDLLEXPORT wxXmlResourceDataRecord -{ -public: - wxXmlResourceDataRecord() : Doc(NULL), Time(wxDateTime::Now()) {} - ~wxXmlResourceDataRecord() {delete Doc;} - - wxString File; - wxXmlDocument *Doc; - wxDateTime Time; -}; - - -#ifdef WXXMLISDLL -WX_DECLARE_EXPORTED_OBJARRAY(wxXmlResourceDataRecord, wxXmlResourceDataRecords); -#else -WX_DECLARE_OBJARRAY(wxXmlResourceDataRecord, wxXmlResourceDataRecords); -#endif - - -// This class holds XML resources from one or more .xml files -// (or derived forms, either binary or zipped -- see manual for -// details). - -class WXXMLDLLEXPORT wxXmlResource : public wxObject -{ -public: - // Ctor. If use_locale is TRUE, translatable strings are - // translated via _(). You can disable it by passing use_locale=FALSE - // (for example if you provide resource file for each locale) - wxXmlResource(bool use_locale = TRUE); - wxXmlResource(const wxString& filemask, bool use_locale = TRUE); - ~wxXmlResource(); - - // Loads resources from XML files that match given filemask. - // This method understands VFS (see filesys.h). - bool Load(const wxString& filemask); - - // Initialize handlers for all supported controls/windows. This will - // make the executable quite big because it forces linking against - // most of wxWin library - void InitAllHandlers(); - - // Initialize only specific handler (or custom handler). Convention says - // that handler name is equal to control's name plus 'XmlHandler', e.g. - // wxTextCtrlXmlHandler, wxHtmlWindowXmlHandler. XML resource compiler - // (xmlres) can create include file that contains initialization code for - // all controls used within the resource. - void AddHandler(wxXmlResourceHandler *handler); - - // Removes all handlers - void ClearHandlers(); - - // Loads menu from resource. Returns NULL on failure. - wxMenu *LoadMenu(const wxString& name); - - // Loads menubar from resource. Returns NULL on failure. - wxMenuBar *LoadMenuBar(const wxString& name); - -#if wxUSE_TOOLBAR - // Loads toolbar - wxToolBar *LoadToolBar(wxWindow *parent, const wxString& name); -#endif - - // Loads dialog. dlg points to parent window (if any). Second form - // is used to finish creation of already existing instance (main reason - // for this is that you may want to use derived class with new event table) - // Example (typical usage): - // MyDialog dlg; - // wxTheXmlResource->LoadDialog(&dlg, mainFrame, "my_dialog"); - // dlg->ShowModal(); - wxDialog *LoadDialog(wxWindow *parent, const wxString& name); - bool LoadDialog(wxDialog *dlg, wxWindow *parent, const wxString& name); - - // Loads panel. panel points to parent window (if any). Second form - // is used to finish creation of already existing instance. - wxPanel *LoadPanel(wxWindow *parent, const wxString& name); - bool LoadPanel(wxPanel *panel, wxWindow *parent, const wxString& name); - - bool LoadFrame(wxFrame* frame, wxWindow *parent, const wxString& name); - - // Loads bitmap or icon resource from file: - wxBitmap LoadBitmap(const wxString& name); - wxIcon LoadIcon(const wxString& name); - - // Attaches unknown control into given panel/window/dialog: - // (unknown controls are used in conjunction with ) - bool AttachUnknownControl(const wxString& name, wxWindow *control, - wxWindow *parent = NULL); - - // Returns numeric ID that is equivalent to string id used in XML - // resource. To be used in event tables - // Macro XMLID is provided for convenience - static int GetXMLID(const char *str_id); - - // Returns version info (a.b.c.d = d+ 256*c + 256^2*b + 256^3*a) - long GetVersion() const { return m_version; } - - // Compares resources version to argument. Returns -1 if resources version - // is less than the argument, +1 if greater and 0 if they equal. - int CompareVersion(int major, int minor, int release, int revision) const - { return GetVersion() - - (major*256*256*256 + minor*256*256 + release*256 + revision); } - -protected: - // Scans resources list for unloaded files and loads them. Also reloads - // files that have been modified since last loading. - void UpdateResources(); - - // Finds resource (calls UpdateResources) and returns node containing it - wxXmlNode *FindResource(const wxString& name, const wxString& classname); - - // Creates resource from info in given node: - wxObject *CreateResFromNode(wxXmlNode *node, wxObject *parent, wxObject *instance = NULL); - - // Remove nodes with property "platform" that does not - // match current platform - void ProcessPlatformProperty(wxXmlNode *node); - - bool GetUseLocale() { return m_useLocale; } - -private: - long m_version; - - bool m_useLocale; - wxList m_handlers; - wxXmlResourceDataRecords m_data; -#if wxUSE_FILESYSTEM - wxFileSystem m_curFileSystem; - wxFileSystem& GetCurFileSystem() { return m_curFileSystem; } -#endif - - friend class wxXmlResourceHandler; -}; - - -// Global instance of resource class. For your convenience. -extern wxXmlResource *wxTheXmlResource; - -// This macro translates string identifier (as used in XML resource, -// e.g. ...) to integer id that is needed by -// wxWindows event tables. -// Example: -// BEGIN_EVENT_TABLE(MyFrame, wxFrame) -// EVT_MENU(XMLID("quit"), MyFrame::OnQuit) -// EVT_MENU(XMLID("about"), MyFrame::OnAbout) -// EVT_MENU(XMLID("new"), MyFrame::OnNew) -// EVT_MENU(XMLID("open"), MyFrame::OnOpen) -// END_EVENT_TABLE() - -#define XMLID(str_id) \ - wxXmlResource::GetXMLID(wxT(str_id)) - - -// This macro returns pointer to particular control in dialog -// created using XML resources. You can use it to set/get values from -// controls. -// Example: -// wxDialog dlg; -// wxTheXmlResource->LoadDialog(&dlg, mainFrame, "my_dialog"); -// XMLCTRL(dlg, "my_textctrl", wxTextCtrl)->SetValue(wxT("default value")); - -#ifdef __WXDEBUG__ -#define XMLCTRL(window, id, type) \ - (wxDynamicCast((window).FindWindow(XMLID(id)), type)) -#else -#define XMLCTRL(window, id, type) \ - ((type*)((window).FindWindow(XMLID(id)))) -#endif - - -class WXXMLDLLEXPORT wxXmlResourceHandler : public wxObject -{ -public: - wxXmlResourceHandler(); - virtual ~wxXmlResourceHandler() {} - - // Creates object (menu, dialog, control, ...) from XML node. - // Should check for validity. - // parent is higher-level object (usually window, dialog or panel) - // that is often neccessary to create resource - // if instance != NULL it should not create new instance via 'new' but - // rather use this one and call its Create method - wxObject *CreateResource(wxXmlNode *node, wxObject *parent, - wxObject *instance); - - // This one is called from CreateResource after variables - // were filled - virtual wxObject *DoCreateResource() = 0; - - // Returns TRUE if it understands this node and can create - // resource from it, FALSE otherwise. - virtual bool CanHandle(wxXmlNode *node) = 0; - - void SetParentResource(wxXmlResource *res) { m_resource = res; } - - -protected: - - wxXmlResource *m_resource; - wxArrayString m_styleNames; - wxArrayInt m_styleValues; - - // Variables (filled by CreateResource) - wxXmlNode *m_node; - wxString m_class; - wxObject *m_parent, *m_instance; - wxWindow *m_parentAsWindow, *m_instanceAsWindow; - - // --- Handy methods: - - // Returns true if the node has property class equal to classname, - // e.g. - bool IsOfClass(wxXmlNode *node, const wxString& classname) - { return node->GetPropVal(wxT("class"), wxEmptyString) == classname; } - - // Gets node content from wxXML_ENTITY_NODE - // (the problem is, content is represented as - // wxXML_ENTITY_NODE name="tag", content="" - // |-- wxXML_TEXT_NODE or - // wxXML_CDATA_SECTION_NODE name="" content="content" - wxString GetNodeContent(wxXmlNode *node); - - // Check to see if a param exists - bool HasParam(const wxString& param); - - // Finds the node or returns NULL - wxXmlNode *GetParamNode(const wxString& param); - wxString GetParamValue(const wxString& param); - - // Add style flag (e.g. wxMB_DOCKABLE) to list of flags - // understood by this handler - void AddStyle(const wxString& name, int value); - - // Add styles common to all wxWindow-derived classes - void AddWindowStyles(); - - // Gets style flags from text in form "flag | flag2| flag3 |..." - // Only understads flags added with AddStyle - int GetStyle(const wxString& param = wxT("style"), int defaults = 0); - - // Gets text from param and does some convertions: - // - replaces \n, \r, \t by respective chars (according to C syntax) - // - replaces $ by & and $$ by $ (needed for $File => &File because of XML) - // - calls wxGetTranslations (unless disabled in wxXmlResource) - wxString GetText(const wxString& param); - - // Return XMLID - int GetID(); - wxString GetName(); - - // Get bool flag (1,t,yes,on,true are TRUE, everything else is FALSE) - bool GetBool(const wxString& param, bool defaultv = FALSE); - - // Get integer value from param - long GetLong( const wxString& param, long defaultv = 0 ); - - // Get colour in HTML syntax (#RRGGBB) - wxColour GetColour(const wxString& param); - - // Get size/position (may be in dlg units): - wxSize GetSize(const wxString& param = wxT("size")); - wxPoint GetPosition(const wxString& param = wxT("pos")); - - // Get dimension (may be in dlg units): - wxCoord GetDimension(const wxString& param, wxCoord defaultv = 0); - - // Get bitmap: - wxBitmap GetBitmap(const wxString& param = wxT("bitmap"), - wxSize size = wxDefaultSize); - wxIcon GetIcon(const wxString& param = wxT("icon"), - wxSize size = wxDefaultSize); - - // Get font: - wxFont GetFont(const wxString& param = wxT("font")); - - // Sets common window options: - void SetupWindow(wxWindow *wnd); - - void CreateChildren(wxObject *parent, bool this_hnd_only = FALSE); - void CreateChildrenPrivately(wxObject *parent, wxXmlNode *rootnode = NULL); - wxObject *CreateResFromNode(wxXmlNode *node, - wxObject *parent, wxObject *instance = NULL) - { return m_resource->CreateResFromNode(node, parent, instance); } - - // helper - wxFileSystem& GetCurFileSystem() { return m_resource->GetCurFileSystem(); } -}; - -#define ADD_STYLE(style) AddStyle(wxT(#style), style) - - -void wxXmlInitResourceModule(); - -#endif // _WX_XMLRES_H_ diff --git a/contrib/include/wx/xrc/xh_all.h b/contrib/include/wx/xrc/xh_all.h new file mode 100644 index 0000000000..3abb40c2c6 --- /dev/null +++ b/contrib/include/wx/xrc/xh_all.h @@ -0,0 +1,49 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xh_all.h +// Purpose: includes all xh_*.h files +// Author: Vaclav Slavik +// Created: 2000/03/05 +// RCS-ID: $Id$ +// Copyright: (c) 2000 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_ALL_H_ +#define _WX_XH_ALL_H_ + + +// Existing handlers: + +#include "wx/xrc/xh_menu.h" +#include "wx/xrc/xh_panel.h" +#include "wx/xrc/xh_dlg.h" +#include "wx/xrc/xh_bttn.h" +#include "wx/xrc/xh_chckb.h" +#include "wx/xrc/xh_gauge.h" +#include "wx/xrc/xh_html.h" +#include "wx/xrc/xh_spin.h" +#include "wx/xrc/xh_sttxt.h" +#include "wx/xrc/xh_slidr.h" +#include "wx/xrc/xh_radbt.h" +#include "wx/xrc/xh_radbx.h" +#include "wx/xrc/xh_combo.h" +#include "wx/xrc/xh_chckl.h" +#include "wx/xrc/xh_choic.h" +#include "wx/xrc/xh_sizer.h" +#include "wx/xrc/xh_stbmp.h" +#include "wx/xrc/xh_notbk.h" +#include "wx/xrc/xh_text.h" +#include "wx/xrc/xh_listb.h" +#include "wx/xrc/xh_toolb.h" +#include "wx/xrc/xh_bmpbt.h" +#include "wx/xrc/xh_stbox.h" +#include "wx/xrc/xh_scrol.h" +#include "wx/xrc/xh_tree.h" +#include "wx/xrc/xh_cald.h" +#include "wx/xrc/xh_listc.h" +#include "wx/xrc/xh_stlin.h" +#include "wx/xrc/xh_bmp.h" +#include "wx/xrc/xh_unkwn.h" +#include "wx/xrc/xh_frame.h" + +#endif // _WX_XMLRES_H_ diff --git a/contrib/include/wx/xrc/xh_bmp.h b/contrib/include/wx/xrc/xh_bmp.h new file mode 100644 index 0000000000..9867f1041a --- /dev/null +++ b/contrib/include/wx/xrc/xh_bmp.h @@ -0,0 +1,38 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xh_bmp.h +// Purpose: XML resource handler for wxBitmap and wxIcon +// Author: Vaclav Slavik +// Created: 2000/09/00 +// RCS-ID: $Id$ +// Copyright: (c) 2000 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_BMP_H_ +#define _WX_XH_BMP_H_ + +#ifdef __GNUG__ +#pragma interface "xh_bmp.h" +#endif + +#include "wx/xrc/xmlres.h" + + +class WXXMLDLLEXPORT wxBitmapXmlHandler : public wxXmlResourceHandler +{ +public: + wxBitmapXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + +class WXXMLDLLEXPORT wxIconXmlHandler : public wxXmlResourceHandler +{ +public: + wxIconXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + + +#endif // _WX_XH_BMP_H_ diff --git a/contrib/include/wx/xrc/xh_bmpbt.h b/contrib/include/wx/xrc/xh_bmpbt.h new file mode 100644 index 0000000000..7927585a2d --- /dev/null +++ b/contrib/include/wx/xrc/xh_bmpbt.h @@ -0,0 +1,30 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xh_bmpbt.h +// Purpose: XML resource handler for bitmap buttons +// Author: Brian Gavin +// Created: 2000/03/05 +// RCS-ID: $Id$ +// Copyright: (c) 2000 Brian Gavin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_BMPBT_H_ +#define _WX_XH_BMPBT_H_ + +#ifdef __GNUG__ +#pragma interface "xh_bmpbt.h" +#endif + +#include "wx/xrc/xmlres.h" + + +class WXXMLDLLEXPORT wxBitmapButtonXmlHandler : public wxXmlResourceHandler +{ +public: + wxBitmapButtonXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + + +#endif // _WX_XH_BMPBT_H_ diff --git a/contrib/include/wx/xrc/xh_bttn.h b/contrib/include/wx/xrc/xh_bttn.h new file mode 100644 index 0000000000..c6c89c34a1 --- /dev/null +++ b/contrib/include/wx/xrc/xh_bttn.h @@ -0,0 +1,29 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xh_bttn.h +// Purpose: XML resource handler for buttons +// Author: Vaclav Slavik +// Created: 2000/03/05 +// RCS-ID: $Id$ +// Copyright: (c) 2000 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_BTTN_H_ +#define _WX_XH_BTTN_H_ + +#ifdef __GNUG__ +#pragma interface "xh_bttn.h" +#endif + +#include "wx/xrc/xmlres.h" + +class WXXMLDLLEXPORT wxButtonXmlHandler : public wxXmlResourceHandler +{ +public: + wxButtonXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + + +#endif // _WX_XH_BTTN_H_ diff --git a/contrib/include/wx/xrc/xh_cald.h b/contrib/include/wx/xrc/xh_cald.h new file mode 100644 index 0000000000..51d0cdab9f --- /dev/null +++ b/contrib/include/wx/xrc/xh_cald.h @@ -0,0 +1,29 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xh_cald.h +// Purpose: XML resource handler for wxCalendarCtrl +// Author: Brian Gavin +// Created: 2000/09/09 +// RCS-ID: $Id$ +// Copyright: (c) 2000 Brian Gavin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_CALD_H_ +#define _WX_XH_CALD_H_ + +#ifdef __GNUG__ +#pragma interface "xh_cald.h" +#endif + +#include "wx/xrc/xmlres.h" + +class WXXMLDLLEXPORT wxCalendarCtrlXmlHandler : public wxXmlResourceHandler +{ +public: + wxCalendarCtrlXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + + +#endif // _WX_XH_CALD_H_ diff --git a/contrib/include/wx/xrc/xh_chckb.h b/contrib/include/wx/xrc/xh_chckb.h new file mode 100644 index 0000000000..07794b7eb0 --- /dev/null +++ b/contrib/include/wx/xrc/xh_chckb.h @@ -0,0 +1,35 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xh_chckb.h +// Purpose: XML resource handler for wxCheckBox +// Author: Bob Mitchell +// Created: 2000/03/21 +// RCS-ID: $Id$ +// Copyright: (c) 2000 Bob Mitchell and Verant Interactive +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_CHCKB_H_ +#define _WX_XH_CHCKB_H_ + +#ifdef __GNUG__ +#pragma interface "xh_chckb.h" +#endif + +#include "wx/xrc/xmlres.h" +#include "wx/defs.h" + +#if wxUSE_CHECKBOX + +class WXXMLDLLEXPORT wxCheckBoxXmlHandler : public wxXmlResourceHandler +{ +public: + wxCheckBoxXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + +#endif + + +#endif // _WX_XH_CHECKBOX_H_ + diff --git a/contrib/include/wx/xrc/xh_chckl.h b/contrib/include/wx/xrc/xh_chckl.h new file mode 100644 index 0000000000..30247ccf87 --- /dev/null +++ b/contrib/include/wx/xrc/xh_chckl.h @@ -0,0 +1,33 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xh_chckl.h +// Purpose: XML resource handler for wxCheckListBox +// Author: Bob Mitchell +// Created: 2000/03/21 +// RCS-ID: $Id$ +// Copyright: (c) 2000 Bob Mitchell and Verant Interactive +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_CHCKL_H_ +#define _WX_XH_CHCKL_H_ + +#ifdef __GNUG__ +#pragma interface "xh_chckl.h" +#endif + +#include "wx/xrc/xmlres.h" + +class WXXMLDLLEXPORT wxCheckListXmlHandler : public wxXmlResourceHandler +{ +public: + wxCheckListXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +private: + bool m_insideBox; + wxArrayString strList; +}; + + + +#endif // _WX_XH_CHECKLIST_H_ diff --git a/contrib/include/wx/xrc/xh_choic.h b/contrib/include/wx/xrc/xh_choic.h new file mode 100644 index 0000000000..d2387781c5 --- /dev/null +++ b/contrib/include/wx/xrc/xh_choic.h @@ -0,0 +1,32 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xh_choic.h +// Purpose: XML resource handler for wxChoice +// Author: Bob Mitchell +// Created: 2000/03/21 +// RCS-ID: $Id$ +// Copyright: (c) 2000 Bob Mitchell and Verant Interactive +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_CHOIC_H_ +#define _WX_XH_CHOIC_H_ + +#ifdef __GNUG__ +#pragma interface "xh_choic.h" +#endif + +#include "wx/xrc/xmlres.h" + +class WXXMLDLLEXPORT wxChoiceXmlHandler : public wxXmlResourceHandler +{ +public: + wxChoiceXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +private: + bool m_insideBox; + wxArrayString strList; +}; + + +#endif // _WX_XH_CHOIC_H_ diff --git a/contrib/include/wx/xrc/xh_combo.h b/contrib/include/wx/xrc/xh_combo.h new file mode 100644 index 0000000000..2128d953b5 --- /dev/null +++ b/contrib/include/wx/xrc/xh_combo.h @@ -0,0 +1,35 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xh_combo.h +// Purpose: XML resource handler for wxComboBox +// Author: Bob Mitchell +// Created: 2000/03/21 +// RCS-ID: $Id$ +// Copyright: (c) 2000 Bob Mitchell and Verant Interactive +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_COMBO_H_ +#define _WX_XH_COMBO_H_ + +#ifdef __GNUG__ +#pragma interface "xh_combo.h" +#endif + +#include "wx/xrc/xmlres.h" + +#if wxUSE_COMBOBOX + +class WXXMLDLLEXPORT wxComboBoxXmlHandler : public wxXmlResourceHandler +{ +public: + wxComboBoxXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +private: + bool m_insideBox; + wxArrayString strList; +}; + +#endif + +#endif // _WX_XH_COMBO_H_ diff --git a/contrib/include/wx/xrc/xh_dlg.h b/contrib/include/wx/xrc/xh_dlg.h new file mode 100644 index 0000000000..3fd4d51076 --- /dev/null +++ b/contrib/include/wx/xrc/xh_dlg.h @@ -0,0 +1,29 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xh_dlg.h +// Purpose: XML resource handler for dialogs +// Author: Vaclav Slavik +// Created: 2000/03/05 +// RCS-ID: $Id$ +// Copyright: (c) 2000 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_DLG_H_ +#define _WX_XH_DLG_H_ + +#ifdef __GNUG__ +#pragma interface "xh_dlg.h" +#endif + +#include "wx/xrc/xmlres.h" + +class WXXMLDLLEXPORT wxDialogXmlHandler : public wxXmlResourceHandler +{ +public: + wxDialogXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + + +#endif // _WX_XH_DLG_H_ diff --git a/contrib/include/wx/xrc/xh_frame.h b/contrib/include/wx/xrc/xh_frame.h new file mode 100644 index 0000000000..47e203114c --- /dev/null +++ b/contrib/include/wx/xrc/xh_frame.h @@ -0,0 +1,29 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xh_frame.h +// Purpose: XML resource handler for dialogs +// Author: Vaclav Slavik & Aleks. +// Created: 2000/03/05 +// RCS-ID: $Id$ +// Copyright: (c) 2000 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_FRAME_H_ +#define _WX_XH_FRAME_H_ + +#ifdef __GNUG__ +#pragma interface "xh_frame.h" +#endif + +#include "wx/xrc/xmlres.h" + +class WXXMLDLLEXPORT wxFrameXmlHandler : public wxXmlResourceHandler +{ +public: + wxFrameXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + + +#endif // _WX_XH_FRAME_H_ diff --git a/contrib/include/wx/xrc/xh_gauge.h b/contrib/include/wx/xrc/xh_gauge.h new file mode 100644 index 0000000000..9c2a94017d --- /dev/null +++ b/contrib/include/wx/xrc/xh_gauge.h @@ -0,0 +1,40 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xh_gauge.h +// Purpose: XML resource handler for wxGauge +// Author: Bob Mitchell +// Created: 2000/03/21 +// RCS-ID: $Id$ +// Copyright: (c) 2000 Bob Mitchell and Verant Interactive +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_GAUGE_H_ +#define _WX_XH_GAUGE_H_ + +#ifdef __GNUG__ +#pragma interface "xh_gauge.h" +#endif + +#include "wx/defs.h" + +#if wxUSE_GAUGE + +#include "wx/xrc/xmlres.h" + + +class WXXMLDLLEXPORT wxGaugeXmlHandler : public wxXmlResourceHandler +{ + enum + { + wxGAUGE_DEFAULT_RANGE = 100 + }; + +public: + wxGaugeXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + +#endif + +#endif // _WX_XH_GAUGE_H_ diff --git a/contrib/include/wx/xrc/xh_html.h b/contrib/include/wx/xrc/xh_html.h new file mode 100644 index 0000000000..daaa93dcc7 --- /dev/null +++ b/contrib/include/wx/xrc/xh_html.h @@ -0,0 +1,34 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xh_html.h +// Purpose: XML resource handler for wxHtmlWindow +// Author: Bob Mitchell +// Created: 2000/03/21 +// RCS-ID: $Id$ +// Copyright: (c) 2000 Bob Mitchell and Verant Interactive +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_HTML_H_ +#define _WX_XH_HTML_H_ + +#ifdef __GNUG__ +#pragma interface "xh_html.h" +#endif + +#include "wx/xrc/xmlres.h" + +#include "wx/defs.h" + +#if wxUSE_HTML + +class WXXMLDLLEXPORT wxHtmlWindowXmlHandler : public wxXmlResourceHandler +{ +public: + wxHtmlWindowXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + +#endif + +#endif // _WX_XH_SLIDER_H_ diff --git a/contrib/include/wx/xrc/xh_listb.h b/contrib/include/wx/xrc/xh_listb.h new file mode 100644 index 0000000000..c080442c8b --- /dev/null +++ b/contrib/include/wx/xrc/xh_listb.h @@ -0,0 +1,35 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xh_listb.h +// Purpose: XML resource handler for wxListbox +// Author: Bob Mitchell & Vaclav Slavik +// Created: 2000/07/29 +// RCS-ID: $Id$ +// Copyright: (c) 2000 Bob Mitchell & Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_LISTB_H_ +#define _WX_XH_LISTB_H_ + +#ifdef __GNUG__ +#pragma interface "xh_listb.h" +#endif + +#include "wx/xrc/xmlres.h" + +#if wxUSE_LISTBOX + +class WXXMLDLLEXPORT wxListBoxXmlHandler : public wxXmlResourceHandler +{ +public: + wxListBoxXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +private: + bool m_insideBox; + wxArrayString strList; +}; + +#endif + +#endif // _WX_XH_LISTB_H_ diff --git a/contrib/include/wx/xrc/xh_listc.h b/contrib/include/wx/xrc/xh_listc.h new file mode 100644 index 0000000000..8bd27632b1 --- /dev/null +++ b/contrib/include/wx/xrc/xh_listc.h @@ -0,0 +1,29 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xh_listc.h +// Purpose: XML resource handler for wxCalendarCtrl +// Author: Brian Gavin +// Created: 2000/09/09 +// RCS-ID: $Id$ +// Copyright: (c) 2000 Brian Gavin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_LISTC_H_ +#define _WX_XH_LISTC_H_ + +#ifdef __GNUG__ +#pragma interface "xh_listc.h" +#endif + +#include "wx/xrc/xmlres.h" + +class WXXMLDLLEXPORT wxListCtrlXmlHandler : public wxXmlResourceHandler +{ +public: + wxListCtrlXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + + +#endif // _WX_XH_LISTC_H_ diff --git a/contrib/include/wx/xrc/xh_menu.h b/contrib/include/wx/xrc/xh_menu.h new file mode 100644 index 0000000000..3ba54e86a6 --- /dev/null +++ b/contrib/include/wx/xrc/xh_menu.h @@ -0,0 +1,40 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xh_menu.h +// Purpose: XML resource handler for menus/menubars +// Author: Vaclav Slavik +// Created: 2000/03/05 +// RCS-ID: $Id$ +// Copyright: (c) 2000 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_MENU_H_ +#define _WX_XH_MENU_H_ + +#ifdef __GNUG__ +#pragma interface "xh_menu.h" +#endif + +#include "wx/xrc/xmlres.h" + +class WXXMLDLLEXPORT wxMenuXmlHandler : public wxXmlResourceHandler +{ +public: + wxMenuXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); + +private: + bool m_insideMenu; +}; + +class WXXMLDLLEXPORT wxMenuBarXmlHandler : public wxXmlResourceHandler +{ + public: + wxMenuBarXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + + +#endif // _WX_XH_MENU_H_ diff --git a/contrib/include/wx/xrc/xh_notbk.h b/contrib/include/wx/xrc/xh_notbk.h new file mode 100644 index 0000000000..bd066d32d5 --- /dev/null +++ b/contrib/include/wx/xrc/xh_notbk.h @@ -0,0 +1,37 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xh_notbk.h +// Purpose: XML resource handler for wxNotebook +// Author: Vaclav Slavik +// RCS-ID: $Id$ +// Copyright: (c) 2000 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_NOTBK_H_ +#define _WX_XH_NOTBK_H_ + +#ifdef __GNUG__ +#pragma interface "xh_notbk.h" +#endif + +#include "wx/xrc/xmlres.h" + +#if wxUSE_NOTEBOOK + +class WXDLLEXPORT wxNotebook; + +class WXXMLDLLEXPORT wxNotebookXmlHandler : public wxXmlResourceHandler +{ +public: + wxNotebookXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); + +private: + bool m_isInside; + wxNotebook *m_notebook; +}; + +#endif + +#endif // _WX_XH_NOTBK_H_ diff --git a/contrib/include/wx/xrc/xh_panel.h b/contrib/include/wx/xrc/xh_panel.h new file mode 100644 index 0000000000..817e5ecc76 --- /dev/null +++ b/contrib/include/wx/xrc/xh_panel.h @@ -0,0 +1,29 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xh_panel.h +// Purpose: XML resource handler for panels +// Author: Vaclav Slavik +// Created: 2000/03/05 +// RCS-ID: $Id$ +// Copyright: (c) 2000 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_PANEL_H_ +#define _WX_XH_PANEL_H_ + +#ifdef __GNUG__ +#pragma interface "xh_panel.h" +#endif + +#include "wx/xrc/xmlres.h" + +class WXXMLDLLEXPORT wxPanelXmlHandler : public wxXmlResourceHandler +{ +public: + wxPanelXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + + +#endif // _WX_XH_PANEL_H_ diff --git a/contrib/include/wx/xrc/xh_radbt.h b/contrib/include/wx/xrc/xh_radbt.h new file mode 100644 index 0000000000..98dc3c9758 --- /dev/null +++ b/contrib/include/wx/xrc/xh_radbt.h @@ -0,0 +1,33 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xh_radbt.h +// Purpose: XML resource handler for radio buttons +// Author: Bob Mitchell +// Created: 2000/03/21 +// RCS-ID: $Id$ +// Copyright: (c) 2000 Bob Mitchell and Verant Interactive +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_RADBT_H_ +#define _WX_XH_RADBT_H_ + +#ifdef __GNUG__ +#pragma interface "xh_radbt.h" +#endif + +#include "wx/xrc/xmlres.h" +#include "wx/defs.h" + +#if wxUSE_RADIOBOX + +class WXXMLDLLEXPORT wxRadioButtonXmlHandler : public wxXmlResourceHandler +{ +public: + wxRadioButtonXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + +#endif + +#endif // _WX_XH_RADIOBUTTON_H_ diff --git a/contrib/include/wx/xrc/xh_radbx.h b/contrib/include/wx/xrc/xh_radbx.h new file mode 100644 index 0000000000..4edfd8b905 --- /dev/null +++ b/contrib/include/wx/xrc/xh_radbx.h @@ -0,0 +1,35 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xh_radbx.h +// Purpose: XML resource handler for radio box +// Author: Bob Mitchell +// Created: 2000/03/21 +// RCS-ID: $Id$ +// Copyright: (c) 2000 Bob Mitchell and Verant Interactive +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_RADBX_H_ +#define _WX_XH_RADBX_H_ + +#ifdef __GNUG__ +#pragma interface "xh_radbx.h" +#endif + +#include "wx/xrc/xmlres.h" + +#if wxUSE_RADIOBOX + +class WXXMLDLLEXPORT wxRadioBoxXmlHandler : public wxXmlResourceHandler +{ +public: + wxRadioBoxXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +private: + bool m_insideBox; + wxArrayString strList; +}; + +#endif + +#endif // _WX_XH_RADBX_H_ diff --git a/contrib/include/wx/xrc/xh_scrol.h b/contrib/include/wx/xrc/xh_scrol.h new file mode 100644 index 0000000000..d5a1f43788 --- /dev/null +++ b/contrib/include/wx/xrc/xh_scrol.h @@ -0,0 +1,39 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xh_scrol.h +// Purpose: XML resource handler for wxScrollBar +// Author: Brian Gavin +// Created: 2000/09/09 +// RCS-ID: $Id$ +// Copyright: (c) 2000 Brian Gavin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_SCROL_H_ +#define _WX_XH_SCROL_H_ + +#ifdef __GNUG__ +#pragma interface "xh_scrol.h" +#endif + +#include "wx/xrc/xmlres.h" +#include "wx/defs.h" + + + +class WXXMLDLLEXPORT wxScrollBarXmlHandler : public wxXmlResourceHandler +{ + enum + { + wxSL_DEFAULT_VALUE = 0, + wxSL_DEFAULT_MIN = 0, + wxSL_DEFAULT_MAX = 100 + }; + +public: + wxScrollBarXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + + +#endif // _WX_XH_SCROL_H_ diff --git a/contrib/include/wx/xrc/xh_sizer.h b/contrib/include/wx/xrc/xh_sizer.h new file mode 100644 index 0000000000..fb5cd23670 --- /dev/null +++ b/contrib/include/wx/xrc/xh_sizer.h @@ -0,0 +1,38 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xh_sizer.h +// Purpose: XML resource handler for wxBoxSizer +// Author: Vaclav Slavik +// Created: 2000/04/24 +// RCS-ID: $Id$ +// Copyright: (c) 2000 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_SIZER_H_ +#define _WX_XH_SIZER_H_ + +#ifdef __GNUG__ +#pragma interface "xh_sizer.h" +#endif + +#include "wx/xrc/xmlres.h" + + +class WXDLLEXPORT wxSizer; + +class WXXMLDLLEXPORT wxSizerXmlHandler : public wxXmlResourceHandler +{ +public: + wxSizerXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); + +private: + bool m_isInside; + wxSizer *m_parentSizer; + + bool IsSizerNode(wxXmlNode *node); +}; + + +#endif // _WX_XH_BOXSIZER_H_ diff --git a/contrib/include/wx/xrc/xh_slidr.h b/contrib/include/wx/xrc/xh_slidr.h new file mode 100644 index 0000000000..32fb738b7b --- /dev/null +++ b/contrib/include/wx/xrc/xh_slidr.h @@ -0,0 +1,40 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xh_slidr.h +// Purpose: XML resource handler for wxSlider +// Author: Bob Mitchell +// Created: 2000/03/21 +// RCS-ID: $Id$ +// Copyright: (c) 2000 Bob Mitchell and Verant Interactive +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_SLIDR_H_ +#define _WX_XH_SLIDR_H_ + +#ifdef __GNUG__ +#pragma interface "xh_slidr.h" +#endif + +#include "wx/xrc/xmlres.h" +#include "wx/defs.h" + +#if wxUSE_SLIDER + +class WXXMLDLLEXPORT wxSliderXmlHandler : public wxXmlResourceHandler +{ + enum + { + wxSL_DEFAULT_VALUE = 0, + wxSL_DEFAULT_MIN = 0, + wxSL_DEFAULT_MAX = 100 + }; + +public: + wxSliderXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + +#endif + +#endif // _WX_XH_SLIDER_H_ diff --git a/contrib/include/wx/xrc/xh_spin.h b/contrib/include/wx/xrc/xh_spin.h new file mode 100644 index 0000000000..9d44a0ffe9 --- /dev/null +++ b/contrib/include/wx/xrc/xh_spin.h @@ -0,0 +1,55 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xh_spin.h +// Purpose: XML resource handler for wxSpinButton +// Author: Bob Mitchell +// Created: 2000/03/21 +// RCS-ID: $Id$ +// Copyright: (c) 2000 Bob Mitchell and Verant Interactive +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_SPIN_H_ +#define _WX_XH_SPIN_H_ + +#ifdef __GNUG__ +#pragma interface "xh_spin.h" +#endif + +#include "wx/xrc/xmlres.h" +#include "wx/defs.h" + +#if wxUSE_SPINBTN +class WXXMLDLLEXPORT wxSpinButtonXmlHandler : public wxXmlResourceHandler +{ + enum + { + wxSP_DEFAULT_VALUE = 0, + wxSP_DEFAULT_MIN = 0, + wxSP_DEFAULT_MAX = 100 + }; + +public: + wxSpinButtonXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; +#endif + +#if wxUSE_SPINCTRL +class WXXMLDLLEXPORT wxSpinCtrlXmlHandler : public wxXmlResourceHandler +{ + enum + { + wxSP_DEFAULT_VALUE = 0, + wxSP_DEFAULT_MIN = 0, + wxSP_DEFAULT_MAX = 100 + }; + +public: + wxSpinCtrlXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; +#endif + +#endif // _WX_XH_SPIN_H_ diff --git a/contrib/include/wx/xrc/xh_stbmp.h b/contrib/include/wx/xrc/xh_stbmp.h new file mode 100644 index 0000000000..34493cfc8e --- /dev/null +++ b/contrib/include/wx/xrc/xh_stbmp.h @@ -0,0 +1,30 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xh_stbmp.h +// Purpose: XML resource handler for wxStaticBitmap +// Author: Vaclav Slavik +// Created: 2000/04/22 +// RCS-ID: $Id$ +// Copyright: (c) 2000 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_STBMP_H_ +#define _WX_XH_STBMP_H_ + +#ifdef __GNUG__ +#pragma interface "xh_stbmp.h" +#endif + +#include "wx/xrc/xmlres.h" + + +class WXXMLDLLEXPORT wxStaticBitmapXmlHandler : public wxXmlResourceHandler +{ +public: + wxStaticBitmapXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + + +#endif // _WX_XH_STBMP_H_ diff --git a/contrib/include/wx/xrc/xh_stbox.h b/contrib/include/wx/xrc/xh_stbox.h new file mode 100644 index 0000000000..509f3ae81c --- /dev/null +++ b/contrib/include/wx/xrc/xh_stbox.h @@ -0,0 +1,30 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xh_stbox.h +// Purpose: XML resource handler for wxStaticBox +// Author: Brian Gavin +// Created: 2000/09/00 +// RCS-ID: $Id$ +// Copyright: (c) 2000 Brian Gavin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_STBOX_H_ +#define _WX_XH_STBOX_H_ + +#ifdef __GNUG__ +#pragma interface "xh_stbox.h" +#endif + +#include "wx/xrc/xmlres.h" + + +class WXXMLDLLEXPORT wxStaticBoxXmlHandler : public wxXmlResourceHandler +{ +public: + wxStaticBoxXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + + +#endif // _WX_XH_STBOX_H_ diff --git a/contrib/include/wx/xrc/xh_stlin.h b/contrib/include/wx/xrc/xh_stlin.h new file mode 100644 index 0000000000..7f7d5d67e7 --- /dev/null +++ b/contrib/include/wx/xrc/xh_stlin.h @@ -0,0 +1,32 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xh_stlin.h +// Purpose: XML resource handler for wxStaticLine +// Author: Vaclav Slavik +// Created: 2000/09/00 +// RCS-ID: $Id$ +// Copyright: (c) 2000 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_STLIN_H_ +#define _WX_XH_STLIN_H_ + +#ifdef __GNUG__ +#pragma interface "xh_stlin.h" +#endif + +#include "wx/xrc/xmlres.h" + +#if wxUSE_STATLINE + +class WXXMLDLLEXPORT wxStaticLineXmlHandler : public wxXmlResourceHandler +{ +public: + wxStaticLineXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + +#endif + +#endif // _WX_XH_STLIN_H_ diff --git a/contrib/include/wx/xrc/xh_sttxt.h b/contrib/include/wx/xrc/xh_sttxt.h new file mode 100644 index 0000000000..94683b82f9 --- /dev/null +++ b/contrib/include/wx/xrc/xh_sttxt.h @@ -0,0 +1,30 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xh_sttxt.h +// Purpose: XML resource handler for wxStaticBitmap +// Author: Bob Mitchell +// Created: 2000/03/21 +// RCS-ID: $Id$ +// Copyright: (c) 2000 Bob Mitchell +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_STTXT_H_ +#define _WX_XH_STTXT_H_ + +#ifdef __GNUG__ +#pragma interface "xh_sttxt.h" +#endif + +#include "wx/xrc/xmlres.h" + + +class WXXMLDLLEXPORT wxStaticTextXmlHandler : public wxXmlResourceHandler +{ +public: + wxStaticTextXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + + +#endif // _WX_XH_STBMP_H_ diff --git a/contrib/include/wx/xrc/xh_text.h b/contrib/include/wx/xrc/xh_text.h new file mode 100644 index 0000000000..6bd2b7d285 --- /dev/null +++ b/contrib/include/wx/xrc/xh_text.h @@ -0,0 +1,30 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xh_text.h +// Purpose: XML resource handler for wxTextCtrl +// Author: Aleksandras Gluchovas +// Created: 2000/03/21 +// RCS-ID: $Id$ +// Copyright: (c) 2000 Aleksandras Gluchovas +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_TEXT_H_ +#define _WX_XH_TEXT_H_ + +#ifdef __GNUG__ +#pragma interface "xh_text.h" +#endif + +#include "wx/xrc/xmlres.h" + + +class WXXMLDLLEXPORT wxTextCtrlXmlHandler : public wxXmlResourceHandler +{ +public: + wxTextCtrlXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + + +#endif // _WX_XH_TEXT_H_ diff --git a/contrib/include/wx/xrc/xh_toolb.h b/contrib/include/wx/xrc/xh_toolb.h new file mode 100644 index 0000000000..c149b77753 --- /dev/null +++ b/contrib/include/wx/xrc/xh_toolb.h @@ -0,0 +1,38 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xh_toolb.h +// Purpose: XML resource handler for wxBoxSizer +// Author: Vaclav Slavik +// Created: 2000/08/11 +// RCS-ID: $Id$ +// Copyright: (c) 2000 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_TOOLB_H_ +#define _WX_XH_TOOLB_H_ + +#ifdef __GNUG__ +#pragma interface "xh_toolb.h" +#endif + +#include "wx/xrc/xmlres.h" + +#if wxUSE_TOOLBAR + +class WXDLLEXPORT wxToolBar; + +class WXXMLDLLEXPORT wxToolBarXmlHandler : public wxXmlResourceHandler +{ +public: + wxToolBarXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); + +private: + bool m_isInside; + wxToolBar *m_toolbar; +}; + +#endif + +#endif // _WX_XH_TOOLBAR_H_ diff --git a/contrib/include/wx/xrc/xh_tree.h b/contrib/include/wx/xrc/xh_tree.h new file mode 100644 index 0000000000..1d49a463dd --- /dev/null +++ b/contrib/include/wx/xrc/xh_tree.h @@ -0,0 +1,29 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xh_tree.h +// Purpose: XML resource handler for wxTreeCtrl +// Author: Brian Gavin +// Created: 2000/09/09 +// RCS-ID: $Id$ +// Copyright: (c) 2000 Brian Gavin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_TREE_H_ +#define _WX_XH_TREE_H_ + +#ifdef __GNUG__ +#pragma interface "xh_tree.h" +#endif + +#include "wx/xrc/xmlres.h" + +class WXXMLDLLEXPORT wxTreeCtrlXmlHandler : public wxXmlResourceHandler +{ +public: + wxTreeCtrlXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + + +#endif // _WX_XH_TREE_H_ diff --git a/contrib/include/wx/xrc/xh_unkwn.h b/contrib/include/wx/xrc/xh_unkwn.h new file mode 100644 index 0000000000..28aa99a251 --- /dev/null +++ b/contrib/include/wx/xrc/xh_unkwn.h @@ -0,0 +1,30 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xh_unkwn.h +// Purpose: XML resource handler for unkown widget +// Author: Vaclav Slavik +// Created: 2000/03/05 +// RCS-ID: $Id$ +// Copyright: (c) 2000 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XH_UNKWN_H_ +#define _WX_XH_UNKWN_H_ + +#ifdef __GNUG__ +#pragma interface "xh_unkwn.h" +#endif + +#include "wx/xrc/xmlres.h" + + +class WXXMLDLLEXPORT wxUnknownWidgetXmlHandler : public wxXmlResourceHandler +{ +public: + wxUnknownWidgetXmlHandler(); + virtual wxObject *DoCreateResource(); + virtual bool CanHandle(wxXmlNode *node); +}; + + +#endif // _WX_XH_UNKWN_H_ diff --git a/contrib/include/wx/xrc/xml.h b/contrib/include/wx/xrc/xml.h new file mode 100644 index 0000000000..de3b3fe7ed --- /dev/null +++ b/contrib/include/wx/xrc/xml.h @@ -0,0 +1,264 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xml.h +// Purpose: wxXmlDocument - XML parser & data holder class +// Author: Vaclav Slavik +// Created: 2000/03/05 +// RCS-ID: $Id$ +// Copyright: (c) 2000 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XML_H_ +#define _WX_XML_H_ + +#ifdef __GNUG__ +#pragma interface "xml.h" +#endif + +#include "wx/defs.h" +#include "wx/string.h" +#include "wx/object.h" +#include "wx/list.h" + +#ifdef WXXMLISDLL +#define WXXMLDLLEXPORT WXDLLEXPORT +#else +#define WXXMLDLLEXPORT +#endif + +class WXXMLDLLEXPORT wxXmlNode; +class WXXMLDLLEXPORT wxXmlProperty; +class WXXMLDLLEXPORT wxXmlDocument; +class WXXMLDLLEXPORT wxXmlIOHandler; +class WXDLLEXPORT wxInputStream; +class WXDLLEXPORT wxOutputStream; + + +// Represents XML node type. +enum wxXmlNodeType +{ + // note: values are synchronized with xmlElementType from libxml + wxXML_ELEMENT_NODE = 1, + wxXML_ATTRIBUTE_NODE = 2, + wxXML_TEXT_NODE = 3, + wxXML_CDATA_SECTION_NODE = 4, + wxXML_ENTITY_REF_NODE = 5, + wxXML_ENTITY_NODE = 6, + wxXML_PI_NODE = 7, + wxXML_COMMENT_NODE = 8, + wxXML_DOCUMENT_NODE = 9, + wxXML_DOCUMENT_TYPE_NODE = 10, + wxXML_DOCUMENT_FRAG_NODE = 11, + wxXML_NOTATION_NODE = 12, + wxXML_HTML_DOCUMENT_NODE = 13 +}; + + +// Types of XML files: + +enum wxXmlIOType +{ + wxXML_IO_AUTO = 0, // detect it automatically + wxXML_IO_EXPAT, // use Expat to load from text/xml document + wxXML_IO_TEXT_OUTPUT, // generic saver into text/xml + wxXML_IO_BIN, // save in binary uncompressed proprietary format + wxXML_IO_BINZ // svae in binary zlib-compressed proprietary format +}; + + +// Represents node property(ies). +// Example: in "src" is property with value +// "hello.gif" and "id" is prop. with value "3". + +class WXXMLDLLEXPORT wxXmlProperty +{ +public: + wxXmlProperty() : m_next(NULL) {} + wxXmlProperty(const wxString& name, const wxString& value, + wxXmlProperty *next) + : m_name(name), m_value(value), m_next(next) {} + ~wxXmlProperty() { delete m_next; } + + wxString GetName() const { return m_name; } + wxString GetValue() const { return m_value; } + wxXmlProperty *GetNext() const { return m_next; } + + void SetName(const wxString& name) { m_name = name; } + void SetValue(const wxString& value) { m_value = value; } + void SetNext(wxXmlProperty *next) { m_next = next; } + +private: + wxString m_name; + wxString m_value; + wxXmlProperty *m_next; +}; + + + +// Represents node in XML document. Node has name and may have content +// and properties. Most common node types are wxXML_TEXT_NODE (name and props +// are irrelevant) and wxXML_ELEMENT_NODE (e.g. in hi there is +// element with name="title", irrelevant content and one child (wxXML_TEXT_NODE +// with content="hi"). +// +// If wxUSE_UNICODE is 0, all strings are encoded in UTF-8 encoding (same as +// ASCII for characters 0-127). You can use wxMBConvUTF8 to convert then to +// desired encoding: +// +// wxCSConv myConv("iso8859-2"); +// wxString s(cMB2WC(node->GetContent().c_str()), myConv); + +class WXXMLDLLEXPORT wxXmlNode +{ +public: + wxXmlNode() : m_properties(NULL), m_parent(NULL), + m_children(NULL), m_next(NULL) {} + wxXmlNode(wxXmlNode *parent,wxXmlNodeType type, + const wxString& name, const wxString& content, + wxXmlProperty *props, wxXmlNode *next); + ~wxXmlNode() { delete m_properties; delete m_next; delete m_children; } + + // copy ctor & operator=. Note that this does NOT copy syblings + // and parent pointer, i.e. m_parent and m_next will be NULL + // after using copy ctor and are never unmodified by operator=. + // On the other hand, it DOES copy children and properties. + wxXmlNode(const wxXmlNode& node); + wxXmlNode& operator=(const wxXmlNode& node); + + // user-friendly creation: + wxXmlNode(wxXmlNodeType type, const wxString& name, + const wxString& content = wxEmptyString); + void AddChild(wxXmlNode *child); + void InsertChild(wxXmlNode *child, wxXmlNode *before_node); + bool RemoveChild(wxXmlNode *child); + void AddProperty(const wxString& name, const wxString& value); + bool DeleteProperty(const wxString& name); + + // access methods: + wxXmlNodeType GetType() const { return m_type; } + wxString GetName() const { return m_name; } + wxString GetContent() const { return m_content; } + + wxXmlNode *GetParent() const { return m_parent; } + wxXmlNode *GetNext() const { return m_next; } + wxXmlNode *GetChildren() const { return m_children; } + + wxXmlProperty *GetProperties() const { return m_properties; } + bool GetPropVal(const wxString& propName, wxString *value) const; + wxString GetPropVal(const wxString& propName, + const wxString& defaultVal) const; + bool HasProp(const wxString& propName) const; + + void SetType(wxXmlNodeType type) { m_type = type; } + void SetName(const wxString& name) { m_name = name; } + void SetContent(const wxString& con) { m_content = con; } + + void SetParent(wxXmlNode *parent) { m_parent = parent; } + void SetNext(wxXmlNode *next) { m_next = next; } + void SetChildren(wxXmlNode *child) { m_children = child; } + + void SetProperties(wxXmlProperty *prop) { m_properties = prop; } + void AddProperty(wxXmlProperty *prop); + +private: + wxXmlNodeType m_type; + wxString m_name; + wxString m_content; + wxXmlProperty *m_properties; + wxXmlNode *m_parent, *m_children, *m_next; + + void DoCopy(const wxXmlNode& node); +}; + + + + + + + +// This class holds XML data/document as parsed by libxml. Note that +// internal representation is independant on libxml and you can use +// it without libxml (see Load/SaveBinary). + +class WXXMLDLLEXPORT wxXmlDocument : public wxObject +{ +public: + wxXmlDocument() : wxObject(), m_version(wxT("1.0")), m_root(NULL) {} + wxXmlDocument(const wxString& filename, + wxXmlIOType io_type = wxXML_IO_AUTO); + wxXmlDocument(wxInputStream& stream, + wxXmlIOType io_type = wxXML_IO_AUTO); + ~wxXmlDocument() { delete m_root; } + + wxXmlDocument(const wxXmlDocument& doc); + wxXmlDocument& operator=(const wxXmlDocument& doc); + + // Parses .xml file and loads data. Returns TRUE on success, FALSE + // otherwise. + // NOTE: Any call to this method will result into linking against libxml + // and app's binary size will grow by ca. 250kB + bool Load(const wxString& filename, wxXmlIOType io_type = wxXML_IO_AUTO); + bool Load(wxInputStream& stream, wxXmlIOType io_type = wxXML_IO_AUTO); + + // Saves document as .xml file. + bool Save(const wxString& filename, + wxXmlIOType io_type = wxXML_IO_TEXT_OUTPUT) const; + bool Save(wxOutputStream& stream, + wxXmlIOType io_type = wxXML_IO_TEXT_OUTPUT) const; + + bool IsOk() const { return m_root != NULL; } + + // Returns root node of the document. + wxXmlNode *GetRoot() const { return m_root; } + + // Returns version of document (may be empty). + wxString GetVersion() const { return m_version; } + // Returns encoding of document (may be empty). + // Note: this is the encoding original fail was saved in, *not* the + // encoding of in-memory representation! Data in wxXmlNode are always + // stored in wchar_t (in Unicode build) or UTF-8 encoded + // (if wxUSE_UNICODE is 0). + wxString GetEncoding() const { return m_encoding; } + + // Write-access methods: + void SetRoot(wxXmlNode *node) { delete m_root ; m_root = node; } + void SetVersion(const wxString& version) { m_version = version; } + void SetEncoding(const wxString& encoding) { m_encoding = encoding; } + + static void AddHandler(wxXmlIOHandler *handler); + static void CleanUpHandlers(); + static void InitStandardHandlers(); + +protected: + static wxList *sm_handlers; + +private: + wxString m_version, m_encoding; + wxXmlNode *m_root; + + void DoCopy(const wxXmlDocument& doc); +}; + + + +// wxXmlIOHandler takes care of loading and/or saving XML data. +// see xmlio.h for available handlers + +class WXXMLDLLEXPORT wxXmlIOHandler : public wxObject +{ + public: + wxXmlIOHandler() {} + + virtual wxXmlIOType GetType() = 0; + virtual bool CanLoad(wxInputStream& stream) = 0; + virtual bool CanSave() = 0; + + virtual bool Load(wxInputStream& stream, wxXmlDocument& doc) = 0; + virtual bool Save(wxOutputStream& stream, const wxXmlDocument& doc) = 0; +}; + + + +void wxXmlInitXmlModule(); + +#endif // _WX_XML_H_ diff --git a/contrib/include/wx/xrc/xmlio.h b/contrib/include/wx/xrc/xmlio.h new file mode 100644 index 0000000000..265ba508f7 --- /dev/null +++ b/contrib/include/wx/xrc/xmlio.h @@ -0,0 +1,85 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xmlio.h +// Purpose: wxXmlIOHandler - XML I/O classes +// Author: Vaclav Slavik +// Created: 2000/07/24 +// RCS-ID: $Id$ +// Copyright: (c) 2000 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XMLIO_H_ +#define _WX_XMLIO_H_ + +#ifdef __GNUG__ +#pragma interface "xmlio.h" +#endif + +#include "wx/defs.h" +#include "wx/string.h" +#include "wx/xrc/xml.h" + + +class WXXMLDLLEXPORT wxXmlIOHandlerExpat : public wxXmlIOHandler +{ +public: + virtual wxXmlIOType GetType() { return wxXML_IO_EXPAT; } + virtual bool CanLoad(wxInputStream& stream); + virtual bool CanSave() { return FALSE; } + + virtual bool Load(wxInputStream& stream, wxXmlDocument& doc); + virtual bool Save(wxOutputStream& WXUNUSED(stream), const wxXmlDocument& WXUNUSED(doc)) + { return FALSE; } +}; + + +class WXXMLDLLEXPORT wxXmlIOHandlerWriter : public wxXmlIOHandler +{ +public: + virtual wxXmlIOType GetType() { return wxXML_IO_TEXT_OUTPUT; } + virtual bool CanLoad(wxInputStream& WXUNUSED(stream)) { return FALSE; } + virtual bool CanSave() { return TRUE; } + + virtual bool Load(wxInputStream& WXUNUSED(stream), wxXmlDocument& WXUNUSED(doc)) + { return FALSE; } + virtual bool Save(wxOutputStream& stream, const wxXmlDocument& doc); +}; + + +class WXXMLDLLEXPORT wxXmlIOHandlerBin : public wxXmlIOHandler +{ +public: + wxXmlIOHandlerBin() {} + + virtual wxXmlIOType GetType() { return wxXML_IO_BIN; } + virtual bool CanLoad(wxInputStream& stream); + virtual bool CanSave() { return TRUE; } + + virtual bool Load(wxInputStream& stream, wxXmlDocument& doc); + virtual bool Save(wxOutputStream& stream, const wxXmlDocument& doc); + +protected: + wxString ReadHeader(wxInputStream& stream); + void WriteHeader(wxOutputStream& stream, const wxString& header); +}; + + + +#if wxUSE_ZLIB + +class WXXMLDLLEXPORT wxXmlIOHandlerBinZ : public wxXmlIOHandlerBin +{ +public: + wxXmlIOHandlerBinZ() {} + + virtual wxXmlIOType GetType() { return wxXML_IO_BINZ; } + virtual bool CanLoad(wxInputStream& stream); + + virtual bool Load(wxInputStream& stream, wxXmlDocument& doc); + virtual bool Save(wxOutputStream& stream, const wxXmlDocument& doc); +}; + +#endif + + +#endif // _WX_XMLIO_H_ diff --git a/contrib/include/wx/xrc/xmlres.h b/contrib/include/wx/xrc/xmlres.h new file mode 100644 index 0000000000..61247013fa --- /dev/null +++ b/contrib/include/wx/xrc/xmlres.h @@ -0,0 +1,358 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xmlres.h +// Purpose: XML resources +// Author: Vaclav Slavik +// Created: 2000/03/05 +// RCS-ID: $Id$ +// Copyright: (c) 2000 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_XMLRES_H_ +#define _WX_XMLRES_H_ + +#ifdef __GNUG__ +#pragma interface "xmlres.h" +#endif + +#include "wx/defs.h" +#include "wx/string.h" +#include "wx/dynarray.h" +#include "wx/datetime.h" +#include "wx/list.h" +#include "wx/gdicmn.h" +#include "wx/filesys.h" +#include "wx/bitmap.h" +#include "wx/icon.h" + +#include "wx/xrc/xml.h" + +class WXDLLEXPORT wxMenu; +class WXDLLEXPORT wxMenuBar; +class WXDLLEXPORT wxDialog; +class WXDLLEXPORT wxPanel; +class WXDLLEXPORT wxWindow; +class WXDLLEXPORT wxFrame; +class WXDLLEXPORT wxToolBar; + +class WXXMLDLLEXPORT wxXmlResourceHandler; + + +// These macros indicate current version of XML resources (this information is +// encoded in root node of XRC file as "version" property). +// +// Rules for increasing version number: +// - change it only if you made incompatible change to the format. Addition of new +// attribute to control handler is _not_ incompatible change, because older +// versions of the library may ignore it. +// - if you change version number, follow these steps: +// - set major, minor and release numbers to respective version numbers of +// the wxWindows library (see wx/version.h) +// - reset revision to 0 unless the first three are same as before, in which +// case you should increase revision by one +#define WX_XMLRES_CURRENT_VERSION_MAJOR 2 +#define WX_XMLRES_CURRENT_VERSION_MINOR 3 +#define WX_XMLRES_CURRENT_VERSION_RELEASE 0 +#define WX_XMLRES_CURRENT_VERSION_REVISION 1 +#define WX_XMLRES_CURRENT_VERSION_STRING "2.3.0.1" + +#define WX_XMLRES_CURRENT_VERSION \ + (WX_XMLRES_CURRENT_VERSION_MAJOR * 256*256*256 + \ + WX_XMLRES_CURRENT_VERSION_MINOR * 256*256 + \ + WX_XMLRES_CURRENT_VERSION_RELEASE * 256 + \ + WX_XMLRES_CURRENT_VERSION_REVISION) + +class WXXMLDLLEXPORT wxXmlResourceDataRecord +{ +public: + wxXmlResourceDataRecord() : Doc(NULL), Time(wxDateTime::Now()) {} + ~wxXmlResourceDataRecord() {delete Doc;} + + wxString File; + wxXmlDocument *Doc; + wxDateTime Time; +}; + + +#ifdef WXXMLISDLL +WX_DECLARE_EXPORTED_OBJARRAY(wxXmlResourceDataRecord, wxXmlResourceDataRecords); +#else +WX_DECLARE_OBJARRAY(wxXmlResourceDataRecord, wxXmlResourceDataRecords); +#endif + + +// This class holds XML resources from one or more .xml files +// (or derived forms, either binary or zipped -- see manual for +// details). + +class WXXMLDLLEXPORT wxXmlResource : public wxObject +{ +public: + // Ctor. If use_locale is TRUE, translatable strings are + // translated via _(). You can disable it by passing use_locale=FALSE + // (for example if you provide resource file for each locale) + wxXmlResource(bool use_locale = TRUE); + wxXmlResource(const wxString& filemask, bool use_locale = TRUE); + ~wxXmlResource(); + + // Loads resources from XML files that match given filemask. + // This method understands VFS (see filesys.h). + bool Load(const wxString& filemask); + + // Initialize handlers for all supported controls/windows. This will + // make the executable quite big because it forces linking against + // most of wxWin library + void InitAllHandlers(); + + // Initialize only specific handler (or custom handler). Convention says + // that handler name is equal to control's name plus 'XmlHandler', e.g. + // wxTextCtrlXmlHandler, wxHtmlWindowXmlHandler. XML resource compiler + // (xmlres) can create include file that contains initialization code for + // all controls used within the resource. + void AddHandler(wxXmlResourceHandler *handler); + + // Removes all handlers + void ClearHandlers(); + + // Loads menu from resource. Returns NULL on failure. + wxMenu *LoadMenu(const wxString& name); + + // Loads menubar from resource. Returns NULL on failure. + wxMenuBar *LoadMenuBar(const wxString& name); + +#if wxUSE_TOOLBAR + // Loads toolbar + wxToolBar *LoadToolBar(wxWindow *parent, const wxString& name); +#endif + + // Loads dialog. dlg points to parent window (if any). Second form + // is used to finish creation of already existing instance (main reason + // for this is that you may want to use derived class with new event table) + // Example (typical usage): + // MyDialog dlg; + // wxTheXmlResource->LoadDialog(&dlg, mainFrame, "my_dialog"); + // dlg->ShowModal(); + wxDialog *LoadDialog(wxWindow *parent, const wxString& name); + bool LoadDialog(wxDialog *dlg, wxWindow *parent, const wxString& name); + + // Loads panel. panel points to parent window (if any). Second form + // is used to finish creation of already existing instance. + wxPanel *LoadPanel(wxWindow *parent, const wxString& name); + bool LoadPanel(wxPanel *panel, wxWindow *parent, const wxString& name); + + bool LoadFrame(wxFrame* frame, wxWindow *parent, const wxString& name); + + // Loads bitmap or icon resource from file: + wxBitmap LoadBitmap(const wxString& name); + wxIcon LoadIcon(const wxString& name); + + // Attaches unknown control into given panel/window/dialog: + // (unknown controls are used in conjunction with ) + bool AttachUnknownControl(const wxString& name, wxWindow *control, + wxWindow *parent = NULL); + + // Returns numeric ID that is equivalent to string id used in XML + // resource. To be used in event tables + // Macro XMLID is provided for convenience + static int GetXMLID(const char *str_id); + + // Returns version info (a.b.c.d = d+ 256*c + 256^2*b + 256^3*a) + long GetVersion() const { return m_version; } + + // Compares resources version to argument. Returns -1 if resources version + // is less than the argument, +1 if greater and 0 if they equal. + int CompareVersion(int major, int minor, int release, int revision) const + { return GetVersion() - + (major*256*256*256 + minor*256*256 + release*256 + revision); } + +protected: + // Scans resources list for unloaded files and loads them. Also reloads + // files that have been modified since last loading. + void UpdateResources(); + + // Finds resource (calls UpdateResources) and returns node containing it + wxXmlNode *FindResource(const wxString& name, const wxString& classname); + + // Creates resource from info in given node: + wxObject *CreateResFromNode(wxXmlNode *node, wxObject *parent, wxObject *instance = NULL); + + // Remove nodes with property "platform" that does not + // match current platform + void ProcessPlatformProperty(wxXmlNode *node); + + bool GetUseLocale() { return m_useLocale; } + +private: + long m_version; + + bool m_useLocale; + wxList m_handlers; + wxXmlResourceDataRecords m_data; +#if wxUSE_FILESYSTEM + wxFileSystem m_curFileSystem; + wxFileSystem& GetCurFileSystem() { return m_curFileSystem; } +#endif + + friend class wxXmlResourceHandler; +}; + + +// Global instance of resource class. For your convenience. +extern wxXmlResource *wxTheXmlResource; + +// This macro translates string identifier (as used in XML resource, +// e.g. ...) to integer id that is needed by +// wxWindows event tables. +// Example: +// BEGIN_EVENT_TABLE(MyFrame, wxFrame) +// EVT_MENU(XMLID("quit"), MyFrame::OnQuit) +// EVT_MENU(XMLID("about"), MyFrame::OnAbout) +// EVT_MENU(XMLID("new"), MyFrame::OnNew) +// EVT_MENU(XMLID("open"), MyFrame::OnOpen) +// END_EVENT_TABLE() + +#define XMLID(str_id) \ + wxXmlResource::GetXMLID(wxT(str_id)) + + +// This macro returns pointer to particular control in dialog +// created using XML resources. You can use it to set/get values from +// controls. +// Example: +// wxDialog dlg; +// wxTheXmlResource->LoadDialog(&dlg, mainFrame, "my_dialog"); +// XMLCTRL(dlg, "my_textctrl", wxTextCtrl)->SetValue(wxT("default value")); + +#ifdef __WXDEBUG__ +#define XMLCTRL(window, id, type) \ + (wxDynamicCast((window).FindWindow(XMLID(id)), type)) +#else +#define XMLCTRL(window, id, type) \ + ((type*)((window).FindWindow(XMLID(id)))) +#endif + + +class WXXMLDLLEXPORT wxXmlResourceHandler : public wxObject +{ +public: + wxXmlResourceHandler(); + virtual ~wxXmlResourceHandler() {} + + // Creates object (menu, dialog, control, ...) from XML node. + // Should check for validity. + // parent is higher-level object (usually window, dialog or panel) + // that is often neccessary to create resource + // if instance != NULL it should not create new instance via 'new' but + // rather use this one and call its Create method + wxObject *CreateResource(wxXmlNode *node, wxObject *parent, + wxObject *instance); + + // This one is called from CreateResource after variables + // were filled + virtual wxObject *DoCreateResource() = 0; + + // Returns TRUE if it understands this node and can create + // resource from it, FALSE otherwise. + virtual bool CanHandle(wxXmlNode *node) = 0; + + void SetParentResource(wxXmlResource *res) { m_resource = res; } + + +protected: + + wxXmlResource *m_resource; + wxArrayString m_styleNames; + wxArrayInt m_styleValues; + + // Variables (filled by CreateResource) + wxXmlNode *m_node; + wxString m_class; + wxObject *m_parent, *m_instance; + wxWindow *m_parentAsWindow, *m_instanceAsWindow; + + // --- Handy methods: + + // Returns true if the node has property class equal to classname, + // e.g. + bool IsOfClass(wxXmlNode *node, const wxString& classname) + { return node->GetPropVal(wxT("class"), wxEmptyString) == classname; } + + // Gets node content from wxXML_ENTITY_NODE + // (the problem is, content is represented as + // wxXML_ENTITY_NODE name="tag", content="" + // |-- wxXML_TEXT_NODE or + // wxXML_CDATA_SECTION_NODE name="" content="content" + wxString GetNodeContent(wxXmlNode *node); + + // Check to see if a param exists + bool HasParam(const wxString& param); + + // Finds the node or returns NULL + wxXmlNode *GetParamNode(const wxString& param); + wxString GetParamValue(const wxString& param); + + // Add style flag (e.g. wxMB_DOCKABLE) to list of flags + // understood by this handler + void AddStyle(const wxString& name, int value); + + // Add styles common to all wxWindow-derived classes + void AddWindowStyles(); + + // Gets style flags from text in form "flag | flag2| flag3 |..." + // Only understads flags added with AddStyle + int GetStyle(const wxString& param = wxT("style"), int defaults = 0); + + // Gets text from param and does some convertions: + // - replaces \n, \r, \t by respective chars (according to C syntax) + // - replaces $ by & and $$ by $ (needed for $File => &File because of XML) + // - calls wxGetTranslations (unless disabled in wxXmlResource) + wxString GetText(const wxString& param); + + // Return XMLID + int GetID(); + wxString GetName(); + + // Get bool flag (1,t,yes,on,true are TRUE, everything else is FALSE) + bool GetBool(const wxString& param, bool defaultv = FALSE); + + // Get integer value from param + long GetLong( const wxString& param, long defaultv = 0 ); + + // Get colour in HTML syntax (#RRGGBB) + wxColour GetColour(const wxString& param); + + // Get size/position (may be in dlg units): + wxSize GetSize(const wxString& param = wxT("size")); + wxPoint GetPosition(const wxString& param = wxT("pos")); + + // Get dimension (may be in dlg units): + wxCoord GetDimension(const wxString& param, wxCoord defaultv = 0); + + // Get bitmap: + wxBitmap GetBitmap(const wxString& param = wxT("bitmap"), + wxSize size = wxDefaultSize); + wxIcon GetIcon(const wxString& param = wxT("icon"), + wxSize size = wxDefaultSize); + + // Get font: + wxFont GetFont(const wxString& param = wxT("font")); + + // Sets common window options: + void SetupWindow(wxWindow *wnd); + + void CreateChildren(wxObject *parent, bool this_hnd_only = FALSE); + void CreateChildrenPrivately(wxObject *parent, wxXmlNode *rootnode = NULL); + wxObject *CreateResFromNode(wxXmlNode *node, + wxObject *parent, wxObject *instance = NULL) + { return m_resource->CreateResFromNode(node, parent, instance); } + + // helper + wxFileSystem& GetCurFileSystem() { return m_resource->GetCurFileSystem(); } +}; + +#define ADD_STYLE(style) AddStyle(wxT(#style), style) + + +void wxXmlInitResourceModule(); + +#endif // _WX_XMLRES_H_ diff --git a/contrib/samples/Makefile.in b/contrib/samples/Makefile.in index af1e43ad6a..1133423958 100644 --- a/contrib/samples/Makefile.in +++ b/contrib/samples/Makefile.in @@ -1,6 +1,6 @@ # $Id$ -CONTRIB_SAMPLES=mmedia ogl stc gizmos canvas xml plot applet +CONTRIB_SAMPLES=mmedia ogl stc gizmos canvas xrc plot applet all: @for d in $(CONTRIB_SAMPLES); do (cd $$d && $(MAKE)); done diff --git a/contrib/samples/xml/Makefile.in b/contrib/samples/xml/Makefile.in deleted file mode 100644 index 45ee21ad31..0000000000 --- a/contrib/samples/xml/Makefile.in +++ /dev/null @@ -1,23 +0,0 @@ -############################################################################### -# Purpose: Makefile.in for xml resources sample for Unix with autoconf -# Created: 17.09.00 -# Author: VS -# Version: $Id$ -############################################################################### - -top_srcdir = @top_srcdir@/.. -top_builddir = ../../.. -program_dir = contrib/samples/xml - -PROGRAM=xmldemo - -OBJECTS=$(PROGRAM).o - -APPEXTRALIBS=$(top_builddir)/lib/libwxxml.@WX_TARGET_LIBRARY_TYPE@ -APPEXTRADEFS=-I$(top_srcdir)/contrib/include - -DATADIRS = rc -DATAFILES = rc/resource.xrc rc/fileopen.gif rc/filesave.gif rc/fuzzy.gif \ - rc/quotes.gif rc/scanning.gif rc/update.gif - -include $(top_builddir)/src/makeprog.env diff --git a/contrib/samples/xml/XmlDemoVC.dsp b/contrib/samples/xml/XmlDemoVC.dsp deleted file mode 100644 index 4b10e558a3..0000000000 --- a/contrib/samples/xml/XmlDemoVC.dsp +++ /dev/null @@ -1,175 +0,0 @@ -# Microsoft Developer Studio Project File - Name="XmlDemoVC" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Application" 0x0101 - -CFG=XmlDemoVC - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "XmlDemoVC.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "XmlDemoVC.mak" CFG="XmlDemoVC - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "XmlDemoVC - Win32 Release" (based on "Win32 (x86) Application") -!MESSAGE "XmlDemoVC - Win32 Debug" (based on "Win32 (x86) Application") -!MESSAGE "XmlDemoVC - Win32 Debug DLL" (based on "Win32 (x86) Application") -!MESSAGE "XmlDemoVC - Win32 Release DLL" (based on "Win32 (x86) Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "XmlDemoVC - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c -# SUBTRACT CPP /YX -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 -# ADD BASE RSC /l 0x809 /d "NDEBUG" -# ADD RSC /l 0x809 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib png.lib zlib.lib jpeg.lib tiff.lib wxxml.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/xmldemo.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib" - -!ELSEIF "$(CFG)" == "XmlDemoVC - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../include" /I "../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 -# ADD BASE RSC /l 0x809 /d "_DEBUG" -# ADD RSC /l 0x809 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib wxxmld.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/xmldemo.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib" - -!ELSEIF "$(CFG)" == "XmlDemoVC - Win32 Debug DLL" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "DebugDLL" -# PROP BASE Intermediate_Dir "DebugDLL" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "DebugDLL" -# PROP Intermediate_Dir "DebugDLL" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../include" /I "../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 -# ADD BASE RSC /l 0x809 /d "_DEBUG" -# ADD RSC /l 0x809 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxdlld.lib wxxmld.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/xmldemo.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib" - -!ELSEIF "$(CFG)" == "XmlDemoVC - Win32 Release DLL" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "ReleaseDLL" -# PROP BASE Intermediate_Dir "ReleaseDLL" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "ReleaseDLL" -# PROP Intermediate_Dir "ReleaseDLL" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c -# SUBTRACT CPP /YX -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 -# ADD BASE RSC /l 0x809 /d "NDEBUG" -# ADD RSC /l 0x809 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxdll.lib wxxml.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/xmldemo.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib" - -!ENDIF - -# Begin Target - -# Name "XmlDemoVC - Win32 Release" -# Name "XmlDemoVC - Win32 Debug" -# Name "XmlDemoVC - Win32 Debug DLL" -# Name "XmlDemoVC - Win32 Release DLL" -# Begin Source File - -SOURCE=.\xmldemo.cpp - -!IF "$(CFG)" == "XmlDemoVC - Win32 Release" - -!ELSEIF "$(CFG)" == "XmlDemoVC - Win32 Debug" - -# SUBTRACT CPP /YX /Yc /Yu - -!ELSEIF "$(CFG)" == "XmlDemoVC - Win32 Debug DLL" - -# SUBTRACT BASE CPP /YX /Yc /Yu -# SUBTRACT CPP /YX /Yc /Yu - -!ELSEIF "$(CFG)" == "XmlDemoVC - Win32 Release DLL" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\xmldemo.rc -# ADD BASE RSC /l 0x809 -# ADD RSC /l 0x809 /i "../../../include" /i "../../../contrib/include" -# End Source File -# End Target -# End Project diff --git a/contrib/samples/xml/XmlDemoVC.dsw b/contrib/samples/xml/XmlDemoVC.dsw deleted file mode 100644 index 91323cfef4..0000000000 --- a/contrib/samples/xml/XmlDemoVC.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "XmlDemoVC"=.\XmlDemoVC.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/contrib/samples/xml/makefile.b32 b/contrib/samples/xml/makefile.b32 deleted file mode 100644 index f24b64c46b..0000000000 --- a/contrib/samples/xml/makefile.b32 +++ /dev/null @@ -1,18 +0,0 @@ -# -# File: makefile.b32 -# Author: Julian Smart -# Created: 1999 -# Updated: -# Copyright: -# -# Makefile : Builds sample for 32-bit BC++ - -WXDIR = $(WXWIN) - -TARGET=xmldemo - -EXTRALIBS=$(WXDIR)\lib\wxxml.lib -OBJECTS = $(TARGET).obj - -!include $(WXDIR)\src\makeprog.b32 - diff --git a/contrib/samples/xml/makefile.g95 b/contrib/samples/xml/makefile.g95 deleted file mode 100644 index 8377fef413..0000000000 --- a/contrib/samples/xml/makefile.g95 +++ /dev/null @@ -1,14 +0,0 @@ -# File: makefile.g95 for stectrl -# Author: Robin Dunn -# Created: 1-Feb-2000 -# Updated: - -WXDIR = ../../.. - -TARGET = xmldemo -OBJECTS = $(TARGET).o -EXTRAINC = -I$(WXDIR)/contrib/include -EXTRALIBS = -lwxxml - -include $(WXDIR)/src/makeprog.g95 - diff --git a/contrib/samples/xml/makefile.vc b/contrib/samples/xml/makefile.vc deleted file mode 100644 index 4c4acdd25a..0000000000 --- a/contrib/samples/xml/makefile.vc +++ /dev/null @@ -1,14 +0,0 @@ -# File: makefile.vc For stectrl -# Author: Robin Dunn -# Created: 1-Feb-2000 -# Updated: - -WXDIR = $(WXWIN) -PROGRAM = xmldemo - -OBJECTS = $(PROGRAM).obj -EXTRALIBS = $(WXDIR)\lib\wxxml$(LIBEXT).lib -EXTRAINC = -I$(WXDIR)\contrib\include - -!include $(WXDIR)\src\makeprog.vc - diff --git a/contrib/samples/xml/rc/appicon.ico b/contrib/samples/xml/rc/appicon.ico deleted file mode 100644 index 6082b2fd0a..0000000000 Binary files a/contrib/samples/xml/rc/appicon.ico and /dev/null differ diff --git a/contrib/samples/xml/rc/appicon.xpm b/contrib/samples/xml/rc/appicon.xpm deleted file mode 100644 index 948961fe5c..0000000000 --- a/contrib/samples/xml/rc/appicon.xpm +++ /dev/null @@ -1,61 +0,0 @@ -/* XPM */ -static char* appicon_xpm[]={ -"32 32 26 1", -"s c #000000", -"u c #ff8000", -"m c #ffc0ff", -"q c #400000", -". c None", -"t c #004040", -"d c #303030", -"n c #ffdca8", -"e c #c0c0c0", -"x c #808000", -"o c #c00000", -"c c #585858", -"b c #a0a0a4", -"f c #c000c0", -"# c #000000", -"i c #808080", -"p c #ffa858", -"v c #ffff00", -"k c #800000", -"w c #c0c000", -"r c #004000", -"h c #404000", -"j c #ffc0c0", -"a c #ffffff", -"l c #c05800", -"g c #ff0000", -".....#####...........##.........", -"...##abbccd........##c#.........", -"###aaaebfgh########abi#.........", -"#cbaaaejggkiibeeaaaeeic#........", -"#ieaaaefggldggfjmnaaeei#........", -"#ibeaajggggcggggfmaaabi#b.......", -"#iieaajggggolgggggmaaeec#.......", -"#cieaajgggggdgggggpmaeec#.......", -"#cieaajgggggqgggggggaabi#.......", -"#dieaajpgggcc##cggggaaebc###....", -"#ribaamecccccs##cgggaebccth##...", -"#dieaa#qtdcch###tcs#iichd####...", -"##cbea##dccccs##qhhccccct#####..", -"##iiea##rhccch##tsdtcccdh#####..", -"##cbea###tccookk#hrdhccccs####..", -"##ciea###koogookkddtcccch###q#..", -"##tiea##qoggggokkqhqccccckokkk#.", -"##hbeb#qkoogggookkqkoklkoookkk#.", -"###icb#kkooggggokkdkogggggookk#.", -"###d..#kkoogggouukqkooggggookk#.", -"##....#kkkoguvvvwuhkogggggooko#.", -"##....##kolwvvvvvulcllggggulll#.", -"##....##kuuvvvvvuvudwuuuuuvuuu#.", -"......##uuuuvvvvvuuqivvvvvvuuu#.", -"......##uuuvvwwiqcllhuvvvvvuuu#.", -"......##uuuwl##xuphdivvvvvvvul#.", -"......##uuu##e.#vltcuvuvvvvux#..", -"......##ux#e....###uuww######...", -"......##i#......bbb####.........", -"......###.......................", -"......##........................", -"......##........................"}; diff --git a/contrib/samples/xml/rc/fileopen.gif b/contrib/samples/xml/rc/fileopen.gif deleted file mode 100644 index a93ef2aab7..0000000000 Binary files a/contrib/samples/xml/rc/fileopen.gif and /dev/null differ diff --git a/contrib/samples/xml/rc/filesave.gif b/contrib/samples/xml/rc/filesave.gif deleted file mode 100644 index 7bd11de000..0000000000 Binary files a/contrib/samples/xml/rc/filesave.gif and /dev/null differ diff --git a/contrib/samples/xml/rc/fuzzy.gif b/contrib/samples/xml/rc/fuzzy.gif deleted file mode 100644 index 51683572a3..0000000000 Binary files a/contrib/samples/xml/rc/fuzzy.gif and /dev/null differ diff --git a/contrib/samples/xml/rc/quotes.gif b/contrib/samples/xml/rc/quotes.gif deleted file mode 100644 index 3ea61bde43..0000000000 Binary files a/contrib/samples/xml/rc/quotes.gif and /dev/null differ diff --git a/contrib/samples/xml/rc/resource.xrc b/contrib/samples/xml/rc/resource.xrc deleted file mode 100644 index 72492b8f13..0000000000 --- a/contrib/samples/xml/rc/resource.xrc +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - - - - filesave.gif - - - - - - - - - - - - - - - - - 2,2 - - fileopen.gif - Open catalog - - - filesave.gif - Save catalog - - - update.gif - Update catalog - synchronize it with sources - - - - quotes.gif - 1 - Display quotes around the string? - - - - fuzzy.gif - Toggled if selected string is fuzzy translation - 1 - - - - - - - fuzzy.gif - fileopen.gif - - - - - - - - - - wxALIGN_CENTER - - - - - - 10d - wxALL - - - - <h1>Hi,</h1>man - 100,45d - - - - - - - - - - Hello, we are inside a <u>NOTEBOOK</u>... - 50,50d - - - - - - - - - - - - - Hello, we are inside a <u>NOTEBOOK</u>... - 50,50d - - - - - - - 1 - - wxEXPAND - - wxVERTICAL - - - - - wxVERTICAL - - - 200,200d - - Hello, this is an ordinary multiline\n textctrl.... - - - wxEXPAND|wxALL - 10 - - - - - - - 1 - - - - - - - 10 - wxLEFT - - - wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_RIGHT - 10 - - - Second testing dialog - - diff --git a/contrib/samples/xml/rc/scanning.gif b/contrib/samples/xml/rc/scanning.gif deleted file mode 100644 index c1b1e15caf..0000000000 Binary files a/contrib/samples/xml/rc/scanning.gif and /dev/null differ diff --git a/contrib/samples/xml/rc/update.gif b/contrib/samples/xml/rc/update.gif deleted file mode 100644 index d6ef70a421..0000000000 Binary files a/contrib/samples/xml/rc/update.gif and /dev/null differ diff --git a/contrib/samples/xml/xmldemo.cpp b/contrib/samples/xml/xmldemo.cpp deleted file mode 100644 index 9564d25abd..0000000000 --- a/contrib/samples/xml/xmldemo.cpp +++ /dev/null @@ -1,168 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: xmldemo.cpp -// Purpose: XML resources sample -// Author: Vaclav Slavik -// RCS-ID: $Id$ -// Copyright: (c) Vaclav Slavik -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -// ============================================================================ -// declarations -// ============================================================================ - -// ---------------------------------------------------------------------------- -// headers -// ---------------------------------------------------------------------------- -#ifdef __GNUG__ - #pragma implementation "xmldemo.cpp" - #pragma interface "xmldemo.cpp" -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ - #pragma hdrstop -#endif - -// for all others, include the necessary headers (this file is usually all you -// need because it includes almost all "standard" wxWindows headers) -#ifndef WX_PRECOMP - #include "wx/wx.h" -#endif - -#include "wx/image.h" -#include "wx/xml/xmlres.h" - -// ---------------------------------------------------------------------------- -// resources -// ---------------------------------------------------------------------------- -// the application icon -#if defined(__WXGTK__) || defined(__WXMOTIF__) - #include "rc/appicon.xpm" -#endif - -// ---------------------------------------------------------------------------- -// private classes -// ---------------------------------------------------------------------------- - -// Define a new application type, each program should derive a class from wxApp -class MyApp : public wxApp -{ -public: - // override base class virtuals - // ---------------------------- - - // this one is called on application startup and is a good place for the app - // initialization (doing it here and not in the ctor allows to have an error - // return: if OnInit() returns false, the application terminates) - virtual bool OnInit(); -}; - -// Define a new frame type: this is going to be our main frame -class MyFrame : public wxFrame -{ -public: - // ctor(s) - MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size); - - // event handlers (these functions should _not_ be virtual) - void OnQuit(wxCommandEvent& event); - void OnAbout(wxCommandEvent& event); - void OnDlg1(wxCommandEvent& event); - void OnDlg2(wxCommandEvent& event); - -private: - // any class wishing to process wxWindows events must use this macro - DECLARE_EVENT_TABLE() -}; - -// ---------------------------------------------------------------------------- -// event tables and other macros for wxWindows -// ---------------------------------------------------------------------------- - -// the event tables connect the wxWindows events with the functions (event -// handlers) which process them. It can be also done at run-time, but for the -// simple menu events like this the static method is much simpler. -BEGIN_EVENT_TABLE(MyFrame, wxFrame) - EVT_MENU(XMLID("menu_quit"), MyFrame::OnQuit) - EVT_MENU(XMLID("menu_about"), MyFrame::OnAbout) - EVT_MENU(XMLID("menu_dlg1"), MyFrame::OnDlg1) - EVT_MENU(XMLID("menu_dlg2"), MyFrame::OnDlg2) -END_EVENT_TABLE() - -// Create a new application object: this macro will allow wxWindows to create -// the application object during program execution (it's better than using a -// static object for many reasons) and also declares the accessor function -// wxGetApp() which will return the reference of the right type (i.e. MyApp and -// not wxApp) -IMPLEMENT_APP(MyApp) - -// ============================================================================ -// implementation -// ============================================================================ - -// ---------------------------------------------------------------------------- -// the application class -// ---------------------------------------------------------------------------- - -// 'Main program' equivalent: the program execution "starts" here -bool MyApp::OnInit() -{ - wxImage::AddHandler(new wxGIFHandler); - wxTheXmlResource->InitAllHandlers(); - wxTheXmlResource->Load("rc/resource.xrc"); - - MyFrame *frame = new MyFrame("XML resources demo", - wxPoint(50, 50), wxSize(450, 340)); - frame->Show(TRUE); - return TRUE; -} - -// ---------------------------------------------------------------------------- -// main frame -// ---------------------------------------------------------------------------- - -// frame constructor -MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size) - : wxFrame((wxFrame *)NULL, -1, title, pos, size) -{ - SetIcon(wxICON(appicon)); - - SetMenuBar(wxTheXmlResource->LoadMenuBar("mainmenu")); - SetToolBar(wxTheXmlResource->LoadToolBar(this, "toolbar")); -} - - -// event handlers - -void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) -{ - // TRUE is to force the frame to close - Close(TRUE); -} - -void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) -{ - wxString msg; - msg.Printf( _T("This is the about dialog of XML resources demo.\n") - _T("Welcome to %s"), wxVERSION_STRING); - - wxMessageBox(msg, "About XML resources demo", wxOK | wxICON_INFORMATION, this); -} - -void MyFrame::OnDlg1(wxCommandEvent& WXUNUSED(event)) -{ - wxDialog dlg; - wxTheXmlResource->LoadDialog(&dlg, this, "dlg1"); - dlg.ShowModal(); -} - - -void MyFrame::OnDlg2(wxCommandEvent& WXUNUSED(event)) -{ - wxDialog dlg; - wxTheXmlResource->LoadDialog(&dlg, this, "dlg2"); - dlg.ShowModal(); -} diff --git a/contrib/samples/xml/xmldemo.rc b/contrib/samples/xml/xmldemo.rc deleted file mode 100644 index a5b2ce34e2..0000000000 --- a/contrib/samples/xml/xmldemo.rc +++ /dev/null @@ -1,2 +0,0 @@ -appicon ICON "rc/appicon.ico" -#include "wx/msw/wx.rc" diff --git a/contrib/samples/xrc/Makefile.in b/contrib/samples/xrc/Makefile.in new file mode 100644 index 0000000000..6d7da4cb7c --- /dev/null +++ b/contrib/samples/xrc/Makefile.in @@ -0,0 +1,23 @@ +############################################################################### +# Purpose: Makefile.in for xml resources sample for Unix with autoconf +# Created: 17.09.00 +# Author: VS +# Version: $Id$ +############################################################################### + +top_srcdir = @top_srcdir@/.. +top_builddir = ../../.. +program_dir = contrib/samples/xrc + +PROGRAM=xrcdemo + +OBJECTS=$(PROGRAM).o + +APPEXTRALIBS=$(top_builddir)/lib/libwxxrc.@WX_TARGET_LIBRARY_TYPE@ +APPEXTRADEFS=-I$(top_srcdir)/contrib/include + +DATADIRS = rc +DATAFILES = rc/resource.xrc rc/fileopen.gif rc/filesave.gif rc/fuzzy.gif \ + rc/quotes.gif rc/scanning.gif rc/update.gif + +include $(top_builddir)/src/makeprog.env diff --git a/contrib/samples/xrc/XmlDemoVC.dsp b/contrib/samples/xrc/XmlDemoVC.dsp new file mode 100644 index 0000000000..d17ec0f40c --- /dev/null +++ b/contrib/samples/xrc/XmlDemoVC.dsp @@ -0,0 +1,175 @@ +# Microsoft Developer Studio Project File - Name="XmlDemoVC" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=XmlDemoVC - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "XmlDemoVC.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "XmlDemoVC.mak" CFG="XmlDemoVC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "XmlDemoVC - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "XmlDemoVC - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "XmlDemoVC - Win32 Debug DLL" (based on "Win32 (x86) Application") +!MESSAGE "XmlDemoVC - Win32 Release DLL" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "XmlDemoVC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib png.lib zlib.lib jpeg.lib tiff.lib wxxrc.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/xmldemo.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ELSEIF "$(CFG)" == "XmlDemoVC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../include" /I "../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib wxxrcd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/xmldemo.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ELSEIF "$(CFG)" == "XmlDemoVC - Win32 Debug DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugDLL" +# PROP BASE Intermediate_Dir "DebugDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugDLL" +# PROP Intermediate_Dir "DebugDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../../include" /I "../../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /Yu"wx/wxprec.h" /FD /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxdlld.lib wxxrcd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/xmldemo.exe" /pdbtype:sept /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ELSEIF "$(CFG)" == "XmlDemoVC - Win32 Release DLL" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseDLL" +# PROP BASE Intermediate_Dir "ReleaseDLL" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseDLL" +# PROP Intermediate_Dir "ReleaseDLL" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxdll.lib wxxrc.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/xmldemo.exe" /libpath:"../../../lib" /libpath:"../../../contrib/lib" + +!ENDIF + +# Begin Target + +# Name "XmlDemoVC - Win32 Release" +# Name "XmlDemoVC - Win32 Debug" +# Name "XmlDemoVC - Win32 Debug DLL" +# Name "XmlDemoVC - Win32 Release DLL" +# Begin Source File + +SOURCE=.\xmldemo.cpp + +!IF "$(CFG)" == "XmlDemoVC - Win32 Release" + +!ELSEIF "$(CFG)" == "XmlDemoVC - Win32 Debug" + +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "XmlDemoVC - Win32 Debug DLL" + +# SUBTRACT BASE CPP /YX /Yc /Yu +# SUBTRACT CPP /YX /Yc /Yu + +!ELSEIF "$(CFG)" == "XmlDemoVC - Win32 Release DLL" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\xmldemo.rc +# ADD BASE RSC /l 0x809 +# ADD RSC /l 0x809 /i "../../../include" /i "../../../contrib/include" +# End Source File +# End Target +# End Project diff --git a/contrib/samples/xrc/XmlDemoVC.dsw b/contrib/samples/xrc/XmlDemoVC.dsw new file mode 100644 index 0000000000..91323cfef4 --- /dev/null +++ b/contrib/samples/xrc/XmlDemoVC.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "XmlDemoVC"=.\XmlDemoVC.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/contrib/samples/xrc/makefile.b32 b/contrib/samples/xrc/makefile.b32 new file mode 100644 index 0000000000..717e97799b --- /dev/null +++ b/contrib/samples/xrc/makefile.b32 @@ -0,0 +1,18 @@ +# +# File: makefile.b32 +# Author: Julian Smart +# Created: 1999 +# Updated: +# Copyright: +# +# Makefile : Builds sample for 32-bit BC++ + +WXDIR = $(WXWIN) + +TARGET=xrcdemo + +EXTRALIBS=$(WXDIR)\lib\wxxrc.lib +OBJECTS = $(TARGET).obj + +!include $(WXDIR)\src\makeprog.b32 + diff --git a/contrib/samples/xrc/makefile.g95 b/contrib/samples/xrc/makefile.g95 new file mode 100644 index 0000000000..c78a91f737 --- /dev/null +++ b/contrib/samples/xrc/makefile.g95 @@ -0,0 +1,14 @@ +# File: makefile.g95 for stectrl +# Author: Robin Dunn +# Created: 1-Feb-2000 +# Updated: + +WXDIR = ../../.. + +TARGET = xrcdemo +OBJECTS = $(TARGET).o +EXTRAINC = -I$(WXDIR)/contrib/include +EXTRALIBS = -lwxxrc + +include $(WXDIR)/src/makeprog.g95 + diff --git a/contrib/samples/xrc/makefile.vc b/contrib/samples/xrc/makefile.vc new file mode 100644 index 0000000000..e0130b2180 --- /dev/null +++ b/contrib/samples/xrc/makefile.vc @@ -0,0 +1,14 @@ +# File: makefile.vc For stectrl +# Author: Robin Dunn +# Created: 1-Feb-2000 +# Updated: + +WXDIR = $(WXWIN) +PROGRAM = xrcdemo + +OBJECTS = $(PROGRAM).obj +EXTRALIBS = $(WXDIR)\lib\wxxrc$(LIBEXT).lib +EXTRAINC = -I$(WXDIR)\contrib\include + +!include $(WXDIR)\src\makeprog.vc + diff --git a/contrib/samples/xrc/rc/appicon.ico b/contrib/samples/xrc/rc/appicon.ico new file mode 100644 index 0000000000..6082b2fd0a Binary files /dev/null and b/contrib/samples/xrc/rc/appicon.ico differ diff --git a/contrib/samples/xrc/rc/appicon.xpm b/contrib/samples/xrc/rc/appicon.xpm new file mode 100644 index 0000000000..948961fe5c --- /dev/null +++ b/contrib/samples/xrc/rc/appicon.xpm @@ -0,0 +1,61 @@ +/* XPM */ +static char* appicon_xpm[]={ +"32 32 26 1", +"s c #000000", +"u c #ff8000", +"m c #ffc0ff", +"q c #400000", +". c None", +"t c #004040", +"d c #303030", +"n c #ffdca8", +"e c #c0c0c0", +"x c #808000", +"o c #c00000", +"c c #585858", +"b c #a0a0a4", +"f c #c000c0", +"# c #000000", +"i c #808080", +"p c #ffa858", +"v c #ffff00", +"k c #800000", +"w c #c0c000", +"r c #004000", +"h c #404000", +"j c #ffc0c0", +"a c #ffffff", +"l c #c05800", +"g c #ff0000", +".....#####...........##.........", +"...##abbccd........##c#.........", +"###aaaebfgh########abi#.........", +"#cbaaaejggkiibeeaaaeeic#........", +"#ieaaaefggldggfjmnaaeei#........", +"#ibeaajggggcggggfmaaabi#b.......", +"#iieaajggggolgggggmaaeec#.......", +"#cieaajgggggdgggggpmaeec#.......", +"#cieaajgggggqgggggggaabi#.......", +"#dieaajpgggcc##cggggaaebc###....", +"#ribaamecccccs##cgggaebccth##...", +"#dieaa#qtdcch###tcs#iichd####...", +"##cbea##dccccs##qhhccccct#####..", +"##iiea##rhccch##tsdtcccdh#####..", +"##cbea###tccookk#hrdhccccs####..", +"##ciea###koogookkddtcccch###q#..", +"##tiea##qoggggokkqhqccccckokkk#.", +"##hbeb#qkoogggookkqkoklkoookkk#.", +"###icb#kkooggggokkdkogggggookk#.", +"###d..#kkoogggouukqkooggggookk#.", +"##....#kkkoguvvvwuhkogggggooko#.", +"##....##kolwvvvvvulcllggggulll#.", +"##....##kuuvvvvvuvudwuuuuuvuuu#.", +"......##uuuuvvvvvuuqivvvvvvuuu#.", +"......##uuuvvwwiqcllhuvvvvvuuu#.", +"......##uuuwl##xuphdivvvvvvvul#.", +"......##uuu##e.#vltcuvuvvvvux#..", +"......##ux#e....###uuww######...", +"......##i#......bbb####.........", +"......###.......................", +"......##........................", +"......##........................"}; diff --git a/contrib/samples/xrc/rc/fileopen.gif b/contrib/samples/xrc/rc/fileopen.gif new file mode 100644 index 0000000000..a93ef2aab7 Binary files /dev/null and b/contrib/samples/xrc/rc/fileopen.gif differ diff --git a/contrib/samples/xrc/rc/filesave.gif b/contrib/samples/xrc/rc/filesave.gif new file mode 100644 index 0000000000..7bd11de000 Binary files /dev/null and b/contrib/samples/xrc/rc/filesave.gif differ diff --git a/contrib/samples/xrc/rc/fuzzy.gif b/contrib/samples/xrc/rc/fuzzy.gif new file mode 100644 index 0000000000..51683572a3 Binary files /dev/null and b/contrib/samples/xrc/rc/fuzzy.gif differ diff --git a/contrib/samples/xrc/rc/quotes.gif b/contrib/samples/xrc/rc/quotes.gif new file mode 100644 index 0000000000..3ea61bde43 Binary files /dev/null and b/contrib/samples/xrc/rc/quotes.gif differ diff --git a/contrib/samples/xrc/rc/resource.xrc b/contrib/samples/xrc/rc/resource.xrc new file mode 100644 index 0000000000..72492b8f13 --- /dev/null +++ b/contrib/samples/xrc/rc/resource.xrc @@ -0,0 +1,154 @@ + + + + + + + + + + filesave.gif + + + + + + + + + + + + + + + + + 2,2 + + fileopen.gif + Open catalog + + + filesave.gif + Save catalog + + + update.gif + Update catalog - synchronize it with sources + + + + quotes.gif + 1 + Display quotes around the string? + + + + fuzzy.gif + Toggled if selected string is fuzzy translation + 1 + + + + + + + fuzzy.gif + fileopen.gif + + + + + + + + + + wxALIGN_CENTER + + + + + + 10d + wxALL + + + + <h1>Hi,</h1>man + 100,45d + + + + + + + + + + Hello, we are inside a <u>NOTEBOOK</u>... + 50,50d + + + + + + + + + + + + + Hello, we are inside a <u>NOTEBOOK</u>... + 50,50d + + + + + + + 1 + + wxEXPAND + + wxVERTICAL + + + + + wxVERTICAL + + + 200,200d + + Hello, this is an ordinary multiline\n textctrl.... + + + wxEXPAND|wxALL + 10 + + + + + + + 1 + + + + + + + 10 + wxLEFT + + + wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_RIGHT + 10 + + + Second testing dialog + + diff --git a/contrib/samples/xrc/rc/scanning.gif b/contrib/samples/xrc/rc/scanning.gif new file mode 100644 index 0000000000..c1b1e15caf Binary files /dev/null and b/contrib/samples/xrc/rc/scanning.gif differ diff --git a/contrib/samples/xrc/rc/update.gif b/contrib/samples/xrc/rc/update.gif new file mode 100644 index 0000000000..d6ef70a421 Binary files /dev/null and b/contrib/samples/xrc/rc/update.gif differ diff --git a/contrib/samples/xrc/xrcdemo.cpp b/contrib/samples/xrc/xrcdemo.cpp new file mode 100644 index 0000000000..7faaa1cda6 --- /dev/null +++ b/contrib/samples/xrc/xrcdemo.cpp @@ -0,0 +1,168 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: xmldemo.cpp +// Purpose: XML resources sample +// Author: Vaclav Slavik +// RCS-ID: $Id$ +// Copyright: (c) Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- +#ifdef __GNUG__ + #pragma implementation "xrcdemo.cpp" + #pragma interface "xrcdemo.cpp" +#endif + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +// for all others, include the necessary headers (this file is usually all you +// need because it includes almost all "standard" wxWindows headers) +#ifndef WX_PRECOMP + #include "wx/wx.h" +#endif + +#include "wx/image.h" +#include "wx/xrc/xmlres.h" + +// ---------------------------------------------------------------------------- +// resources +// ---------------------------------------------------------------------------- +// the application icon +#if defined(__WXGTK__) || defined(__WXMOTIF__) + #include "rc/appicon.xpm" +#endif + +// ---------------------------------------------------------------------------- +// private classes +// ---------------------------------------------------------------------------- + +// Define a new application type, each program should derive a class from wxApp +class MyApp : public wxApp +{ +public: + // override base class virtuals + // ---------------------------- + + // this one is called on application startup and is a good place for the app + // initialization (doing it here and not in the ctor allows to have an error + // return: if OnInit() returns false, the application terminates) + virtual bool OnInit(); +}; + +// Define a new frame type: this is going to be our main frame +class MyFrame : public wxFrame +{ +public: + // ctor(s) + MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size); + + // event handlers (these functions should _not_ be virtual) + void OnQuit(wxCommandEvent& event); + void OnAbout(wxCommandEvent& event); + void OnDlg1(wxCommandEvent& event); + void OnDlg2(wxCommandEvent& event); + +private: + // any class wishing to process wxWindows events must use this macro + DECLARE_EVENT_TABLE() +}; + +// ---------------------------------------------------------------------------- +// event tables and other macros for wxWindows +// ---------------------------------------------------------------------------- + +// the event tables connect the wxWindows events with the functions (event +// handlers) which process them. It can be also done at run-time, but for the +// simple menu events like this the static method is much simpler. +BEGIN_EVENT_TABLE(MyFrame, wxFrame) + EVT_MENU(XMLID("menu_quit"), MyFrame::OnQuit) + EVT_MENU(XMLID("menu_about"), MyFrame::OnAbout) + EVT_MENU(XMLID("menu_dlg1"), MyFrame::OnDlg1) + EVT_MENU(XMLID("menu_dlg2"), MyFrame::OnDlg2) +END_EVENT_TABLE() + +// Create a new application object: this macro will allow wxWindows to create +// the application object during program execution (it's better than using a +// static object for many reasons) and also declares the accessor function +// wxGetApp() which will return the reference of the right type (i.e. MyApp and +// not wxApp) +IMPLEMENT_APP(MyApp) + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// the application class +// ---------------------------------------------------------------------------- + +// 'Main program' equivalent: the program execution "starts" here +bool MyApp::OnInit() +{ + wxImage::AddHandler(new wxGIFHandler); + wxTheXmlResource->InitAllHandlers(); + wxTheXmlResource->Load("rc/resource.xrc"); + + MyFrame *frame = new MyFrame("XML resources demo", + wxPoint(50, 50), wxSize(450, 340)); + frame->Show(TRUE); + return TRUE; +} + +// ---------------------------------------------------------------------------- +// main frame +// ---------------------------------------------------------------------------- + +// frame constructor +MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size) + : wxFrame((wxFrame *)NULL, -1, title, pos, size) +{ + SetIcon(wxICON(appicon)); + + SetMenuBar(wxTheXmlResource->LoadMenuBar("mainmenu")); + SetToolBar(wxTheXmlResource->LoadToolBar(this, "toolbar")); +} + + +// event handlers + +void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) +{ + // TRUE is to force the frame to close + Close(TRUE); +} + +void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) +{ + wxString msg; + msg.Printf( _T("This is the about dialog of XML resources demo.\n") + _T("Welcome to %s"), wxVERSION_STRING); + + wxMessageBox(msg, "About XML resources demo", wxOK | wxICON_INFORMATION, this); +} + +void MyFrame::OnDlg1(wxCommandEvent& WXUNUSED(event)) +{ + wxDialog dlg; + wxTheXmlResource->LoadDialog(&dlg, this, "dlg1"); + dlg.ShowModal(); +} + + +void MyFrame::OnDlg2(wxCommandEvent& WXUNUSED(event)) +{ + wxDialog dlg; + wxTheXmlResource->LoadDialog(&dlg, this, "dlg2"); + dlg.ShowModal(); +} diff --git a/contrib/samples/xrc/xrcdemo.rc b/contrib/samples/xrc/xrcdemo.rc new file mode 100644 index 0000000000..a5b2ce34e2 --- /dev/null +++ b/contrib/samples/xrc/xrcdemo.rc @@ -0,0 +1,2 @@ +appicon ICON "rc/appicon.ico" +#include "wx/msw/wx.rc" diff --git a/contrib/src/Makefile.in b/contrib/src/Makefile.in index b531e22864..15b4ebb5b0 100644 --- a/contrib/src/Makefile.in +++ b/contrib/src/Makefile.in @@ -1,6 +1,6 @@ # $Id$ -CONTRIB_SUBDIRS=ogl mmedia stc xml applet +CONTRIB_SUBDIRS=ogl mmedia stc xrc applet all: @for d in $(CONTRIB_SUBDIRS); do (cd $$d && $(MAKE)); done diff --git a/contrib/src/xml/FORMAT.txt b/contrib/src/xml/FORMAT.txt deleted file mode 100644 index 6d93b5d28b..0000000000 --- a/contrib/src/xml/FORMAT.txt +++ /dev/null @@ -1,324 +0,0 @@ - - XML resources file format - =============================== - - 1. Basics ------------ - -XML resource is well-formed XML document, i.e. all tags are paired -and there is only one root node, which is always . - -In the following text, I will use standard XML terminology: - - - - - -Here, tag_one is a node (the word 'tag' refers to the type of the node), -prop1 and prop2 are properties and tag_two is a child node of tag_one. -Property's default value is the value that will be assigned to the property -if you do not specify it explicitly. - -I will use the term "primary node" to refer to nodes than represent controls, -dialogs etc. "Secondary nodes" are nodes used to store data: - - primary - Demo Dialog... secondary - 100,200d secondary - secondary - - - - -In the example above,