#include "LyXView.h"
#include "Painter.h"
#include "lyxrc.h"
-#include "math_matrixinset.h"
+#include "math_hullinset.h"
#include "math_support.h"
#include "math_mathmlstream.h"
InsetFormula::InsetFormula()
- : par_(MathAtom(new MathMatrixInset))
+ : par_(MathAtom(new MathHullInset))
{}
InsetFormula::InsetFormula(MathInsetTypes t)
- : par_(MathAtom(new MathMatrixInset(t)))
+ : par_(MathAtom(new MathHullInset(t)))
{}
if (!res) {
lyxerr << "cannot interpret '" << s << "' as math\n";
- par_ = MathAtom(new MathMatrixInset(LM_OT_SIMPLE));
+ par_ = MathAtom(new MathHullInset(LM_OT_SIMPLE));
}
}
metrics();
}
-MathMatrixInset const * InsetFormula::mat() const
+MathHullInset const * InsetFormula::mat() const
{
lyx::Assert(par_->asMatrixInset());
return par_->asMatrixInset();
}
-MathMatrixInset * InsetFormula::mat()
+MathHullInset * InsetFormula::mat()
{
lyx::Assert(par_->asMatrixInset());
return par_->asMatrixInset();
#include "math_braceinset.h"
#include "math_charinset.h"
#include "math_deliminset.h"
-#include "math_matrixinset.h"
+#include "math_hullinset.h"
#include "math_scriptinset.h"
#include "math_spaceinset.h"
#include "math_specialcharinset.h"
while (popRight())
;
- MathMatrixInset * p = formula()->par()->asMatrixInset();
+ MathHullInset * p = formula()->par()->asMatrixInset();
if (!p)
return;
// split line
const row_type r = row();
for (col_type c = col() + 1; c < p->ncols(); ++c) {
- const MathMatrixInset::idx_type i1 = p->index(r, c);
- const MathMatrixInset::idx_type i2 = p->index(r + 1, c);
+ const MathHullInset::idx_type i1 = p->index(r, c);
+ const MathHullInset::idx_type i2 = p->index(r + 1, c);
//lyxerr << "swapping cells " << i1 << " and " << i2 << "\n";
p->cell(i1).swap(p->cell(i2));
}
#include "math_macro.h"
#include "math_macrotable.h"
#include "math_macrotemplate.h"
-#include "math_matrixinset.h"
+#include "math_hullinset.h"
#include "math_rootinset.h"
#include "math_sqrtinset.h"
#include "math_scriptinset.h"
}
if (outmost) {
- MathMatrixInset * m = t->asMatrixInset();
+ MathHullInset * m = t->asMatrixInset();
if (!m) {
lyxerr << "error in Parser::parse_lines() 2\n";
return false;
Token const & t = getToken();
if (t.cs() == "(") {
- matrix = MathAtom(new MathMatrixInset(LM_OT_SIMPLE));
+ matrix = MathAtom(new MathHullInset(LM_OT_SIMPLE));
parse_into(matrix->cell(0), 0);
return true;
}
Token const & n = getToken();
if (n.cat() == catMath) {
// TeX's $$...$$ syntax for displayed math
- matrix = MathAtom(new MathMatrixInset(LM_OT_EQUATION));
- MathMatrixInset * p = matrix->asMatrixInset();
+ matrix = MathAtom(new MathHullInset(LM_OT_EQUATION));
+ MathHullInset * p = matrix->asMatrixInset();
parse_into(p->cell(0), 0);
p->numbered(0, curr_num_);
p->label(0, curr_label_);
} else {
// simple $...$ stuff
putback();
- matrix = MathAtom(new MathMatrixInset(LM_OT_SIMPLE));
+ matrix = MathAtom(new MathHullInset(LM_OT_SIMPLE));
parse_into(matrix->cell(0), 0);
}
return true;
if (cs == "[") {
curr_num_ = 0;
curr_label_.erase();
- matrix = MathAtom(new MathMatrixInset(LM_OT_EQUATION));
- MathMatrixInset * p = matrix->asMatrixInset();
+ matrix = MathAtom(new MathHullInset(LM_OT_EQUATION));
+ MathHullInset * p = matrix->asMatrixInset();
parse_into(p->cell(0), 0);
p->numbered(0, curr_num_);
p->label(0, curr_label_);
if (name == "equation" || name == "equation*" || name == "displaymath") {
curr_num_ = (name == "equation");
curr_label_.erase();
- matrix = MathAtom(new MathMatrixInset(LM_OT_EQUATION));
- MathMatrixInset * p = matrix->asMatrixInset();
+ matrix = MathAtom(new MathHullInset(LM_OT_EQUATION));
+ MathHullInset * p = matrix->asMatrixInset();
parse_into(p->cell(0), FLAG_END);
p->numbered(0, curr_num_);
p->label(0, curr_label_);
}
if (name == "eqnarray" || name == "eqnarray*") {
- matrix = MathAtom(new MathMatrixInset(LM_OT_EQNARRAY));
+ matrix = MathAtom(new MathHullInset(LM_OT_EQNARRAY));
return parse_lines(matrix, !stared(name), true);
}
if (name == "align" || name == "align*") {
- matrix = MathAtom(new MathMatrixInset(LM_OT_ALIGN));
+ matrix = MathAtom(new MathHullInset(LM_OT_ALIGN));
return parse_lines(matrix, !stared(name), true);
}
if (name == "alignat" || name == "alignat*") {
int nc = 2 * atoi(getArg('{', '}').c_str());
- matrix = MathAtom(new MathMatrixInset(LM_OT_ALIGNAT, nc));
+ matrix = MathAtom(new MathHullInset(LM_OT_ALIGNAT, nc));
return parse_lines(matrix, !stared(name), true);
}
if (name == "xalignat" || name == "xalignat*") {
int nc = 2 * atoi(getArg('{', '}').c_str());
- matrix = MathAtom(new MathMatrixInset(LM_OT_XALIGNAT, nc));
+ matrix = MathAtom(new MathHullInset(LM_OT_XALIGNAT, nc));
return parse_lines(matrix, !stared(name), true);
}
if (name == "xxalignat") {
int nc = 2 * atoi(getArg('{', '}').c_str());
- matrix = MathAtom(new MathMatrixInset(LM_OT_XXALIGNAT, nc));
+ matrix = MathAtom(new MathHullInset(LM_OT_XXALIGNAT, nc));
return parse_lines(matrix, !stared(name), true);
}
if (name == "multline" || name == "multline*") {
- matrix = MathAtom(new MathMatrixInset(LM_OT_MULTLINE));
+ matrix = MathAtom(new MathHullInset(LM_OT_MULTLINE));
return parse_lines(matrix, !stared(name), true);
}
if (name == "gather" || name == "gather*") {
- matrix = MathAtom(new MathMatrixInset(LM_OT_GATHER));
+ matrix = MathAtom(new MathHullInset(LM_OT_GATHER));
return parse_lines(matrix, !stared(name), true);
}