]> git.lyx.org Git - lyx.git/blob - src/mathed/math_decorationinset.h
the DocIterator stuff
[lyx.git] / src / mathed / math_decorationinset.h
1 // -*- C++ -*-
2 /**
3  * \file math_decorationinset.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Alejandro Aguilar Sierra
8  * \author André Pönitz
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef MATH_DECORATIONINSET_H
14 #define MATH_DECORATIONINSET_H
15
16 #include "math_nestinset.h"
17
18
19 class latexkeys;
20
21 /// Decorations and accents over (below) a math object
22 class MathDecorationInset : public MathNestInset {
23 public:
24         ///
25         explicit MathDecorationInset(latexkeys const * key);
26         ///
27         virtual std::auto_ptr<InsetBase> clone() const;
28         ///
29         void draw(PainterInfo &, int x, int y) const;
30         ///
31         void write(WriteStream & os) const;
32         ///
33         void metrics(MetricsInfo & mi, Dimension & dim) const;
34         ///
35         void normalize(NormalStream & os) const;
36         ///
37         void infoize(std::ostream & os) const;
38         ///
39         bool isScriptable() const;
40
41 private:
42         ///
43         bool upper() const;
44         ///
45         bool protect() const;
46         /// is it a wide decoration?
47         bool wide() const;
48
49         ///
50         latexkeys const * key_;
51         /// height cache of deco
52         mutable int dh_;
53         /// vertical offset cache of deco
54         mutable int dy_;
55         /// width for non-wide deco
56         mutable int dw_;
57 };
58 #endif