]> git.lyx.org Git - lyx.git/blob - src/mathed/InsetMathRoot.h
g-brief loads babel internally. So don't load it ourselves.
[lyx.git] / src / mathed / InsetMathRoot.h
1 // -*- C++ -*-
2 /**
3  * \file InsetMathRoot.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_ROOT_H
14 #define MATH_ROOT_H
15
16 #include "InsetMathNest.h"
17
18
19 namespace lyx {
20
21
22 /// The general n-th root inset.
23 class InsetMathRoot : public InsetMathNest {
24 public:
25         ///
26         explicit InsetMathRoot(Buffer * buf);
27         ///
28         bool idxUpDown(Cursor & cur, bool up) const override;
29         ///
30         bool idxForward(Cursor & cur) const override;
31         ///
32         bool idxBackward(Cursor & cur) const override;
33         ///
34         bool idxFirst(Cursor &) const override;
35         ///
36         bool idxLast(Cursor &) const override;
37
38         ///
39         void metrics(MetricsInfo & mi, Dimension & dim) const override;
40         ///
41         void draw(PainterInfo & pi, int x, int y) const override;
42
43         ///
44         void write(TeXMathStream & os) const override;
45         ///
46         void normalize(NormalStream &) const override;
47         ///
48         void mathmlize(MathMLStream &) const override;
49         ///
50         void htmlize(HtmlStream &) const override;
51         ///
52         void maple(MapleStream &) const override;
53         ///
54         void mathematica(MathematicaStream &) const override;
55         ///
56         void octave(OctaveStream &) const override;
57         ///
58         InsetCode lyxCode() const override { return MATH_ROOT_CODE; }
59         ///
60         void validate(LaTeXFeatures &) const override;
61
62 private:
63         Inset * clone() const override;
64 };
65
66 void mathed_root_metrics(MetricsInfo & mi, MathData const & nucleus,
67                          MathData const * root, Dimension & dim);
68
69 void mathed_draw_root(PainterInfo & pi, int x, int y, MathData const & nucleus,
70                       MathData const * root, Dimension const & dim);
71
72
73 } // namespace lyx
74 #endif