]> git.lyx.org Git - lyx.git/blob - src/mathed/InsetMathFrac.h
Rename files in src/mathed and src/graphics from .C to .cpp, step 2
[lyx.git] / src / mathed / InsetMathFrac.h
1 // -*- C++ -*-
2 /**
3  * \file InsetMathFrac.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 "InsetMathFracBase.h"
17
18
19 namespace lyx {
20
21
22 /// Fraction like objects (frac, binom)
23 class InsetMathFrac : public InsetMathFracBase {
24 public:
25         ///
26         enum Kind {
27                 FRAC,
28                 OVER,
29                 ATOP,
30                 NICEFRAC
31         };
32
33         ///
34         explicit InsetMathFrac(Kind kind = FRAC);
35         ///
36         bool metrics(MetricsInfo & mi, Dimension & dim) const;
37         ///
38         void draw(PainterInfo &, int x, int y) const;
39         ///
40         void metricsT(TextMetricsInfo const & mi, Dimension & dim) const;
41         ///
42         void drawT(TextPainter &, int x, int y) const;
43         /// identifies FracInsets
44         InsetMathFrac * asFracInset();
45         /// identifies FracInsets
46         InsetMathFrac const * asFracInset() const;
47         ///
48         docstring name() const;
49         ///
50         bool extraBraces() const;
51
52         ///
53         void write(WriteStream & os) const;
54         ///
55         void maple(MapleStream &) const;
56         ///
57         void mathematica(MathematicaStream &) const;
58         ///
59         void octave(OctaveStream &) const;
60         ///
61         void mathmlize(MathStream &) const;
62         ///
63         void validate(LaTeXFeatures & features) const;
64 public:
65         virtual std::auto_ptr<InsetBase> doClone() const;
66         ///
67         Kind kind_;
68 };
69
70
71
72 } // namespace lyx
73 #endif