]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_inset.C
new LFUN_MOUSE_(PRESS|MOTION|RELEASE)
[lyx.git] / src / mathed / math_inset.C
index 70010e623466f26d637b7dfe6273798668b28443..f075e4654c53bc689ec2c13e3344ede477e99765 100644 (file)
@@ -46,19 +46,9 @@ int MathInset::height() const
 
 
 ostream & operator<<(ostream & os, MathAtom const & at)
-{
-       if (at.nucleus())
-               os << *(at.nucleus());
-       else
-               os << "(nil)";
-       return os;
-}
-
-
-ostream & operator<<(ostream & os, MathInset const & inset)
 {
        WriteStream wi(os, false, false);
-       inset.write(wi);
+       at->write(wi);
        return os;
 }
 
@@ -166,15 +156,6 @@ void MathInset::getPos(idx_type, pos_type, int & x, int & y) const
 }
 
 
-void MathInset::normalize(NormalStream & os) const
-{
-       os << "[unknown ";
-       WriteStream wi(os.os(), false, true);
-       write(wi);
-       os << "] ";
-}
-
-
 void MathInset::dump() const
 {
        lyxerr << "---------------------------------------------\n";
@@ -226,9 +207,15 @@ void MathInset::drawT(TextPainter &, int, int) const
 
 
 
-void MathInset::write(WriteStream &) const
+void MathInset::write(WriteStream & os) const
+{
+       os << '\\' << name().c_str() << ' ';
+}
+
+
+void MathInset::normalize(NormalStream & os) const
 {
-       lyxerr << "MathInset::write() called directly!\n";
+       os << '[' << name().c_str() << "] ";
 }
 
 
@@ -278,7 +265,7 @@ int MathInset::docbook(std::ostream &, bool) const
 }
 
 
-int MathInset::dispatch(string const &, idx_type, pos_type) 
+int MathInset::dispatch(FuncRequest const &, idx_type, pos_type) 
 {
        return 0; // undispatched
 }