X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Fmolecule.hh;h=7907be0ae440c479d588b73aa08716a397c6a800;hb=ae0a8ce9764d714e026ed7c6f24502ac10df3797;hp=0ccb399a03a1de60ad2f8224e6cb0089e3cc6bbf;hpb=04f01c7e890bd4f1b358378e5911fb7c117c3802;p=lilypond.git diff --git a/lily/include/molecule.hh b/lily/include/molecule.hh index 0ccb399a03..7907be0ae4 100644 --- a/lily/include/molecule.hh +++ b/lily/include/molecule.hh @@ -1,57 +1,41 @@ +/* + molecule.hh -- declare Molecule + + source file of the GNU LilyPond music typesetter + + (c) 1997--1998 Han-Wen Nienhuys +*/ #ifndef MOLECULE_HH #define MOLECULE_HH #include "lily-proto.hh" #include "plist.hh" -#include "boxes.hh" -#include "symbol.hh" - -/// a symbol which can be translated, and freely copied -struct Atom { - Offset off; - Symbol sym; - - /* *************** */ - - void translate(Offset o) { - off += o; - } - - /// how big is #this#? - Box extent() const; - Atom(Symbol s); - - void print() const; - - String TeX_string() const; -}; - +#include "box.hh" +#include "axes.hh" +#include "direction.hh" /** a group of individually translated symbols. You can add molecules to the top, to the right, etc. */ struct Molecule { - Pointer_list ats; // change to List? + Pointer_list atoms_; // change to List? - /* *************** */ - Molecule() { } - Molecule(Atom a) { add(a) ; } - - void add_right(const Molecule &m); - void add_left(const Molecule &m); - void add_top(const Molecule &m); - void add_bottom(const Molecule &m); - void add(Molecule const &m); - void translate(Offset); - void add(Atom a) { ats.bottom().add(new Atom(a)); } - /// how big is #this#? - Box extent() const; - - String TeX_string() const; - - Molecule(const Molecule&s); - void print() const; + Molecule() { } + Molecule (Atom const &a); + + void add_at_edge (Axis a, Direction d, const Molecule &m); + + void add_molecule (Molecule const &m); + void translate (Offset); + void translate_axis (Real,Axis); + void add_atom (Atom const & a) ; + /// how big is #this#? + Box extent() const; + + + Molecule (const Molecule&s); + void print() const; private: - void operator=(const Molecule&); + void operator=(const Molecule&); }; #endif