]> git.lyx.org Git - lyx.git/blob - src/mathed/math_scriptinset.h
LyX Drinkers Union: patch 1
[lyx.git] / src / mathed / math_scriptinset.h
1 // -*- C++ -*-
2 #ifndef MATH_SCRIPTINSET_H
3 #define MATH_SCRIPTINSET_H
4
5 #include "math_inset.h"
6
7 #ifdef __GNUG__
8 #pragma interface
9 #endif
10
11 /** Inset for super- and subscripts
12     \author André Pönitz
13  */
14
15 class MathScriptInset : public MathInset {
16 public:
17         ///
18         MathScriptInset();
19         ///
20         MathScriptInset(bool up, bool down);
21         ///
22         MathInset * Clone() const;
23         ///
24         void Write(std::ostream &, bool fragile) const;
25         ///
26         void WriteNormal(std::ostream &) const;
27         ///
28         void Metrics(MathStyles st);
29         ///
30         void draw(Painter &, int x, int baseline);
31         ///
32         bool idxUp(int & idx, int & pos) const;
33         ///
34         bool idxDown(int & idx, int & pos) const;
35         ///
36         bool idxLeft(int & idx, int & pos) const;
37         ///
38         bool idxRight(int & idx, int & pos) const;
39         ///
40         bool idxFirst(int & idx, int & pos) const;
41         ///
42         bool idxLast(int & idx, int & pos) const;
43         ///
44         bool up() const;
45         ///
46         bool down() const;
47         ///
48         void up(bool);
49         ///
50         void down(bool);
51 private:
52         ///
53         bool up_;
54         ///
55         bool down_;
56 };
57
58 #endif