+void wxHtmlCell::OnMouseClick(wxWindow *parent, int x, int y,
+ const wxMouseEvent& event)
+{
+ wxHtmlLinkInfo *lnk = GetLink(x, y);
+ if (lnk != NULL)
+ {
+ wxHtmlLinkInfo lnk2(*lnk);
+ lnk2.SetEvent(&event);
+ lnk2.SetHtmlCell(this);
+
+ // note : this cast is legal because parent is *always* wxHtmlWindow
+ wxStaticCast(parent, wxHtmlWindow)->OnLinkClicked(lnk2);
+ }
+}
+
+
+
+bool wxHtmlCell::AdjustPagebreak(int *pagebreak) const
+{
+ if ((!m_CanLiveOnPagebreak) &&
+ m_PosY < *pagebreak && m_PosY + m_Height > *pagebreak)
+ {
+ *pagebreak = m_PosY;
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+
+
+void wxHtmlCell::SetLink(const wxHtmlLinkInfo& link)
+{
+ if (m_Link) delete m_Link;
+ m_Link = NULL;
+ if (link.GetHref() != wxEmptyString)
+ m_Link = new wxHtmlLinkInfo(link);
+}
+
+
+
+void wxHtmlCell::Layout(int WXUNUSED(w))
+{
+ SetPos(0, 0);
+}
+
+
+
+void wxHtmlCell::GetHorizontalConstraints(int *left, int *right) const
+{
+ if (left)
+ *left = m_PosX;
+ if (right)
+ *right = m_PosX + m_Width;
+}
+
+
+
+const wxHtmlCell* wxHtmlCell::Find(int WXUNUSED(condition), const void* WXUNUSED(param)) const
+{
+ return NULL;
+}
+
+
+wxHtmlCell *wxHtmlCell::FindCellByPos(wxCoord x, wxCoord y) const
+{
+ if ( x >= 0 && x < m_Width && y >= 0 && y < m_Height )
+ return wxConstCast(this, wxHtmlCell);
+
+ return NULL;
+}
+