return 0;
int y = 0;
- for (Row * row = firstrow;
+ for (Row * row = firstRow();
row && row != anchor_row_; row = row->next()) {
y += row->height();
}
void LyXText::top_y(int newy)
{
- if (!firstrow)
+ if (!firstRow())
return;
lyxerr[Debug::GUI] << "setting top y = " << newy << endl;
}
-lyx::pos_type LyXText::log2vis(lyx::pos_type pos) const
+lyx::pos_type LyXText::log2vis(lyx::pos_type pos) const
{
if (bidi_start == -1)
return pos;
}
-lyx::pos_type LyXText::vis2log(lyx::pos_type pos) const
+lyx::pos_type LyXText::vis2log(lyx::pos_type pos) const
{
if (bidi_start == -1)
return pos;
}
-lyx::pos_type LyXText::bidi_level(lyx::pos_type pos) const
+lyx::pos_type LyXText::bidi_level(lyx::pos_type pos) const
{
if (bidi_start == -1)
return 0;
}
-bool LyXText::bidi_InRange(lyx::pos_type pos) const
+bool LyXText::bidi_InRange(lyx::pos_type pos) const
{
return bidi_start == -1 ||
(bidi_start <= pos && pos <= bidi_end);
}
row->width(int(maxwidth + x));
if (inset_owner) {
- Row * r = firstrow;
+ Row * r = firstRow();
width = max(0, workWidth());
while (r) {
if (r->width() > width)
++z;
insertRow(row, row->par(), z);
row = row->next();
- row->height(0);
} else {
done = true;
}
}
-// Do we even need this at all ? Code that uses RowPainter *already*
-// sets need_break_row when it sees a CHANGED_IN_DRAW, though not
-// quite like this
-void LyXText::markChangeInDraw(Row * row, Row * prev)
-{
- if (prev && prev->par() == row->par()) {
- breakAgainOneRow(prev);
- if (prev->next() != row) {
- // breakAgainOneRow() has removed row_
- need_break_row = prev;
- } else {
- need_break_row = row;
- }
- } else if (!prev) {
- need_break_row = firstrow;
- } else {
- need_break_row = prev->next();
- }
- setCursor(cursor.par(), cursor.pos());
- /* FIXME */
-}
-
-
void LyXText::breakAgain(Row * row)
{
bool not_ready = true;
++z;
insertRow(row, row->par(), z);
row = row->next();
- row->height(0);
} else {
row = row->next();
++z;
++z;
insertRow(row, row->par(), z);
row = row->next();
- row->height(0);
} else {
row = row->next();
++z;
cursor.par()->next()->erase(0);
insertParagraph(cursor.par()->next(), cursor.row());
-
updateCounters();
// This check is necessary. Otherwise the new empty paragraph will
// returns pointer to a specified row
Row * LyXText::getRow(Paragraph * par, pos_type pos, int & y) const
{
- if (!firstrow)
+ if (!firstRow())
return 0;
- Row * tmprow = firstrow;
+ Row * tmprow = firstRow();
y = 0;
// find the first row of the specified paragraph
{
#if 1
// If possible we should optimize this method. (Lgb)
- Row * tmprow = firstrow;
+ Row * tmprow = firstRow();
int tmpy = 0;
while (tmprow->next() && tmpy + tmprow->height() <= y) {