+void MyFrame::OnUpdateItem(wxCommandEvent& WXUNUSED(event))
+{
+ if (GetMyBox())
+ GetMyBox()->UpdateFirstItem();
+}
+
+void MyFrame::OnSetBgCol(wxCommandEvent& WXUNUSED(event))
+{
+ wxColour col = wxGetColourFromUser(this, m_hlbox->GetBackgroundColour());
+ if ( col.Ok() )
+ {
+ m_hlbox->SetBackgroundColour(col);
+ m_hlbox->Refresh();
+
+#if wxUSE_STATUSBAR
+ SetStatusText(_T("Background colour changed."));
+#endif // wxUSE_STATUSBAR
+ }
+}
+
+void MyFrame::OnSetSelBgCol(wxCommandEvent& WXUNUSED(event))
+{
+ wxColour col = wxGetColourFromUser(this, m_hlbox->GetSelectionBackground());
+ if ( col.Ok() )
+ {
+ m_hlbox->SetSelectionBackground(col);
+ m_hlbox->Refresh();
+
+#if wxUSE_STATUSBAR
+ SetStatusText(_T("Selection background colour changed."));
+#endif // wxUSE_STATUSBAR
+ }
+}
+
+void MyFrame::OnSetSelFgCol(wxCommandEvent& event)
+{
+ if (GetMyBox())
+ {
+ GetMyBox()->SetChangeSelFg(!event.IsChecked());
+ GetMyBox()->Refresh();
+ }
+}
+
+void MyFrame::OnHtmlLinkClicked(wxHtmlLinkEvent &event)
+{
+ wxLogMessage(wxT("The url '%s' has been clicked!"), event.GetLinkInfo().GetHref().c_str());
+
+ if (GetMyBox())
+ {
+ GetMyBox()->m_linkClicked = true;
+ GetMyBox()->RefreshLine(1);
+ }
+}
+
+void MyFrame::OnHtmlCellHover(wxHtmlCellEvent &event)
+{
+ wxLogMessage(wxT("Mouse moved over cell %p at %d;%d"),
+ event.GetCell(), event.GetPoint().x, event.GetPoint().y);
+}
+
+void MyFrame::OnHtmlCellClicked(wxHtmlCellEvent &event)
+{
+ wxLogMessage(wxT("Click over cell %p at %d;%d"),
+ event.GetCell(), event.GetPoint().x, event.GetPoint().y);
+
+ // if we don't skip the event, OnHtmlLinkClicked won't be called!
+ event.Skip();
+}
+