X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3e729cbe15997180987992097e6d78c6b8de2b25..60df0f96859fb0131ddfa8b477612a15f4a43790:/samples/html/test/test.cpp diff --git a/samples/html/test/test.cpp b/samples/html/test/test.cpp index faaf91d0f9..4519cfe898 100644 --- a/samples/html/test/test.cpp +++ b/samples/html/test/test.cpp @@ -9,7 +9,7 @@ #endif // For compilers that support precompilation, includes "wx/wx.h". -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop @@ -18,13 +18,15 @@ // for all others, include the necessary headers (this file is usually all you // need because it includes almost all "standard" wxWindows headers #ifndef WX_PRECOMP - #include + #include "wx/wx.h" #endif -#include -#include -#include -#include +#include "wx/image.h" +#include "wx/sysopt.h" +#include "wx/html/htmlwin.h" +#include "wx/html/htmlproc.h" +#include "wx/fs_inet.h" +#include "wx/filedlg.h" // ---------------------------------------------------------------------------- // private classes @@ -75,7 +77,6 @@ class BoldProcessor : public wxHtmlProcessor r.Replace(wxT(""), wxEmptyString); r.Replace(wxT(""), wxEmptyString); r.Replace(wxT(""), wxEmptyString); - printf("called\n"); return r; } }; @@ -130,10 +131,14 @@ class BoldProcessor : public wxHtmlProcessor // `Main program' equivalent: the program execution "starts" here bool MyApp::OnInit() { +#if wxUSE_SYSTEM_OPTIONS + wxSystemOptions::SetOption(wxT("no-maskblt"), 1); +#endif + wxInitAllImageHandlers(); - #if wxUSE_FS_INET && wxUSE_STREAMS && wxUSE_SOCKETS +#if wxUSE_FS_INET && wxUSE_STREAMS && wxUSE_SOCKETS wxFileSystem::AddHandler(new wxInternetFSHandler); - #endif +#endif SetVendorName("wxWindows"); SetAppName("wxHtmlTest"); @@ -210,7 +215,7 @@ void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnPageOpen(wxCommandEvent& WXUNUSED(event)) { - wxString p = wxFileSelector("Open HTML document", "", "", "", "HTML files|*.htm"); + wxString p = wxFileSelector(wxT("Open HTML document"), wxT(""), wxT(""), wxT(""), wxT("HTML files|*.htm")); if (p != wxEmptyString) m_Html -> LoadPage(p); } @@ -229,5 +234,4 @@ void MyFrame::OnProcessor(wxCommandEvent& WXUNUSED(event)) { m_Processor->Enable(!m_Processor->IsEnabled()); m_Html->LoadPage(m_Html->GetOpenedPage()); - printf("%i\n", m_Processor->IsEnabled()); }