]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMath.h
Simplify Changers interface
[lyx.git] / src / mathed / InsetMath.h
index deb6915e9acac587e8f493759bb986600122b3cf..e8c893bda5d9e8046859792cd3fe9e510a0b98ec 100644 (file)
 #ifndef MATH_INSET_H
 #define MATH_INSET_H
 
-#include "MathData.h"
+#include "MathClass.h"
 
 #include "insets/Inset.h"
 
-#include "TexRow.h"
-
 
 namespace lyx {
 
@@ -55,7 +53,10 @@ inclusion in the "real LyX insets" FormulaInset and FormulaMacroInset.
 
 */
 
+class Cursor;
 class OutputParams;
+class MetricsInfo;
+
 class InsetMathArray;
 class InsetMathAMSArray;
 class InsetMathBrace;
@@ -74,7 +75,6 @@ class InsetMathSpace;
 class InsetMathSpecialChar;
 class InsetMathSymbol;
 class InsetMathUnknown;
-
 class InsetMathRef;
 
 class HtmlStream;
@@ -85,16 +85,18 @@ class MaximaStream;
 class MathematicaStream;
 class MathStream;
 class WriteStream;
-class InfoStream;
 
+class MathData;
 class MathMacroTemplate;
 class MathMacro;
-class MathPosFinder;
-class Cursor;
+class MathRow;
 class TextPainter;
 class TextMetricsInfo;
 class ReplaceData;
 
+/// Type of unique identifiers for math insets (used in TexRow)
+typedef void const * uid_type;
+
 
 class InsetMath : public Inset {
 public:
@@ -162,10 +164,22 @@ public:
        virtual InsetMathRef            * asRefInset()            { return 0; }
        virtual InsetMathSpecialChar const * asSpecialCharInset() const { return 0; }
 
+       /// The class of the math object (used primarily for spacing)
+       virtual MathClass mathClass() const;
+       /// Add this inset to a math row. Return true if contents got added
+       virtual bool addToMathRow(MathRow &, MetricsInfo & mi) const;
+
+       /// draw four angular markers
+       void drawMarkers(PainterInfo & pi, int x, int y) const;
+       /// draw two angular markers
+       void drawMarkers2(PainterInfo & pi, int x, int y) const;
+       /// add space for markers
+       void metricsMarkers(MetricsInfo & mi, Dimension & dim, int framesize = 1) const;
+       /// add space for markers
+       void metricsMarkers2(MetricsInfo & mi, Dimension & dim, int framesize = 1) const;
+
        /// identifies things that can get scripts
        virtual bool isScriptable() const { return false; }
-       /// is the a relational operator (used for splitting equations)
-       virtual bool isRelOp() const { return false; }
        /// will this get written as a single block in {..}
        virtual bool extraBraces() const { return false; }