]> git.lyx.org Git - features.git/commitdiff
Prepare for independent decoration drawing.
authorAbdelrazak Younes <younes@lyx.org>
Sat, 20 Jan 2007 00:55:24 +0000 (00:55 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Sat, 20 Jan 2007 00:55:24 +0000 (00:55 +0000)
* InsetBase::drawDecoration(): new method.

* all other files: implement drawDecoration().

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16772 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/insetbase.h
src/mathed/InsetMathBinom.h
src/mathed/InsetMathGrid.h
src/mathed/InsetMathMacro.h
src/mathed/InsetMathNest.h

index bd3b914e21892d6a0f2c962b189bdf42267f2aef..540f117e3ad10ec6c2f173ec5c9a03d514953c4a 100644 (file)
@@ -114,6 +114,10 @@ public:
        virtual bool editing(BufferView * bv) const;
        ///
        virtual bool showInsetDialog(BufferView *) const { return false; }
+
+       /// draw inset decoration if necessary.
+       /// This can use \c drawMarkers() for example.
+       virtual void drawDecoration(PainterInfo &, int, int) const {}
        /// draw four angular markers
        void drawMarkers(PainterInfo & pi, int x, int y) const;
        /// draw two angular markers
index 80ed9473f635a23c9fbea86fbc7d9ee55641e858..baf2b8d6bf7bd1897ae0be00ac4772a8178ce787 100644 (file)
@@ -31,6 +31,9 @@ public:
        bool metrics(MetricsInfo & mi, Dimension & dim) const;
        ///
        void draw(PainterInfo &, int x, int y) const;
+       /// draw decorations.
+       void drawDecoration(PainterInfo & pi, int x, int y) const
+       { drawMarkers2(pi, x, y); }
        ///
        bool extraBraces() const;
 private:
index b08ad54be5d7b525ffebb2b33f6571525b116ca7..f3485916a1f04d5969eeb8dfeec6c97d4e2ce256 100644 (file)
@@ -103,6 +103,9 @@ public:
        ///
        void drawWithMargin(PainterInfo & pi, int x, int y,
                int lmargin = 0, int rmargin = 0) const;
+       /// draw decorations.
+       void drawDecoration(PainterInfo & pi, int x, int y) const
+       { drawMarkers2(pi, x, y); }
        ///
        void metricsT(TextMetricsInfo const & mi, Dimension & dim) const;
        ///
index 8a6a6997c7b4f750290e060b8d7692a35f834ff5..478f08066cf22d85ba395e4145da7f9ded9cf056 100644 (file)
@@ -33,6 +33,9 @@ public:
        void drawExpanded(PainterInfo & pi, int x, int y) const;
        /// draw selection background
        void drawSelection(PainterInfo & pi, int x, int y) const;
+       /// draw decorations.
+       void drawDecoration(PainterInfo & pi, int x, int y) const
+       { drawMarkers2(pi, x, y); }
        ///
        bool metrics(MetricsInfo & mi, Dimension & dim) const;
        /// get cursor position
index a01198749ad231fa1df2ea0f327b5a3675600ffb..604b3b41e5beb0abbf69bfca3c94a8805d60e41b 100644 (file)
@@ -35,6 +35,9 @@ public:
        void draw(PainterInfo & pi, int x, int y) const;
        /// draw selection background
        void drawSelection(PainterInfo & pi, int x, int y) const;
+       /// draw decorations.
+       void drawDecoration(PainterInfo & pi, int x, int y) const
+       { drawMarkers(pi, x, y); }
        /// identifies NestInsets
        InsetMathNest * asNestInset() { return this; }
        /// identifies NestInsets