2001-02-13 13:28:32 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
#ifndef MATH_MATRIXINSET_H
|
|
|
|
#define MATH_MATRIXINSET_H
|
|
|
|
|
2001-06-25 00:06:33 +00:00
|
|
|
#include "math_grid.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);
|
|
|
|
///
|
|
|
|
MathInset * Clone() const;
|
|
|
|
///
|
|
|
|
void Write(std::ostream &, bool fragile) const;
|
|
|
|
///
|
|
|
|
void Metrics(MathStyles st);
|
2001-02-16 09:25:43 +00:00
|
|
|
///
|
2001-06-25 00:06:33 +00:00
|
|
|
void breakLine();
|
2001-02-16 09:25:43 +00:00
|
|
|
///
|
|
|
|
void draw(Painter &, int, int);
|
|
|
|
///
|
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-25 00:06:33 +00:00
|
|
|
vector<string> const getLabelList() const;
|
2001-02-16 09:25:43 +00:00
|
|
|
///
|
2001-06-25 00:06:33 +00:00
|
|
|
void Validate(LaTeXFeatures & features);
|
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-06-25 00:06:33 +00:00
|
|
|
/// Splits cells and shifts right part to the next cell
|
|
|
|
void splitCell(int idx);
|
|
|
|
|
|
|
|
private:
|
|
|
|
///
|
|
|
|
void Validate1(LaTeXFeatures & features);
|
|
|
|
///
|
|
|
|
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-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
|