X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/45e6e6f8ab806b337dffeb3b52fec7eba3c845ef..d5cc191c9cd48a915ce0dfc6e49511b2fddb6746:/samples/html/virtual/virtual.cpp diff --git a/samples/html/virtual/virtual.cpp b/samples/html/virtual/virtual.cpp index 27c1b8a57a..58086a31d6 100644 --- a/samples/html/virtual/virtual.cpp +++ b/samples/html/virtual/virtual.cpp @@ -1,7 +1,12 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: virtua;.cpp -// Purpose: wxHtml testing example -// demonstrates virtual file systems feature +// Name: virtual.cpp +// Purpose: wxHtml sample: demonstrates virtual file systems feature +// Author: ? +// Modified by: +// Created: ? +// RCS-ID: $Id$ +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // For compilers that support precompilation, includes "wx/wx.h". @@ -17,9 +22,11 @@ #include "wx/wx.h" #endif - #include "wx/html/htmlwin.h" +#ifndef wxHAS_IMAGES_IN_RESOURCES + #include "../../sample.xpm" +#endif // new handler class: @@ -27,6 +34,9 @@ #include "wx/mstream.h" +// ---------------------------------------------------------------------------- +// MyVFS +// ---------------------------------------------------------------------------- class MyVFS : public wxFileSystemHandler { @@ -37,14 +47,11 @@ public: bool CanOpen(const wxString& location); }; - bool MyVFS::CanOpen(const wxString& location) { return (GetProtocol(location) == wxT("myVFS")); } - - wxFSFile* MyVFS::OpenFile(wxFileSystem& WXUNUSED(fs), const wxString& location) { wxFSFile *f; @@ -53,13 +60,13 @@ wxFSFile* MyVFS::OpenFile(wxFileSystem& WXUNUSED(fs), const wxString& location) const wxWX2MBbuf loc = location.ToAscii(); sprintf(buf, "
"
- "Where do you want to go?
" - "sub-1", - (const char*)loc, (const char*)loc, (const char*)loc, - (const char*)loc); + "Where do you want to go?
" - "sub-2
" - "sub-3
" - "
" + "sub-1
" + "sub-2
" + "sub-3
" + "