]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/MathMacro.h
Generalise the deletion protection mechanism from math to text (#9540)
[lyx.git] / src / mathed / MathMacro.h
index c7dca261fadb042ab9ed340bb259e8c1abecd9b2..893c011a4141bdc05e3e1ddd250f160c751ec4ae 100644 (file)
@@ -37,19 +37,28 @@ public:
        ///
        virtual MathMacro const * asMacro() const { return this; }
        ///
-       marker_type marker() const;
+       marker_type marker(BufferView const *) const;
        /// If the macro is in normal edit mode, dissolve its contents in
        /// the row. Otherwise, just insert the inset.
        bool addToMathRow(MathRow &, MetricsInfo & mi) const;
        ///
-       void draw(PainterInfo & pi, int x, int y) const;
-       /// draw selection background
-       void drawSelection(PainterInfo & pi, int x, int y) const;
+       void beforeMetrics() const;
+       ///
+       void afterMetrics() const;
+       ///
+       void beforeDraw(PainterInfo const &) const;
+       ///
+       void afterDraw(PainterInfo const &) const;
+
        ///
        void metrics(MetricsInfo & mi, Dimension & dim) const;
        /// was the macro in edit mode when computing metrics?
        bool editMetrics(BufferView const * bv) const;
        ///
+       void draw(PainterInfo & pi, int x, int y) const;
+       /// draw selection background
+       void drawSelection(PainterInfo & pi, int x, int y) const;
+       ///
        int kerning(BufferView const * bv) const;
        /// get cursor position
        void cursorPos(BufferView const & bv, CursorSlice const & sl,