]> git.lyx.org Git - lyx.git/blob - src/mathed/math_fracinset.h
get rid of several friends small cleanup
[lyx.git] / src / mathed / math_fracinset.h
1 #ifndef MATH_FRACINSET_H
2 #define MATH_FRACINSET_H
3
4 #include "math_parinset.h"
5
6 /// Fraction like objects (frac, stackrel, binom) 
7 class MathFracInset: public MathParInset {
8 public:
9         ///
10         MathFracInset(short ot = LM_OT_FRAC);
11         ///
12         ~MathFracInset();
13         ///
14         MathedInset * Clone();
15         ///
16         void draw(Painter &, int x, int baseline);
17         ///
18         void Write(std::ostream &, bool fragile);
19         ///
20         void Metrics();
21         
22         /** This does the same that SetData(MathedArray*) but for both
23             numerator and denominator at once.
24         */
25         void SetData(MathedArray *, MathedArray *);
26         ///
27         void SetData(MathedArray *);
28         ///
29         void GetXY(int & x, int & y) const;
30         ///
31         void SetFocus(int, int);
32         ///
33         bool Inside(int, int);
34         ///
35         MathedArray * GetData();
36         ///
37         bool setArgumentIdx(int i); // was bool Up/down(void);
38         ///
39         int getArgumentIdx() const { return idx; }
40         ///
41         int getMaxArgumentIdx() const { return 1; }
42         ///
43         void  SetStyle(short);
44 protected:
45         ///
46         int idx;
47         ///
48         MathParInset * den;
49         ///
50         int w0, w1, des0, dh;
51 };
52 #endif