3 * \file InsetMathRoot.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Alejandro Aguilar Sierra
10 * Full author contact details are available in file CREDITS.
16 #include "InsetMathNest.h"
22 /// The general n-th root inset.
23 class InsetMathRoot : public InsetMathNest {
26 explicit InsetMathRoot(Buffer * buf);
28 bool idxUpDown(Cursor & cur, bool up) const override;
30 bool idxForward(Cursor & cur) const override;
32 bool idxBackward(Cursor & cur) const override;
34 bool idxFirst(Cursor &) const override;
36 bool idxLast(Cursor &) const override;
39 void metrics(MetricsInfo & mi, Dimension & dim) const override;
41 void draw(PainterInfo & pi, int x, int y) const override;
44 void write(TeXMathStream & os) const override;
46 void normalize(NormalStream &) const override;
48 void mathmlize(MathMLStream &) const override;
50 void htmlize(HtmlStream &) const override;
52 void maple(MapleStream &) const override;
54 void mathematica(MathematicaStream &) const override;
56 void octave(OctaveStream &) const override;
58 InsetCode lyxCode() const override { return MATH_ROOT_CODE; }
60 void validate(LaTeXFeatures &) const override;
63 Inset * clone() const override;
66 void mathed_root_metrics(MetricsInfo & mi, MathData const & nucleus,
67 MathData const * root, Dimension & dim);
69 void mathed_draw_root(PainterInfo & pi, int x, int y, MathData const & nucleus,
70 MathData const * root, Dimension const & dim);