3 * \file math_fracinset.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 "math_fracbase.h"
19 /// Fraction like objects (frac, binom)
20 class MathFracInset : public MathFracbaseInset {
31 explicit MathFracInset(Kind kind = FRAC);
33 void metrics(MetricsInfo & mi, Dimension & dim) const;
35 void draw(PainterInfo &, int x, int y) const;
37 void metricsT(TextMetricsInfo const & mi, Dimension & dim) const;
39 void drawT(TextPainter &, int x, int y) const;
40 /// identifies FracInsets
41 MathFracInset * asFracInset();
42 /// identifies FracInsets
43 MathFracInset const * asFracInset() const;
45 std::string name() const;
47 bool extraBraces() const;
50 void write(WriteStream & os) const;
52 void maple(MapleStream &) const;
54 void mathematica(MathematicaStream &) const;
56 void octave(OctaveStream &) const;
58 void mathmlize(MathMLStream &) const;
60 void validate(LaTeXFeatures & features) const;
62 virtual std::auto_ptr<InsetBase> doClone() const;