]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_parboxinset.C
fix #1073
[lyx.git] / src / mathed / math_parboxinset.C
index 254a678767735a66d903c696481f371deaabbd7e..f8a3254e0ea38f8bf80d455eaf1c97fea35512f2 100644 (file)
@@ -7,8 +7,7 @@
 
 
 MathParboxInset::MathParboxInset()
-       : MathNestInset(1), lyx_width_(0), tex_width_("0mm"),
-         position_('c')
+       : lyx_width_(0), tex_width_("0mm"), position_('c')
 {
        lyxerr << "constructing MathParboxInset\n";
 }
@@ -34,23 +33,20 @@ void MathParboxInset::setWidth(string const & w)
 }
 
 
-void MathParboxInset::metrics(MathMetricsInfo & mi) const
+void MathParboxInset::metrics(MetricsInfo & mi) const
 {
-       MathFontSetChanger dummy1(mi.base, "textnormal");
-       MathWidthChanger   dummy2(mi.base, lyx_width_);
-       xcell(0).metrics(mi);
-       ascent_  = xcell(0).ascent();
-       descent_ = xcell(0).descent() + 1;
-       width_   = xcell(0).width()   + 2;
+       FontSetChanger dummy1(mi.base, "textnormal");
+       WidthChanger dummy2(mi.base, lyx_width_);
+       MathTextInset::metrics(mi);
+       metricsMarkers2();
 }
 
 
-void MathParboxInset::draw(MathPainterInfo & pi, int x, int y) const
+void MathParboxInset::draw(PainterInfo & pi, int x, int y) const
 {
-       MathFontSetChanger dummy1(pi.base, "textnormal");
-       MathWidthChanger   dummy2(pi.base, lyx_width_);
-       xcell(0).draw(pi, x + 1, y);
-       drawMarkers(pi, x, y);
+       FontSetChanger dummy(pi.base, "textnormal");
+       MathTextInset::draw(pi, x + 1, y);
+       drawMarkers2(pi, x, y);
 }
 
 
@@ -65,6 +61,5 @@ void MathParboxInset::write(WriteStream & os) const
 
 void MathParboxInset::infoize(std::ostream & os) const
 {
-       os << "Box: Parbox " << tex_width_ << ' ';
+       os << "Box: Parbox " << tex_width_;
 }
-