]> git.lyx.org Git - lyx.git/blob - src/mathed/InsetMathClass.h
Cut excessively long author lists before parsing them for the GUI
[lyx.git] / src / mathed / InsetMathClass.h
1 // -*- C++ -*-
2 /**
3  * \file InsetMathClass.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_CLASSINSET_H
13 #define MATH_CLASSINSET_H
14
15 #include "MathClass.h"
16
17 #include "InsetMathNest.h"
18
19
20 namespace lyx {
21
22
23 /// Support for LaTeX's \\mathxxx class-changing commands
24
25 class InsetMathClass : public InsetMathNest {
26 public:
27         ///
28         InsetMathClass(Buffer * buf, MathClass);
29         ///
30         docstring name() const override;
31         ///
32         MathClass mathClass() const override { return math_class_; }
33         /// The default limits value in \c display style
34         Limits defaultLimits(bool display) const override;
35         /// whether the inset has limit-like sub/superscript
36         Limits limits() const override { return limits_; }
37         /// sets types of sub/superscripts
38         void limits(Limits lim) override { limits_ = lim; }
39         ///
40         void metrics(MetricsInfo & mi, Dimension & dim) const override;
41         ///
42         void draw(PainterInfo & pi, int x, int y) const override;
43         ///
44         void write(TeXMathStream & os) const override;
45         ///
46         void mathmlize(MathMLStream & ms) const override;
47         ///
48         void infoize(odocstream & os) const override;
49         ///
50         InsetCode lyxCode() const override { return MATH_CLASS_CODE; }
51         ///
52         InsetMathClass * asClassInset() { return this; }
53         ///
54         InsetMathClass const * asClassInset() const override { return this; }
55
56 private:
57         Inset * clone() const override;
58         ///
59         MathClass math_class_;
60         ///
61         Limits limits_ = AUTO_LIMITS;
62 };
63
64
65 } // namespace lyx
66 #endif