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 {
23 explicit MathFracInset(bool atop = false);
25 virtual std::auto_ptr<InsetBase> clone() const;
27 void metrics(MetricsInfo & mi, Dimension & dim) const;
29 void draw(PainterInfo &, int x, int y) const;
31 void metricsT(TextMetricsInfo const & mi, Dimension & dim) const;
33 void drawT(TextPainter &, int x, int y) const;
34 /// identifies FracInsets
35 MathFracInset * asFracInset();
36 /// identifies FracInsets
37 MathFracInset const * asFracInset() const;
39 std::string name() const;
42 void write(WriteStream & os) const;
44 void maple(MapleStream &) const;
46 void mathematica(MathematicaStream &) const;
48 void octave(OctaveStream &) const;
50 void mathmlize(MathMLStream &) const;