]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_sizeinset.C
forward search in math insets. ugly. seems to work. don't ask why.
[lyx.git] / src / mathed / math_sizeinset.C
index 8587e570479198cd474c7dce735cfe57e29a9308..02f45c00afb7e25009b49ed99206325ec6d58904 100644 (file)
@@ -1,10 +1,13 @@
+#include <config.h>
+
 #ifdef __GNUG__
 #pragma implementation
 #endif
 
 #include "math_sizeinset.h"
 #include "math_parser.h"
-#include "support/LOstream.h"
+#include "math_mathmlstream.h"
+#include "math_streamstr.h"
 
 
 MathSizeInset::MathSizeInset(latexkeys const * l)
@@ -20,32 +23,28 @@ MathInset * MathSizeInset::clone() const
 
 void MathSizeInset::draw(Painter & pain, int x, int y) const
 {
-       xo(x);
-       yo(y);
        xcell(0).draw(pain, x, y);
 }
 
 
-void MathSizeInset::metrics(MathStyles /* st */) const
+void MathSizeInset::metrics(MathMetricsInfo const & mi) const
 {
-       xcell(0).metrics(MathStyles(key_->id));
+       MathMetricsInfo m = mi;
+       m.style = MathStyles(key_->id);
+       xcell(0).metrics(m);
        ascent_   = xcell(0).ascent_;
        descent_  = xcell(0).descent_;
        width_    = xcell(0).width_;
 }
 
 
-void MathSizeInset::write(std::ostream & os, bool fragile) const
+void MathSizeInset::write(WriteStream & os) const
 {
-       os << "{\\" << key_->name << " ";
-       cell(0).write(os, fragile);
-       os << "}";
+       os << "{\\" << key_->name << ' ' << cell(0) << '}';
 }
 
 
-void MathSizeInset::writeNormal(std::ostream & os) const
+void MathSizeInset::normalize(NormalStream & os) const
 {
-       os << "[" << key_->name << " ";
-       cell(0).writeNormal(os);
-       os << "]";
+       os << "[" << key_->name << ' ' << cell(0) << ']';
 }