wxPoint pt1 = (selFrom == wxDefaultPosition) ?
wxDefaultPosition : selFrom - GetAbsPos();
wxPoint pt2 = (selTo == wxDefaultPosition) ?
- wxPoint(m_Width, wxDefaultPosition.y) : selTo - GetAbsPos();
+ wxPoint(m_Width, wxDefaultCoord) : selTo - GetAbsPos();
wxCoord charW, charH;
unsigned len = m_Word.length();
#endif
bool drawSelectionAfterCell = false;
-
+
if ( info.GetState().GetSelectionState() == wxHTML_SEL_CHANGING )
{
// Selection changing, we must draw the word piecewise:
curLineWidth += cell->GetMaxTotalWidth();
cell = cell->GetNext();
-
+
// compute length of the next word that would be added:
nextWordWidth = 0;
if (cell)
nextCell = nextCell->GetNext();
} while (nextCell && !nextCell->IsLinebreakAllowed());
}
-
+
// force new line if occured:
- if ((cell == NULL) ||
+ if ((cell == NULL) ||
(xpos + nextWordWidth > s_width && cell->IsLinebreakAllowed()))
{
if (xpos > MaxLineWidth) MaxLineWidth = xpos;
// first cell on line is not moved:
line->SetPos(line->GetPosX() + s_indent,
line->GetPosY() + ypos);
-
+
line = line->GetNext();
for ( int n = 0; line != cell; line = line->GetNext() )
{
// thus increasing our size
n++;
}
-
+
line->SetPos(line->GetPosX() + s_indent +
((n * step) / total),
line->GetPosY() + ypos);
if (curLineWidth > m_MaxTotalWidth)
m_MaxTotalWidth = curLineWidth;
-
+
m_MaxTotalWidth += s_indent + ((m_IndentRight < 0) ? (-m_IndentRight * m_Width / 100) : m_IndentRight);
MaxLineWidth += s_indent + ((m_IndentRight < 0) ? (-m_IndentRight * m_Width / 100) : m_IndentRight);
if (m_Width < MaxLineWidth) m_Width = MaxLineWidth;
if ( cell->IsFormattingCell() )
continue;
int cellY = cell->GetPosY();
- if (!( y < cellY || (y < cellY + cell->GetHeight() &&
+ if (!( y < cellY || (y < cellY + cell->GetHeight() &&
x < cell->GetPosX() + cell->GetWidth()) ))
continue;
-
+
c = cell->FindCellByPos(x - cell->GetPosX(), y - cellY, flags);
if (c) return c;
}
}
void wxHtmlContainerCell::RemoveExtraSpacing(bool top, bool bottom)
-{
+{
if ( top )
SetIndent(0, wxHTML_INDENT_TOP);
if ( bottom )
}
}
}
-
+
if ( bottom )
{
wxArrayPtrVoid arr;
for ( c = m_Cells; c; c = c->GetNext() )
arr.Add((void*)c);
-
+
for ( int i = arr.GetCount() - 1; i >= 0; i--)
{
c = (wxHtmlCell*)arr[i];