Merge branch 'xrc-generic-animation-ctrl'

Extend wxAnimationCtrl XRC handler to cover wxGenericAnimationCtrl too.

Also fix a bug with wxGenericAnimationCtrl inactive bitmap background.

See https://github.com/wxWidgets/wxWidgets/pull/1889
This commit is contained in:
Vadim Zeitlin 2020-06-10 00:02:59 +02:00
commit 13477ee164
26 changed files with 137 additions and 200 deletions

View File

@ -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

View File

@ -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
</set>
<set var="XRC_HDR" hints="files">

View File

@ -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
)

View File

@ -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

View File

@ -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

View File

@ -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) $<

View File

@ -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

View File

@ -820,9 +820,6 @@
<File
RelativePath="..\..\src\xrc\xh_wizrd.cpp">
</File>
<File
RelativePath="..\..\src\xrc\xmladv.cpp">
</File>
<File
RelativePath="..\..\src\xrc\xmlres.cpp">
</File>

View File

@ -1595,10 +1595,6 @@
RelativePath="..\..\src\xrc\xh_wizrd.cpp"
>
</File>
<File
RelativePath="..\..\src\xrc\xmladv.cpp"
>
</File>
<File
RelativePath="..\..\src\xrc\xmlres.cpp"
>

View File

@ -1591,10 +1591,6 @@
RelativePath="..\..\src\xrc\xh_wizrd.cpp"
>
</File>
<File
RelativePath="..\..\src\xrc\xmladv.cpp"
>
</File>
<File
RelativePath="..\..\src\xrc\xmlres.cpp"
>

View File

@ -520,7 +520,6 @@
<ClCompile Include="..\..\src\xrc\xh_treebk.cpp" />
<ClCompile Include="..\..\src\xrc\xh_unkwn.cpp" />
<ClCompile Include="..\..\src\xrc\xh_wizrd.cpp" />
<ClCompile Include="..\..\src\xrc\xmladv.cpp" />
<ClCompile Include="..\..\src\xrc\xmlres.cpp" />
<ClCompile Include="..\..\src\xrc\xmlrsall.cpp" />
<ClCompile Include="..\..\src\xrc\xh_activityindicator.cpp" />

View File

@ -223,9 +223,6 @@
<ClCompile Include="..\..\src\xrc\xh_wizrd.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\xrc\xmladv.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\xrc\xmlres.cpp">
<Filter>Source Files</Filter>
</ClCompile>

View File

@ -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 = "<group>"; };
A1A53EC3A3463EFDB7614E93 /* bitmap.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = bitmap.cpp; path = ../../src/osx/core/bitmap.cpp; sourceTree = "<group>"; };
A1CB6A4171D4343BB0A9858A /* msgdlgg.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = msgdlgg.cpp; path = ../../src/generic/msgdlgg.cpp; sourceTree = "<group>"; };
A1E1A01885B036C28EBDAE27 /* xmladv.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = xmladv.cpp; path = ../../src/xrc/xmladv.cpp; sourceTree = "<group>"; };
A284E855892F3A9E9E19E854 /* LexTADS3.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = LexTADS3.cxx; path = ../../src/stc/scintilla/lexers/LexTADS3.cxx; sourceTree = "<group>"; };
A298576700C33F018616E7BD /* auibook.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = auibook.cpp; path = ../../src/aui/auibook.cpp; sourceTree = "<group>"; };
A37E3D1FB4FB31AFAE88665A /* dpycmn.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = dpycmn.cpp; path = ../../src/common/dpycmn.cpp; sourceTree = "<group>"; };
@ -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 */,

View File

@ -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 = "<group>"; };
A1A53EC3A3463EFDB7614E93 /* bitmap.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = bitmap.cpp; path = ../../src/osx/core/bitmap.cpp; sourceTree = "<group>"; };
A1CB6A4171D4343BB0A9858A /* msgdlgg.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = msgdlgg.cpp; path = ../../src/generic/msgdlgg.cpp; sourceTree = "<group>"; };
A1E1A01885B036C28EBDAE27 /* xmladv.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = xmladv.cpp; path = ../../src/xrc/xmladv.cpp; sourceTree = "<group>"; };
A284E855892F3A9E9E19E854 /* LexTADS3.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = LexTADS3.cxx; path = ../../src/stc/scintilla/lexers/LexTADS3.cxx; sourceTree = "<group>"; };
A298576700C33F018616E7BD /* auibook.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = auibook.cpp; path = ../../src/aui/auibook.cpp; sourceTree = "<group>"; };
A37E3D1FB4FB31AFAE88665A /* dpycmn.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = dpycmn.cpp; path = ../../src/common/dpycmn.cpp; sourceTree = "<group>"; };
@ -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 */,

View File

@ -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

View File

@ -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;

View File

@ -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.
@ -603,7 +605,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(); }

View File

@ -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,11 +101,13 @@ 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;
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,
@ -352,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
@ -367,6 +371,10 @@ protected:
{
return GetImpl()->GetBoolAttr(attr, defaultv);
}
wxString GetFilePath(const wxXmlNode* node)
{
return GetImpl()->GetFilePath(node);
}
void SetupWindow(wxWindow *wnd)
{
GetImpl()->SetupWindow(wnd);

View File

@ -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.

View File

@ -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" } &

View File

@ -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...");

View File

@ -68,7 +68,7 @@
<object class="wxPanel" name="animctrl">
<object class="wxFlexGridSizer">
<cols>2</cols>
<rows>1</rows>
<rows>2</rows>
<vgap>0</vgap>
<hgap>0</hgap>
<growablecols>0,1</growablecols>
@ -91,6 +91,17 @@
</object>
</object>
<object class="spacer"/>
<object class="sizeritem">
<flag>wxALIGN_CENTRE|wxALL</flag>
<border>5</border>
<object class="wxGenericAnimationCtrl" name="controls_generic_animation_ctrl">
<animation>throbber.gif</animation>
<inactive-bitmap>stop.xpm</inactive-bitmap>
</object>
</object>
</object>
</object>
</object>

View File

@ -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);

View File

@ -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

View File

@ -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,37 @@ wxAnimationCtrlXmlHandler::wxAnimationCtrlXmlHandler() : wxXmlResourceHandler()
wxObject *wxAnimationCtrlXmlHandler::DoCreateResource()
{
XRC_MAKE_INSTANCE(ctrl, wxAnimationCtrl)
wxAnimationCtrlBase *ctrl = NULL;
if ( m_instance )
ctrl = wxStaticCast(m_instance, wxAnimationCtrlBase);
wxScopedPtr<wxAnimation> 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());
wxScopedPtr<wxAnimation> 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
@ -53,7 +75,43 @@ wxObject *wxAnimationCtrlXmlHandler::DoCreateResource()
bool wxAnimationCtrlXmlHandler::CanHandle(wxXmlNode *node)
{
return IsOfClass(node, wxT("wxAnimationCtrl"));
return IsOfClass(node, wxT("wxAnimationCtrl")) ||
IsOfClass(node, wxT("wxGenericAnimationCtrl"));
}
wxAnimation* wxXmlResourceHandlerImpl::GetAnimation(const wxString& param,
wxAnimationCtrlBase* ctrl)
{
wxString name = GetFilePath(GetParamNode(param));
if ( name.empty() )
return NULL;
// load the animation from file
wxScopedPtr<wxAnimation> ani(ctrl ? new wxAnimation(ctrl->CreateAnimation())
: 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

View File

@ -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<wxAnimation> 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