]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_boxinset.C
Jean-Marc's fix for wrong descent
[lyx.git] / src / mathed / math_boxinset.C
index 19ccbad82b727af61a4cbfd9748bd96b08a8b748..135d526944ad795baf8ccf48581617a23a47867e 100644 (file)
@@ -1,17 +1,15 @@
 #include <config.h>
 
-#ifdef __GNUG__
-#pragma implementation
-#endif
 
 #include "math_boxinset.h"
 #include "math_support.h"
 #include "math_mathmlstream.h"
 #include "math_streamstr.h"
+#include "support/LOstream.h"
 
 
 MathBoxInset::MathBoxInset(string const & name)
-       : MathGridInset(1, 1), name_(name)
+       : MathNestInset(1), name_(name)
 {}
 
 
@@ -23,7 +21,7 @@ MathInset * MathBoxInset::clone() const
 
 void MathBoxInset::write(WriteStream & os) const
 {
-       os << "\\" << name_ << "{" << cell(0) << "}";
+       os << '\\' << name_ << '{' << cell(0) << '}';
 }
 
 
@@ -35,24 +33,20 @@ void MathBoxInset::normalize(NormalStream & os) const
 }
 
 
-void MathBoxInset::rebreak()
-{
-       //lyxerr << "trying to rebreak...\n";
-}
-
-
 void MathBoxInset::metrics(MathMetricsInfo & mi) const
 {
        MathFontSetChanger dummy(mi.base, "textnormal");
-       MathGridInset::metrics(mi);
+       cell(0).metrics(mi);
+       dim_ = cell(0).dim();
+       metricsMarkers2();
 }
 
 
 void MathBoxInset::draw(MathPainterInfo & pi, int x, int y) const
 {
        MathFontSetChanger dummy(pi.base, "textnormal");
-       MathGridInset::draw(pi, x, y);
-       mathed_draw_framebox(pi, x, y, this);
+       cell(0).draw(pi, x, y);
+       drawMarkers2(pi, x + 1, y);
 }