]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_inset.C
fix typo that put too many include paths for most people
[lyx.git] / src / mathed / math_inset.C
index f13b3124b890e31799327603ab3f83086832f2e8..87af584c5c28098d9a54a4348547f4a58a332f91 100644 (file)
@@ -1,9 +1,9 @@
 /*
  *  File:        math_inset.C
  *  Purpose:     Implementation of insets for mathed
- *  Author:      Alejandro Aguilar Sierra <asierra@servidor.unam.mx> 
+ *  Author:      Alejandro Aguilar Sierra <asierra@servidor.unam.mx>
  *  Created:     January 1996
- *  Description: 
+ *  Description:
  *
  *  Dependencies: Xlib, XForms
  *
 #include "debug.h"
 
 
+using std::ostream;
+using std::vector;
+
+
 int MathInset::height() const
 {
        return ascent() + descent();
 }
 
 
-std::ostream & operator<<(std::ostream & os, MathInset const & inset)
+ostream & operator<<(ostream & os, MathInset const & inset)
 {
-       WriteStream wi(os, false);
+       WriteStream wi(os, false, false);
        inset.write(wi);
        return os;
 }
@@ -78,6 +82,15 @@ MathArray const & MathInset::cell(idx_type) const
 }
 
 
+MathInset::idx_type MathInset::index(row_type row, col_type col) const
+{
+       if (row != 0)
+               lyxerr << "illegal row: " << row << "\n";
+       if (col != 0)
+               lyxerr << "illegal col: " << col << "\n";
+       return 0;
+}
+
 void MathInset::substitute(MathMacro const &)
 {}
 
@@ -106,13 +119,7 @@ bool MathInset::idxLeft(idx_type &, pos_type &) const
 }
 
 
-bool MathInset::idxUp(idx_type &, pos_type &) const
-{
-       return false;
-}
-
-
-bool MathInset::idxDown(idx_type &, pos_type &) const
+bool MathInset::idxUpDown(idx_type &, bool) const
 {
        return false;
 }
@@ -124,36 +131,12 @@ bool MathInset::idxFirst(idx_type &, pos_type &) const
 }
 
 
-bool MathInset::idxFirstUp(idx_type &, pos_type &) const
-{
-       return false;
-}
-
-
-bool MathInset::idxFirstDown(idx_type &, pos_type &) const
-{
-       return false;
-}
-
-
 bool MathInset::idxLast(idx_type &, pos_type &) const
 {
        return false;
 }
 
 
-bool MathInset::idxLastUp(idx_type &, pos_type &) const
-{
-       return false;
-}
-
-
-bool MathInset::idxLastDown(idx_type &, pos_type &) const
-{
-       return false;
-}
-
-
 bool MathInset::idxHome(idx_type &, pos_type &) const
 {
        return false;
@@ -166,21 +149,10 @@ bool MathInset::idxEnd(idx_type &, pos_type &) const
 }
 
 
-void MathInset::idxDelete(idx_type &, bool & popit, bool & deleteit)
-{
-       popit    = false;
-       deleteit = false;
-}
-
-
-void MathInset::idxDeleteRange(idx_type, idx_type)
-{}
-
-
 void MathInset::normalize(NormalStream & os) const
 {
        os << "[unknown ";
-       WriteStream wi(os.os(), false);
+       WriteStream wi(os.os(), false, true);
        write(wi);
        os << "] ";
 }
@@ -189,7 +161,7 @@ void MathInset::normalize(NormalStream & os) const
 void MathInset::dump() const
 {
        lyxerr << "---------------------------------------------\n";
-       WriteStream wi(lyxerr, false);
+       WriteStream wi(lyxerr, false, true);
        write(wi);
        lyxerr << "\n---------------------------------------------\n";
 }
@@ -199,10 +171,10 @@ void MathInset::validate(LaTeXFeatures &) const
 {}
 
 
-std::vector<MathInset::idx_type>
+vector<MathInset::idx_type>
        MathInset::idxBetween(idx_type from, idx_type to) const
 {
-       std::vector<idx_type> res;
+       vector<idx_type> res;
        for (idx_type i = from; i <= to; ++i)
                res.push_back(i);
        return res;
@@ -221,6 +193,19 @@ void MathInset::draw(Painter &, int, int) const
 }
 
 
+void MathInset::metricsT(TextMetricsInfo const &) const
+{
+       lyxerr << "MathInset::metricsT(Text) called directly!\n";
+}
+
+
+void MathInset::drawT(TextPainter &, int, int) const
+{
+       lyxerr << "MathInset::drawT(Text) called directly!\n";
+}
+
+
+
 void MathInset::write(WriteStream &) const
 {
        lyxerr << "MathInset::write() called directly!\n";