beginnings of HTML4 tables layouter

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11487 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2001-08-25 23:14:21 +00:00
parent bb0e27ee5a
commit 79d6c01818
3 changed files with 151 additions and 55 deletions

View File

@@ -97,6 +97,17 @@ void wxHtmlCell::Layout(int WXUNUSED(w))
}
void wxHtmlCell::GetHorizontalConstraints(int *left, int *right) const
{
if (left)
*left = m_PosX;
if (right)
*right = m_PosX + m_Width - 1;
}
const wxHtmlCell* wxHtmlCell::Find(int WXUNUSED(condition), const void* WXUNUSED(param)) const
{
return NULL;
@@ -551,6 +562,28 @@ void wxHtmlContainerCell::OnMouseClick(wxWindow *parent, int x, int y, const wxM
void wxHtmlContainerCell::GetHorizontalConstraints(int *left, int *right) const
{
int cleft = m_PosX + m_Width, cright = m_PosX; // worst case
int l, r;
for (wxHtmlCell *cell = m_Cells; cell; cell = cell->GetNext())
{
cell->GetHorizontalConstraints(&l, &r);
if (l < cleft)
cleft = l;
if (r > cright)
cright = r;
}
if (left)
*left = cleft;
if (right)
*right = cright;
}
//--------------------------------------------------------------------------------