]> git.lyx.org Git - lyx.git/blob - src/mathed/math_spaceinset.h
Make Helge happy: no more crash on arrow up/down in math macro
[lyx.git] / src / mathed / math_spaceinset.h
1 // -*- C++ -*-
2 /**
3  * \file math_spaceinset.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author André Pönitz
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef MATH_SPACEINSET_H
13 #define MATH_SPACEINSET_H
14
15 #include "math_inset.h"
16
17
18 /// Smart spaces
19 class MathSpaceInset : public MathInset {
20 public:
21         ///
22         explicit MathSpaceInset(int sp);
23         ///
24         explicit MathSpaceInset(std::string const & name);
25         ///
26         MathSpaceInset const * asSpaceInset() const { return this; }
27         ///
28         MathSpaceInset * asSpaceInset() { return this; }
29         ///
30         void incSpace();
31         ///
32         int ascent() const;
33         ///
34         int descent() const;
35         ///
36         int width() const;
37         ///
38         void metrics(MetricsInfo & mi, Dimension & dim) const;
39         ///
40         void draw(PainterInfo & pi, int x, int y) const;
41
42         ///
43         void normalize(NormalStream &) const;
44         ///
45         void validate(LaTeXFeatures & features) const;
46         ///
47         void maple(MapleStream &) const;
48         ///
49         void mathematica(MathematicaStream &) const;
50         ///
51         void octave(OctaveStream &) const;
52         ///
53         void write(WriteStream & os) const;
54 private:
55         virtual std::auto_ptr<InsetBase> doClone() const;
56         ///
57         int space_;
58 };
59 #endif