Add wxHtmlCell::GetRect()
This commit is contained in:
committed by
Vadim Zeitlin
parent
ba5547d640
commit
65771f685b
@@ -221,10 +221,10 @@ wxHtmlCell *wxHtmlCell::FindCellByPos(wxCoord x, wxCoord y,
|
||||
}
|
||||
|
||||
|
||||
wxPoint wxHtmlCell::GetAbsPos(wxHtmlCell *rootCell) const
|
||||
wxPoint wxHtmlCell::GetAbsPos(const wxHtmlCell *rootCell) const
|
||||
{
|
||||
wxPoint p(m_PosX, m_PosY);
|
||||
for (wxHtmlCell *parent = m_Parent; parent && parent != rootCell;
|
||||
for (const wxHtmlCell *parent = m_Parent; parent && parent != rootCell;
|
||||
parent = parent->m_Parent)
|
||||
{
|
||||
p.x += parent->m_PosX;
|
||||
@@ -233,6 +233,11 @@ wxPoint wxHtmlCell::GetAbsPos(wxHtmlCell *rootCell) const
|
||||
return p;
|
||||
}
|
||||
|
||||
wxRect wxHtmlCell::GetRect(const wxHtmlCell* rootCell) const
|
||||
{
|
||||
return wxRect(GetAbsPos(rootCell), wxSize(m_Width, m_Height));
|
||||
}
|
||||
|
||||
wxHtmlCell *wxHtmlCell::GetRootCell() const
|
||||
{
|
||||
wxHtmlCell *c = wxConstCast(this, wxHtmlCell);
|
||||
|
Reference in New Issue
Block a user