mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 13:46:43 +00:00
86c2cf6f65
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2999 a592a061-630c-0410-9148-cb99ea01b6c8
63 lines
1018 B
C++
63 lines
1018 B
C++
// -*- 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
|
|
|
|
--
|
|
|
|
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'
|
|
|
|
*/
|
|
|
|
class MathInset;
|
|
|
|
class MathAtom {
|
|
public:
|
|
///
|
|
MathAtom();
|
|
///
|
|
MathAtom(MathAtom const &);
|
|
///
|
|
explicit MathAtom(MathInset * p);
|
|
///
|
|
virtual ~MathAtom();
|
|
///
|
|
void operator=(MathAtom const &);
|
|
///
|
|
void reset(MathInset * p);
|
|
///
|
|
bool hasNucleus() const;
|
|
///
|
|
MathInset * nucleus() const;
|
|
///
|
|
MathInset * operator->() const;
|
|
|
|
private:
|
|
///
|
|
MathInset * nucleus_;
|
|
|
|
/// raw copy
|
|
void copy(MathAtom const & p);
|
|
/// raw destruction
|
|
void done();
|
|
};
|
|
|
|
#endif
|