webviewarchivehandler.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: webviewarchivehandler.h
  3. // Purpose: Custom webview handler to allow archive browsing
  4. // Author: Steven Lamerton
  5. // Copyright: (c) 2011 Steven Lamerton
  6. // Licence: wxWindows licence
  7. /////////////////////////////////////////////////////////////////////////////
  8. #ifndef _WX_WEBVIEW_FILE_HANDLER_H_
  9. #define _WX_WEBVIEW_FILE_HANDLER_H_
  10. #include "wx/setup.h"
  11. #if wxUSE_WEBVIEW
  12. class wxFSFile;
  13. class wxFileSystem;
  14. #include "wx/webview.h"
  15. //Loads from uris such as scheme:///C:/example/example.html or archives such as
  16. //scheme:///C:/example/example.zip;protocol=zip/example.html
  17. class WXDLLIMPEXP_WEBVIEW wxWebViewArchiveHandler : public wxWebViewHandler
  18. {
  19. public:
  20. wxWebViewArchiveHandler(const wxString& scheme);
  21. virtual ~wxWebViewArchiveHandler();
  22. virtual wxFSFile* GetFile(const wxString &uri);
  23. private:
  24. wxFileSystem* m_fileSystem;
  25. };
  26. #endif // wxUSE_WEBVIEW
  27. #endif // _WX_WEBVIEW_FILE_HANDLER_H_