- class MyFrame : public wxFrame
- {
- public:
- // ctor(s)
- MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size);
-
- // event handlers (these functions should _not_ be virtual)
- void OnQuit(wxCommandEvent& event);
- void OnAbout(wxCommandEvent& event);
- void OnBack(wxCommandEvent& event);
- void OnForward(wxCommandEvent& event);
-
- private:
- // any class wishing to process wxWindows events must use this macro
- DECLARE_EVENT_TABLE()
- };
+class MyFrame : public wxFrame
+{
+public:
+ // ctor(s)
+ MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size);
+
+ // event handlers (these functions should _not_ be virtual)
+ void OnQuit(wxCommandEvent& event);
+ void OnPageOpen(wxCommandEvent& event);
+ void OnBack(wxCommandEvent& event);
+ void OnForward(wxCommandEvent& event);
+ void OnProcessor(wxCommandEvent& event);
+
+private:
+ wxHtmlWindow *m_Html;
+ wxHtmlProcessor *m_Processor;
+ // any class wishing to process wxWindows events must use this macro
+ DECLARE_EVENT_TABLE()
+};
+
+
+class BoldProcessor : public wxHtmlProcessor
+{
+ public:
+ virtual wxString Process(const wxString& s) const
+ {
+ wxString r(s);
+ r.Replace(wxT("<b>"), wxEmptyString);
+ r.Replace(wxT("<B>"), wxEmptyString);
+ r.Replace(wxT("</b>"), wxEmptyString);
+ r.Replace(wxT("</B>"), wxEmptyString);
+ return r;
+ }
+};