if (!inset) {
// Either we deconst editXY or better we move current_font
// and real_current_font to Cursor
- text_->setCurrentFont(cur);
+ // FIXME: what is needed now that current_font and real_current_font
+ // are transferred?
+ cur.setCurrentFont();
return 0;
}
inset = inset->editXY(cur, x, y);
if (cur.top().text() == text_)
- text_->setCurrentFont(cur);
+ cur.setCurrentFont();
return inset;
}
}
+bool TextMetrics::isLastRow(pit_type pit, Row const & row) const
+{
+ ParagraphList const & pars = text_->paragraphs();
+ return row.endpos() >= pars[pit].size()
+ && pit + 1 == pit_type(pars.size());
+}
+
+
+bool TextMetrics::isFirstRow(pit_type pit, Row const & row) const
+{
+ return row.pos() == 0 && pit == 0;
+}
+
+
int TextMetrics::leftMargin(int max_width, pit_type pit) const
{
BOOST_ASSERT(pit >= 0);