]> git.lyx.org Git - features.git/commitdiff
cosmetics: rename "matrix" into "hull" since it is used only for the
authorAndré Pönitz <poenitz@gmx.net>
Thu, 8 Nov 2001 12:28:33 +0000 (12:28 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Thu, 8 Nov 2001 12:28:33 +0000 (12:28 +0000)
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

src/mathed/Makefile.am
src/mathed/formula.C
src/mathed/formula.h
src/mathed/formulamacro.C
src/mathed/math_cursor.C
src/mathed/math_cursor.h
src/mathed/math_inset.h
src/mathed/math_parser.C
src/mathed/math_parser.h

index 68d7c6dbc3bcc0050635bab034659681909f0fa3..ee2683fc1235de0da8d8c8940e2d7732a3095248 100644 (file)
@@ -60,6 +60,8 @@ libmathed_la_SOURCES = \
        math_gridinset.C \
        math_gridinset.h \
        math_hash.C \
+       math_hullinset.C \
+       math_hullinset.h \
        math_inset.C \
        math_inset.h \
        math_kerninset.C \
@@ -76,8 +78,6 @@ libmathed_la_SOURCES = \
        math_macrotable.h \
        math_mathmlstream.C \
        math_mathmlstream.h \
-       math_matrixinset.C \
-       math_matrixinset.h \
        math_metricsinfo.h \
        math_metricsinfo.C \
        math_nestinset.C \
index e596cf6b0c5d8dba4c28cfc5d2902c1293ae1596..cc01ef14f9e087a1d0146fcd5b0721a12bb189e9 100644 (file)
@@ -40,7 +40,7 @@
 #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"
 
@@ -248,12 +248,12 @@ namespace {
 
 
 InsetFormula::InsetFormula()
-       : par_(MathAtom(new MathMatrixInset))
+       : par_(MathAtom(new MathHullInset))
 {}
 
 
 InsetFormula::InsetFormula(MathInsetTypes t)
-       : par_(MathAtom(new MathMatrixInset(t)))
+       : par_(MathAtom(new MathHullInset(t)))
 {}
 
 
@@ -267,7 +267,7 @@ InsetFormula::InsetFormula(string const & s)
 
                if (!res) {
                        lyxerr << "cannot interpret '" << s << "' as math\n";
-                       par_ = MathAtom(new MathMatrixInset(LM_OT_SIMPLE));
+                       par_ = MathAtom(new MathHullInset(LM_OT_SIMPLE));
                }
        }
        metrics();
@@ -537,14 +537,14 @@ bool InsetFormula::display() const
 }
 
 
-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();
index 38b41cbccbcbdaa042692b40df1576ffe46a203f..f0b57150d9f44d208bc90099532f0e9cf4b6fe2d 100644 (file)
@@ -25,7 +25,7 @@
 #include "math_defs.h"
 #include "math_atom.h"
 
-class MathMatrixInset;
+class MathHullInset;
 
 ///
 class InsetFormula : public InsetFormulaBase {
@@ -87,8 +87,8 @@ public:
        MathAtom par_;
 
        /// Access
-       MathMatrixInset * mat();
+       MathHullInset * mat();
        /// Access
-       MathMatrixInset const * mat() const;
+       MathHullInset const * mat() const;
 };
 #endif
index cd2b108c242169cb4050dd2b4b2b6721db03b516..bd50d8c087083acb4b334551aaff3563e7ffa2f0 100644 (file)
@@ -25,7 +25,7 @@
 #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"
index c06778070702e9f094b1de790df1bd89b42d433e..a19c1072752b1157eae189883889345171752354 100644 (file)
@@ -36,7 +36,7 @@
 #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"
@@ -1091,7 +1091,7 @@ void MathCursor::breakLine()
        while (popRight())
                ;
 
-       MathMatrixInset * p = formula()->par()->asMatrixInset();
+       MathHullInset * p = formula()->par()->asMatrixInset();
        if (!p)
                return;
 
@@ -1105,8 +1105,8 @@ void MathCursor::breakLine()
                // 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));
                }
index 7b533306c66a6bb56f5a0245f21a4df21efe751d..e0f9649a422ead4fdff427cf844c4f39dc1555e4 100644 (file)
@@ -29,7 +29,7 @@ class MathInset;
 class MathAtom;
 class MathArrayInset;
 class MathFuncInset;
-class MathMatrixInset;
+class MathHullInset;
 class MathScriptInset;
 class MathSpaceInset;
 class InsetFormulaBase;
index dc9020cc072afb962e0ba676ad0002206ca9c980..5d8098e8bd9f9b03197ab7dcdaafb00a952537b3 100644 (file)
@@ -43,7 +43,7 @@ class MathBoxInset;
 class MathCharInset;
 class MathGridInset;
 class MathNestInset;
-class MathMatrixInset;
+class MathHullInset;
 class MathScriptInset;
 class MathSpaceInset;
 class MathMacroTemplate;
@@ -169,9 +169,9 @@ public:
        /// 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
-       virtual MathMatrixInset * asMatrixInset() { return 0; }
+       virtual MathHullInset * asMatrixInset() { return 0; }
        /// identifies SpaceInset
        virtual MathSpaceInset * asSpaceInset() { return 0; }
        /// identifies GridInset
index 1266efc819c83eb8dc85fd348132ff858dc2c085..4da7787d9c016097f76e345ea8a576eb06851c1d 100644 (file)
@@ -65,7 +65,7 @@ point to write some macros:
 #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"
@@ -493,7 +493,7 @@ bool Parser::parse_lines(MathAtom & t, bool numbered, bool outmost)
                }
 
                if (outmost) {
-                       MathMatrixInset * m = t->asMatrixInset();
+                       MathHullInset * m = t->asMatrixInset();
                        if (!m) {
                                lyxerr << "error in Parser::parse_lines() 2\n";
                                return false;
@@ -570,7 +570,7 @@ bool Parser::parse_normal(MathAtom & matrix)
        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;
        }
@@ -579,15 +579,15 @@ bool Parser::parse_normal(MathAtom & matrix)
                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;
@@ -603,8 +603,8 @@ bool Parser::parse_normal(MathAtom & matrix)
        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_);
@@ -621,8 +621,8 @@ bool Parser::parse_normal(MathAtom & matrix)
        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_);
@@ -630,40 +630,40 @@ bool Parser::parse_normal(MathAtom & matrix)
        }
 
        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);
        }
 
index e49a4f7ce6c44616097c7180d34fd0dc8088a05c..8fe33a3a11d490fa7a5cfb909d6c94cb7bd1a253 100644 (file)
@@ -26,7 +26,7 @@
 #include "LString.h"
 #include "math_defs.h"
 
-class MathMatrixInset;
+class MathHullInset;
 class MathMacroTemplate;
 class MathAtom;
 class MathArray;