2001-02-13 13:28:32 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
#ifndef MATH_MATRIXINSET_H
|
|
|
|
#define MATH_MATRIXINSET_H
|
|
|
|
|
2001-07-17 07:38:41 +00:00
|
|
|
#include "math_gridinset.h"
|
2001-02-13 13:28:32 +00:00
|
|
|
|
2001-02-26 12:53:35 +00:00
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
2001-02-13 13:28:32 +00:00
|
|
|
/** Multiline math paragraph base class.
|
|
|
|
This is the base to all multiline editable math objects
|
2001-02-16 09:25:43 +00:00
|
|
|
like array and eqnarray.
|
|
|
|
\author Alejandro Aguilar Sierra
|
|
|
|
*/
|
2001-06-25 00:06:33 +00:00
|
|
|
|
|
|
|
class LaTeXFeatures;
|
|
|
|
|
|
|
|
class MathMatrixInset : public MathGridInset {
|
2001-02-16 09:25:43 +00:00
|
|
|
public:
|
|
|
|
///
|
2001-06-25 00:06:33 +00:00
|
|
|
MathMatrixInset();
|
|
|
|
///
|
|
|
|
explicit MathMatrixInset(MathInsetTypes t);
|
|
|
|
///
|
2001-09-04 08:48:23 +00:00
|
|
|
MathMatrixInset(MathInsetTypes t, int cols);
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
MathInset * clone() const;
|
2001-06-25 00:06:33 +00:00
|
|
|
///
|
2001-07-26 06:56:43 +00:00
|
|
|
void write(std::ostream &, bool fragile) const;
|
2001-06-25 00:06:33 +00:00
|
|
|
///
|
2001-08-06 17:20:26 +00:00
|
|
|
void metrics(MathStyles st) const;
|
2001-02-16 09:25:43 +00:00
|
|
|
///
|
2001-08-06 17:20:26 +00:00
|
|
|
void draw(Painter &, int x, int y) const;
|
2001-02-16 09:25:43 +00:00
|
|
|
///
|
2001-06-25 00:06:33 +00:00
|
|
|
string label(int row) const;
|
2001-02-16 09:25:43 +00:00
|
|
|
///
|
2001-06-25 00:06:33 +00:00
|
|
|
void label(int row, string const & label);
|
2001-02-16 09:25:43 +00:00
|
|
|
///
|
2001-06-25 00:06:33 +00:00
|
|
|
void numbered(int row, bool num);
|
2001-02-16 09:25:43 +00:00
|
|
|
///
|
2001-06-25 00:06:33 +00:00
|
|
|
bool numbered(int row) const;
|
2001-02-16 09:25:43 +00:00
|
|
|
///
|
2001-06-25 00:06:33 +00:00
|
|
|
bool numberedType() const;
|
2001-02-16 09:25:43 +00:00
|
|
|
///
|
2001-06-25 00:06:33 +00:00
|
|
|
bool display() const;
|
2001-02-16 09:25:43 +00:00
|
|
|
///
|
2001-06-25 00:06:33 +00:00
|
|
|
bool ams() const;
|
2001-02-16 09:25:43 +00:00
|
|
|
///
|
2001-06-27 15:33:55 +00:00
|
|
|
std::vector<string> const getLabelList() const;
|
2001-02-16 09:25:43 +00:00
|
|
|
///
|
2001-07-26 06:56:43 +00:00
|
|
|
void validate(LaTeXFeatures & features) const;
|
2001-02-16 09:25:43 +00:00
|
|
|
|
2001-06-25 00:06:33 +00:00
|
|
|
///
|
|
|
|
void addRow(int);
|
|
|
|
///
|
|
|
|
void delRow(int);
|
|
|
|
///
|
|
|
|
void addCol(int);
|
|
|
|
///
|
|
|
|
void delCol(int);
|
|
|
|
///
|
|
|
|
void appendRow();
|
2001-02-16 09:25:43 +00:00
|
|
|
|
2001-06-25 00:06:33 +00:00
|
|
|
/// change type
|
|
|
|
void mutate(string const &);
|
|
|
|
///
|
|
|
|
void mutate(short);
|
2001-02-16 09:25:43 +00:00
|
|
|
|
2001-08-01 13:28:45 +00:00
|
|
|
///
|
|
|
|
MathInsetTypes getType() const;
|
|
|
|
|
2001-06-25 00:06:33 +00:00
|
|
|
private:
|
2001-08-01 13:28:45 +00:00
|
|
|
///
|
|
|
|
virtual void setType(MathInsetTypes t);
|
2001-06-25 00:06:33 +00:00
|
|
|
///
|
2001-07-26 06:56:43 +00:00
|
|
|
void validate1(LaTeXFeatures & features);
|
2001-06-25 00:06:33 +00:00
|
|
|
///
|
|
|
|
void header_write(std::ostream &) const;
|
|
|
|
///
|
|
|
|
void footer_write(std::ostream &) const;
|
|
|
|
///
|
|
|
|
void glueall();
|
|
|
|
///
|
|
|
|
string nicelabel(int row) const;
|
2001-02-16 09:25:43 +00:00
|
|
|
|
2001-08-01 13:28:45 +00:00
|
|
|
///
|
|
|
|
MathInsetTypes objtype_;
|
2001-06-25 00:06:33 +00:00
|
|
|
///
|
|
|
|
std::vector<int> nonum_;
|
|
|
|
///
|
|
|
|
std::vector<string> label_;
|
|
|
|
};
|
2001-02-16 09:25:43 +00:00
|
|
|
|
2001-02-13 13:28:32 +00:00
|
|
|
#endif
|