]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/beam.hh
* lily/beam.cc (score_stem_lengths): Bugfix for knees: use correct
[lilypond.git] / lily / include / beam.hh
1 /*
2   beam.hh -- part of GNU LilyPond
3
4   (c) 1996--2002 Han-Wen Nienhuys
5 */
6
7 #ifndef BEAM_HH
8 #define BEAM_HH
9
10 #include "lily-proto.hh"
11 #include "lily-guile.hh"
12 #include "stem-info.hh"
13
14
15 class Beam
16 {
17 public:
18   static int visible_stem_count (Grob*);
19   static Item* first_visible_stem (Grob*);
20   static Item* last_visible_stem (Grob*);
21   static bool has_interface (Grob*);
22   DECLARE_SCHEME_CALLBACK (rest_collision_callback, (SCM element, SCM axis));
23   Beam (SCM);
24   static void add_stem (Grob*,Grob*);
25   static void set_beaming (Grob*,Beaming_info_list *);
26   static void set_stemlens (Grob*);
27   static int get_multiplicity (Grob*me);
28   static Real get_interbeam (Grob*me);
29   DECLARE_SCHEME_CALLBACK (space_function, (SCM, SCM));
30   DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM));
31   DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM));
32   DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM));
33
34   /* position callbacks */
35   DECLARE_SCHEME_CALLBACK (least_squares, (SCM));
36   DECLARE_SCHEME_CALLBACK (check_concave, (SCM));
37   DECLARE_SCHEME_CALLBACK (slope_damping, (SCM));
38   DECLARE_SCHEME_CALLBACK (quanting, (SCM));
39   static Real score_slopes_dy (Grob*, Real,Real,Real,Real);
40   static Real score_stem_lengths (Link_array<Grob>,
41                                   Array<Stem_info>,
42                                   Array<Real>, Array<Real>, 
43                                   bool,Grob*,Real , Real);
44   static Real score_forbidden_quants (Grob*, Real, Real,
45                                       Real, Real, Real, Real,
46                                       int, Direction, Direction);
47   
48   
49   static Molecule stem_beams (Grob*,Item *here, Item *next, Item *prev,
50                               Real dydx);
51
52 private:
53   static Direction get_default_dir (Grob*);
54   static void set_stem_directions (Grob*, Direction );
55   static void consider_auto_knees (Grob*, Direction d);
56   static void set_stem_shorten (Grob*);
57   static Real calc_stem_y (Grob*, Grob* s, Interval pos, bool correct);
58   static void set_stem_lengths (Grob*);
59   static int forced_stem_count (Grob*);
60 };
61
62 #endif /* BEAM_HH */
63