]> git.lyx.org Git - lyx.git/blob - src/mathed/math_root.h
first go at mathed file cleanup
[lyx.git] / src / mathed / math_root.h
1 // -*- C++ -*-
2 /*
3  *  File:        math_root.h
4  *  Purpose:     Declaration of the root object 
5  *  Author:      Alejandro Aguilar Sierra <asierra@servidor.unam.mx> 
6  *  Created:     January 1999
7  *  Description: Root math object
8  *
9  *  Copyright: 1999 Alejandro Aguilar Sierra
10  *
11  *   You are free to use and modify this code under the terms of
12  *   the GNU General Public Licence version 2 or later.
13  */
14
15 #ifndef MATH_ROOT
16 #define MATH_ROOT
17
18 #ifdef __GNUG__
19 #pragma interface
20 #endif
21
22 #include "math_sqrtinset.h"
23 #include "symbol_def.h"
24 #include "LString.h"
25
26 ///
27 class MathRootInset: public MathSqrtInset {
28 public:
29     ///
30     explicit
31     MathRootInset(short st = LM_ST_TEXT);
32     ///
33     ~MathRootInset();
34     ///
35     MathedInset * Clone();
36     ///
37     void draw(Painter &, int x, int baseline);
38     ///
39     void Write(std::ostream &, bool fragile);
40     ///
41     void Metrics();
42     ///
43     bool Inside(int, int);
44     ///
45     void SetFocus(int, int);
46     ///
47     void SetData(MathedArray *);
48     ///
49     void GetXY(int & x, int & y) const;
50     ///
51     MathedArray * GetData();
52     ///
53     bool setArgumentIdx(int i);
54     ///
55     int getArgumentIdx() const { return idx; }
56     ///
57     int getMaxArgumentIdx() const { return 1; }
58     ///
59     void SetStyle(short);
60
61 protected:
62     ///
63     int idx;
64     ///
65     MathParInset * uroot;
66     ///
67     int wroot, dh;
68 };
69 #endif