2 staffelem.hh -- part of LilyPond
4 (c) 1996,97 Han-Wen Nienhuys
12 #include "molecule.hh"
16 ORPHAN, // not yet added to pstaff
17 VIRGIN, // added to pstaff
18 PRECALCED, // calcs before spacing done
19 POSTCALCED, // after spacing calcs done
20 OUTPUT, // molecule has been output
23 Array<Staff_elem*> dependencies;
25 /// the pstaff it is in
29 Staff_elem(Staff_elem const&);
30 String TeXstring () const ;
31 virtual void print() const;
32 virtual Interval width() const;
33 virtual Interval height() const;
34 Paperdef *paper() const;
35 virtual ~Staff_elem();
38 void translate(Offset);
39 void add_processing();
40 void pre_processing();
41 void post_processing();
42 void molecule_processing();
45 /// generate the molecule
46 virtual Molecule* brew_molecule()const=0;
47 ///executed directly after the item is added to the PScore
48 virtual void do_add_processing();
49 /// do calculations before determining horizontal spacing
50 virtual void do_pre_processing();
52 /// do calculations after determining horizontal spacing
53 virtual void do_post_processing();
56 /// member: the symbols
57 Molecule *output; // should scrap, and use temp var?
62 This is needed, because #output# may still be
66 /** Both Spanner and Item are Staff_elem's. Most Staff_elem's depend
67 on other Staff_elem's, eg, Beam needs to know and set direction of
68 Stem. So the Beam has to be calculated *before* Stem. This is
69 accomplished with the dependencies field of struct Staff_elem.
72 #endif // STAFFELEM_HH