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 InsetMathRoot(Buffer * buf);
28 bool idxUpDown(Cursor & cur, bool up) const;
30 void metrics(MetricsInfo & mi, Dimension & dim) const;
32 void draw(PainterInfo & pi, int x, int y) const;
34 idx_type firstIdx() const { return 1; }
36 idx_type lastIdx() const { return 1; }
39 void write(WriteStream & os) const;
41 void normalize(NormalStream &) const;
43 void mathmlize(MathStream &) const;
45 void htmlize(HtmlStream &) const;
47 void maple(MapleStream &) const;
49 void mathematica(MathematicaStream &) const;
51 void octave(OctaveStream &) const;
53 InsetCode lyxCode() const { return MATH_ROOT_CODE; }
55 void validate(LaTeXFeatures &) const;
58 virtual Inset * clone() const;
61 void mathed_root_metrics(MetricsInfo & mi, MathData const & nucleus,
62 MathData const * root, Dimension & dim);
64 void mathed_draw_root(PainterInfo & pi, int x, int y, MathData const & nucleus,
65 MathData const * root, Dimension const & dim);