// demonstrates virtual file systems feature
/////////////////////////////////////////////////////////////////////////////
// demonstrates virtual file systems feature
/////////////////////////////////////////////////////////////////////////////
sprintf(buf, "<html><body><h2><i>You're in Node <u>%s</u></i></h2><p>"
"Where do you want to go?<br><blockquote>"
sprintf(buf, "<html><body><h2><i>You're in Node <u>%s</u></i></h2><p>"
"Where do you want to go?<br><blockquote>"
"<a href=\"%s-2\">sub-2</a><br>"
"<a href=\"%s-3\">sub-3</a><br>"
"</blockquote></body></html>",
"<a href=\"%s-2\">sub-2</a><br>"
"<a href=\"%s-3\">sub-3</a><br>"
"</blockquote></body></html>",
- location.GetData(), location.GetData(), location.GetData(), location.GetData());
+ (const char*)loc, (const char*)loc, (const char*)loc,
+ (const char*)loc);
// NB: There's a terrible hack involved: we fill 'buf' with new data every
// time this method is called and return new wxMemoryInputStream pointing to it.
// NB: There's a terrible hack involved: we fill 'buf' with new data every
// time this method is called and return new wxMemoryInputStream pointing to it.
// this won't happen because wxHTML keeps only one "page" file opened at the
// time.
str = new wxMemoryInputStream(buf, strlen(buf));
// this won't happen because wxHTML keeps only one "page" file opened at the
// time.
str = new wxMemoryInputStream(buf, strlen(buf));
- f = new wxFSFile(str, location, "text/html", wxEmptyString, wxDateTime::Today());
+ f = new wxFSFile(str, location, wxT("text/html"), wxEmptyString, wxDateTime::Today());
// handlers) which process them. It can be also done at run-time, but for the
// simple menu events like this the static method is much simpler.
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_MENU(Minimal_Quit, MyFrame::OnQuit)
// handlers) which process them. It can be also done at run-time, but for the
// simple menu events like this the static method is much simpler.
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_MENU(Minimal_Quit, MyFrame::OnQuit)
EVT_MENU(Minimal_Back, MyFrame::OnBack)
EVT_MENU(Minimal_Forward, MyFrame::OnForward)
END_EVENT_TABLE()
EVT_MENU(Minimal_Back, MyFrame::OnBack)
EVT_MENU(Minimal_Forward, MyFrame::OnForward)
END_EVENT_TABLE()
// the application object during program execution (it's better than using a
// static object for many reasons) and also declares the accessor function
// wxGetApp() which will return the reference of the right type (i.e. MyApp and
// the application object during program execution (it's better than using a
// static object for many reasons) and also declares the accessor function
// wxGetApp() which will return the reference of the right type (i.e. MyApp and
- MyFrame *frame = new MyFrame("wxHtmlWindow testing application",
- wxPoint(50, 50), wxSize(640, 480));
-
+ MyFrame *frame = new MyFrame(_("wxHtmlWindow testing application"),
+ wxDefaultPosition, wxSize(640, 480));
+
// Show it and tell the application that it's our main window
// @@@ what does it do exactly, in fact? is it necessary here?
// Show it and tell the application that it's our main window
// @@@ what does it do exactly, in fact? is it necessary here?
- : wxFrame((wxFrame *)NULL, -1, title, pos, size)
+ : wxFrame((wxFrame *)NULL, wxID_ANY, title, pos, size)
- menuFile->Append(Minimal_Quit, "E&xit");
- menuNav->Append(Minimal_Back, "Go &BACK");
- menuNav->Append(Minimal_Forward, "Go &FORWARD");
+ menuFile->Append(Minimal_Quit, _("E&xit"));
+ menuNav->Append(Minimal_Back, _("Go &BACK"));
+ menuNav->Append(Minimal_Forward, _("Go &FORWARD"));
- menuBar->Append(menuFile, "&File");
- menuBar->Append(menuNav, "&Navigate");
+ menuBar->Append(menuFile, _("&File"));
+ menuBar->Append(menuNav, _("&Navigate"));