]> git.lyx.org Git - lyx.git/blob - src/mathed/math_fracinset.h
Fix to bug 2362: Deleting superscript also deletes subscript.
[lyx.git] / src / mathed / math_fracinset.h
1 // -*- C++ -*-
2 /**
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.
6  *
7  * \author Alejandro Aguilar Sierra
8  * \author André Pönitz
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef MATH_FRACINSET_H
14 #define MATH_FRACINSET_H
15
16 #include "math_fracbase.h"
17
18
19 /// Fraction like objects (frac, binom)
20 class MathFracInset : public MathFracbaseInset {
21 public:
22         ///
23         explicit MathFracInset(bool atop = false);
24         ///
25         void metrics(MetricsInfo & mi, Dimension & dim) const;
26         ///
27         void draw(PainterInfo &, int x, int y) const;
28         ///
29         void metricsT(TextMetricsInfo const & mi, Dimension & dim) const;
30         ///
31         void drawT(TextPainter &, int x, int y) const;
32         /// identifies FracInsets
33         MathFracInset * asFracInset();
34         /// identifies FracInsets
35         MathFracInset const * asFracInset() const;
36         ///
37         std::string name() const;
38
39         ///
40         void write(WriteStream & os) const;
41         ///
42         void maple(MapleStream &) const;
43         ///
44         void mathematica(MathematicaStream &) const;
45         ///
46         void octave(OctaveStream &) const;
47         ///
48         void mathmlize(MathMLStream &) const;
49 public:
50         virtual std::auto_ptr<InsetBase> doClone() const;
51         ///
52         bool const atop_;
53 };
54
55 #endif