]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_inset.h
Fix.
[lyx.git] / src / mathed / math_inset.h
index a1b2f2c8dadd54985c5c20d14cdc59bd18ffb6d0..0ca35c6107e8f99f3a8ca45c8e601ffc6920e816 100644 (file)
 #ifndef MATH_INSET_H
 #define MATH_INSET_H
 
-#include <config.h>
 
-#ifdef __GNUG__
-#pragma interface
-#endif
+#include <config.h>
 
 #include "LString.h"
 #include "frontends/mouse_state.h"
@@ -53,6 +50,7 @@ class MathCharInset;
 class MathDelimInset;
 class MathGridInset;
 class MathFracInset;
+class MathFontInset;
 class MathHullInset;
 class MathMatrixInset;
 class MathNestInset;
@@ -68,6 +66,7 @@ class InsetRef;
 class NormalStream;
 class OctaveStream;
 class MapleStream;
+class MaximaStream;
 class MathematicaStream;
 class MathMLStream;
 class WriteStream;
@@ -199,6 +198,8 @@ public:
        virtual MathDelimInset const    * asDelimInset() const    { return 0; }
        virtual MathFracInset           * asFracInset()           { return 0; }
        virtual MathFracInset const     * asFracInset() const     { return 0; }
+       virtual MathFontInset           * asFontInset()           { return 0; }
+       virtual MathFontInset const     * asFontInset() const     { return 0; }
        virtual MathGridInset           * asGridInset()           { return 0; }
        virtual MathGridInset const     * asGridInset() const     { return 0; }
        virtual MathHullInset           * asHullInset()           { return 0; }
@@ -227,7 +228,7 @@ public:
        /// is the a relational operator (used for splitting equations)
        virtual bool isRelOp() const { return false; }
        /// -1: text mode, 1: math mode, 0 undecided
-       enum mode_type {UNDECIDED_MODE, TEXT_MODE, MATH_MODE, VERBATIM_MODE};
+       enum mode_type {UNDECIDED_MODE, TEXT_MODE, MATH_MODE};
        /// Dispatch result codes, see inset/inset.h
        enum result_type {
                UNDISPATCHED = 0, DISPATCHED, DISPATCHED_NOUPDATE,
@@ -262,22 +263,26 @@ public:
        /// access to the lock (only nest array have one)
        virtual void lock(bool) {}
        /// get notification when the cursor leaves this inset
-       virtual void notifyCursorLeaves() {}
+       virtual void notifyCursorLeaves(idx_type) {}
 
        /// write LaTeX and Lyx code
        virtual void write(WriteStream & os) const;
        /// write normalized content
        virtual void normalize(NormalStream &) const;
        /// write content as something readable by Maple
-       virtual void maplize(MapleStream &) const;
+       virtual void maple(MapleStream &) const;
+       /// write content as something readable by Maxima
+       virtual void maxima(MaximaStream &) const;
        /// write content as something readable by Mathematica
-       virtual void mathematicize(MathematicaStream &) const;
+       virtual void mathematica(MathematicaStream &) const;
        /// write content as something resembling MathML
        virtual void mathmlize(MathMLStream &) const;
        /// write content as something readable by Octave
-       virtual void octavize(OctaveStream &) const;
-       /// describe content
+       virtual void octave(OctaveStream &) const;
+       /// describe content if cursor inside
        virtual void infoize(std::ostream &) const {}
+       /// describe content if cursor behind
+       virtual void infoize2(std::ostream &) const {}
        /// plain ascii output
        virtual int ascii(std::ostream & os, int) const;
        /// linuxdoc output
@@ -308,8 +313,12 @@ public:
 
 std::ostream & operator<<(std::ostream &, MathAtom const &);
 
+// converts single cell to string
 string asString(MathArray const & ar);
+// converts string to single cell
 MathArray asArray(string const & str);
+
+// initialize math
 void initMath();
 
 /// here to ssave a few includes in the insets