]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_matrixinset.h
preview as preview can...
[lyx.git] / src / mathed / math_matrixinset.h
index 38af58f5d270a5c727aa9397d6d92ae5c564d382..9c796bfa2735092a99b012e0032b01f2084e7e87 100644 (file)
@@ -2,62 +2,37 @@
 #ifndef MATH_MATRIXINSET_H
 #define MATH_MATRIXINSET_H
 
-#include <vector>
+#include "math_gridinset.h"
 
-#include "math_parinset.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. 
- */
-class MathMatrixInset: public MathParInset {
- public: 
-    ///
-    explicit
-    MathMatrixInset(int m = 1, int n = 1, short st = LM_ST_TEXT);
-    ///
-    explicit
-    MathMatrixInset(MathMatrixInset *);
-    ///
-    MathedInset * Clone();
-    ///
-    virtual ~MathMatrixInset();
-    ///
-    void draw(Painter &, int, int);
-    ///
-    void Write(std::ostream &, bool fragile);
-    ///
-    void Metrics();
-    ///
-    void SetData(MathedArray *);
-    ///
-    void SetAlign(char, string const &);
-    ///
-    int GetColumns() const { return nc; }
-    ///
-    int GetRows() const { return nr; }
-    ///
-    virtual bool isMatrix() const { return true; }
+// "shortcut" for DelimInset("(",ArrayInset,")")
 
-    /// Use this to manage the extra information independently of paragraph
-    MathedRowSt * getRowSt() const { return row; }
-    ///
-    void setRowSt(MathedRowSt * r) { row = r; }
-    
- protected:
-    ///  Number of columns & rows
-    int nc;
-    ///
-    int nr;
-    /// tab sizes
-    std::vector<int> ws_;   
-    /// 
-    char v_align; // add approp. type
-    ///
-       //std::vector<char> h_align;
-       string h_align; // a vector would perhaps be more correct
-    /// Vertical structure
-    MathedRowSt * row;
+class MathMatrixInset : public MathGridInset {
+public:
+       ///
+       MathMatrixInset(MathGridInset const &);
+       ///
+       MathMatrixInset(string const & str);
+       ///
+       MathInset * clone() const;
+       ///
+       void metrics(MathMetricsInfo &) const {}
+       /// identifies MatrixInsets
+       MathMatrixInset const * asMatrixInset() const { return this; }
 
+       ///
+       void write(WriteStream & os) const;
+       ///
+       void normalize(NormalStream &) const;
+       ///
+       void maplize(MapleStream &) const;
+       ///
+       void mathmlize(MathMLStream &) const;
+       ///
+       void octavize(OctaveStream &) const;
 };
+
 #endif