lilypond-0.0.39
[lilypond.git] / lily / include / beam.hh
blob8eb2f148b557b2af4a50357362d6f473aa1ea9b8
1 /*
2 beam.hh -- part of LilyPond
4 (c) 1996,97 Han-Wen Nienhuys
5 */
7 #ifndef BEAM_HH
8 #define BEAM_HH
9 #include "proto.hh"
10 #include "directional-spanner.hh"
11 #include "plist.hh"
13 /** a beam connects multiple stems Beam adjusts the stems its owns to
14 make sure that they reach the beam and that point in the correct
15 direction */
16 struct Beam: public Directional_spanner {
17 PointerList<Stem*> stems;
18 /// the slope of the beam in posns / point (dimension)
19 Real slope;
21 /// position of leftmost end of beam
22 Real left_pos;
25 /* *************** */
26 NAME_MEMBERS(Beam);
28 virtual Interval width()const;
29 Offset center() const;
30 Spanner *do_break_at(PCol *, PCol *) const;
31 Beam();
32 void add(Stem*);
35 void set_default_dir();
36 void do_pre_processing();
37 void do_post_processing();
39 void do_print() const;
40 void set_grouping(Rhythmic_grouping def, Rhythmic_grouping current);
41 void set_stemlens();
42 ~Beam();
44 private:
45 Molecule stem_beams(Stem *here, Stem *next, Stem *prev)const;
46 void solve_slope();
47 Molecule*brew_molecule_p()const;
50 #endif // BEAM_HH