]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathRoot.cpp
* src/frontends/controllers/Dialog.{cpp,h}:
[lyx.git] / src / mathed / InsetMathRoot.cpp
index eb791c343ac52fc094a6ba4e618a317c56643543..5442fd1be4d1b41e6478c0d3c609eb25e3906045 100644 (file)
 #include <config.h>
 
 #include "InsetMathRoot.h"
-#include "MathArray.h"
+#include "MathData.h"
 #include "MathStream.h"
-#include "cursor.h"
-#include "LColor.h"
+#include "Cursor.h"
+#include "Color.h"
 
 #include "frontends/Painter.h"
 
@@ -32,9 +32,9 @@ InsetMathRoot::InsetMathRoot()
 {}
 
 
-auto_ptr<InsetBase> InsetMathRoot::doClone() const
+auto_ptr<Inset> InsetMathRoot::doClone() const
 {
-       return auto_ptr<InsetBase>(new InsetMathRoot(*this));
+       return auto_ptr<Inset>(new InsetMathRoot(*this));
 }
 
 
@@ -61,14 +61,15 @@ void InsetMathRoot::draw(PainterInfo & pi, int x, int y) const
        cell(1).draw(pi, x + w + 8, y);
        int const a = dim_.ascent();
        int const d = dim_.descent();
-       int xp[5];
-       int yp[5];
-       xp[0] = x + dim_.width();  yp[0] = y - a + 1;
-       xp[1] = x + w + 4;         yp[1] = y - a + 1;
-       xp[2] = x + w;             yp[2] = y + d;
-       xp[3] = x + w - 2;         yp[3] = y + (d - a)/2 + 2;
-       xp[4] = x + w - 5;         yp[4] = y + (d - a)/2 + 4;
-       pi.pain.lines(xp, yp, 5, LColor::math);
+       int xp[4];
+       int yp[4];
+       pi.pain.line(x + dim_.width(), y - a + 1,
+                                                        x + w + 4, y - a + 1, Color::math);
+       xp[0] = x + w + 4;         yp[0] = y - a + 1;
+       xp[1] = x + w;             yp[1] = y + d;
+       xp[2] = x + w - 2;         yp[2] = y + (d - a)/2 + 2;
+       xp[3] = x + w - 5;         yp[3] = y + (d - a)/2 + 4;
+       pi.pain.lines(xp, yp, 4, Color::math);
        drawMarkers(pi, x, y);
 }
 
@@ -85,9 +86,9 @@ void InsetMathRoot::normalize(NormalStream & os) const
 }
 
 
-bool InsetMathRoot::idxUpDown(LCursor & cur, bool up) const
+bool InsetMathRoot::idxUpDown(Cursor & cur, bool up) const
 {
-       LCursor::idx_type const target = up ? 0 : 1;
+       Cursor::idx_type const target = up ? 0 : 1;
        if (cur.idx() == target)
                return false;
        cur.idx() = target;