2001-02-13 13:28:32 +00:00
|
|
|
|
// -*- C++ -*-
|
2001-11-08 12:30:26 +00:00
|
|
|
|
#ifndef MATH_HULLINSET_H
|
|
|
|
|
#define MATH_HULLINSET_H
|
2001-02-13 13:28:32 +00:00
|
|
|
|
|
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-11-08 12:30:26 +00:00
|
|
|
|
/** This provides an interface between "LyX insets" and "LyX math insets"
|
|
|
|
|
* \author Andr<EFBFBD> P<EFBFBD>nitz
|
|
|
|
|
*/
|
2001-06-25 00:06:33 +00:00
|
|
|
|
|
|
|
|
|
class LaTeXFeatures;
|
|
|
|
|
|
2001-11-08 12:30:26 +00:00
|
|
|
|
class MathHullInset : public MathGridInset {
|
2001-02-16 09:25:43 +00:00
|
|
|
|
public:
|
|
|
|
|
///
|
2001-11-08 12:30:26 +00:00
|
|
|
|
MathHullInset();
|
2001-06-25 00:06:33 +00:00
|
|
|
|
///
|
2001-11-08 12:30:26 +00:00
|
|
|
|
explicit MathHullInset(MathInsetTypes t);
|
2001-06-25 00:06:33 +00:00
|
|
|
|
///
|
2001-11-08 12:30:26 +00:00
|
|
|
|
MathHullInset(MathInsetTypes t, col_type cols);
|
2001-09-04 08:48:23 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
MathInset * clone() const;
|
2001-06-25 00:06:33 +00:00
|
|
|
|
///
|
2001-10-19 11:25:48 +00:00
|
|
|
|
void metrics(MathMetricsInfo const & 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-09-26 16:52:34 +00:00
|
|
|
|
string label(row_type row) const;
|
2001-02-16 09:25:43 +00:00
|
|
|
|
///
|
2001-09-26 16:52:34 +00:00
|
|
|
|
void label(row_type row, string const & label);
|
2001-02-16 09:25:43 +00:00
|
|
|
|
///
|
2001-09-26 16:52:34 +00:00
|
|
|
|
void numbered(row_type row, bool num);
|
2001-02-16 09:25:43 +00:00
|
|
|
|
///
|
2001-09-26 16:52:34 +00:00
|
|
|
|
bool numbered(row_type 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-10-12 12:02:49 +00:00
|
|
|
|
/// identifies MatrixInsets
|
2001-12-11 15:04:02 +00:00
|
|
|
|
MathHullInset const * asHullInset() const { return this; }
|
2001-11-09 08:35:57 +00:00
|
|
|
|
/// identifies HullInset
|
2001-12-11 15:04:02 +00:00
|
|
|
|
MathHullInset * asHullInset() { return this; }
|
2001-02-16 09:25:43 +00:00
|
|
|
|
|
2001-06-25 00:06:33 +00:00
|
|
|
|
///
|
2001-09-26 16:52:34 +00:00
|
|
|
|
void addRow(row_type);
|
2001-06-25 00:06:33 +00:00
|
|
|
|
///
|
2001-09-26 16:52:34 +00:00
|
|
|
|
void delRow(row_type);
|
2001-06-25 00:06:33 +00:00
|
|
|
|
///
|
2001-09-26 16:52:34 +00:00
|
|
|
|
void addCol(col_type);
|
2001-06-25 00:06:33 +00:00
|
|
|
|
///
|
2001-09-26 16:52:34 +00:00
|
|
|
|
void delCol(col_type);
|
2001-06-25 00:06:33 +00:00
|
|
|
|
///
|
|
|
|
|
void appendRow();
|
2001-02-16 09:25:43 +00:00
|
|
|
|
|
2001-06-25 00:06:33 +00:00
|
|
|
|
/// change type
|
|
|
|
|
void mutate(string const &);
|
|
|
|
|
///
|
2001-09-04 13:32:06 +00:00
|
|
|
|
void mutate(MathInsetTypes);
|
|
|
|
|
|
|
|
|
|
///
|
2001-09-26 16:52:34 +00:00
|
|
|
|
int defaultColSpace(col_type col);
|
2001-09-04 13:32:06 +00:00
|
|
|
|
///
|
2001-09-26 16:52:34 +00:00
|
|
|
|
char defaultColAlign(col_type col);
|
2001-02-16 09:25:43 +00:00
|
|
|
|
|
2001-08-01 13:28:45 +00:00
|
|
|
|
///
|
|
|
|
|
MathInsetTypes getType() const;
|
2001-11-07 18:15:24 +00:00
|
|
|
|
///
|
2001-11-09 18:02:20 +00:00
|
|
|
|
void write(WriteStream & os) const;
|
|
|
|
|
///
|
2001-11-07 18:15:24 +00:00
|
|
|
|
void mathmlize(MathMLStream &) const;
|
2001-11-09 18:02:20 +00:00
|
|
|
|
///
|
|
|
|
|
void normalize(NormalStream &) const;
|
2001-08-01 13:28:45 +00:00
|
|
|
|
|
2001-06-25 00:06:33 +00:00
|
|
|
|
private:
|
2001-09-04 13:32:06 +00:00
|
|
|
|
///
|
|
|
|
|
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
|
|
|
|
///
|
2001-11-19 19:06:05 +00:00
|
|
|
|
void header_write(WriteStream &) const;
|
2001-06-25 00:06:33 +00:00
|
|
|
|
///
|
2001-11-19 19:06:05 +00:00
|
|
|
|
void footer_write(WriteStream &) const;
|
2001-06-25 00:06:33 +00:00
|
|
|
|
///
|
|
|
|
|
void glueall();
|
|
|
|
|
///
|
2001-09-26 16:52:34 +00:00
|
|
|
|
string nicelabel(row_type row) const;
|
2001-12-11 15:04:02 +00:00
|
|
|
|
/// consistency check
|
|
|
|
|
void check() 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-10-22 15:37:49 +00:00
|
|
|
|
///
|
|
|
|
|
mutable MathMetricsInfo mi_;
|
2001-06-25 00:06:33 +00:00
|
|
|
|
};
|
2001-02-16 09:25:43 +00:00
|
|
|
|
|
2001-02-13 13:28:32 +00:00
|
|
|
|
#endif
|