class WriteStream;
class MathData;
-class MathMacroTemplate;
-class MathMacro;
+class InsetMathMacroTemplate;
+class InsetMathMacro;
class MathRow;
class TextPainter;
class TextMetricsInfo;
/// this is overridden by specific insets
virtual mode_type currentMode() const { return MATH_MODE; }
+ // The possible marker types for math insets
+ enum marker_type { NO_MARKER, MARKER2, MARKER, BOX_MARKER };
/// this is overridden by insets with specific edit marker type
- virtual marker_type marker() const;
+ virtual marker_type marker(BufferView const *) const;
/// the ascent of the inset above the baseline
/// compute the size of the object for text based drawing
virtual InsetMathGrid const * asGridInset() const { return 0; }
virtual InsetMathHull * asHullInset() { return 0; }
virtual InsetMathHull const * asHullInset() const { return 0; }
- virtual MathMacro * asMacro() { return 0; }
- virtual MathMacro const * asMacro() const { return 0; }
- virtual MathMacroTemplate * asMacroTemplate() { return 0; }
- virtual MathMacroTemplate const * asMacroTemplate() const { return 0; }
+ virtual InsetMathMacro * asMacro() { return 0; }
+ virtual InsetMathMacro const * asMacro() const { return 0; }
+ virtual InsetMathMacroTemplate * asMacroTemplate() { return 0; }
+ virtual InsetMathMacroTemplate const * asMacroTemplate() const { return 0; }
virtual InsetMathMatrix const * asMatrixInset() const { return 0; }
virtual InsetMathNest * asNestInset() { return 0; }
virtual InsetMathNest const * asNestInset() const { return 0; }
virtual MathClass mathClass() const;
/// Add this inset to a math row. Return true if contents got added
virtual bool addToMathRow(MathRow &, MetricsInfo & mi) const;
+ /// Hook that is run before metrics computation starts
+ virtual void beforeMetrics() const {}
+ /// Hook that is run after metrics computation
+ virtual void afterMetrics() const {}
+ /// Hook that is run before actual drawing
+ virtual void beforeDraw(PainterInfo const &) const {}
+ /// Hook that is run after drawing
+ virtual void afterDraw(PainterInfo const &) const {}
/// identifies things that can get scripts
virtual bool isScriptable() const { return false; }