X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2Fmath_matrixinset.h;h=9c796bfa2735092a99b012e0032b01f2084e7e87;hb=4bc59f21015e9151841eea3733b97d25cd616fdc;hp=c8c7cc45b7315022c4155f69d45246eb820db0db;hpb=13794d5ec36619c68996353e2d58091d8aaa2afe;p=lyx.git diff --git a/src/mathed/math_matrixinset.h b/src/mathed/math_matrixinset.h index c8c7cc45b7..9c796bfa27 100644 --- a/src/mathed/math_matrixinset.h +++ b/src/mathed/math_matrixinset.h @@ -2,100 +2,37 @@ #ifndef MATH_MATRIXINSET_H #define MATH_MATRIXINSET_H -#include - -#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, int n, short st = LM_ST_TEXT); - /// - explicit - MathMatrixInset(MathMatrixInset const &); - /// - ~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 ws_; - /// - char v_align_; // add approp. type + void mathmlize(MathMLStream &) const; /// - //std::vector h_align; - string h_align_; // a vector would perhaps be more correct - /// Vertical structure - MathedRowContainer 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_.data_; -} - - -inline -void MathMatrixInset::setRowSt(MathedRowSt * r) -{ - row_ = r; -} #endif