#ifndef MATH_INSET_H
#define MATH_INSET_H
-#include "MathData.h"
+#include "MathClass.h"
#include "insets/Inset.h"
-#include "TexRow.h"
-
namespace lyx {
*/
+class Cursor;
class OutputParams;
+class MetricsInfo;
+
class InsetMathArray;
class InsetMathAMSArray;
class InsetMathBrace;
class InsetMathSpecialChar;
class InsetMathSymbol;
class InsetMathUnknown;
-
class InsetMathRef;
class HtmlStream;
class MathStream;
class WriteStream;
+class MathData;
class MathMacroTemplate;
class MathMacro;
-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:
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; }
- /// identifies a binary operators (used for spacing)
- virtual bool isMathBin() const { return false; }
- /// identifies relational operators (used for spacing and splitting equations)
- virtual bool isMathRel() const { return false; }
- /// identifies punctuation (used for spacing)
- virtual bool isMathPunct() const { return false; }
/// will this get written as a single block in {..}
virtual bool extraBraces() const { return false; }