]> git.lyx.org Git - features.git/blobdiff - src/mathed/math_root.C
apply the ostream changes to mathed, some other small related things
[features.git] / src / mathed / math_root.C
index bce021dafc23722a4393c3f83e805db77fd806c2..f37fe0518c9ea2d1349870ad26583311f5599721 100644 (file)
@@ -109,7 +109,6 @@ void MathRootInset::Metrics()
 }
 
 
-#ifdef USE_PAINTER
 void MathRootInset::draw(Painter & pain, int x, int y)
 {
     int idxp = idx;
@@ -119,18 +118,6 @@ void MathRootInset::draw(Painter & pain, int x, int y)
     MathSqrtInset::draw(pain, x + wroot, y);
     idx = idxp;
 }
-#else
-void MathRootInset::Draw(int x, int y)
-{
-    int idxp = idx;
-
-    idx = 1;
-    uroot->Draw(x, y - dh);
-    MathSqrtInset::Draw(x+wroot, y);
-    XFlush(fl_display);
-    idx = idxp;
-}
-#endif
 
 
 void MathRootInset::SetStyle(short st)
@@ -148,14 +135,23 @@ void MathRootInset::SetFocus(int x, int)
 
 
 void MathRootInset::Write(ostream & os)
-{ 
+{
+#ifdef USE_OSTREAM_ONLY
+       os << '\\' << name << '[';
+       uroot->Write(os);  
+       os << "]{";
+       MathParInset::Write(os);
+       os << '}';
+#else
    string output;
    MathRootInset::Write(output);
    os << output;
+#endif
 }
 
 
-void MathRootInset::Write(string &outf)
+#ifndef USE_OSTREAM_ONLY
+void MathRootInset::Write(string & outf)
 { 
    outf += '\\';
    outf += name;
@@ -165,3 +161,4 @@ void MathRootInset::Write(string &outf)
    MathParInset::Write(outf);
    outf += '}';
 }
+#endif