]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_inset.C
mathed108.diff
[lyx.git] / src / mathed / math_inset.C
index 82760011adc9365ab6c70af77d0b46e1e46a7a7e..b5980fc019530eeea4bbb7a63ff6fdc26233793b 100644 (file)
  *   the GNU General Public Licence version 2 or later.
  */
 
-#include <config.h>
-
 #ifdef __GNUG__
 #pragma implementation
 #endif
 
 #include "math_inset.h"
-#include "mathed/support.h"
-#include "Painter.h"
 #include "debug.h"
 
 
@@ -70,12 +66,6 @@ void MathInset::limits(int)
 {
 }
 
-bool MathInset::hasLimits() const
-{
-       return false;
-}
-
-
 string const & MathInset::name() const
 {
        return name_;
@@ -172,12 +162,6 @@ MathArray const & MathInset::cell(int i) const
 }
 
 
-void MathInset::setData(MathArray const & a, int idx)
-{
-       cells_[idx].data_ = a;
-}
-
-
 void MathInset::substitute(MathArray & array, MathMacro const & m) const
 {
        MathInset * p = clone();
@@ -294,11 +278,15 @@ bool MathInset::idxFirstDown(int &, int &) const
        return false;
 }
 
-bool MathInset::idxDelete(int)
+void MathInset::idxDelete(int &, bool & popit, bool & deleteit)
 {
-       return false;
+       popit    = false;
+       deleteit = false;
 }
 
+void MathInset::idxDeleteRange(int, int)
+{}
+
 
 bool MathInset::idxLastUp(int &, int &) const
 {
@@ -346,7 +334,7 @@ void MathInset::dump() const
 }
 
 
-void MathInset::push_back(byte ch, MathTextCodes fcode)
+void MathInset::push_back(unsigned char ch, MathTextCodes fcode)
 {
        if (nargs())
                cells_.back().data_.push_back(ch, fcode);
@@ -373,3 +361,16 @@ bool MathInset::covers(int x, int y) const
                y <= yo_ + descent_;
 }
 
+void MathInset::Validate(LaTeXFeatures & features) const
+{
+       for (int i = 0; i < nargs(); ++i)
+               cell(i).Validate(features);
+}
+
+std::vector<int> MathInset::idxBetween(int from, int to) const
+{
+       std::vector<int> res;
+       for (int i = from; i <= to; ++i)
+               res.push_back(i);
+       return res;
+}