]> git.lyx.org Git - features.git/blob - src/mathed/InsetMathDim.h
59773c031086f19e742ac189046bda4a6db2aa45
[features.git] / src / mathed / InsetMathDim.h
1 // -*- C++ -*-
2 /**
3  * \file InsetMathDim.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author André Pönitz
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef MATH_DIMINSET_H
13 #define MATH_DIMINSET_H
14
15 #include <boost/assert.hpp>
16 #include "InsetMath.h"
17
18 namespace lyx {
19
20 class PainterInfo;
21
22
23 /// things that need the dimension cache
24 class InsetMathDim : public InsetMath {
25 public:
26         ///
27         InsetMathDim();
28
29         ///
30         Dimension dimensions() const { return dim_; }
31         ///
32         int ascent() const;
33         ///
34         int descent() const;
35         ///
36         int width() const;
37
38         ///
39         void setPosCache(PainterInfo const & pi, int x, int y) const;
40         ///
41         int plaintext(Buffer const &, odocstream & os,
42                       OutputParams const &) const
43                 { // FIXME: math macros are output here but
44                   // should be handled in InsetMathHull
45                   os << "[math macro]"; return 12; }
46 };
47
48
49 } // namespace lyx
50
51 #endif