X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2Fmath_matrixinset.h;h=9c796bfa2735092a99b012e0032b01f2084e7e87;hb=4bc59f21015e9151841eea3733b97d25cd616fdc;hp=a3f59639790d90e6c25def6953956cac4d4ca953;hpb=8e77078e603f4bad68d4845a1bf088d0743693d1;p=lyx.git diff --git a/src/mathed/math_matrixinset.h b/src/mathed/math_matrixinset.h index a3f5963979..9c796bfa27 100644 --- a/src/mathed/math_matrixinset.h +++ b/src/mathed/math_matrixinset.h @@ -2,85 +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: - /// - MathMatrixInset(int m, int n, short st = LM_ST_TEXT); - /// - MathedInset * Clone(); - /// - void draw(Painter &, int, int); +// "shortcut" for DelimInset("(",ArrayInset,")") + +class MathMatrixInset : public MathGridInset { +public: /// - void Write(std::ostream &, bool fragile); + MathMatrixInset(MathGridInset const &); /// - void Metrics(); + MathMatrixInset(string const & str); /// - void setData(MathedArray const &); + MathInset * clone() const; /// - void SetAlign(char, string const &); + void metrics(MathMetricsInfo &) const {} + /// identifies MatrixInsets + MathMatrixInset const * asMatrixInset() const { return this; } + /// - int GetColumns() const; + void write(WriteStream & os) const; /// - int GetRows() const; + void normalize(NormalStream &) const; /// - virtual bool isMatrix() const; - - /// Use this to manage the extra information independently of paragraph - MathedRowContainer & getRowSt(); -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 -MathedRowContainer & MathMatrixInset::getRowSt() -{ - return row_; -} #endif