webviewfshandler.h 963 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: webviewfshandler.h
  3. // Purpose: Custom webview handler for virtual file system
  4. // Author: Nick Matthews
  5. // Copyright: (c) 2012 Steven Lamerton
  6. // Licence: wxWindows licence
  7. /////////////////////////////////////////////////////////////////////////////
  8. // Based on webviewarchivehandler.h file by Steven Lamerton
  9. #ifndef _WX_WEBVIEW_FS_HANDLER_H_
  10. #define _WX_WEBVIEW_FS_HANDLER_H_
  11. #include "wx/setup.h"
  12. #if wxUSE_WEBVIEW
  13. class wxFSFile;
  14. class wxFileSystem;
  15. #include "wx/webview.h"
  16. //Loads from uris such as scheme:example.html
  17. class WXDLLIMPEXP_WEBVIEW wxWebViewFSHandler : public wxWebViewHandler
  18. {
  19. public:
  20. wxWebViewFSHandler(const wxString& scheme);
  21. virtual ~wxWebViewFSHandler();
  22. virtual wxFSFile* GetFile(const wxString &uri);
  23. private:
  24. wxFileSystem* m_fileSystem;
  25. };
  26. #endif // wxUSE_WEBVIEW
  27. #endif // _WX_WEBVIEW_FS_HANDLER_H_