X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2Fmath_matrixinset.h;h=50d7baccd3e5a458138908795bc52277ca3bb5aa;hb=7338f3b980d4dc5793ff80be814b7a74e1c72274;hp=fd9e55262a08ce78041bf59b7a02e345805d9a94;hpb=2be247f6ef5e35f27a41d92a88790357875c66bd;p=lyx.git diff --git a/src/mathed/math_matrixinset.h b/src/mathed/math_matrixinset.h index fd9e55262a..50d7baccd3 100644 --- a/src/mathed/math_matrixinset.h +++ b/src/mathed/math_matrixinset.h @@ -1,101 +1,45 @@ // -*- C++ -*- +/** + * \file math_matrixinset.h + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. + * + * \author André Pönitz + * + * Full author contact details are available in file CREDITS. + */ + #ifndef MATH_MATRIXINSET_H #define MATH_MATRIXINSET_H -#include +#include "math_gridinset.h" -#include "math_parinset.h" -#ifdef __GNUG__ -#pragma interface -#endif +// "shortcut" for DelimInset("(",ArrayInset,")") -/** 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(); +class MathMatrixInset : public MathGridInset { +public: /// - MathedInset * Clone(); + MathMatrixInset(MathGridInset const &); /// - void draw(Painter &, int, int); + MathMatrixInset(string const & str); /// - void Write(std::ostream &, bool fragile); - /// - void Metrics(); - /// - void setData(MathedArray const &); - /// - void SetAlign(char, string const &); + virtual std::auto_ptr clone() 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 - MathedRowSt * getRowSt() const; + void maple(MapleStream &) const; /// - void setRowSt(MathedRowSt * r); -private: - /// Number of columns & rows - int nc_; + void maxima(MaximaStream &) 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 - MathedRowSt * row_; + void octave(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