+/*********************************************************************************
+wxHtmlAppletCell
+*********************************************************************************/
+wxHtmlAppletCell::wxHtmlAppletCell(wxWindow *wnd, int align) : wxHtmlCell()
+{
+ int sx, sy;
+ m_Wnd = wnd;
+ m_Wnd->GetSize(&sx, &sy);
+ m_Width = sx, m_Height = sy;
+
+ switch (align) {
+ case wxHTML_ALIGN_TOP :
+ m_Descent = m_Height;
+ break;
+ case wxHTML_ALIGN_CENTER :
+ m_Descent = m_Height / 2;
+ break;
+ case wxHTML_ALIGN_BOTTOM :
+ default :
+ m_Descent = 0;
+ break;
+ }
+
+ SetCanLiveOnPagebreak(FALSE);
+}
+
+
+void wxHtmlAppletCell::Draw(wxDC& WXUNUSED(dc), int WXUNUSED(x), int WXUNUSED(y), int WXUNUSED(view_y1), int WXUNUSED(view_y2))
+{
+ int absx = 0, absy = 0, stx, sty;
+ wxHtmlCell *c = this;
+
+ while (c)
+ {
+ absx += c->GetPosX();
+ absy += c->GetPosY();
+ c = c->GetParent();
+ }
+
+ ((wxScrolledWindow*)(m_Wnd->GetParent()))->GetViewStart(&stx, &sty);
+ m_Wnd->Move(absx - wxHTML_SCROLL_STEP * stx, absy - wxHTML_SCROLL_STEP * sty);
+}
+
+
+
+void wxHtmlAppletCell::DrawInvisible(wxDC& WXUNUSED(dc), int WXUNUSED(x), int WXUNUSED(y))
+{
+ int absx = 0, absy = 0, stx, sty;
+ wxHtmlCell *c = this;
+
+ while (c)
+ {
+ absx += c->GetPosX();
+ absy += c->GetPosY();
+ c = c->GetParent();
+ }
+
+ ((wxScrolledWindow*)(m_Wnd->GetParent()))->GetViewStart(&stx, &sty);
+ m_Wnd->Move(absx - wxHTML_SCROLL_STEP * stx, absy - wxHTML_SCROLL_STEP * sty);
+}
+
+
+
+void wxHtmlAppletCell::Layout(int w)
+{
+ int sx, sy;
+ m_Wnd->GetSize(&sx, &sy);
+ m_Width = sx, m_Height = sy;
+
+ wxHtmlCell::Layout(w);
+}
+
+
+
+