]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/beam.hh
patch::: 1.5.40.jcn1
[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
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   DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
29   DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM ));
30   DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM ));
31   DECLARE_SCHEME_CALLBACK (end_after_line_breaking, (SCM));
32
33   /* position callbacks */
34   DECLARE_SCHEME_CALLBACK (least_squares, (SCM));
35   DECLARE_SCHEME_CALLBACK (check_concave, (SCM));
36   DECLARE_SCHEME_CALLBACK (slope_damping, (SCM));
37   DECLARE_SCHEME_CALLBACK (quantise_position, (SCM));
38
39   static Molecule stem_beams (Grob*,Item *here, Item *next, Item *prev,
40                               Real dydx);
41
42 private:
43   static Direction get_default_dir (Grob*);
44   static void set_stem_directions (Grob*);
45   static void consider_auto_knees (Grob*);
46   static void set_stem_shorten (Grob*);
47   static Real calc_stem_y_f (Grob*, Item* s, Interval pos);
48   static Real check_stem_length_f (Grob*, Interval pos);
49   static void set_stem_lengths (Grob*);
50   static Interval quantise_interval (Grob*, Interval pos, Direction quant_dir);
51   static int forced_stem_count (Grob*);
52 };
53
54 #endif /* BEAM_HH */
55