2 beam.hh -- part of GNU LilyPond
4 (c) 1996--1999 Han-Wen Nienhuys
10 #include "lily-proto.hh"
11 #include "directional-spanner.hh"
12 #include "stem-info.hh"
15 /** a beam connects multiple stems.
17 Beam adjusts the stems its owns to make sure that they reach the
18 beam and that point in the correct direction
22 damping: amount of beam slope damping. (int)
24 should beam slope be damped? 0: no, 1: yes, 100000: horizontal beams
26 slope_quantisation: 'none, 'normal or 'traditional
29 class Beam : public Directional_spanner {
32 int stem_count ()const;
33 Stem * stem (int )const;
36 the slope of the beam in (staffpositions) per (X-dimension, in PT).
37 UGH. standardise this for once and for all.
41 /// position of leftmost end of beam
45 /// maximum number of beams (for opening-up of beam-spacing)
48 Array<Stem_info> sinfo_;
51 void add_stem (Stem*);
52 Stem_info get_stem_info (Stem*);
54 void set_grouping (Rhythmic_grouping def, Rhythmic_grouping current);
55 void set_beaming (Beaming_info_list *);
57 VIRTUAL_COPY_CONS(Score_element);
60 Offset center () const;
61 Direction get_default_dir () const;
62 void set_direction (Direction);
64 bool auto_knee (SCM gap, bool interstaff_b);
67 virtual void do_pre_processing ();
68 virtual void do_post_processing ();
69 virtual void do_add_processing ();
70 virtual void do_print() const;
71 virtual Molecule*do_brew_molecule_p () const;
73 Molecule stem_beams (Stem *here, Stem *next, Stem *prev) const;
76 void calculate_slope ();
77 Real check_stemlengths_f (bool set_b);
80 void quantise_left_y (bool extend_b);