]> 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 f9097d9c9103bc4a2fae2a2d072e2739ec9fe78e..27cdc56c2c13a99c478f5b0c46a42fd2b2ce41cf 100644 (file)
@@ -9,7 +9,7 @@
 
 
 MathSqrtInset::MathSqrtInset()
-       : MathInset(1)
+       : MathNestInset(1)
 {}
 
 
@@ -19,9 +19,9 @@ MathInset * MathSqrtInset::clone() const
 }
 
 
-void MathSqrtInset::Metrics(MathStyles st)
+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;
@@ -29,7 +29,7 @@ void MathSqrtInset::Metrics(MathStyles st)
 }
 
 
-void MathSqrtInset::draw(Painter & pain, int x, int y)
+void MathSqrtInset::draw(Painter & pain, int x, int y) const
 { 
        xo(x);
        yo(y);
@@ -46,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 << "] ";
 }