From cc5fb63bf7768448762cb366555eaf458ccbd1a0 Mon Sep 17 00:00:00 2001 From: Ilya Sinitsyn Date: Tue, 9 Jun 2020 21:30:59 +0700 Subject: [PATCH 1/7] Add wxXmlResourceHandler::GetFilePath() The function already implemented in wxXmlResourceHandlerImpl. Just make it accessible from wxXmlResourceHandler. --- include/wx/xrc/xmlres.h | 2 +- include/wx/xrc/xmlreshandler.h | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/wx/xrc/xmlres.h b/include/wx/xrc/xmlres.h index c19d36dc31..984536230f 100644 --- a/include/wx/xrc/xmlres.h +++ b/include/wx/xrc/xmlres.h @@ -603,7 +603,7 @@ public: // Gets a file path from the given node, expanding environment variables in // it if wxXRC_USE_ENVVARS is in use. - wxString GetFilePath(const wxXmlNode* node); + wxString GetFilePath(const wxXmlNode* node) wxOVERRIDE; // Returns the window associated with the handler (may be NULL). wxWindow* GetParentAsWindow() const { return m_handler->GetParentAsWindow(); } diff --git a/include/wx/xrc/xmlreshandler.h b/include/wx/xrc/xmlreshandler.h index 8e4ffcb691..c4630915ac 100644 --- a/include/wx/xrc/xmlreshandler.h +++ b/include/wx/xrc/xmlreshandler.h @@ -105,6 +105,7 @@ public: virtual wxFont GetFont(const wxString& param = wxT("font"), wxWindow* parent = NULL) = 0; virtual bool GetBoolAttr(const wxString& attr, bool defaultv) = 0; + virtual wxString GetFilePath(const wxXmlNode* node) = 0; virtual void SetupWindow(wxWindow *wnd) = 0; virtual void CreateChildren(wxObject *parent, bool this_hnd_only = false) = 0; virtual void CreateChildrenPrivately(wxObject *parent, @@ -367,6 +368,10 @@ protected: { return GetImpl()->GetBoolAttr(attr, defaultv); } + wxString GetFilePath(const wxXmlNode* node) + { + return GetImpl()->GetFilePath(node); + } void SetupWindow(wxWindow *wnd) { GetImpl()->SetupWindow(wnd); From 2cdcd8492893672ea7945c1149792a41a71a0c1b Mon Sep 17 00:00:00 2001 From: Ilya Sinitsyn Date: Tue, 9 Jun 2020 01:43:40 +0700 Subject: [PATCH 2/7] Support wxGenericAnimationCtrl by the animation control XRC handler --- samples/xrc/myframe.cpp | 6 +++- samples/xrc/rc/controls.xrc | 13 ++++++- src/xrc/xh_animatctrl.cpp | 69 ++++++++++++++++++++++++++++++++----- 3 files changed, 77 insertions(+), 11 deletions(-) diff --git a/samples/xrc/myframe.cpp b/samples/xrc/myframe.cpp index 7fcf80ccbb..70ebe38069 100644 --- a/samples/xrc/myframe.cpp +++ b/samples/xrc/myframe.cpp @@ -52,6 +52,7 @@ #include "objrefdlg.h" // For functions to manipulate the corresponding controls. #include "wx/animate.h" +#include "wx/generic/animate.h" #include "wx/infobar.h" #include "wx/treectrl.h" #include "wx/listctrl.h" @@ -206,14 +207,17 @@ void MyFrame::OnAnimationCtrlPlay(wxCommandEvent& event) wxWindow *win = btn->GetParent(); wxAnimationCtrl *ctrl = XRCCTRL(*win, "controls_animation_ctrl", wxAnimationCtrl); + wxGenericAnimationCtrl *generic = + XRCCTRL(*win, "controls_generic_animation_ctrl", wxGenericAnimationCtrl); if (ctrl->IsPlaying()) { ctrl->Stop(); + generic->Stop(); btn->SetLabel("Play"); } else { - if (ctrl->Play()) + if ( ctrl->Play() && generic->Play() ) btn->SetLabel("Stop"); else wxLogError("Cannot play the animation..."); diff --git a/samples/xrc/rc/controls.xrc b/samples/xrc/rc/controls.xrc index 993b2a2441..13f0d85e4a 100644 --- a/samples/xrc/rc/controls.xrc +++ b/samples/xrc/rc/controls.xrc @@ -68,7 +68,7 @@ 2 - 1 + 2 0 0 0,1 @@ -91,6 +91,17 @@ + + + + wxALIGN_CENTRE|wxALL + 5 + + throbber.gif + stop.xpm + + + diff --git a/src/xrc/xh_animatctrl.cpp b/src/xrc/xh_animatctrl.cpp index d2e8444352..b34874c25c 100644 --- a/src/xrc/xh_animatctrl.cpp +++ b/src/xrc/xh_animatctrl.cpp @@ -18,6 +18,7 @@ #include "wx/xrc/xh_animatctrl.h" #include "wx/animate.h" +#include "wx/generic/animate.h" #include "wx/scopedptr.h" wxIMPLEMENT_DYNAMIC_CLASS(wxAnimationCtrlXmlHandler, wxXmlResourceHandler); @@ -31,16 +32,65 @@ wxAnimationCtrlXmlHandler::wxAnimationCtrlXmlHandler() : wxXmlResourceHandler() wxObject *wxAnimationCtrlXmlHandler::DoCreateResource() { - XRC_MAKE_INSTANCE(ctrl, wxAnimationCtrl) + wxAnimationCtrlBase *ctrl = NULL; + if ( m_instance ) + ctrl = wxStaticCast(m_instance, wxAnimationCtrlBase); - wxScopedPtr animation(GetAnimation(wxT("animation"))); + if ( !ctrl ) + { + if ( m_class == "wxAnimationCtrl" ) + { + ctrl = new wxAnimationCtrl(m_parentAsWindow, + GetID(), + wxNullAnimation, + GetPosition(), GetSize(), + GetStyle("style", wxAC_DEFAULT_STYLE), + GetName()); + } + else + { + ctrl = new wxGenericAnimationCtrl(m_parentAsWindow, + GetID(), + wxNullAnimation, + GetPosition(), GetSize(), + GetStyle("style", wxAC_DEFAULT_STYLE), + GetName()); + } + } + if ( GetBool("hidden", 0) == 1 ) + ctrl->Hide(); - ctrl->Create(m_parentAsWindow, - GetID(), - animation ? *animation : wxNullAnimation, - GetPosition(), GetSize(), - GetStyle(wxT("style"), wxAC_DEFAULT_STYLE), - GetName()); + const wxString aniParam = "animation"; + wxString path = GetFilePath(GetParamNode(aniParam)); + // load the animation from file + if ( !path.empty() ) + { + wxAnimation ani = ctrl->CreateAnimation(); +#if wxUSE_FILESYSTEM + wxScopedPtr fsfile( + GetCurFileSystem().OpenFile(path, wxFS_READ | wxFS_SEEKABLE) + ); + if (fsfile) + { + ani.Load(*fsfile->GetStream()); + } +#else + ani.LoadFile(name); +#endif + + if ( ani.IsOk() ) + { + ctrl->SetAnimation(ani); + } + else + { + ReportParamError + ( + aniParam, + wxString::Format("cannot create animation from \"%s\"", path) + ); + } + } // if no inactive-bitmap has been provided, GetBitmap() will return wxNullBitmap // which just tells wxAnimationCtrl to use the default for inactive status @@ -53,7 +103,8 @@ wxObject *wxAnimationCtrlXmlHandler::DoCreateResource() bool wxAnimationCtrlXmlHandler::CanHandle(wxXmlNode *node) { - return IsOfClass(node, wxT("wxAnimationCtrl")); + return IsOfClass(node, wxT("wxAnimationCtrl")) || + IsOfClass(node, wxT("wxGenericAnimationCtrl")); } #endif // wxUSE_XRC && wxUSE_ANIMATIONCTRL From ac7c40b14162080da504cdf4cd80d4ee5ba2a1f2 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 9 Jun 2020 18:01:16 +0200 Subject: [PATCH 3/7] Add dummy wxBitmap::HasAlpha() to wxX11 This allows to write code using this function without any preprocessor checks. It should arguably be added to wxBitmapBase to ensure that it's available in all ports, but should be done together with UseAlpha(), which is not quite trivial, so leave it for later. --- include/wx/x11/bitmap.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/wx/x11/bitmap.h b/include/wx/x11/bitmap.h index b188a5b140..4e7c418b7c 100644 --- a/include/wx/x11/bitmap.h +++ b/include/wx/x11/bitmap.h @@ -139,6 +139,10 @@ public: WXDisplay *GetDisplay() const; + // This is provided only for compatibility with the other ports, there is + // no alpha support in X11 bitmaps. + bool HasAlpha() const { return false; } + protected: virtual wxGDIRefData *CreateGDIRefData() const; virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; From b1a744ce077dc9d309b9e4dd8ca5458ae9207d37 Mon Sep 17 00:00:00 2001 From: Ilya Sinitsyn Date: Tue, 9 Jun 2020 05:54:09 +0700 Subject: [PATCH 4/7] Fix an issue with the background in wxGenericAnimationCtrl Static bitmap with alpha channel must also be drawn on the memory DC instead of being used directly, just as the bitmaps with a mask. --- src/generic/animateg.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/generic/animateg.cpp b/src/generic/animateg.cpp index bfd826eb04..578827b52b 100644 --- a/src/generic/animateg.cpp +++ b/src/generic/animateg.cpp @@ -454,8 +454,9 @@ void wxGenericAnimationCtrl::DisplayStaticImage() if (m_bmpStaticReal.IsOk()) { // copy the inactive bitmap in the backing store - // eventually using the mask if the static bitmap has one - if ( m_bmpStaticReal.GetMask() ) + // eventually using the mask or the alpha if the static + // bitmap has one + if ( m_bmpStaticReal.GetMask() || m_bmpStaticReal.HasAlpha() ) { wxMemoryDC temp; temp.SelectObject(m_backingStore); From 2c4b0b42710b46cba252f0fe7eba6e94187b9633 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 9 Jun 2020 17:47:45 +0200 Subject: [PATCH 5/7] Get rid of src/xrc/xmladv.cpp file It contained a single function which can be defined in xh_animatctrl.cpp instead as it's only used there anyhow, and this file has no more reason to exist, as "adv" library itself doesn't exist any longer. --- Makefile.in | 16 ---- build/bakefiles/files.bkl | 1 - build/cmake/files.cmake | 3 - build/files | 1 - build/msw/makefile.bcc | 16 ---- build/msw/makefile.gcc | 16 ---- build/msw/makefile.vc | 16 ---- build/msw/wx_vc7_xrc.vcproj | 3 - build/msw/wx_vc8_xrc.vcproj | 4 - build/msw/wx_vc9_xrc.vcproj | 4 - build/msw/wx_xrc.vcxproj | 1 - build/msw/wx_xrc.vcxproj.filters | 3 - build/osx/wxcocoa.xcodeproj/project.pbxproj | 8 -- build/osx/wxiphone.xcodeproj/project.pbxproj | 4 - src/xrc/descrip.mms | 5 +- src/xrc/xh_animatctrl.cpp | 33 ++++++++ src/xrc/xmladv.cpp | 81 -------------------- 17 files changed, 35 insertions(+), 180 deletions(-) delete mode 100644 src/xrc/xmladv.cpp diff --git a/Makefile.in b/Makefile.in index 98e57d5fda..f5d86179ca 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1821,7 +1821,6 @@ XRCDLL_OBJECTS = \ xrcdll_xh_unkwn.o \ xrcdll_xh_wizrd.o \ xrcdll_xmlres.o \ - xrcdll_xmladv.o \ xrcdll_xmlrsall.o XRCDLL_ODEP = $(_____pch_wxprec_xrcdll_wx_wxprec_h_gch___depname) XRCLIB_CXXFLAGS = $(__xrclib_PCH_INC) $(__INC_TIFF_BUILD_p) $(__INC_TIFF_p) \ @@ -1897,7 +1896,6 @@ XRCLIB_OBJECTS = \ xrclib_xh_unkwn.o \ xrclib_xh_wizrd.o \ xrclib_xmlres.o \ - xrclib_xmladv.o \ xrclib_xmlrsall.o XRCLIB_ODEP = $(_____pch_wxprec_xrclib_wx_wxprec_h_gch___depname) AUIDLL_CXXFLAGS = $(__auidll_PCH_INC) $(__INC_TIFF_BUILD_p) $(__INC_TIFF_p) \ @@ -4390,7 +4388,6 @@ COND_USE_GUI_1___MONOLIB_GUI_SRC_OBJECTS = \ monodll_xh_unkwn.o \ monodll_xh_wizrd.o \ monodll_xmlres.o \ - monodll_xmladv.o \ monodll_xmlrsall.o \ monodll_framemanager.o \ monodll_dockart.o \ @@ -6370,7 +6367,6 @@ COND_USE_GUI_1___MONOLIB_GUI_SRC_OBJECTS_1 = \ monolib_xh_unkwn.o \ monolib_xh_wizrd.o \ monolib_xmlres.o \ - monolib_xmladv.o \ monolib_xmlrsall.o \ monolib_framemanager.o \ monolib_dockart.o \ @@ -17362,9 +17358,6 @@ monodll_xh_wizrd.o: $(srcdir)/src/xrc/xh_wizrd.cpp $(MONODLL_ODEP) monodll_xmlres.o: $(srcdir)/src/xrc/xmlres.cpp $(MONODLL_ODEP) $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/xrc/xmlres.cpp -monodll_xmladv.o: $(srcdir)/src/xrc/xmladv.cpp $(MONODLL_ODEP) - $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/xrc/xmladv.cpp - monodll_xmlrsall.o: $(srcdir)/src/xrc/xmlrsall.cpp $(MONODLL_ODEP) $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/xrc/xmlrsall.cpp @@ -22618,9 +22611,6 @@ monolib_xh_wizrd.o: $(srcdir)/src/xrc/xh_wizrd.cpp $(MONOLIB_ODEP) monolib_xmlres.o: $(srcdir)/src/xrc/xmlres.cpp $(MONOLIB_ODEP) $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/xrc/xmlres.cpp -monolib_xmladv.o: $(srcdir)/src/xrc/xmladv.cpp $(MONOLIB_ODEP) - $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/xrc/xmladv.cpp - monolib_xmlrsall.o: $(srcdir)/src/xrc/xmlrsall.cpp $(MONOLIB_ODEP) $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/xrc/xmlrsall.cpp @@ -36187,9 +36177,6 @@ xrcdll_xh_wizrd.o: $(srcdir)/src/xrc/xh_wizrd.cpp $(XRCDLL_ODEP) xrcdll_xmlres.o: $(srcdir)/src/xrc/xmlres.cpp $(XRCDLL_ODEP) $(CXXC) -c -o $@ $(XRCDLL_CXXFLAGS) $(srcdir)/src/xrc/xmlres.cpp -xrcdll_xmladv.o: $(srcdir)/src/xrc/xmladv.cpp $(XRCDLL_ODEP) - $(CXXC) -c -o $@ $(XRCDLL_CXXFLAGS) $(srcdir)/src/xrc/xmladv.cpp - xrcdll_xmlrsall.o: $(srcdir)/src/xrc/xmlrsall.cpp $(XRCDLL_ODEP) $(CXXC) -c -o $@ $(XRCDLL_CXXFLAGS) $(srcdir)/src/xrc/xmlrsall.cpp @@ -36394,9 +36381,6 @@ xrclib_xh_wizrd.o: $(srcdir)/src/xrc/xh_wizrd.cpp $(XRCLIB_ODEP) xrclib_xmlres.o: $(srcdir)/src/xrc/xmlres.cpp $(XRCLIB_ODEP) $(CXXC) -c -o $@ $(XRCLIB_CXXFLAGS) $(srcdir)/src/xrc/xmlres.cpp -xrclib_xmladv.o: $(srcdir)/src/xrc/xmladv.cpp $(XRCLIB_ODEP) - $(CXXC) -c -o $@ $(XRCLIB_CXXFLAGS) $(srcdir)/src/xrc/xmladv.cpp - xrclib_xmlrsall.o: $(srcdir)/src/xrc/xmlrsall.cpp $(XRCLIB_ODEP) $(CXXC) -c -o $@ $(XRCLIB_CXXFLAGS) $(srcdir)/src/xrc/xmlrsall.cpp diff --git a/build/bakefiles/files.bkl b/build/bakefiles/files.bkl index 79668d1719..3dc842b2cd 100644 --- a/build/bakefiles/files.bkl +++ b/build/bakefiles/files.bkl @@ -3095,7 +3095,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file! src/xrc/xh_unkwn.cpp src/xrc/xh_wizrd.cpp src/xrc/xmlres.cpp - src/xrc/xmladv.cpp src/xrc/xmlrsall.cpp diff --git a/build/cmake/files.cmake b/build/cmake/files.cmake index 361cbd9dfd..34d7a1bbc3 100644 --- a/build/cmake/files.cmake +++ b/build/cmake/files.cmake @@ -2587,7 +2587,6 @@ set(UNIV_THEMES_SRC ) set(UNIV_SRC - ${UNIV_PLATFORM_SRC} src/generic/accel.cpp src/generic/clrpickerg.cpp src/generic/collpaneg.cpp @@ -2642,7 +2641,6 @@ set(UNIV_SRC ) set(UNIV_HDR - ${UNIV_PLATFORM_HDR} wx/generic/accel.h wx/generic/clrpickerg.h wx/generic/collpaneg.h @@ -2937,7 +2935,6 @@ set(XRC_SRC src/xrc/xh_unkwn.cpp src/xrc/xh_wizrd.cpp src/xrc/xmlres.cpp - src/xrc/xmladv.cpp src/xrc/xmlrsall.cpp src/xrc/xh_dataview.cpp ) diff --git a/build/files b/build/files index a6263a8801..52ec58ef54 100644 --- a/build/files +++ b/build/files @@ -2878,7 +2878,6 @@ XRC_SRC = src/xrc/xh_unkwn.cpp src/xrc/xh_wizrd.cpp src/xrc/xmlres.cpp - src/xrc/xmladv.cpp src/xrc/xmlrsall.cpp XRC_HDR = wx/xrc/xh_activityindicator.h diff --git a/build/msw/makefile.bcc b/build/msw/makefile.bcc index 11bb68bbe3..995cb1faa5 100644 --- a/build/msw/makefile.bcc +++ b/build/msw/makefile.bcc @@ -1290,7 +1290,6 @@ XRCDLL_OBJECTS = \ $(OBJS)\xrcdll_xh_unkwn.obj \ $(OBJS)\xrcdll_xh_wizrd.obj \ $(OBJS)\xrcdll_xmlres.obj \ - $(OBJS)\xrcdll_xmladv.obj \ $(OBJS)\xrcdll_xmlrsall.obj XRCLIB_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include \ -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib \ @@ -1369,7 +1368,6 @@ XRCLIB_OBJECTS = \ $(OBJS)\xrclib_xh_unkwn.obj \ $(OBJS)\xrclib_xh_wizrd.obj \ $(OBJS)\xrclib_xmlres.obj \ - $(OBJS)\xrclib_xmladv.obj \ $(OBJS)\xrclib_xmlrsall.obj AUIDLL_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include \ -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib \ @@ -1767,7 +1765,6 @@ ____MONOLIB_GUI_SRC_FILENAMES_OBJECTS = \ $(OBJS)\monodll_xh_unkwn.obj \ $(OBJS)\monodll_xh_wizrd.obj \ $(OBJS)\monodll_xmlres.obj \ - $(OBJS)\monodll_xmladv.obj \ $(OBJS)\monodll_xmlrsall.obj \ $(OBJS)\monodll_framemanager.obj \ $(OBJS)\monodll_dockart.obj \ @@ -2602,7 +2599,6 @@ ____MONOLIB_GUI_SRC_FILENAMES_1_OBJECTS = \ $(OBJS)\monolib_xh_unkwn.obj \ $(OBJS)\monolib_xh_wizrd.obj \ $(OBJS)\monolib_xmlres.obj \ - $(OBJS)\monolib_xmladv.obj \ $(OBJS)\monolib_xmlrsall.obj \ $(OBJS)\monolib_framemanager.obj \ $(OBJS)\monolib_dockart.obj \ @@ -7501,9 +7497,6 @@ $(OBJS)\monodll_xh_wizrd.obj: ..\..\src\xrc\xh_wizrd.cpp $(OBJS)\monodll_xmlres.obj: ..\..\src\xrc\xmlres.cpp $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xmlres.cpp -$(OBJS)\monodll_xmladv.obj: ..\..\src\xrc\xmladv.cpp - $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xmladv.cpp - $(OBJS)\monodll_xmlrsall.obj: ..\..\src\xrc\xmlrsall.cpp $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xmlrsall.cpp @@ -10058,9 +10051,6 @@ $(OBJS)\monolib_xh_wizrd.obj: ..\..\src\xrc\xh_wizrd.cpp $(OBJS)\monolib_xmlres.obj: ..\..\src\xrc\xmlres.cpp $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xmlres.cpp -$(OBJS)\monolib_xmladv.obj: ..\..\src\xrc\xmladv.cpp - $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xmladv.cpp - $(OBJS)\monolib_xmlrsall.obj: ..\..\src\xrc\xmlrsall.cpp $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xmlrsall.cpp @@ -16325,9 +16315,6 @@ $(OBJS)\xrcdll_xh_wizrd.obj: ..\..\src\xrc\xh_wizrd.cpp $(OBJS)\xrcdll_xmlres.obj: ..\..\src\xrc\xmlres.cpp $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xmlres.cpp -$(OBJS)\xrcdll_xmladv.obj: ..\..\src\xrc\xmladv.cpp - $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xmladv.cpp - $(OBJS)\xrcdll_xmlrsall.obj: ..\..\src\xrc\xmlrsall.cpp $(CXX) -q -c -P -o$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xmlrsall.cpp @@ -16535,9 +16522,6 @@ $(OBJS)\xrclib_xh_wizrd.obj: ..\..\src\xrc\xh_wizrd.cpp $(OBJS)\xrclib_xmlres.obj: ..\..\src\xrc\xmlres.cpp $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xmlres.cpp -$(OBJS)\xrclib_xmladv.obj: ..\..\src\xrc\xmladv.cpp - $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xmladv.cpp - $(OBJS)\xrclib_xmlrsall.obj: ..\..\src\xrc\xmlrsall.cpp $(CXX) -q -c -P -o$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xmlrsall.cpp diff --git a/build/msw/makefile.gcc b/build/msw/makefile.gcc index d8186009ee..77dc7fd8ca 100644 --- a/build/msw/makefile.gcc +++ b/build/msw/makefile.gcc @@ -1297,7 +1297,6 @@ XRCDLL_OBJECTS = \ $(OBJS)\xrcdll_xh_unkwn.o \ $(OBJS)\xrcdll_xh_wizrd.o \ $(OBJS)\xrcdll_xmlres.o \ - $(OBJS)\xrcdll_xmladv.o \ $(OBJS)\xrcdll_xmlrsall.o XRCLIB_CXXFLAGS = -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png \ -I..\..\src\zlib -I..\..\src\regex -I..\..\src\expat\expat\lib \ @@ -1376,7 +1375,6 @@ XRCLIB_OBJECTS = \ $(OBJS)\xrclib_xh_unkwn.o \ $(OBJS)\xrclib_xh_wizrd.o \ $(OBJS)\xrclib_xmlres.o \ - $(OBJS)\xrclib_xmladv.o \ $(OBJS)\xrclib_xmlrsall.o AUIDLL_CXXFLAGS = -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png \ -I..\..\src\zlib -I..\..\src\regex -I..\..\src\expat\expat\lib \ @@ -1791,7 +1789,6 @@ ____MONOLIB_GUI_SRC_FILENAMES_OBJECTS = \ $(OBJS)\monodll_xh_unkwn.o \ $(OBJS)\monodll_xh_wizrd.o \ $(OBJS)\monodll_xmlres.o \ - $(OBJS)\monodll_xmladv.o \ $(OBJS)\monodll_xmlrsall.o \ $(OBJS)\monodll_framemanager.o \ $(OBJS)\monodll_dockart.o \ @@ -2632,7 +2629,6 @@ ____MONOLIB_GUI_SRC_FILENAMES_1_OBJECTS = \ $(OBJS)\monolib_xh_unkwn.o \ $(OBJS)\monolib_xh_wizrd.o \ $(OBJS)\monolib_xmlres.o \ - $(OBJS)\monolib_xmladv.o \ $(OBJS)\monolib_xmlrsall.o \ $(OBJS)\monolib_framemanager.o \ $(OBJS)\monolib_dockart.o \ @@ -7805,9 +7801,6 @@ $(OBJS)\monodll_xh_wizrd.o: ../../src/xrc/xh_wizrd.cpp $(OBJS)\monodll_xmlres.o: ../../src/xrc/xmlres.cpp $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< -$(OBJS)\monodll_xmladv.o: ../../src/xrc/xmladv.cpp - $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< - $(OBJS)\monodll_xmlrsall.o: ../../src/xrc/xmlrsall.cpp $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $< @@ -10362,9 +10355,6 @@ $(OBJS)\monolib_xh_wizrd.o: ../../src/xrc/xh_wizrd.cpp $(OBJS)\monolib_xmlres.o: ../../src/xrc/xmlres.cpp $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< -$(OBJS)\monolib_xmladv.o: ../../src/xrc/xmladv.cpp - $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< - $(OBJS)\monolib_xmlrsall.o: ../../src/xrc/xmlrsall.cpp $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $< @@ -16629,9 +16619,6 @@ $(OBJS)\xrcdll_xh_wizrd.o: ../../src/xrc/xh_wizrd.cpp $(OBJS)\xrcdll_xmlres.o: ../../src/xrc/xmlres.cpp $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< -$(OBJS)\xrcdll_xmladv.o: ../../src/xrc/xmladv.cpp - $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< - $(OBJS)\xrcdll_xmlrsall.o: ../../src/xrc/xmlrsall.cpp $(CXX) -c -o $@ $(XRCDLL_CXXFLAGS) $(CPPDEPS) $< @@ -16839,9 +16826,6 @@ $(OBJS)\xrclib_xh_wizrd.o: ../../src/xrc/xh_wizrd.cpp $(OBJS)\xrclib_xmlres.o: ../../src/xrc/xmlres.cpp $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< -$(OBJS)\xrclib_xmladv.o: ../../src/xrc/xmladv.cpp - $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< - $(OBJS)\xrclib_xmlrsall.o: ../../src/xrc/xmlrsall.cpp $(CXX) -c -o $@ $(XRCLIB_CXXFLAGS) $(CPPDEPS) $< diff --git a/build/msw/makefile.vc b/build/msw/makefile.vc index 84c6333c02..2a7a3077d3 100644 --- a/build/msw/makefile.vc +++ b/build/msw/makefile.vc @@ -1431,7 +1431,6 @@ XRCDLL_OBJECTS = \ $(OBJS)\xrcdll_xh_unkwn.obj \ $(OBJS)\xrcdll_xh_wizrd.obj \ $(OBJS)\xrcdll_xmlres.obj \ - $(OBJS)\xrcdll_xmladv.obj \ $(OBJS)\xrcdll_xmlrsall.obj XRCDLL_RESOURCES = \ $(OBJS)\xrcdll_version.res @@ -1517,7 +1516,6 @@ XRCLIB_OBJECTS = \ $(OBJS)\xrclib_xh_unkwn.obj \ $(OBJS)\xrclib_xh_wizrd.obj \ $(OBJS)\xrclib_xmlres.obj \ - $(OBJS)\xrclib_xmladv.obj \ $(OBJS)\xrclib_xmlrsall.obj AUIDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_457)$(__DEBUGRUNTIME) /DWIN32 \ /I..\..\src\tiff\libtiff /I..\..\src\jpeg /I..\..\src\png /I..\..\src\zlib \ @@ -2272,7 +2270,6 @@ ____MONOLIB_GUI_SRC_FILENAMES_OBJECTS = \ $(OBJS)\monodll_xh_unkwn.obj \ $(OBJS)\monodll_xh_wizrd.obj \ $(OBJS)\monodll_xmlres.obj \ - $(OBJS)\monodll_xmladv.obj \ $(OBJS)\monodll_xmlrsall.obj \ $(OBJS)\monodll_framemanager.obj \ $(OBJS)\monodll_dockart.obj \ @@ -3113,7 +3110,6 @@ ____MONOLIB_GUI_SRC_FILENAMES_1_OBJECTS = \ $(OBJS)\monolib_xh_unkwn.obj \ $(OBJS)\monolib_xh_wizrd.obj \ $(OBJS)\monolib_xmlres.obj \ - $(OBJS)\monolib_xmladv.obj \ $(OBJS)\monolib_xmlrsall.obj \ $(OBJS)\monolib_framemanager.obj \ $(OBJS)\monolib_dockart.obj \ @@ -8404,9 +8400,6 @@ $(OBJS)\monodll_xh_wizrd.obj: ..\..\src\xrc\xh_wizrd.cpp $(OBJS)\monodll_xmlres.obj: ..\..\src\xrc\xmlres.cpp $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xmlres.cpp -$(OBJS)\monodll_xmladv.obj: ..\..\src\xrc\xmladv.cpp - $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xmladv.cpp - $(OBJS)\monodll_xmlrsall.obj: ..\..\src\xrc\xmlrsall.cpp $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\xrc\xmlrsall.cpp @@ -10961,9 +10954,6 @@ $(OBJS)\monolib_xh_wizrd.obj: ..\..\src\xrc\xh_wizrd.cpp $(OBJS)\monolib_xmlres.obj: ..\..\src\xrc\xmlres.cpp $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xmlres.cpp -$(OBJS)\monolib_xmladv.obj: ..\..\src\xrc\xmladv.cpp - $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xmladv.cpp - $(OBJS)\monolib_xmlrsall.obj: ..\..\src\xrc\xmlrsall.cpp $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\xrc\xmlrsall.cpp @@ -17228,9 +17218,6 @@ $(OBJS)\xrcdll_xh_wizrd.obj: ..\..\src\xrc\xh_wizrd.cpp $(OBJS)\xrcdll_xmlres.obj: ..\..\src\xrc\xmlres.cpp $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xmlres.cpp -$(OBJS)\xrcdll_xmladv.obj: ..\..\src\xrc\xmladv.cpp - $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xmladv.cpp - $(OBJS)\xrcdll_xmlrsall.obj: ..\..\src\xrc\xmlrsall.cpp $(CXX) /c /nologo /TP /Fo$@ $(XRCDLL_CXXFLAGS) ..\..\src\xrc\xmlrsall.cpp @@ -17438,9 +17425,6 @@ $(OBJS)\xrclib_xh_wizrd.obj: ..\..\src\xrc\xh_wizrd.cpp $(OBJS)\xrclib_xmlres.obj: ..\..\src\xrc\xmlres.cpp $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xmlres.cpp -$(OBJS)\xrclib_xmladv.obj: ..\..\src\xrc\xmladv.cpp - $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xmladv.cpp - $(OBJS)\xrclib_xmlrsall.obj: ..\..\src\xrc\xmlrsall.cpp $(CXX) /c /nologo /TP /Fo$@ $(XRCLIB_CXXFLAGS) ..\..\src\xrc\xmlrsall.cpp diff --git a/build/msw/wx_vc7_xrc.vcproj b/build/msw/wx_vc7_xrc.vcproj index 934653bcdb..c4fb5d9229 100644 --- a/build/msw/wx_vc7_xrc.vcproj +++ b/build/msw/wx_vc7_xrc.vcproj @@ -820,9 +820,6 @@ - - diff --git a/build/msw/wx_vc8_xrc.vcproj b/build/msw/wx_vc8_xrc.vcproj index d1923d757e..1883a66dac 100644 --- a/build/msw/wx_vc8_xrc.vcproj +++ b/build/msw/wx_vc8_xrc.vcproj @@ -1595,10 +1595,6 @@ RelativePath="..\..\src\xrc\xh_wizrd.cpp" > - - diff --git a/build/msw/wx_vc9_xrc.vcproj b/build/msw/wx_vc9_xrc.vcproj index 5485155ab2..d1287e58f5 100644 --- a/build/msw/wx_vc9_xrc.vcproj +++ b/build/msw/wx_vc9_xrc.vcproj @@ -1591,10 +1591,6 @@ RelativePath="..\..\src\xrc\xh_wizrd.cpp" > - - diff --git a/build/msw/wx_xrc.vcxproj b/build/msw/wx_xrc.vcxproj index 90b73196f4..7b7003e67a 100644 --- a/build/msw/wx_xrc.vcxproj +++ b/build/msw/wx_xrc.vcxproj @@ -520,7 +520,6 @@ - diff --git a/build/msw/wx_xrc.vcxproj.filters b/build/msw/wx_xrc.vcxproj.filters index f6da18c850..805c605a43 100644 --- a/build/msw/wx_xrc.vcxproj.filters +++ b/build/msw/wx_xrc.vcxproj.filters @@ -223,9 +223,6 @@ Source Files - - Source Files - Source Files diff --git a/build/osx/wxcocoa.xcodeproj/project.pbxproj b/build/osx/wxcocoa.xcodeproj/project.pbxproj index 683c990c30..364f1e4484 100644 --- a/build/osx/wxcocoa.xcodeproj/project.pbxproj +++ b/build/osx/wxcocoa.xcodeproj/project.pbxproj @@ -1556,9 +1556,6 @@ 86003C8EB906304F9025F788 /* jcinit.c in Sources */ = {isa = PBXBuildFile; fileRef = AA6C6739C3BD3EFA9CF71102 /* jcinit.c */; }; 86003C8EB906304F9025F789 /* jcinit.c in Sources */ = {isa = PBXBuildFile; fileRef = AA6C6739C3BD3EFA9CF71102 /* jcinit.c */; }; 86003C8EB906304F9025F78A /* jcinit.c in Sources */ = {isa = PBXBuildFile; fileRef = AA6C6739C3BD3EFA9CF71102 /* jcinit.c */; }; - 867F5D1962383C98A8ADDC3D /* xmladv.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A1E1A01885B036C28EBDAE27 /* xmladv.cpp */; }; - 867F5D1962383C98A8ADDC3E /* xmladv.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A1E1A01885B036C28EBDAE27 /* xmladv.cpp */; }; - 867F5D1962383C98A8ADDC3F /* xmladv.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A1E1A01885B036C28EBDAE27 /* xmladv.cpp */; }; 86AED49CEAFC3637B1F10537 /* dialog_osx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BDE76674C0F5391BAD2AFA2F /* dialog_osx.cpp */; }; 86AED49CEAFC3637B1F10538 /* dialog_osx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BDE76674C0F5391BAD2AFA2F /* dialog_osx.cpp */; }; 86AED49CEAFC3637B1F10539 /* dialog_osx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BDE76674C0F5391BAD2AFA2F /* dialog_osx.cpp */; }; @@ -4456,7 +4453,6 @@ A1276C0E5D48337489DEE8DF /* LexErlang.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = LexErlang.cxx; path = ../../src/stc/scintilla/lexers/LexErlang.cxx; sourceTree = ""; }; A1A53EC3A3463EFDB7614E93 /* bitmap.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = bitmap.cpp; path = ../../src/osx/core/bitmap.cpp; sourceTree = ""; }; A1CB6A4171D4343BB0A9858A /* msgdlgg.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = msgdlgg.cpp; path = ../../src/generic/msgdlgg.cpp; sourceTree = ""; }; - A1E1A01885B036C28EBDAE27 /* xmladv.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = xmladv.cpp; path = ../../src/xrc/xmladv.cpp; sourceTree = ""; }; A284E855892F3A9E9E19E854 /* LexTADS3.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = LexTADS3.cxx; path = ../../src/stc/scintilla/lexers/LexTADS3.cxx; sourceTree = ""; }; A298576700C33F018616E7BD /* auibook.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = auibook.cpp; path = ../../src/aui/auibook.cpp; sourceTree = ""; }; A37E3D1FB4FB31AFAE88665A /* dpycmn.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = dpycmn.cpp; path = ../../src/common/dpycmn.cpp; sourceTree = ""; }; @@ -5812,7 +5808,6 @@ 15FCCD1B587637DDA3C1748A /* xh_unkwn.cpp */, EBD381E57BAE3F2AA31A68CB /* xh_wizrd.cpp */, 087B66573CD33DA99DA82B1C /* xmlres.cpp */, - A1E1A01885B036C28EBDAE27 /* xmladv.cpp */, 29922DF1D0D63C33A186E783 /* xmlrsall.cpp */, ); name = xrc; @@ -8009,7 +8004,6 @@ C5A8DF376BB13A2A8290C2E7 /* xh_unkwn.cpp in Sources */, 37DD17F479A1371ABF3589BB /* xh_wizrd.cpp in Sources */, 1710A4BB0E6339558A187F8F /* xmlres.cpp in Sources */, - 867F5D1962383C98A8ADDC3F /* xmladv.cpp in Sources */, 135DFCE48FC03D8294D01A8B /* xmlrsall.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -8657,7 +8651,6 @@ C5A8DF376BB13A2A8290C2E6 /* xh_unkwn.cpp in Sources */, 37DD17F479A1371ABF3589BA /* xh_wizrd.cpp in Sources */, 1710A4BB0E6339558A187F8E /* xmlres.cpp in Sources */, - 867F5D1962383C98A8ADDC3E /* xmladv.cpp in Sources */, 135DFCE48FC03D8294D01A8A /* xmlrsall.cpp in Sources */, 50E89226E8D7390D9D21C80A /* debugrpt.cpp in Sources */, 7C5552FA058034238F485901 /* dbgrptg.cpp in Sources */, @@ -9884,7 +9877,6 @@ C5A8DF376BB13A2A8290C2E5 /* xh_unkwn.cpp in Sources */, 37DD17F479A1371ABF3589B9 /* xh_wizrd.cpp in Sources */, 1710A4BB0E6339558A187F8D /* xmlres.cpp in Sources */, - 867F5D1962383C98A8ADDC3D /* xmladv.cpp in Sources */, 135DFCE48FC03D8294D01A89 /* xmlrsall.cpp in Sources */, 50E89226E8D7390D9D21C809 /* debugrpt.cpp in Sources */, 7C5552FA058034238F485900 /* dbgrptg.cpp in Sources */, diff --git a/build/osx/wxiphone.xcodeproj/project.pbxproj b/build/osx/wxiphone.xcodeproj/project.pbxproj index e64d711aae..d4158649d9 100644 --- a/build/osx/wxiphone.xcodeproj/project.pbxproj +++ b/build/osx/wxiphone.xcodeproj/project.pbxproj @@ -449,7 +449,6 @@ 84B3625464F732C3A79E1314 /* xh_bmpbt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 11AE4D94B791344AB6BF6397 /* xh_bmpbt.cpp */; }; 85F9828B80B03178A274BD17 /* selstore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5ED2105A5A033E3384EBC4ED /* selstore.cpp */; }; 86003C8EB906304F9025F788 /* jcinit.c in Sources */ = {isa = PBXBuildFile; fileRef = AA6C6739C3BD3EFA9CF71102 /* jcinit.c */; }; - 867F5D1962383C98A8ADDC3D /* xmladv.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A1E1A01885B036C28EBDAE27 /* xmladv.cpp */; }; 86AED49CEAFC3637B1F10537 /* dialog_osx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BDE76674C0F5391BAD2AFA2F /* dialog_osx.cpp */; }; 86B0D280A43C308CAC14BE24 /* CaseFolder.cxx in Sources */ = {isa = PBXBuildFile; fileRef = F52DCBC0442233738B39138E /* CaseFolder.cxx */; }; 86BE5213D3F131D8A6862679 /* hid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 160EB9744CB63A0B81DC651F /* hid.cpp */; }; @@ -1391,7 +1390,6 @@ A1276C0E5D48337489DEE8DF /* LexErlang.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = LexErlang.cxx; path = ../../src/stc/scintilla/lexers/LexErlang.cxx; sourceTree = ""; }; A1A53EC3A3463EFDB7614E93 /* bitmap.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = bitmap.cpp; path = ../../src/osx/core/bitmap.cpp; sourceTree = ""; }; A1CB6A4171D4343BB0A9858A /* msgdlgg.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = msgdlgg.cpp; path = ../../src/generic/msgdlgg.cpp; sourceTree = ""; }; - A1E1A01885B036C28EBDAE27 /* xmladv.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = xmladv.cpp; path = ../../src/xrc/xmladv.cpp; sourceTree = ""; }; A284E855892F3A9E9E19E854 /* LexTADS3.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = LexTADS3.cxx; path = ../../src/stc/scintilla/lexers/LexTADS3.cxx; sourceTree = ""; }; A298576700C33F018616E7BD /* auibook.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = auibook.cpp; path = ../../src/aui/auibook.cpp; sourceTree = ""; }; A37E3D1FB4FB31AFAE88665A /* dpycmn.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = dpycmn.cpp; path = ../../src/common/dpycmn.cpp; sourceTree = ""; }; @@ -2396,7 +2394,6 @@ 15FCCD1B587637DDA3C1748A /* xh_unkwn.cpp */, EBD381E57BAE3F2AA31A68CB /* xh_wizrd.cpp */, 087B66573CD33DA99DA82B1C /* xmlres.cpp */, - A1E1A01885B036C28EBDAE27 /* xmladv.cpp */, 29922DF1D0D63C33A186E783 /* xmlrsall.cpp */, ); name = xrc; @@ -3410,7 +3407,6 @@ C5A8DF376BB13A2A8290C2E5 /* xh_unkwn.cpp in Sources */, 37DD17F479A1371ABF3589B9 /* xh_wizrd.cpp in Sources */, 1710A4BB0E6339558A187F8D /* xmlres.cpp in Sources */, - 867F5D1962383C98A8ADDC3D /* xmladv.cpp in Sources */, 135DFCE48FC03D8294D01A89 /* xmlrsall.cpp in Sources */, 50E89226E8D7390D9D21C809 /* debugrpt.cpp in Sources */, 7C5552FA058034238F485900 /* dbgrptg.cpp in Sources */, diff --git a/src/xrc/descrip.mms b/src/xrc/descrip.mms index 8f72641754..0f2651c6ec 100644 --- a/src/xrc/descrip.mms +++ b/src/xrc/descrip.mms @@ -55,7 +55,7 @@ OBJECTS=xh_bmp.obj,xh_bmpbt.obj,xh_bttn.obj,xh_cald.obj,xh_chckb.obj,\ xh_fontpicker.obj,xh_clrpicker.obj,xh_odcombo.obj,xh_mdi.obj,\ xh_grid.obj,xh_datectrl.obj,xh_treebk.obj,xh_bmpcbox.obj,\ xh_animatctrl.obj,xh_htmllbox.obj,xh_collpane.obj,xh_srchctrl.obj,\ - xh_propdlg.obj,xh_comboctrl.obj,xmladv.obj,xh_editlbox.obj,\ + xh_propdlg.obj,xh_comboctrl.obj,xh_editlbox.obj,\ xh_filectrl.obj,xh_cmdlinkbn.obj,xh_toolbk.obj,xh_bannerwindow.obj,\ xh_timectrl.obj,xmlreshandler.obj,xh_ribbon.obj,xh_auitoolb.obj,\ xh_aui.obj,xh_simplebook.obj,xh_activityindicator.obj,\ @@ -73,7 +73,7 @@ SOURCES =xh_bmp.cpp,xh_bmpbt.cpp,xh_bttn.cpp,xh_cald.cpp,xh_chckb.cpp,\ xh_fontpicker.cpp,xh_clrpicker.cpp,xh_odcombo.cpp,xh_mdi.cpp,\ xh_grid.cpp,xh_datectrl.cpp,xh_treebk.cpp,xh_bmpcbox.cpp,\ xh_animatctrl.cpp,xh_htmllbox.cpp,xh_collpane.cpp,xh_srchctrl.cpp,\ - xh_propdlg.cpp,xh_comboctrl.cpp,xmladv.cpp,xh_editlbox.cpp,\ + xh_propdlg.cpp,xh_comboctrl.cpp,xh_editlbox.cpp,\ xh_filectrl.cpp,xh_cmdlinkbn.cpp,xh_toolbk.cpp,xh_bannerwindow.cpp,\ xh_timectrl.cpp,xmlreshandler.cpp,xh_ribbon.cpp,xh_auitoolb.cpp,\ xh_aui.cpp,xh_simplebook.cpp,xh_activityindicator.cpp,\ @@ -158,7 +158,6 @@ xh_htmllbox.obj : xh_htmllbox.cpp xh_collpane.obj : xh_collpane.cpp xh_srchctrl.obj : xh_srchctrl.cpp xh_propdlg.obj : xh_propdlg.cpp -xmladv.obj : xmladv.cpp xh_editlbox.obj : xh_editlbox.cpp xh_filectrl.obj : xh_filectrl.cpp xh_cmdlinkbn.obj : xh_cmdlinkbn.cpp diff --git a/src/xrc/xh_animatctrl.cpp b/src/xrc/xh_animatctrl.cpp index b34874c25c..fb98705bf7 100644 --- a/src/xrc/xh_animatctrl.cpp +++ b/src/xrc/xh_animatctrl.cpp @@ -107,4 +107,37 @@ bool wxAnimationCtrlXmlHandler::CanHandle(wxXmlNode *node) IsOfClass(node, wxT("wxGenericAnimationCtrl")); } +wxAnimation* wxXmlResourceHandlerImpl::GetAnimation(const wxString& param) +{ + wxString name = GetFilePath(GetParamNode(param)); + if ( name.empty() ) + return NULL; + + // load the animation from file + wxScopedPtr ani(new wxAnimation); +#if wxUSE_FILESYSTEM + wxFSFile * const + fsfile = GetCurFileSystem().OpenFile(name, wxFS_READ | wxFS_SEEKABLE); + if ( fsfile ) + { + ani->Load(*fsfile->GetStream()); + delete fsfile; + } +#else + ani->LoadFile(name); +#endif + + if ( !ani->IsOk() ) + { + ReportParamError + ( + param, + wxString::Format("cannot create animation from \"%s\"", name) + ); + return NULL; + } + + return ani.release(); +} + #endif // wxUSE_XRC && wxUSE_ANIMATIONCTRL diff --git a/src/xrc/xmladv.cpp b/src/xrc/xmladv.cpp deleted file mode 100644 index 861f1f73ee..0000000000 --- a/src/xrc/xmladv.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Name: src/xrc/xmladv.cpp -// Purpose: Parts of wxXRC library depending on wxAdv: they must not be in -// xmlres.cpp itself or it becomes impossible to use wxXRC without -// linking wxAdv even if the latter is not used at all. -// Author: Vadim Zeitlin (extracted from src/xrc/xmlres.cpp) -// Created: 2008-08-02 -// Copyright: (c) 2000 Vaclav Slavik -// Licence: wxWindows licence -/////////////////////////////////////////////////////////////////////////////// - -// ============================================================================ -// declarations -// ============================================================================ - -// ---------------------------------------------------------------------------- -// headers -// ---------------------------------------------------------------------------- - -// for compilers that support precompilation, includes "wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ - #pragma hdrstop -#endif - -#if wxUSE_XRC - -#include "wx/xrc/xmlres.h" - -#ifndef WX_PRECOMP - #include "wx/log.h" -#endif // WX_PRECOMP - -#include "wx/animate.h" -#include "wx/scopedptr.h" - -// ============================================================================ -// implementation -// ============================================================================ - -#if wxUSE_ANIMATIONCTRL -wxAnimation* wxXmlResourceHandlerImpl::GetAnimation(const wxString& param) -{ - wxString name = GetFilePath(GetParamNode(param)); - if ( name.empty() ) - return NULL; - - // load the animation from file - wxScopedPtr ani(new wxAnimation); -#if wxUSE_FILESYSTEM - wxFSFile * const - fsfile = GetCurFileSystem().OpenFile(name, wxFS_READ | wxFS_SEEKABLE); - if ( fsfile ) - { - ani->Load(*fsfile->GetStream()); - delete fsfile; - } -#else - ani->LoadFile(name); -#endif - - if ( !ani->IsOk() ) - { - ReportParamError - ( - param, - wxString::Format("cannot create animation from \"%s\"", name) - ); - return NULL; - } - - return ani.release(); -} -#endif // wxUSE_ANIMATIONCTRL - -#endif // wxUSE_XRC - - - - From 8ff6fa6f54982826f83c6d3ecf9741ed10115053 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 9 Jun 2020 18:05:00 +0200 Subject: [PATCH 6/7] Use GetAnimation() in wxAnimationCtrlXmlHandler again This function basically only exists in order to be used in this handler, so extend it to allow doing it by adding wxAnimationCtrlBase argument to it, allowing it to create wxAnimation object compatible with the given control. This reduces code duplication and, incidentally, makes GetAnimation() more useful for any user-defined XRC handlers. --- include/wx/xrc/xmlres.h | 6 +++-- include/wx/xrc/xmlreshandler.h | 9 +++++--- interface/wx/xrc/xmlres.h | 9 +++++++- src/xrc/xh_animatctrl.cpp | 40 ++++++---------------------------- 4 files changed, 25 insertions(+), 39 deletions(-) diff --git a/include/wx/xrc/xmlres.h b/include/wx/xrc/xmlres.h index 984536230f..9b74828fc2 100644 --- a/include/wx/xrc/xmlres.h +++ b/include/wx/xrc/xmlres.h @@ -591,8 +591,10 @@ public: wxImageList *GetImageList(const wxString& param = wxT("imagelist")) wxOVERRIDE; #if wxUSE_ANIMATIONCTRL - // Gets an animation. - wxAnimation* GetAnimation(const wxString& param = wxT("animation")) wxOVERRIDE; + // Gets an animation creating it using the provided control (so that it + // will be compatible with it) if any. + wxAnimation* GetAnimation(const wxString& param = wxT("animation"), + wxAnimationCtrlBase* ctrl = NULL) wxOVERRIDE; #endif // Gets a font. diff --git a/include/wx/xrc/xmlreshandler.h b/include/wx/xrc/xmlreshandler.h index c4630915ac..b478356d6d 100644 --- a/include/wx/xrc/xmlreshandler.h +++ b/include/wx/xrc/xmlreshandler.h @@ -22,6 +22,7 @@ #include "wx/window.h" class WXDLLIMPEXP_FWD_CORE wxAnimation; +class WXDLLIMPEXP_FWD_CORE wxAnimationCtrlBase; class WXDLLIMPEXP_FWD_XML wxXmlNode; class WXDLLIMPEXP_FWD_XML wxXmlResource; @@ -100,7 +101,8 @@ public: virtual wxImageList *GetImageList(const wxString& param = wxT("imagelist")) = 0; #if wxUSE_ANIMATIONCTRL - virtual wxAnimation* GetAnimation(const wxString& param = wxT("animation")) = 0; + virtual wxAnimation* GetAnimation(const wxString& param = wxT("animation"), + wxAnimationCtrlBase* ctrl = NULL) = 0; #endif virtual wxFont GetFont(const wxString& param = wxT("font"), wxWindow* parent = NULL) = 0; @@ -353,9 +355,10 @@ protected: } #if wxUSE_ANIMATIONCTRL - wxAnimation* GetAnimation(const wxString& param = wxT("animation")) + wxAnimation* GetAnimation(const wxString& param = wxT("animation"), + wxAnimationCtrlBase* ctrl = NULL) { - return GetImpl()->GetAnimation(param); + return GetImpl()->GetAnimation(param, ctrl); } #endif diff --git a/interface/wx/xrc/xmlres.h b/interface/wx/xrc/xmlres.h index 0c625ce724..9feca5980f 100644 --- a/interface/wx/xrc/xmlres.h +++ b/interface/wx/xrc/xmlres.h @@ -542,8 +542,15 @@ protected: /** Creates an animation (see wxAnimation) from the filename specified in @a param. + + It is recommended to provide @a ctrl argument to this function (which + is only available in wxWidgets 3.1.4 or later) to make sure that the + created animation is compatible with the specified control, otherwise a + wxAnimation object compatible with the default wxAnimationCtrl + implementation is created. */ - wxAnimation* GetAnimation(const wxString& param = "animation"); + wxAnimation* GetAnimation(const wxString& param = "animation", + wxAnimationCtrlBase* ctrl = NULL); /** Gets a bitmap. diff --git a/src/xrc/xh_animatctrl.cpp b/src/xrc/xh_animatctrl.cpp index fb98705bf7..d75502b1ce 100644 --- a/src/xrc/xh_animatctrl.cpp +++ b/src/xrc/xh_animatctrl.cpp @@ -60,37 +60,9 @@ wxObject *wxAnimationCtrlXmlHandler::DoCreateResource() if ( GetBool("hidden", 0) == 1 ) ctrl->Hide(); - const wxString aniParam = "animation"; - wxString path = GetFilePath(GetParamNode(aniParam)); - // load the animation from file - if ( !path.empty() ) - { - wxAnimation ani = ctrl->CreateAnimation(); -#if wxUSE_FILESYSTEM - wxScopedPtr fsfile( - GetCurFileSystem().OpenFile(path, wxFS_READ | wxFS_SEEKABLE) - ); - if (fsfile) - { - ani.Load(*fsfile->GetStream()); - } -#else - ani.LoadFile(name); -#endif - - if ( ani.IsOk() ) - { - ctrl->SetAnimation(ani); - } - else - { - ReportParamError - ( - aniParam, - wxString::Format("cannot create animation from \"%s\"", path) - ); - } - } + wxScopedPtr animation(GetAnimation("animation", ctrl)); + if ( animation ) + ctrl->SetAnimation(*animation); // if no inactive-bitmap has been provided, GetBitmap() will return wxNullBitmap // which just tells wxAnimationCtrl to use the default for inactive status @@ -107,14 +79,16 @@ bool wxAnimationCtrlXmlHandler::CanHandle(wxXmlNode *node) IsOfClass(node, wxT("wxGenericAnimationCtrl")); } -wxAnimation* wxXmlResourceHandlerImpl::GetAnimation(const wxString& param) +wxAnimation* wxXmlResourceHandlerImpl::GetAnimation(const wxString& param, + wxAnimationCtrlBase* ctrl) { wxString name = GetFilePath(GetParamNode(param)); if ( name.empty() ) return NULL; // load the animation from file - wxScopedPtr ani(new wxAnimation); + wxScopedPtr ani(ctrl ? new wxAnimation(ctrl->CreateAnimation()) + : new wxAnimation); #if wxUSE_FILESYSTEM wxFSFile * const fsfile = GetCurFileSystem().OpenFile(name, wxFS_READ | wxFS_SEEKABLE); From 9e2434d01397dae3252a12292c4281329e2c7359 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 10 Jun 2020 00:00:54 +0200 Subject: [PATCH 7/7] Document wxGenericAnimationCtrl XRC handler and it to XRC schema It's actually the same handler as for wxAnimationCtrl, but it still needs to be mentioned in the XRC format description and recognized by its schema. --- docs/doxygen/overviews/xrc_format.h | 8 ++++++++ misc/schema/xrc_schema.rnc | 12 ++++++++++++ 2 files changed, 20 insertions(+) diff --git a/docs/doxygen/overviews/xrc_format.h b/docs/doxygen/overviews/xrc_format.h index 6dcf45c947..94db32f09c 100644 --- a/docs/doxygen/overviews/xrc_format.h +++ b/docs/doxygen/overviews/xrc_format.h @@ -1185,6 +1185,14 @@ objects. If sizer child is used, it sets Ignored, preserved only for compatibility.} @endTable +@subsubsection xrc_wxgenericanimationctrl wxGenericAnimationCtrl + +This handler is identical to the one for @ref xrc_wxanimationctrl +"wxAnimationCtrl", please see it for more information. The only difference is +that, for the platforms with a native wxAnimationCtrl implementation, using +this handler creates a generic control rather than a native one. + + @subsubsection xrc_wxgenericdirctrl wxGenericDirCtrl @beginTable diff --git a/misc/schema/xrc_schema.rnc b/misc/schema/xrc_schema.rnc index a1ac038de6..8b63cbe642 100644 --- a/misc/schema/xrc_schema.rnc +++ b/misc/schema/xrc_schema.rnc @@ -189,6 +189,7 @@ builtinWindowClasses = | wxFontPickerCtrl | wxFrame | wxGauge + | wxGenericAnimationCtrl | wxGenericDirCtrl | wxGrid | wxHtmlWindow @@ -290,6 +291,7 @@ builtinClassesNames = | "wxFontPickerCtrl" | "wxFrame" | "wxGauge" + | "wxGenericAnimationCtrl" | "wxGenericDirCtrl" | "wxGrid" | "wxHtmlWindow" @@ -986,6 +988,16 @@ wxGauge = } +wxGenericAnimationCtrl = + element object { + attribute class { "wxGenericAnimationCtrl" } & + stdObjectNodeAttributes & + stdWindowProperties & + [xrc:p="o"] element animation {_, t_url }* & + [xrc:p="o"] element inactive-bitmap {_, t_bitmap }* + } + + wxGenericDirCtrl = element object { attribute class { "wxGenericDirCtrl" } &