]> git.lyx.org Git - lyx.git/blob - src/mathed/math_atom.h
some support for matrix operations with maple ('M-x math-extern maple evalm')
[lyx.git] / src / mathed / math_atom.h
1 // -*- C++ -*-
2
3 #ifndef MATH_ATOM_H
4 #define MATH_ATOM_H
5
6 #ifdef __GNUG__
7 #pragma interface
8 #endif
9
10 /** 
11 The 'atom' is the major blob in math typesetting.  And 'atom' consists
12 of a nucleus, an optional superscript, and an optional subscript.
13
14 Exactly where the subscript and superscript are drawn depends on the
15 size, and type, of the nucleus they are attached to.  
16
17 Jules
18
19 --
20
21 Ok: Implementing it thusly is not feasible since cursor movement gets
22 hackish. We use MathAtom only as a wrapper around MathInset * with value
23 semantics.
24
25 Andre'
26
27 */
28
29 class MathInset;
30
31 class MathAtom {
32 public: 
33         ///
34         MathAtom();
35         ///
36         MathAtom(MathAtom const &);
37         ///
38         explicit MathAtom(MathInset * p);
39         /// 
40         virtual ~MathAtom(); 
41         ///
42         void operator=(MathAtom const &);
43         ///
44         void reset(MathInset * p);
45         ///
46         MathInset * nucleus() const;
47         ///
48         MathInset * operator->() const;
49
50 private:
51         ///
52         MathInset * nucleus_;
53
54         /// raw copy
55         void copy(MathAtom const & p);
56         /// raw destruction
57         void done();
58 };
59
60 #endif