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 {
30 explicit MathFracInset(Kind kind = FRAC);
32 void metrics(MetricsInfo & mi, Dimension & dim) const;
34 void draw(PainterInfo &, int x, int y) const;
36 void metricsT(TextMetricsInfo const & mi, Dimension & dim) const;
38 void drawT(TextPainter &, int x, int y) const;
39 /// identifies FracInsets
40 MathFracInset * asFracInset();
41 /// identifies FracInsets
42 MathFracInset const * asFracInset() const;
44 std::string name() const;
47 void write(WriteStream & os) const;
49 void maple(MapleStream &) const;
51 void mathematica(MathematicaStream &) const;
53 void octave(OctaveStream &) const;
55 void mathmlize(MathMLStream &) const;
57 void validate(LaTeXFeatures & features) const;
59 virtual std::auto_ptr<InsetBase> doClone() const;