outermost math inset in a formula and not for matrices at all...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2986
a592a061-630c-0410-9148-
cb99ea01b6c8
math_gridinset.C \
math_gridinset.h \
math_hash.C \
math_gridinset.C \
math_gridinset.h \
math_hash.C \
+ math_hullinset.C \
+ math_hullinset.h \
math_inset.C \
math_inset.h \
math_kerninset.C \
math_inset.C \
math_inset.h \
math_kerninset.C \
math_macrotable.h \
math_mathmlstream.C \
math_mathmlstream.h \
math_macrotable.h \
math_mathmlstream.C \
math_mathmlstream.h \
- math_matrixinset.C \
- math_matrixinset.h \
math_metricsinfo.h \
math_metricsinfo.C \
math_nestinset.C \
math_metricsinfo.h \
math_metricsinfo.C \
math_nestinset.C \
#include "LyXView.h"
#include "Painter.h"
#include "lyxrc.h"
#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"
#include "math_support.h"
#include "math_mathmlstream.h"
InsetFormula::InsetFormula()
InsetFormula::InsetFormula()
- : par_(MathAtom(new MathMatrixInset))
+ : par_(MathAtom(new MathHullInset))
{}
InsetFormula::InsetFormula(MathInsetTypes t)
{}
InsetFormula::InsetFormula(MathInsetTypes t)
- : par_(MathAtom(new MathMatrixInset(t)))
+ : par_(MathAtom(new MathHullInset(t)))
if (!res) {
lyxerr << "cannot interpret '" << s << "' as math\n";
if (!res) {
lyxerr << "cannot interpret '" << s << "' as math\n";
- par_ = MathAtom(new MathMatrixInset(LM_OT_SIMPLE));
+ par_ = MathAtom(new MathHullInset(LM_OT_SIMPLE));
-MathMatrixInset const * InsetFormula::mat() const
+MathHullInset const * InsetFormula::mat() const
{
lyx::Assert(par_->asMatrixInset());
return par_->asMatrixInset();
}
{
lyx::Assert(par_->asMatrixInset());
return par_->asMatrixInset();
}
-MathMatrixInset * InsetFormula::mat()
+MathHullInset * InsetFormula::mat()
{
lyx::Assert(par_->asMatrixInset());
return par_->asMatrixInset();
{
lyx::Assert(par_->asMatrixInset());
return par_->asMatrixInset();
#include "math_defs.h"
#include "math_atom.h"
#include "math_defs.h"
#include "math_atom.h"
///
class InsetFormula : public InsetFormulaBase {
///
class InsetFormula : public InsetFormulaBase {
MathAtom par_;
/// Access
MathAtom par_;
/// Access
- MathMatrixInset * mat();
- MathMatrixInset const * mat() const;
+ MathHullInset const * mat() const;
#include "math_macroarg.h"
#include "math_macrotable.h"
#include "math_macrotemplate.h"
#include "math_macroarg.h"
#include "math_macrotable.h"
#include "math_macrotemplate.h"
-#include "math_matrixinset.h"
+#include "math_hullinset.h"
#include "lyx_main.h"
#include "BufferView.h"
#include "gettext.h"
#include "lyx_main.h"
#include "BufferView.h"
#include "gettext.h"
#include "math_braceinset.h"
#include "math_charinset.h"
#include "math_deliminset.h"
#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"
#include "math_scriptinset.h"
#include "math_spaceinset.h"
#include "math_specialcharinset.h"
- MathMatrixInset * p = formula()->par()->asMatrixInset();
+ MathHullInset * p = formula()->par()->asMatrixInset();
// split line
const row_type r = row();
for (col_type c = col() + 1; c < p->ncols(); ++c) {
// 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));
}
//lyxerr << "swapping cells " << i1 << " and " << i2 << "\n";
p->cell(i1).swap(p->cell(i2));
}
class MathAtom;
class MathArrayInset;
class MathFuncInset;
class MathAtom;
class MathArrayInset;
class MathFuncInset;
class MathScriptInset;
class MathSpaceInset;
class InsetFormulaBase;
class MathScriptInset;
class MathSpaceInset;
class InsetFormulaBase;
class MathCharInset;
class MathGridInset;
class MathNestInset;
class MathCharInset;
class MathGridInset;
class MathNestInset;
class MathScriptInset;
class MathSpaceInset;
class MathMacroTemplate;
class MathScriptInset;
class MathSpaceInset;
class MathMacroTemplate;
/// identifies ScriptInsets
virtual MathScriptInset * asScriptInset() { return 0; }
/// identifies MatrixInsets
/// identifies ScriptInsets
virtual MathScriptInset * asScriptInset() { return 0; }
/// identifies MatrixInsets
- virtual MathMatrixInset const * asMatrixInset() const { return 0; }
+ virtual MathHullInset const * asMatrixInset() const { return 0; }
/// identifies MatrixInsets
/// identifies MatrixInsets
- virtual MathMatrixInset * asMatrixInset() { return 0; }
+ virtual MathHullInset * asMatrixInset() { return 0; }
/// identifies SpaceInset
virtual MathSpaceInset * asSpaceInset() { return 0; }
/// identifies GridInset
/// identifies SpaceInset
virtual MathSpaceInset * asSpaceInset() { return 0; }
/// identifies GridInset
#include "math_macro.h"
#include "math_macrotable.h"
#include "math_macrotemplate.h"
#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"
#include "math_rootinset.h"
#include "math_sqrtinset.h"
#include "math_scriptinset.h"
- MathMatrixInset * m = t->asMatrixInset();
+ MathHullInset * m = t->asMatrixInset();
if (!m) {
lyxerr << "error in Parser::parse_lines() 2\n";
return false;
if (!m) {
lyxerr << "error in Parser::parse_lines() 2\n";
return false;
Token const & t = getToken();
if (t.cs() == "(") {
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;
}
parse_into(matrix->cell(0), 0);
return true;
}
Token const & n = getToken();
if (n.cat() == catMath) {
// TeX's $$...$$ syntax for displayed math
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();
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;
parse_into(matrix->cell(0), 0);
}
return true;
if (cs == "[") {
curr_num_ = 0;
curr_label_.erase();
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_);
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();
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_);
parse_into(p->cell(0), FLAG_END);
p->numbered(0, curr_num_);
p->label(0, curr_label_);
}
if (name == "eqnarray" || name == "eqnarray*") {
}
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*") {
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());
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());
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());
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*") {
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*") {
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);
}
return parse_lines(matrix, !stared(name), true);
}
#include "LString.h"
#include "math_defs.h"
#include "LString.h"
#include "math_defs.h"
class MathMacroTemplate;
class MathAtom;
class MathArray;
class MathMacroTemplate;
class MathAtom;
class MathArray;