]> git.lyx.org Git - lyx.git/blob - src/mathed/math_root.h
merge from the string-switch branch and ready for a prelease.
[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: (c) 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 <stdio.h>
23 #include "math_defs.h"
24 #include "math_inset.h"
25 #include "symbol_def.h"
26 #include "LString.h"
27
28
29 ///
30 class MathRootInset: public MathSqrtInset {
31  public:
32     ///
33     MathRootInset(short st=LM_ST_TEXT);
34     ///
35     //    MathRootInset(MathSqrtInset &);
36     ///
37     ~MathRootInset();
38     ///
39     MathedInset *Clone();
40     ///
41     void Draw(int x, int baseline);
42     ///
43     void Write(FILE *file);
44     ///
45     void Write(string &file);
46     ///
47     void Metrics();
48     ///
49     bool Inside(int, int);
50     ///
51     void SetFocus(int,int);
52     ///
53     void SetData(LyxArrayBase*);
54     ///
55     void GetXY(int& x, int& y) const;
56     ///
57     LyxArrayBase * GetData();
58     ///
59     bool setArgumentIdx(int i);
60     ///
61     int  getArgumentIdx() { return idx; }
62     ///
63     int  getMaxArgumentIdx() { return 1; }
64     ///
65     void  SetStyle(short);
66
67  protected:
68     ///
69     int idx;
70     ///
71     MathParInset *uroot;
72     ///
73     int wroot, dh;
74 };
75
76
77 #endif