]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_matrixinset.h
further code uglification to make Jean-Marc's compiler happy
[lyx.git] / src / mathed / math_matrixinset.h
index c2daa85dadcb14a69ede5dc7110de79f45602375..823eab9bbd8175d403e32ad9adac33ef9147f86e 100644 (file)
@@ -2,9 +2,7 @@
 #ifndef MATH_MATRIXINSET_H
 #define MATH_MATRIXINSET_H
 
-#include <vector>
-
-#include "math_grid.h"
+#include "math_gridinset.h"
 
 #ifdef __GNUG__
 #pragma interface
@@ -25,21 +23,23 @@ public:
        ///
        explicit MathMatrixInset(MathInsetTypes t);
        ///
+       MathMatrixInset(MathInsetTypes t, unsigned int cols);
+       ///
        MathInset * clone() const;
        ///
-       void Write(std::ostream &, bool fragile) const;
+       void write(std::ostream &, bool fragile) const;
        ///
-       void Metrics(MathStyles st, int asc = 0, int des = 0);
+       void metrics(MathStyles st) const;
        ///
-       void draw(Painter &, int, int);
+       void draw(Painter &, int x, int y) const;
        ///
-       string label(int row) const;
+       string label(unsigned int row) const;
        ///
-       void label(int row, string const & label);
+       void label(unsigned int row, string const & label);
        ///
-       void numbered(int row, bool num);
+       void numbered(unsigned int row, bool num);
        ///
-       bool numbered(int row) const;
+       bool numbered(unsigned int row) const;
        ///
        bool numberedType() const;
        ///
@@ -49,27 +49,37 @@ public:
        ///
        std::vector<string> const getLabelList() const;
        ///
-       void Validate(LaTeXFeatures & features) const;
+       void validate(LaTeXFeatures & features) const;
 
        ///
-       void addRow(int);
+       void addRow(unsigned int);
        ///
-       void delRow(int);
+       void delRow(unsigned int);
        ///
-       void addCol(int);
+       void addCol(unsigned int);
        ///
-       void delCol(int);
+       void delCol(unsigned int);
        ///
        void appendRow();
 
        /// change type
        void mutate(string const &);
        ///
-       void mutate(short);
+       void mutate(MathInsetTypes);
+
+       ///
+       int defaultColSpace(unsigned int col);
+       ///
+       char defaultColAlign(unsigned int col);
+
+       ///
+       MathInsetTypes getType() const;
 
 private:
        ///
-       void Validate1(LaTeXFeatures & features);
+       void setType(MathInsetTypes t);
+       ///
+       void validate1(LaTeXFeatures & features);
        ///
        void header_write(std::ostream &) const;
        ///
@@ -77,8 +87,10 @@ private:
        ///
        void glueall();
        ///
-       string nicelabel(int row) const;
+       string nicelabel(unsigned int row) const;
 
+       ///
+       MathInsetTypes objtype_;
        ///
        std::vector<int> nonum_;
        ///