]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMath.h
Account for old versions of Pygments
[lyx.git] / src / mathed / InsetMath.h
index f8e70c7293bc4a7fecc37ee0e3eea345e9425995..81cad09b486fd692b2643064b77273760de46d45 100644 (file)
@@ -114,6 +114,11 @@ public:
        /// 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(BufferView const *) const;
+
        /// the ascent of the inset above the baseline
        /// compute the size of the object for text based drawing
        virtual void metricsT(TextMetricsInfo const & mi, Dimension & dim) const;
@@ -168,6 +173,14 @@ public:
        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; }
@@ -227,7 +240,7 @@ public:
        /// math stuff usually isn't allowed in text mode
        virtual bool allowedIn(mode_type mode) const { return mode == MATH_MODE; }
 
-       /// superscript kerning
+       /// Italic correction as described in InsetMathScript.h
        virtual int kerning(BufferView const *) const { return 0; }
        ///
        bool isInToc() const { return true; }