X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/af1ed0c1077cdfc63ae3621a482167f644586297..399b60a0ad232265cd74ce8bf6a53a1f2cc57ff2:/src/html/htmlcell.cpp?ds=sidebyside diff --git a/src/html/htmlcell.cpp b/src/html/htmlcell.cpp index e6c3269665..0ca4bb2524 100644 --- a/src/html/htmlcell.cpp +++ b/src/html/htmlcell.cpp @@ -92,6 +92,35 @@ void wxHtmlCell::SetLink(const wxHtmlLinkInfo& link) +void wxHtmlCell::Layout(int w) +{ + SetPos(0, 0); + if (m_Next) m_Next -> Layout(w); +} + + +void wxHtmlCell::Draw(wxDC& dc, int x, int y, int view_y1, int view_y2) +{ + if (m_Next) m_Next -> Draw(dc, x, y, view_y1, view_y2); +} + + + +void wxHtmlCell::DrawInvisible(wxDC& dc, int x, int y) +{ + if (m_Next) m_Next -> DrawInvisible(dc, x, y); +} + + + +const wxHtmlCell* wxHtmlCell::Find(int condition, const void* param) const +{ + if (m_Next) return m_Next -> Find(condition, param); + else return NULL; +} + + + //----------------------------------------------------------------------------- // wxHtmlWordCell //----------------------------------------------------------------------------- @@ -248,6 +277,11 @@ wxHtmlContainerCell::wxHtmlContainerCell(wxHtmlContainerCell *parent) : wxHtmlCe m_LastLayout = -1; } +wxHtmlContainerCell::~wxHtmlContainerCell() +{ + if (m_Cells) delete m_Cells; +} + void wxHtmlContainerCell::SetIndent(int i, int what, int units) @@ -405,12 +439,14 @@ void wxHtmlContainerCell::Layout(int w) int counter = 0; int step = (s_width - xpos); if (step < 0) step = 0; - while (line != cell) { + xcnt--; + if (xcnt > 0) while (line != cell) { line -> SetPos(line -> GetPosX() + s_indent + (counter++ * step / xcnt), ypos + line -> GetPosY()); line = line -> GetNext(); } + xcnt++; } ypos += ysizedown;