+}
+
+void wxHtmlWindowMouseHelper::HandleMouseMoved()
+{
+ m_tmpMouseMoved = true;
+}
+
+bool wxHtmlWindowMouseHelper::HandleMouseClick(wxHtmlCell *rootCell,
+ const wxPoint& pos,
+ const wxMouseEvent& event)
+{
+ if (!rootCell)
+ return false;
+
+ wxHtmlCell *cell = rootCell->FindCellByPos(pos.x, pos.y);
+ // this check is needed because FindCellByPos returns terminal cell and
+ // containers may have empty borders -- in this case NULL will be
+ // returned
+ if (!cell)
+ return false;
+
+ // adjust the coordinates to be relative to this cell:
+ wxPoint relpos = pos - cell->GetAbsPos(rootCell);
+
+ return OnCellClicked(cell, relpos.x, relpos.y, event);
+}
+
+void wxHtmlWindowMouseHelper::HandleIdle(wxHtmlCell *rootCell,
+ const wxPoint& pos)
+{
+ wxHtmlCell *cell = rootCell ? rootCell->FindCellByPos(pos.x, pos.y) : NULL;
+
+ if (cell != m_tmpLastCell)
+ {
+ wxHtmlLinkInfo *lnk = NULL;
+ if (cell)
+ {
+ // adjust the coordinates to be relative to this cell:
+ wxPoint relpos = pos - cell->GetAbsPos(rootCell);
+ lnk = cell->GetLink(relpos.x, relpos.y);
+ }
+
+ wxCursor cur;
+ if (cell)
+ cur = cell->GetMouseCursor(m_interface);
+ else
+ cur = m_interface->GetHTMLCursor(
+ wxHtmlWindowInterface::HTMLCursor_Default);
+
+ m_interface->GetHTMLWindow()->SetCursor(cur);
+
+ if (lnk != m_tmpLastLink)
+ {
+ if (lnk)
+ m_interface->SetHTMLStatusText(lnk->GetHref());
+ else
+ m_interface->SetHTMLStatusText(wxEmptyString);
+
+ m_tmpLastLink = lnk;
+ }
+
+ m_tmpLastCell = cell;
+ }
+ else // mouse moved but stayed in the same cell
+ {
+ if ( cell )
+ {
+ OnCellMouseHover(cell, pos.x, pos.y);
+ }
+ }
+
+ m_tmpMouseMoved = false;
+}
+
+bool wxHtmlWindowMouseHelper::OnCellClicked(wxHtmlCell *cell,
+ wxCoord x, wxCoord y,
+ const wxMouseEvent& event)
+{
+ wxCHECK_MSG( cell, false, _T("can't be called with NULL cell") );
+
+ return cell->ProcessMouseClick(m_interface, wxPoint(x, y), event);
+}
+
+void wxHtmlWindowMouseHelper::OnCellMouseHover(wxHtmlCell * WXUNUSED(cell),
+ wxCoord WXUNUSED(x),
+ wxCoord WXUNUSED(y))
+{
+ // do nothing here
+}
+
+//-----------------------------------------------------------------------------
+// wxHtmlWindow
+//-----------------------------------------------------------------------------
+
+wxList wxHtmlWindow::m_Filters;
+wxHtmlFilter *wxHtmlWindow::m_DefaultFilter = NULL;
+wxHtmlProcessorList *wxHtmlWindow::m_GlobalProcessors = NULL;
+wxCursor *wxHtmlWindow::ms_cursorLink = NULL;
+wxCursor *wxHtmlWindow::ms_cursorText = NULL;
+
+void wxHtmlWindow::CleanUpStatics()
+{
+ wxDELETE(m_DefaultFilter);
+ WX_CLEAR_LIST(wxList, m_Filters);
+ if (m_GlobalProcessors)
+ WX_CLEAR_LIST(wxHtmlProcessorList, *m_GlobalProcessors);
+ wxDELETE(m_GlobalProcessors);
+ wxDELETE(ms_cursorLink);
+ wxDELETE(ms_cursorText);
+}
+
+void wxHtmlWindow::Init()
+{
+ m_tmpCanDrawLocks = 0;