]> git.lyx.org Git - lyx.git/blob - src/mathed/math_decorationinset.h
Replace LString.h with support/std_string.h,
[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 #include "support/std_string.h"
18
19
20 class latexkeys;
21
22 /// Decorations and accents over (below) a math object
23 class MathDecorationInset : public MathNestInset {
24 public:
25         ///
26         explicit MathDecorationInset(latexkeys const * key);
27         ///
28         virtual std::auto_ptr<InsetBase> clone() const;
29         ///
30         void draw(PainterInfo &, int x, int y) const;
31         ///
32         void write(WriteStream & os) const;
33         ///
34         void metrics(MetricsInfo & mi, Dimension & dim) const;
35         ///
36         void normalize(NormalStream & os) const;
37         ///
38         void infoize(std::ostream & os) const;
39         ///
40         bool isScriptable() const;
41
42 private:
43         ///
44         bool upper() const;
45         ///
46         bool protect() const;
47         /// is it a wide decoration?
48         bool wide() const;
49
50         ///
51         latexkeys const * key_;
52         /// height cache of deco
53         mutable int dh_;
54         /// vertical offset cache of deco
55         mutable int dy_;
56         /// width for non-wide deco
57         mutable int dw_;
58 };
59 #endif