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 {
37 explicit InsetMathFrac(Kind kind = FRAC, idx_type ncells = 2);
39 bool idxRight(Cursor &) const;
41 bool idxLeft(Cursor &) const;
43 bool metrics(MetricsInfo & mi, Dimension & dim) const;
45 void draw(PainterInfo &, int x, int y) const;
47 void metricsT(TextMetricsInfo const & mi, Dimension & dim) const;
49 void drawT(TextPainter &, int x, int y) const;
50 /// identifies FracInsets
51 InsetMathFrac * asFracInset();
52 /// identifies FracInsets
53 InsetMathFrac const * asFracInset() const;
55 docstring name() const;
57 bool extraBraces() const;
60 void write(WriteStream & os) const;
62 void maple(MapleStream &) const;
64 void mathematica(MathematicaStream &) const;
66 void octave(OctaveStream &) const;
68 void mathmlize(MathStream &) const;
70 void validate(LaTeXFeatures & features) const;
72 virtual Inset * clone() const;