]> git.lyx.org Git - lyx.git/blob - src/mathed/math_root.h
fix "make dist" target
[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 #include "math_sqrtinset.h"
19 #include "symbol_def.h"
20
21 #ifdef __GNUG__
22 #pragma interface
23 #endif
24
25 /** The general n-th root inset.
26     \author Alejandro Aguilar Sierra
27     \version January 1999
28  */
29 class MathRootInset : public MathSqrtInset {
30 public:
31         ///
32         explicit
33         MathRootInset(short st = LM_ST_TEXT);
34         ///
35         MathedInset * Clone();
36         ///
37         void draw(Painter &, int x, int baseline);
38         ///
39         void Write(std::ostream &, bool fragile);
40         ///
41         void WriteNormal(std::ostream &);
42         ///
43         void Metrics();
44         ///
45         bool Inside(int, int);
46         ///
47         void SetFocus(int, int);
48         ///
49         void setData(MathedArray const &);
50         ///
51         void GetXY(int & x, int & y) const;
52         ///
53         MathedArray & GetData();
54         ///
55         MathedArray const & GetData() const;
56         ///
57         bool setArgumentIdx(int i);
58         ///
59         int getArgumentIdx() const;
60         ///
61         int getMaxArgumentIdx() const;
62         ///
63         void SetStyle(short);
64 private:
65         ///
66         int idx_;
67         ///
68         MathParInset uroot_;
69         ///
70         int wroot_;
71         ///
72         int dh_;
73 };
74
75 #endif