]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_sqrtinset.C
use stream-like syntax for LaTeX output
[lyx.git] / src / mathed / math_sqrtinset.C
index e802a4e0c7facb2a3b21748e822047f3f639bd3b..27cdc56c2c13a99c478f5b0c46a42fd2b2ce41cf 100644 (file)
@@ -1,5 +1,3 @@
-#include <config.h>
-
 #ifdef __GNUG__
 #pragma implementation
 #endif
@@ -7,12 +5,11 @@
 #include "math_sqrtinset.h"
 #include "LColor.h"
 #include "Painter.h"
-#include "support.h"
 #include "support/LOstream.h"
 
 
 MathSqrtInset::MathSqrtInset()
-       : MathInset(1)
+       : MathNestInset(1)
 {}
 
 
@@ -22,9 +19,9 @@ MathInset * MathSqrtInset::clone() const
 }
 
 
-void MathSqrtInset::Metrics(MathStyles st, int, int)
+void MathSqrtInset::metrics(MathMetricsInfo const & st) const
 {
-       xcell(0).Metrics(st);
+       xcell(0).metrics(st);
        size_    = st;
        ascent_  = xcell(0).ascent()  + 4;
        descent_ = xcell(0).descent() + 2;
@@ -32,7 +29,7 @@ void MathSqrtInset::Metrics(MathStyles st, int, int)
 }
 
 
-void MathSqrtInset::draw(Painter & pain, int x, int y)
+void MathSqrtInset::draw(Painter & pain, int x, int y) const
 { 
        xo(x);
        yo(y);
@@ -49,17 +46,15 @@ void MathSqrtInset::draw(Painter & pain, int x, int y)
 }
 
 
-void MathSqrtInset::Write(std::ostream & os, bool fragile) const
+void MathSqrtInset::write(MathWriteInfo & os) const
 {
-       os << "\\sqrt{";
-       cell(0).Write(os, fragile); 
-       os << '}';
+       os << "\\sqrt{" << cell(0) << '}';
 }
 
 
-void MathSqrtInset::WriteNormal(std::ostream & os) const
+void MathSqrtInset::writeNormal(std::ostream & os) const
 {
        os << "[sqrt ";
-       cell(0).WriteNormal(os); 
+       cell(0).writeNormal(os); 
        os << "] ";
 }