2001-09-11 10:58:17 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
|
|
|
|
#ifndef MATH_ATOM_H
|
|
|
|
#define MATH_ATOM_H
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
The 'atom' is the major blob in math typesetting. And 'atom' consists
|
|
|
|
of a nucleus, an optional superscript, and an optional subscript.
|
|
|
|
|
|
|
|
Exactly where the subscript and superscript are drawn depends on the
|
|
|
|
size, and type, of the nucleus they are attached to.
|
|
|
|
|
|
|
|
Jules
|
2001-10-23 09:03:07 +00:00
|
|
|
|
|
|
|
--
|
|
|
|
|
|
|
|
Ok: Implementing it thusly is not feasible since cursor movement gets
|
|
|
|
hackish. We use MathAtom only as a wrapper around MathInset * with value
|
|
|
|
semantics.
|
|
|
|
|
|
|
|
Andre'
|
|
|
|
|
2001-09-11 10:58:17 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
class MathInset;
|
|
|
|
|
|
|
|
class MathAtom {
|
|
|
|
public:
|
|
|
|
///
|
|
|
|
MathAtom();
|
|
|
|
///
|
|
|
|
MathAtom(MathAtom const &);
|
|
|
|
///
|
|
|
|
explicit MathAtom(MathInset * p);
|
|
|
|
///
|
|
|
|
virtual ~MathAtom();
|
|
|
|
///
|
|
|
|
void operator=(MathAtom const &);
|
|
|
|
///
|
2001-10-12 12:02:49 +00:00
|
|
|
MathInset * nucleus() const;
|
2001-09-11 10:58:17 +00:00
|
|
|
///
|
2001-10-12 12:02:49 +00:00
|
|
|
MathInset * operator->() const;
|
2001-09-11 10:58:17 +00:00
|
|
|
|
2001-10-12 12:02:49 +00:00
|
|
|
private:
|
2001-09-11 10:58:17 +00:00
|
|
|
///
|
|
|
|
MathInset * nucleus_;
|
|
|
|
|
|
|
|
/// raw copy
|
|
|
|
void copy(MathAtom const & p);
|
|
|
|
/// raw destruction
|
|
|
|
void done();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|