+wxHtmlCell::wxHtmlCell() : wxObject()
+{
+ m_Next = NULL;
+ m_Parent = NULL;
+ m_Width = m_Height = m_Descent = 0;
+ m_CanLiveOnPagebreak = TRUE;
+ m_Link = NULL;
+}
+
+wxHtmlCell::~wxHtmlCell()
+{
+ delete m_Link;
+}
+
+
+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;
+}
+
+