]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/molecule.hh
release: 1.1.28
[lilypond.git] / lily / include / molecule.hh
1 /*
2   molecule.hh -- declare Molecule
3
4   source file of the GNU LilyPond music typesetter
5
6   (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
8 #ifndef MOLECULE_HH
9 #define MOLECULE_HH
10
11 #include "lily-proto.hh"
12 #include "plist.hh"
13 #include "box.hh"
14 #include "axes.hh"
15 #include "direction.hh"
16 #include "protected-scm.hh"
17 #include "cons.hh"
18
19 /** a group of individually translated symbols. You can add molecules
20     to the top, to the right, etc.  */
21 class Molecule {
22   //  Protected_scm atom_list_; // change to List<Atom>?
23   Killing_cons<Atom> *atom_list_;
24   friend class Paper_outputter;
25 public:
26   Box dim_;
27
28   Molecule();
29   ~Molecule();
30
31   void add_at_edge (Axis a, Direction d, const Molecule &m, Real padding);
32   
33   void add_molecule (Molecule const &m);
34   void translate (Offset);
35   void do_center (Axis);
36   void translate_axis (Real,Axis);
37   
38   void add_atom (Atom const *a);
39   /// how big is #this#? 
40   Box extent() const;
41   Interval extent (Axis) const;
42
43   Molecule (const Molecule&s);
44   void print() const;
45   void operator=(const Molecule&);  
46 };
47 #endif