3 * \file InsetMathFrac.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.
13 #ifndef MATH_FRACINSET_H
14 #define MATH_FRACINSET_H
16 #include "InsetMathFracBase.h"
22 /// Fraction like objects (frac, binom)
23 class InsetMathFrac : public InsetMathFracBase {
36 explicit InsetMathFrac(Kind kind = FRAC, idx_type ncells = 2);
38 bool idxRight(Cursor &) const;
40 bool idxLeft(Cursor &) const;
42 bool metrics(MetricsInfo & mi, Dimension & dim) const;
44 void draw(PainterInfo &, int x, int y) const;
46 void metricsT(TextMetricsInfo const & mi, Dimension & dim) const;
48 void drawT(TextPainter &, int x, int y) const;
49 /// identifies FracInsets
50 InsetMathFrac * asFracInset();
51 /// identifies FracInsets
52 InsetMathFrac const * asFracInset() const;
54 docstring name() const;
56 bool extraBraces() const;
59 void write(WriteStream & os) const;
61 void maple(MapleStream &) const;
63 void mathematica(MathematicaStream &) const;
65 void octave(OctaveStream &) const;
67 void mathmlize(MathStream &) const;
69 void validate(LaTeXFeatures & features) const;
71 virtual Inset * clone() const;