4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS.
17 Wrapper for MathInset * with copy-semantics
21 The 'atom' is the major blob in math typesetting. And 'atom' consists
22 of a nucleus, an optional superscript, and an optional subscript.
24 Exactly where the subscript and superscript are drawn depends on the
25 size, and type, of the nucleus they are attached to.
31 Ok: Implementing it thusly is not feasible since cursor movement gets
32 hackish. We use MathAtom only as a wrapper around MathInset * with value
35 The MathAtom owns the MathInset * and is responsible for proper cloning and
36 destruction. Every MathInset * should be put into a MathAtom after its
37 creation as soon as possible.
48 /// default constructor, object is useless, but we need it to put it into
51 /// the "real constructor"
52 explicit MathAtom(InsetBase * p);
53 /// copy constructor, invokes nucleus_->clone()
54 MathAtom(MathAtom const &);
55 /// we really need to clean up
57 /// assignment invokes nucleus_->clone()
58 MathAtom & operator=(MathAtom const &);
59 /// access to the inset (checked with gprof)
60 MathInset * nucleus() { return nucleus_; }
61 MathInset const * nucleus() const { return nucleus_; }
62 /// access to the inset
63 MathInset const * operator->() const { return nucleus_; }
65 /// width cache. Not nice...