]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_matrixinset.C
split inset -> inset + updatableinset
[lyx.git] / src / mathed / math_matrixinset.C
index d8a02da555b5d13a930e0d3c52990c7bb35ed0f3..37db699ed6aef57bdc8c23ebd4a8defab5be2f13 100644 (file)
@@ -1,6 +1,3 @@
-#ifdef __GNUG__
-#pragma implementation
-#endif
 
 #include "math_matrixinset.h"
 #include "math_parser.h"
@@ -8,8 +5,8 @@
 #include "Lsstream.h"
 
 
-MathMatrixInset::MathMatrixInset(MathArrayInset const & p)
-       : MathArrayInset(p)
+MathMatrixInset::MathMatrixInset(MathGridInset const & p)
+       : MathGridInset(p)
 {}
 
 
@@ -21,17 +18,17 @@ MathInset * MathMatrixInset::clone() const
 
 void MathMatrixInset::write(WriteStream & os) const
 {
-       MathArrayInset::write(os);
+       MathGridInset::write(os);
 }
 
 
 void MathMatrixInset::normalize(NormalStream & os) const
 {
-       MathArrayInset::normalize(os);
+       MathGridInset::normalize(os);
 }
 
 
-void MathMatrixInset::maplize(MapleStream & os) const
+void MathMatrixInset::maple(MapleStream & os) const
 {
        os << "matrix(" << int(nrows()) << ',' << int(ncols()) << ",[";
        for (idx_type idx = 0; idx < nargs(); ++idx) {
@@ -43,27 +40,38 @@ void MathMatrixInset::maplize(MapleStream & os) const
 }
 
 
-void MathMatrixInset::mathmlize(MathMLStream & os) const
+void MathMatrixInset::maxima(MaximaStream & os) const
 {
-       os << MTag("mtable");
+       os << "matrix(";
        for (row_type row = 0; row < nrows(); ++row) {
-               os << MTag("mtr");
-               for (col_type col = 0; col < ncols(); ++col) 
+               if (row)
+                       os << ',';
+               os << '[';
+               for (col_type col = 0; col < ncols(); ++col) {
+                       if (col)
+                               os << ',';
                        os << cell(index(row, col));
-               os << ETag("mtr");
+               }
+               os << ']';
        }
-       os << ETag("mtable");
+       os << ')';
+}
+
+
+void MathMatrixInset::mathmlize(MathMLStream & os) const
+{
+       MathGridInset::mathmlize(os);
 }
 
 
-void MathMatrixInset::octavize(OctaveStream & os) const
+void MathMatrixInset::octave(OctaveStream & os) const
 {
        os << '[';
        for (row_type row = 0; row < nrows(); ++row) {
                if (row)
                        os << ';';
                os << '[';
-               for (col_type col = 0; col < ncols(); ++col) 
+               for (col_type col = 0; col < ncols(); ++col)
                        os << cell(index(row, col)) << ' ';
                os << ']';
        }