Prepare for independent decoration drawing.

* 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
This commit is contained in:
Abdelrazak Younes 2007-01-20 00:55:24 +00:00
parent 53c2522cf7
commit 5c4844af43
5 changed files with 16 additions and 0 deletions

View 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

View 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:

View 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;
///

View 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

View 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