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