]> git.donarmstrong.com Git - lilypond.git/blob - hdr/beam.hh
release: 0.0.26
[lilypond.git] / hdr / beam.hh
1 /*
2   beam.hh -- part of LilyPond
3
4   (c) 1996,97 Han-Wen Nienhuys
5 */
6
7 #ifndef BEAM_HH
8 #define BEAM_HH
9 #include "proto.hh"
10 #include "directionalspanner.hh"
11 #include "plist.hh"
12
13 /// a beam connects multiple stems 
14 struct Beam:  public Directional_spanner {
15     PointerList<Stem*> stems;
16     Real slope;
17     Real left_pos;
18     /// dir: -1 below heads, +1 above heads.
19
20     /****************/
21     const char * name() const;
22     
23     virtual Interval width()const;    
24     Offset center() const;
25     Spanner *do_break_at(PCol *,  PCol *) const;
26     Beam();
27     void add(Stem*);
28     
29
30     void set_default_dir();
31     void do_pre_processing();
32     void do_post_processing();
33
34     void do_print() const;
35     void set_grouping(Rhythmic_grouping def, Rhythmic_grouping current);
36     void set_stemlens();
37     ~Beam();
38
39 private:
40     Molecule stem_beams(Stem *here, Stem *next, Stem *prev)const;
41     void solve_slope();
42     Molecule*brew_molecule_p()const;
43 };
44 /** Beam adjusts the stems its owns to make sure that they reach the
45   beam and that point in the correct direction */
46
47 #endif // BEAM_HH
48