}
-bool InsetMathMBox::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathMBox::metrics(MetricsInfo & mi, Dimension & dim) const
{
TextMetrics & tm = mi.base.bv->textMetrics(&text_);
tm.metrics(mi, dim);
metricsMarkers2(dim);
- if (dim_ == dim)
- return false;
- dim_ = dim;
- return true;
}
void InsetMathMBox::draw(PainterInfo & pi, int x, int y) const
{
- text_.draw(pi, x + 1, y);
+ pi.base.bv->textMetrics(&text_).draw(pi, x + 1, y);
drawMarkers(pi, x, y);
}
void InsetMathMBox::cursorPos(BufferView const & bv,
CursorSlice const & sl, bool boundary, int & x, int & y) const
{
- x = text_.cursorX(bv, sl, boundary);
- y = text_.cursorY(bv, sl, boundary);
-}
-
-
-void InsetMathMBox::drawSelection(PainterInfo & pi, int x, int y) const
-{
- text_.drawSelection(pi, x, y);
+ x = bv.textMetrics(&text_).cursorX(sl, boundary);
+ y = bv.textMetrics(&text_).cursorY(sl, boundary);
}