]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_matrixinset.h
preview as preview can...
[lyx.git] / src / mathed / math_matrixinset.h
index fd9e55262a08ce78041bf59b7a02e345805d9a94..9c796bfa2735092a99b012e0032b01f2084e7e87 100644 (file)
 #ifndef MATH_MATRIXINSET_H
 #define MATH_MATRIXINSET_H
 
-#include <vector>
-
-#include "math_parinset.h"
+#include "math_gridinset.h"
 
 #ifdef __GNUG__
 #pragma interface
 #endif
 
-/** Multiline math paragraph base class.
-    This is the base to all multiline editable math objects
-    like array and eqnarray.
-    \author Alejandro Aguilar Sierra
-*/
-class MathMatrixInset : public MathParInset {
-public: 
-       ///
-       explicit
-       MathMatrixInset(int m = 1, int n = 1, short st = LM_ST_TEXT);
-       ///
-       explicit
-       MathMatrixInset(MathMatrixInset *);
-       ///
-       ~MathMatrixInset();
-       ///
-       MathedInset * Clone();
-       ///
-       void draw(Painter &, int, int);
-       ///
-       void Write(std::ostream &, bool fragile);
+// "shortcut" for DelimInset("(",ArrayInset,")")
+
+class MathMatrixInset : public MathGridInset {
+public:
        ///
-       void Metrics();
+       MathMatrixInset(MathGridInset const &);
        ///
-       void setData(MathedArray const &);
+       MathMatrixInset(string const & str);
        ///
-       void SetAlign(char, string const &);
+       MathInset * clone() const;
        ///
-       int GetColumns() const;
+       void metrics(MathMetricsInfo &) const {}
+       /// identifies MatrixInsets
+       MathMatrixInset const * asMatrixInset() const { return this; }
+
        ///
-       int GetRows() const;
+       void write(WriteStream & os) const;
        ///
-       virtual bool isMatrix() const;
-       
-       /// Use this to manage the extra information independently of paragraph
-       MathedRowSt * getRowSt() const;
+       void normalize(NormalStream &) const;
        ///
-       void setRowSt(MathedRowSt * r);
-private:
-       ///  Number of columns & rows
-       int nc_;
+       void maplize(MapleStream &) const;
        ///
-       int nr_;
-       /// tab sizes
-       std::vector<int> ws_;   
-       /// 
-       char v_align_; // add approp. type
+       void mathmlize(MathMLStream &) const;
        ///
-       //std::vector<char> h_align;
-       string h_align_; // a vector would perhaps be more correct
-       /// Vertical structure
-       MathedRowSt * row_;
+       void octavize(OctaveStream &) const;
 };
 
-
-inline
-int MathMatrixInset::GetColumns() const
-{
-       return nc_;
-}
-
-
-inline
-int MathMatrixInset::GetRows() const
-{
-       return nr_;
-}
-
-
-inline
-bool MathMatrixInset::isMatrix() const
-{
-       return true;
-}
-       
-
-inline
-MathedRowSt * MathMatrixInset::getRowSt() const
-{
-       return row_;
-}
-
-
-inline
-void MathMatrixInset::setRowSt(MathedRowSt * r)
-{
-       row_ = r;
-}
 #endif