Add generic wxFileSystem support to wxWebView using wxWebViewFSHandler.

Closes #14623.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72461 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Steve Lamerton 2012-09-11 09:26:58 +00:00
parent e52aec972c
commit 0bfd90b3e7
21 changed files with 439 additions and 161 deletions

View File

@ -1646,7 +1646,8 @@ WEBVIEWDLL_OBJECTS = \
$(__webviewdll___win32rc) \
$(__WEBVIEW_SRC_PLATFORM_OBJECTS_2) \
webviewdll_webview.o \
webviewdll_webviewarchivehandler.o
webviewdll_webviewarchivehandler.o \
webviewdll_webviewfshandler.o
WEBVIEWDLL_ODEP = $(_____pch_wxprec_webviewdll_wx_wxprec_h_gch___depname)
WEBVIEWLIB_CXXFLAGS = $(__webviewlib_PCH_INC) -D__WX$(TOOLKIT)__ \
$(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \
@ -1661,7 +1662,8 @@ WEBVIEWLIB_OBJCXXFLAGS = $(__webviewlib_PCH_INC) -D__WX$(TOOLKIT)__ \
WEBVIEWLIB_OBJECTS = \
$(__WEBVIEW_SRC_PLATFORM_OBJECTS_3) \
webviewlib_webview.o \
webviewlib_webviewarchivehandler.o
webviewlib_webviewarchivehandler.o \
webviewlib_webviewfshandler.o
WEBVIEWLIB_ODEP = $(_____pch_wxprec_webviewlib_wx_wxprec_h_gch___depname)
QADLL_CXXFLAGS = $(__qadll_PCH_INC) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
@ -4381,7 +4383,8 @@ COND_USE_GUI_1_ALL_GUI_HEADERS = \
wx/stc/stc.h \
$(WEBVIEW_HDR_PLATFORM) \
wx/webview.h \
wx/webviewarchivehandler.h
wx/webviewarchivehandler.h \
wx/webviewfshandler.h
@COND_USE_GUI_1@ALL_GUI_HEADERS = $(COND_USE_GUI_1_ALL_GUI_HEADERS)
COND_MONOLITHIC_1_SHARED_1___monodll___depname = \
$(LIBDIRNAME)/$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(dll___targetsuf3)
@ -4582,6 +4585,7 @@ COND_USE_GUI_1___MONOLIB_GUI_SRC_OBJECTS = \
$(__WEBVIEW_SRC_PLATFORM_OBJECTS) \
monodll_webview.o \
monodll_webviewarchivehandler.o \
monodll_webviewfshandler.o \
monodll_debugrpt.o \
monodll_dbgrptg.o \
monodll_xh_animatctrl.o \
@ -6787,6 +6791,7 @@ COND_USE_GUI_1___MONOLIB_GUI_SRC_OBJECTS_1 = \
$(__WEBVIEW_SRC_PLATFORM_OBJECTS_1) \
monolib_webview.o \
monolib_webviewarchivehandler.o \
monolib_webviewfshandler.o \
monolib_debugrpt.o \
monolib_dbgrptg.o \
monolib_xh_animatctrl.o \
@ -18228,6 +18233,9 @@ monodll_webview.o: $(srcdir)/src/common/webview.cpp $(MONODLL_ODEP)
monodll_webviewarchivehandler.o: $(srcdir)/src/common/webviewarchivehandler.cpp $(MONODLL_ODEP)
$(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/common/webviewarchivehandler.cpp
monodll_webviewfshandler.o: $(srcdir)/src/common/webviewfshandler.cpp $(MONODLL_ODEP)
$(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/common/webviewfshandler.cpp
monodll_debugrpt.o: $(srcdir)/src/common/debugrpt.cpp $(MONODLL_ODEP)
$(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/common/debugrpt.cpp
@ -23922,6 +23930,9 @@ monolib_webview.o: $(srcdir)/src/common/webview.cpp $(MONOLIB_ODEP)
monolib_webviewarchivehandler.o: $(srcdir)/src/common/webviewarchivehandler.cpp $(MONOLIB_ODEP)
$(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/common/webviewarchivehandler.cpp
monolib_webviewfshandler.o: $(srcdir)/src/common/webviewfshandler.cpp $(MONOLIB_ODEP)
$(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/common/webviewfshandler.cpp
monolib_debugrpt.o: $(srcdir)/src/common/debugrpt.cpp $(MONOLIB_ODEP)
$(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/common/debugrpt.cpp
@ -38766,6 +38777,9 @@ webviewdll_webview.o: $(srcdir)/src/common/webview.cpp $(WEBVIEWDLL_ODEP)
webviewdll_webviewarchivehandler.o: $(srcdir)/src/common/webviewarchivehandler.cpp $(WEBVIEWDLL_ODEP)
$(CXXC) -c -o $@ $(WEBVIEWDLL_CXXFLAGS) $(srcdir)/src/common/webviewarchivehandler.cpp
webviewdll_webviewfshandler.o: $(srcdir)/src/common/webviewfshandler.cpp $(WEBVIEWDLL_ODEP)
$(CXXC) -c -o $@ $(WEBVIEWDLL_CXXFLAGS) $(srcdir)/src/common/webviewfshandler.cpp
webviewlib_webview_ie.o: $(srcdir)/src/msw/webview_ie.cpp $(WEBVIEWLIB_ODEP)
$(CXXC) -c -o $@ $(WEBVIEWLIB_CXXFLAGS) $(srcdir)/src/msw/webview_ie.cpp
@ -38781,6 +38795,9 @@ webviewlib_webview.o: $(srcdir)/src/common/webview.cpp $(WEBVIEWLIB_ODEP)
webviewlib_webviewarchivehandler.o: $(srcdir)/src/common/webviewarchivehandler.cpp $(WEBVIEWLIB_ODEP)
$(CXXC) -c -o $@ $(WEBVIEWLIB_CXXFLAGS) $(srcdir)/src/common/webviewarchivehandler.cpp
webviewlib_webviewfshandler.o: $(srcdir)/src/common/webviewfshandler.cpp $(WEBVIEWLIB_ODEP)
$(CXXC) -c -o $@ $(WEBVIEWLIB_CXXFLAGS) $(srcdir)/src/common/webviewfshandler.cpp
qadll_version_rc.o: $(srcdir)/src/msw/version.rc $(QADLL_ODEP)
$(WINDRES) -i$< -o$@ --define __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_67) $(__DEBUG_DEFINE_p_66) $(__EXCEPTIONS_DEFINE_p_65) $(__RTTI_DEFINE_p_65) $(__THREAD_DEFINE_p_65) --define WXBUILDING --define WXDLLNAME=$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG) $(__RCDEFDIR_p) --include-dir $(top_srcdir)/include $(__INC_TIFF_BUILD_p_66) $(__INC_TIFF_p_66) $(__INC_JPEG_p_66) $(__INC_PNG_p_65) $(__INC_ZLIB_p_67) $(__INC_REGEX_p_65) $(__INC_EXPAT_p_65) --define WXUSINGDLL --define WXMAKINGDLL_QA

View File

@ -3345,6 +3345,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
$(WEBVIEW_SRC_PLATFORM)
src/common/webview.cpp
src/common/webviewarchivehandler.cpp
src/common/webviewfshandler.cpp
</set>
<set var="WEBVIEW_HDR_PLATFORM" hints="files">
@ -3366,6 +3367,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
$(WEBVIEW_HDR_PLATFORM)
wx/webview.h
wx/webviewarchivehandler.h
wx/webviewfshandler.h
</set>
<!-- ====================================================================== -->

View File

@ -1106,7 +1106,8 @@ WEBVIEWDLL_OBJECTS = \
$(OBJS)\webviewdll_dummy.obj \
$(OBJS)\webviewdll_webview_ie.obj \
$(OBJS)\webviewdll_webview.obj \
$(OBJS)\webviewdll_webviewarchivehandler.obj
$(OBJS)\webviewdll_webviewarchivehandler.obj \
$(OBJS)\webviewdll_webviewfshandler.obj
WEBVIEWLIB_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \
$(__OPTIMIZEFLAG) $(__THREADSFLAG) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \
@ -1120,7 +1121,8 @@ WEBVIEWLIB_OBJECTS = \
$(OBJS)\webviewlib_dummy.obj \
$(OBJS)\webviewlib_webview_ie.obj \
$(OBJS)\webviewlib_webview.obj \
$(OBJS)\webviewlib_webviewarchivehandler.obj
$(OBJS)\webviewlib_webviewarchivehandler.obj \
$(OBJS)\webviewlib_webviewfshandler.obj
QADLL_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \
$(__OPTIMIZEFLAG) $(__THREADSFLAG) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \
@ -1643,6 +1645,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_OBJECTS = \
$(OBJS)\monodll_webview_ie.obj \
$(OBJS)\monodll_webview.obj \
$(OBJS)\monodll_webviewarchivehandler.obj \
$(OBJS)\monodll_webviewfshandler.obj \
$(OBJS)\monodll_debugrpt.obj \
$(OBJS)\monodll_dbgrptg.obj \
$(OBJS)\monodll_xh_animatctrl.obj \
@ -2431,6 +2434,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_1_OBJECTS = \
$(OBJS)\monolib_webview_ie.obj \
$(OBJS)\monolib_webview.obj \
$(OBJS)\monolib_webviewarchivehandler.obj \
$(OBJS)\monolib_webviewfshandler.obj \
$(OBJS)\monolib_debugrpt.obj \
$(OBJS)\monolib_dbgrptg.obj \
$(OBJS)\monolib_xh_animatctrl.obj \
@ -6949,6 +6953,9 @@ $(OBJS)\monodll_webview.obj: ..\..\src\common\webview.cpp
$(OBJS)\monodll_webviewarchivehandler.obj: ..\..\src\common\webviewarchivehandler.cpp
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\webviewarchivehandler.cpp
$(OBJS)\monodll_webviewfshandler.obj: ..\..\src\common\webviewfshandler.cpp
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\webviewfshandler.cpp
$(OBJS)\monodll_debugrpt.obj: ..\..\src\common\debugrpt.cpp
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\debugrpt.cpp
@ -9367,6 +9374,9 @@ $(OBJS)\monolib_webview.obj: ..\..\src\common\webview.cpp
$(OBJS)\monolib_webviewarchivehandler.obj: ..\..\src\common\webviewarchivehandler.cpp
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\webviewarchivehandler.cpp
$(OBJS)\monolib_webviewfshandler.obj: ..\..\src\common\webviewfshandler.cpp
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\webviewfshandler.cpp
$(OBJS)\monolib_debugrpt.obj: ..\..\src\common\debugrpt.cpp
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\debugrpt.cpp
@ -15089,6 +15099,9 @@ $(OBJS)\webviewdll_webview.obj: ..\..\src\common\webview.cpp
$(OBJS)\webviewdll_webviewarchivehandler.obj: ..\..\src\common\webviewarchivehandler.cpp
$(CXX) -q -c -P -o$@ $(WEBVIEWDLL_CXXFLAGS) ..\..\src\common\webviewarchivehandler.cpp
$(OBJS)\webviewdll_webviewfshandler.obj: ..\..\src\common\webviewfshandler.cpp
$(CXX) -q -c -P -o$@ $(WEBVIEWDLL_CXXFLAGS) ..\..\src\common\webviewfshandler.cpp
$(OBJS)\webviewlib_dummy.obj: ..\..\src\common\dummy.cpp
$(CXX) -q -c -P -o$@ $(WEBVIEWLIB_CXXFLAGS) -H ..\..\src\common\dummy.cpp
@ -15101,6 +15114,9 @@ $(OBJS)\webviewlib_webview.obj: ..\..\src\common\webview.cpp
$(OBJS)\webviewlib_webviewarchivehandler.obj: ..\..\src\common\webviewarchivehandler.cpp
$(CXX) -q -c -P -o$@ $(WEBVIEWLIB_CXXFLAGS) ..\..\src\common\webviewarchivehandler.cpp
$(OBJS)\webviewlib_webviewfshandler.obj: ..\..\src\common\webviewfshandler.cpp
$(CXX) -q -c -P -o$@ $(WEBVIEWLIB_CXXFLAGS) ..\..\src\common\webviewfshandler.cpp
$(OBJS)\qadll_dummy.obj: ..\..\src\common\dummy.cpp
$(CXX) -q -c -P -o$@ $(QADLL_CXXFLAGS) -H ..\..\src\common\dummy.cpp

View File

@ -1103,7 +1103,8 @@ WEBVIEWDLL_OBJECTS = \
$(OBJS)\webviewdll_version_rc.o \
$(OBJS)\webviewdll_webview_ie.o \
$(OBJS)\webviewdll_webview.o \
$(OBJS)\webviewdll_webviewarchivehandler.o
$(OBJS)\webviewdll_webviewarchivehandler.o \
$(OBJS)\webviewdll_webviewfshandler.o
WEBVIEWLIB_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) \
$(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \
@ -1117,7 +1118,8 @@ WEBVIEWLIB_OBJECTS = \
$(OBJS)\webviewlib_dummy.o \
$(OBJS)\webviewlib_webview_ie.o \
$(OBJS)\webviewlib_webview.o \
$(OBJS)\webviewlib_webviewarchivehandler.o
$(OBJS)\webviewlib_webviewarchivehandler.o \
$(OBJS)\webviewlib_webviewfshandler.o
QADLL_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) $(GCCFLAGS) \
-DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
@ -1655,6 +1657,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_OBJECTS = \
$(OBJS)\monodll_webview_ie.o \
$(OBJS)\monodll_webview.o \
$(OBJS)\monodll_webviewarchivehandler.o \
$(OBJS)\monodll_webviewfshandler.o \
$(OBJS)\monodll_debugrpt.o \
$(OBJS)\monodll_dbgrptg.o \
$(OBJS)\monodll_xh_animatctrl.o \
@ -2449,6 +2452,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_1_OBJECTS = \
$(OBJS)\monolib_webview_ie.o \
$(OBJS)\monolib_webview.o \
$(OBJS)\monolib_webviewarchivehandler.o \
$(OBJS)\monolib_webviewfshandler.o \
$(OBJS)\monolib_debugrpt.o \
$(OBJS)\monolib_dbgrptg.o \
$(OBJS)\monolib_xh_animatctrl.o \
@ -7118,6 +7122,9 @@ $(OBJS)\monodll_webview.o: ../../src/common/webview.cpp
$(OBJS)\monodll_webviewarchivehandler.o: ../../src/common/webviewarchivehandler.cpp
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\monodll_webviewfshandler.o: ../../src/common/webviewfshandler.cpp
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\monodll_debugrpt.o: ../../src/common/debugrpt.cpp
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
@ -9536,6 +9543,9 @@ $(OBJS)\monolib_webview.o: ../../src/common/webview.cpp
$(OBJS)\monolib_webviewarchivehandler.o: ../../src/common/webviewarchivehandler.cpp
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\monolib_webviewfshandler.o: ../../src/common/webviewfshandler.cpp
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\monolib_debugrpt.o: ../../src/common/debugrpt.cpp
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
@ -15258,6 +15268,9 @@ $(OBJS)\webviewdll_webview.o: ../../src/common/webview.cpp
$(OBJS)\webviewdll_webviewarchivehandler.o: ../../src/common/webviewarchivehandler.cpp
$(CXX) -c -o $@ $(WEBVIEWDLL_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\webviewdll_webviewfshandler.o: ../../src/common/webviewfshandler.cpp
$(CXX) -c -o $@ $(WEBVIEWDLL_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\webviewlib_dummy.o: ../../src/common/dummy.cpp
$(CXX) -c -o $@ $(WEBVIEWLIB_CXXFLAGS) $(CPPDEPS) $<
@ -15270,6 +15283,9 @@ $(OBJS)\webviewlib_webview.o: ../../src/common/webview.cpp
$(OBJS)\webviewlib_webviewarchivehandler.o: ../../src/common/webviewarchivehandler.cpp
$(CXX) -c -o $@ $(WEBVIEWLIB_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\webviewlib_webviewfshandler.o: ../../src/common/webviewfshandler.cpp
$(CXX) -c -o $@ $(WEBVIEWLIB_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\qadll_dummy.o: ../../src/common/dummy.cpp
$(CXX) -c -o $@ $(QADLL_CXXFLAGS) $(CPPDEPS) $<

View File

@ -1203,7 +1203,8 @@ WEBVIEWDLL_OBJECTS = \
$(OBJS)\webviewdll_dummy.obj \
$(OBJS)\webviewdll_webview_ie.obj \
$(OBJS)\webviewdll_webview.obj \
$(OBJS)\webviewdll_webviewarchivehandler.obj
$(OBJS)\webviewdll_webviewarchivehandler.obj \
$(OBJS)\webviewdll_webviewfshandler.obj
WEBVIEWDLL_RESOURCES = \
$(OBJS)\webviewdll_version.res
WEBVIEWLIB_CXXFLAGS = /M$(__RUNTIME_LIBS_348)$(__DEBUGRUNTIME) /DWIN32 \
@ -1223,7 +1224,8 @@ WEBVIEWLIB_OBJECTS = \
$(OBJS)\webviewlib_dummy.obj \
$(OBJS)\webviewlib_webview_ie.obj \
$(OBJS)\webviewlib_webview.obj \
$(OBJS)\webviewlib_webviewarchivehandler.obj
$(OBJS)\webviewlib_webviewarchivehandler.obj \
$(OBJS)\webviewlib_webviewfshandler.obj
QADLL_CXXFLAGS = /M$(__RUNTIME_LIBS_364)$(__DEBUGRUNTIME) /DWIN32 \
$(__DEBUGINFO) \
/Fd$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG).pdb \
@ -1935,6 +1937,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_OBJECTS = \
$(OBJS)\monodll_webview_ie.obj \
$(OBJS)\monodll_webview.obj \
$(OBJS)\monodll_webviewarchivehandler.obj \
$(OBJS)\monodll_webviewfshandler.obj \
$(OBJS)\monodll_debugrpt.obj \
$(OBJS)\monodll_dbgrptg.obj \
$(OBJS)\monodll_xh_animatctrl.obj \
@ -2729,6 +2732,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_1_OBJECTS = \
$(OBJS)\monolib_webview_ie.obj \
$(OBJS)\monolib_webview.obj \
$(OBJS)\monolib_webviewarchivehandler.obj \
$(OBJS)\monolib_webviewfshandler.obj \
$(OBJS)\monolib_debugrpt.obj \
$(OBJS)\monolib_dbgrptg.obj \
$(OBJS)\monolib_xh_animatctrl.obj \
@ -7633,6 +7637,9 @@ $(OBJS)\monodll_webview.obj: ..\..\src\common\webview.cpp
$(OBJS)\monodll_webviewarchivehandler.obj: ..\..\src\common\webviewarchivehandler.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\webviewarchivehandler.cpp
$(OBJS)\monodll_webviewfshandler.obj: ..\..\src\common\webviewfshandler.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\webviewfshandler.cpp
$(OBJS)\monodll_debugrpt.obj: ..\..\src\common\debugrpt.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\debugrpt.cpp
@ -10051,6 +10058,9 @@ $(OBJS)\monolib_webview.obj: ..\..\src\common\webview.cpp
$(OBJS)\monolib_webviewarchivehandler.obj: ..\..\src\common\webviewarchivehandler.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\webviewarchivehandler.cpp
$(OBJS)\monolib_webviewfshandler.obj: ..\..\src\common\webviewfshandler.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\webviewfshandler.cpp
$(OBJS)\monolib_debugrpt.obj: ..\..\src\common\debugrpt.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\debugrpt.cpp
@ -15773,6 +15783,9 @@ $(OBJS)\webviewdll_webview.obj: ..\..\src\common\webview.cpp
$(OBJS)\webviewdll_webviewarchivehandler.obj: ..\..\src\common\webviewarchivehandler.cpp
$(CXX) /c /nologo /TP /Fo$@ $(WEBVIEWDLL_CXXFLAGS) ..\..\src\common\webviewarchivehandler.cpp
$(OBJS)\webviewdll_webviewfshandler.obj: ..\..\src\common\webviewfshandler.cpp
$(CXX) /c /nologo /TP /Fo$@ $(WEBVIEWDLL_CXXFLAGS) ..\..\src\common\webviewfshandler.cpp
$(OBJS)\webviewlib_dummy.obj: ..\..\src\common\dummy.cpp
$(CXX) /c /nologo /TP /Fo$@ $(WEBVIEWLIB_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp
@ -15785,6 +15798,9 @@ $(OBJS)\webviewlib_webview.obj: ..\..\src\common\webview.cpp
$(OBJS)\webviewlib_webviewarchivehandler.obj: ..\..\src\common\webviewarchivehandler.cpp
$(CXX) /c /nologo /TP /Fo$@ $(WEBVIEWLIB_CXXFLAGS) ..\..\src\common\webviewarchivehandler.cpp
$(OBJS)\webviewlib_webviewfshandler.obj: ..\..\src\common\webviewfshandler.cpp
$(CXX) /c /nologo /TP /Fo$@ $(WEBVIEWLIB_CXXFLAGS) ..\..\src\common\webviewfshandler.cpp
$(OBJS)\qadll_dummy.obj: ..\..\src\common\dummy.cpp
$(CXX) /c /nologo /TP /Fo$@ $(QADLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp

View File

@ -149,6 +149,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_OBJECTS = &
$(OBJS)\monodll_webview_ie.obj &
$(OBJS)\monodll_webview.obj &
$(OBJS)\monodll_webviewarchivehandler.obj &
$(OBJS)\monodll_webviewfshandler.obj &
$(OBJS)\monodll_debugrpt.obj &
$(OBJS)\monodll_dbgrptg.obj &
$(OBJS)\monodll_xh_animatctrl.obj &
@ -948,6 +949,7 @@ ____MONOLIB_GUI_SRC_FILENAMES_1_OBJECTS = &
$(OBJS)\monolib_webview_ie.obj &
$(OBJS)\monolib_webview.obj &
$(OBJS)\monolib_webviewarchivehandler.obj &
$(OBJS)\monolib_webviewfshandler.obj &
$(OBJS)\monolib_debugrpt.obj &
$(OBJS)\monolib_dbgrptg.obj &
$(OBJS)\monolib_xh_animatctrl.obj &
@ -4655,7 +4657,8 @@ WEBVIEWDLL_OBJECTS = &
$(OBJS)\webviewdll_dummy.obj &
$(OBJS)\webviewdll_webview_ie.obj &
$(OBJS)\webviewdll_webview.obj &
$(OBJS)\webviewdll_webviewarchivehandler.obj
$(OBJS)\webviewdll_webviewarchivehandler.obj &
$(OBJS)\webviewdll_webviewfshandler.obj
WEBVIEWLIB_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) &
$(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) &
$(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) &
@ -4669,7 +4672,8 @@ WEBVIEWLIB_OBJECTS = &
$(OBJS)\webviewlib_dummy.obj &
$(OBJS)\webviewlib_webview_ie.obj &
$(OBJS)\webviewlib_webview.obj &
$(OBJS)\webviewlib_webviewarchivehandler.obj
$(OBJS)\webviewlib_webviewarchivehandler.obj &
$(OBJS)\webviewlib_webviewfshandler.obj
QADLL_CXXFLAGS = -bd $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) &
$(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) &
$(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) &
@ -7391,6 +7395,9 @@ $(OBJS)\monodll_webview.obj : .AUTODEPEND ..\..\src\common\webview.cpp
$(OBJS)\monodll_webviewarchivehandler.obj : .AUTODEPEND ..\..\src\common\webviewarchivehandler.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<
$(OBJS)\monodll_webviewfshandler.obj : .AUTODEPEND ..\..\src\common\webviewfshandler.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<
$(OBJS)\monodll_debugrpt.obj : .AUTODEPEND ..\..\src\common\debugrpt.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<
@ -9809,6 +9816,9 @@ $(OBJS)\monolib_webview.obj : .AUTODEPEND ..\..\src\common\webview.cpp
$(OBJS)\monolib_webviewarchivehandler.obj : .AUTODEPEND ..\..\src\common\webviewarchivehandler.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<
$(OBJS)\monolib_webviewfshandler.obj : .AUTODEPEND ..\..\src\common\webviewfshandler.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<
$(OBJS)\monolib_debugrpt.obj : .AUTODEPEND ..\..\src\common\debugrpt.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<
@ -15531,6 +15541,9 @@ $(OBJS)\webviewdll_webview.obj : .AUTODEPEND ..\..\src\common\webview.cpp
$(OBJS)\webviewdll_webviewarchivehandler.obj : .AUTODEPEND ..\..\src\common\webviewarchivehandler.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(WEBVIEWDLL_CXXFLAGS) $<
$(OBJS)\webviewdll_webviewfshandler.obj : .AUTODEPEND ..\..\src\common\webviewfshandler.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(WEBVIEWDLL_CXXFLAGS) $<
$(OBJS)\webviewlib_dummy.obj : .AUTODEPEND ..\..\src\common\dummy.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(WEBVIEWLIB_CXXFLAGS) $<
@ -15543,6 +15556,9 @@ $(OBJS)\webviewlib_webview.obj : .AUTODEPEND ..\..\src\common\webview.cpp
$(OBJS)\webviewlib_webviewarchivehandler.obj : .AUTODEPEND ..\..\src\common\webviewarchivehandler.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(WEBVIEWLIB_CXXFLAGS) $<
$(OBJS)\webviewlib_webviewfshandler.obj : .AUTODEPEND ..\..\src\common\webviewfshandler.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(WEBVIEWLIB_CXXFLAGS) $<
$(OBJS)\qadll_dummy.obj : .AUTODEPEND ..\..\src\common\dummy.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(QADLL_CXXFLAGS) $<

View File

@ -7044,6 +7044,10 @@ SOURCE=..\..\include\wx\webviewarchivehandler.h
# End Source File
# Begin Source File
SOURCE=..\..\include\wx\webviewfshandler.h
# End Source File
# Begin Source File
SOURCE=..\..\include\wx\persist\window.h
# End Source File
# Begin Source File

View File

@ -5858,6 +5858,9 @@
<File
RelativePath="..\..\include\wx\webviewarchivehandler.h">
</File>
<File
RelativePath="..\..\include\wx\webviewfshandler.h">
</File>
<File
RelativePath="..\..\include\wx\persist\window.h">
</File>

View File

@ -585,6 +585,9 @@
<File
RelativePath="..\..\src\common\webviewarchivehandler.cpp">
</File>
<File
RelativePath="..\..\src\common\webviewfshandler.cpp">
</File>
</Filter>
<Filter
Name="MSW Sources"
@ -795,6 +798,9 @@
<File
RelativePath="..\..\include\wx\webviewarchivehandler.h">
</File>
<File
RelativePath="..\..\include\wx\webviewfshandler.h">
</File>
</Filter>
</Files>
<Globals>

View File

@ -7831,6 +7831,10 @@
RelativePath="..\..\include\wx\webviewarchivehandler.h"
>
</File>
<File
RelativePath="..\..\include\wx\webviewfshandler.h"
>
</File>
<File
RelativePath="..\..\include\wx\persist\window.h"
>

View File

@ -814,6 +814,10 @@
RelativePath="..\..\src\common\webviewarchivehandler.cpp"
>
</File>
<File
RelativePath="..\..\src\common\webviewfshandler.cpp"
>
</File>
</Filter>
<Filter
Name="MSW Sources"
@ -1082,6 +1086,10 @@
RelativePath="..\..\include\wx\webviewarchivehandler.h"
>
</File>
<File
RelativePath="..\..\include\wx\webviewfshandler.h"
>
</File>
</Filter>
</Files>
<Globals>

View File

@ -7827,6 +7827,10 @@
RelativePath="..\..\include\wx\webviewarchivehandler.h"
>
</File>
<File
RelativePath="..\..\include\wx\webviewfshandler.h"
>
</File>
<File
RelativePath="..\..\include\wx\persist\window.h"
>

View File

@ -810,6 +810,10 @@
RelativePath="..\..\src\common\webviewarchivehandler.cpp"
>
</File>
<File
RelativePath="..\..\src\common\webviewfshandler.cpp"
>
</File>
</Filter>
<Filter
Name="MSW Sources"
@ -1078,6 +1082,10 @@
RelativePath="..\..\include\wx\webviewarchivehandler.h"
>
</File>
<File
RelativePath="..\..\include\wx\webviewfshandler.h"
>
</File>
</Filter>
</Files>
<Globals>

View File

@ -256,6 +256,10 @@ SOURCE=..\..\src\common\webview.cpp
SOURCE=..\..\src\common\webviewarchivehandler.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\common\webviewfshandler.cpp
# End Source File
# End Group
# Begin Group "MSW Sources"
@ -560,6 +564,10 @@ SOURCE=..\..\include\wx\webview.h
SOURCE=..\..\include\wx\webviewarchivehandler.h
# End Source File
# Begin Source File
SOURCE=..\..\include\wx\webviewfshandler.h
# End Source File
# End Group
# End Target
# End Project

View File

@ -540,6 +540,8 @@ All (GUI):
- Support hexadecimal numbers in wxSpinCtrl.
- Respect window max size in wxBoxSizer (Nathan Ridge).
- Add support for searching in wxWebView for MSW and GTK (Allonii).
- Add generic wxFileSystem support to wxWebView with
wxWebViewFSHandler (Nick Matthews).
- Add possibility to hide and show again wxRibbonBar pages (wxBen).
- Add wxRibbonBar pages highlighting (wxBen).
- Add expand/collapse button to wxRibbonBar (rakeshthp).

View File

@ -0,0 +1,38 @@
/////////////////////////////////////////////////////////////////////////////
// Name: webviewfshandler.h
// Purpose: Custom webview handler for virtual file system
// Author: Nick Matthews
// Id: $Id$
// Copyright: (c) 2012 Steven Lamerton
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// Based on webviewarchivehandler.h file by Steven Lamerton
#ifndef _WX_WEB_VIEW_FS_HANDLER_H_
#define _WX_WEB_VIEW_FS_HANDLER_H_
#include "wx/setup.h"
#if wxUSE_WEBVIEW
class wxFSFile;
class wxFileSystem;
#include "wx/webview.h"
//Loads from uris such as scheme:example.html
class WXDLLIMPEXP_WEBVIEW wxWebViewFSHandler : public wxWebViewHandler
{
public:
wxWebViewFSHandler(const wxString& scheme);
virtual ~wxWebViewFSHandler();
virtual wxFSFile* GetFile(const wxString &uri);
private:
wxFileSystem* m_fileSystem;
};
#endif // wxUSE_WEBVIEW
#endif // _WX_WEB_VIEW_FS_HANDLER_H_

View File

@ -13,7 +13,7 @@
them accessible via an URL.
It is particularly suitable for storing bitmaps from resources or included XPM
files so that they can be used with wxHTML.
files so that they can be used with wxHTML or wxWebView.
Filenames are prefixed with @c "memory:", e.g. @c "memory:myfile.html".
@ -26,24 +26,30 @@
void MyFrame::OnAbout(wxCommandEvent&)
{
wxBusyCursor bcur;
wxFileSystem::AddHandler(new wxMemoryFSHandler);
wxMemoryFSHandler::AddFile("logo.pcx", wxBITMAP(logo), wxBITMAP_TYPE_PCX);
wxMemoryFSHandler::AddFile("logo.png", wxBITMAP(logo), wxBITMAP_TYPE_PNG);
wxMemoryFSHandler::AddFile("about.htm",
"<html><body>About: "
"<img src=\"memory:logo.pcx\"></body></html>");
"<img src=\"memory:logo.png\"></body></html>");
wxDialog dlg(this, -1, wxString(_("About")));
wxBoxSizer *topsizer;
wxHtmlWindow *html;
topsizer = new wxBoxSizer(wxVERTICAL);
html = new wxHtmlWindow(&dlg, -1, wxDefaultPosition,
#ifdef USE_WEBVIEW
wxWebView* browser = wxWebView::New(&dlg, wxID_ANY, wxWebViewDefaultURLStr,
wxDefaultPosition, wxSize(380, 160));
browser->RegisterHandler(wxSharedPtr<wxWebViewHandler>(new wxWebViewFSHandler("memory")));
browser->LoadURL("memory:about.htm");
#else // Use wxHtml
wxHtmlWindow *browser;
browser = new wxHtmlWindow(&dlg, -1, wxDefaultPosition,
wxSize(380, 160), wxHW_SCROLLBAR_NEVER);
html->SetBorders(0);
html->LoadPage("memory:about.htm");
html->SetSize(html->GetInternalRepresentation()->GetWidth(),
html->GetInternalRepresentation()->GetHeight());
topsizer->Add(html, 1, wxALL, 10);
browser->SetBorders(0);
browser->LoadPage("memory:about.htm");
browser->SetSize(browser->GetInternalRepresentation()->GetWidth(),
browser->GetInternalRepresentation()->GetHeight());
#endif
topsizer->Add(browser, 1, wxALL, 10);
topsizer->Add(new wxStaticLine(&dlg, -1), 0, wxEXPAND | wxLEFT | wxRIGHT, 10);
topsizer->Add(new wxButton(&dlg, wxID_OK, "Ok"),
0, wxALL | wxALIGN_RIGHT, 15);
@ -53,7 +59,7 @@
dlg.Centre();
dlg.ShowModal();
wxMemoryFSHandler::RemoveFile("logo.pcx");
wxMemoryFSHandler::RemoveFile("logo.png");
wxMemoryFSHandler::RemoveFile("about.htm");
}
@endcode

View File

@ -231,10 +231,13 @@ public:
wxFSFile which represents the given url. You can then register your handler
with RegisterHandler() it will be called for all pages and resources.
wxWebFileHandler is provided to allow the navigation of pages inside a zip
archive. It overrides the @c file scheme and provides support for the
standard @c file syntax as well as paths to archives of the form
@c file:///C:/example/docs.zip;protocol=zip/main.htm
wxWebViewFSHandler is provided to access the virtual file system encapsulated by
wxFileSystem. The wxMemoryFSHandler documentation gives an example of how this
may be used.
wxWebViewArchiveHandler is provided to allow the navigation of pages inside a zip
archive. It supports paths of the form:
@c scheme:///C:/example/docs.zip;protocol=zip/main.htm
@beginEventEmissionTable{wxWebViewEvent}
@event{EVT_WEB_VIEW_NAVIGATING(id, func)}

View File

@ -0,0 +1,32 @@
/////////////////////////////////////////////////////////////////////////////
// Name: webviewfshandler.h
// Purpose: interface of wxWebViewFSHandler
// Author: wxWidgets team
// RCS-ID: $Id$
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
/**
@class wxWebViewFSHandler
A wxWebView file system handler to support standard wxFileSystem protocols
of the form <code> example:page.htm </code> The handler allows wxWebView to
use wxFileSystem in a similar fashion to its use with wxHtml.
The wxMemoryFSHandler documentation gives an example of how it may be used.
@since 2.9.5
@library{wxwebview}
@category{webview}
@see wxWebView, wxWebViewHandler, wxWebViewArchiveHandler
*/
class wxWebViewFSHandler : public wxWebViewHandler
{
public:
/**
Constructor.
*/
wxWebViewFSHandler(const wxString& scheme);
virtual wxFSFile* GetFile(const wxString &uri);
};

View File

@ -32,9 +32,11 @@
#include "wx/settings.h"
#include "wx/webview.h"
#include "wx/webviewarchivehandler.h"
#include "wx/webviewfshandler.h"
#include "wx/infobar.h"
#include "wx/filesys.h"
#include "wx/fs_arc.h"
#include "wx/fs_mem.h"
#ifndef wxHAS_IMAGES_IN_RESOURCES
#include "../sample.xpm"
@ -136,6 +138,7 @@ public:
void OnDeleteSelection(wxCommandEvent& evt);
void OnSelectAll(wxCommandEvent& evt);
void OnLoadScheme(wxCommandEvent& evt);
void OnUseMemoryFS(wxCommandEvent& evt);
void OnFind(wxCommandEvent& evt);
void OnFindDone(wxCommandEvent& evt);
void OnFindText(wxCommandEvent& evt);
@ -213,6 +216,27 @@ bool WebApp::OnInit()
if ( !wxApp::OnInit() )
return false;
//Required for virtual file system archive and memory support
wxFileSystem::AddHandler(new wxArchiveFSHandler);
wxFileSystem::AddHandler(new wxMemoryFSHandler);
// Create the memory files
wxImage::AddHandler(new wxPNGHandler);
wxMemoryFSHandler::AddFile("logo.png",
wxBitmap(wxlogo_xpm), wxBITMAP_TYPE_PNG);
wxMemoryFSHandler::AddFile("page1.htm",
"<html><head><title>File System Example</title>"
"<link rel='stylesheet' type='text/css' href='memory:test.css'>"
"</head><body><h1>Page 1</h1>"
"<p><img src='memory:logo.png'></p>"
"<p>Some text about <a href='memory:page2.htm'>Page 2</a>.</p></body>");
wxMemoryFSHandler::AddFile("page2.htm",
"<html><head><title>File System Example</title>"
"<link rel='stylesheet' type='text/css' href='memory:test.css'>"
"</head><body><h1>Page 2</h1>"
"<p><a href='memory:page1.htm'>Page 1</a> was better.</p></body>");
wxMemoryFSHandler::AddFile("test.css", "h1 {color: red;}");
WebFrame *frame = new WebFrame(m_url);
frame->Show();
@ -222,9 +246,6 @@ bool WebApp::OnInit()
WebFrame::WebFrame(const wxString& url) :
wxFrame(NULL, wxID_ANY, "wxWebView Sample")
{
//Required from virtual file system archive support
wxFileSystem::AddHandler(new wxArchiveFSHandler);
// set the frame icon
SetIcon(wxICON(sample));
SetTitle("wxWebView Sample");
@ -309,6 +330,8 @@ WebFrame::WebFrame(const wxString& url) :
//We register the wxfs:// protocol for testing purposes
m_browser->RegisterHandler(wxSharedPtr<wxWebViewHandler>(new wxWebViewArchiveHandler("wxfs")));
//And the memory: file system
m_browser->RegisterHandler(wxSharedPtr<wxWebViewHandler>(new wxWebViewFSHandler("memory")));
SetSizer(topsizer);
@ -378,6 +401,7 @@ WebFrame::WebFrame(const wxString& url) :
editmenu->AppendSubMenu(selection, "Selection");
wxMenuItem* loadscheme = m_tools_menu->Append(wxID_ANY, _("Custom Scheme Example"));
wxMenuItem* usememoryfs = m_tools_menu->Append(wxID_ANY, _("Memory File System Example"));
//By default we want to handle navigation and new windows
m_tools_handle_navigation->Check();
@ -481,6 +505,8 @@ WebFrame::WebFrame(const wxString& url) :
wxCommandEventHandler(WebFrame::OnSelectAll), NULL, this );
Connect(loadscheme->GetId(), wxEVT_COMMAND_MENU_SELECTED,
wxCommandEventHandler(WebFrame::OnLoadScheme), NULL, this );
Connect(usememoryfs->GetId(), wxEVT_COMMAND_MENU_SELECTED,
wxCommandEventHandler(WebFrame::OnUseMemoryFS), NULL, this );
Connect(m_find->GetId(), wxEVT_COMMAND_MENU_SELECTED,
wxCommandEventHandler(WebFrame::OnFind), NULL, this );
@ -628,6 +654,11 @@ void WebFrame::OnLoadScheme(wxCommandEvent& WXUNUSED(evt))
m_browser->LoadURL(path);
}
void WebFrame::OnUseMemoryFS(wxCommandEvent& WXUNUSED(evt))
{
m_browser->LoadURL("memory:page1.htm");
}
void WebFrame::OnFind(wxCommandEvent& WXUNUSED(evt))
{
wxString value = m_browser->GetSelectedText();

View File

@ -0,0 +1,38 @@
/////////////////////////////////////////////////////////////////////////////
// Name: webviewfshandler.cpp
// Purpose: Custom webview handler for virtual file system
// Author: Nick Matthews
// Id: $Id$
// Copyright: (c) 2012 Steven Lamerton
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#if wxUSE_WEBVIEW
#if defined(__BORLANDC__)
#pragma hdrstop
#endif
#include "wx/webviewfshandler.h"
#include "wx/filesys.h"
wxWebViewFSHandler::wxWebViewFSHandler(const wxString& scheme) :
wxWebViewHandler(scheme)
{
m_fileSystem = new wxFileSystem();
}
wxWebViewFSHandler::~wxWebViewFSHandler()
{
wxDELETE(m_fileSystem);
}
wxFSFile* wxWebViewFSHandler::GetFile(const wxString &uri)
{
return m_fileSystem->OpenFile(uri);
}
#endif // wxUSE_WEBVIEW