]> git.lyx.org Git - features.git/blobdiff - src/mathed/InsetMath.h
Introduce hooks to encapsulate macro code of MathRow
[features.git] / src / mathed / InsetMath.h
index 9c65fafe4d307dadf77772f544f978d74e7a8187..2fc4c1ddf6b1a3129b92119d711f7d584fd9f06d 100644 (file)
@@ -171,6 +171,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; }