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 {
34 explicit InsetMathFrac(Kind kind = FRAC);
36 bool metrics(MetricsInfo & mi, Dimension & dim) const;
38 void draw(PainterInfo &, int x, int y) const;
40 void metricsT(TextMetricsInfo const & mi, Dimension & dim) const;
42 void drawT(TextPainter &, int x, int y) const;
43 /// identifies FracInsets
44 InsetMathFrac * asFracInset();
45 /// identifies FracInsets
46 InsetMathFrac const * asFracInset() const;
48 docstring name() const;
50 bool extraBraces() const;
53 void write(WriteStream & os) const;
55 void maple(MapleStream &) const;
57 void mathematica(MathematicaStream &) const;
59 void octave(OctaveStream &) const;
61 void mathmlize(MathStream &) const;
63 void validate(LaTeXFeatures & features) const;
65 virtual std::auto_ptr<InsetBase> doClone() const;