2 This file is part of LilyPond, the GNU music typesetter.
4 Copyright (C) 1996--2009 Han-Wen Nienhuys
6 LilyPond is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 LilyPond is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
23 #include "std-vector.hh"
24 #include "lily-proto.hh"
25 #include "stem-info.hh"
26 #include "grob-interface.hh"
31 static vector
<int> note_head_positions (Grob
*);
32 static int duration_log (Grob
*);
33 static void set_beaming (Grob
*, int, Direction d
);
34 static int get_beaming (Grob
*, Direction d
);
35 static Spanner
*get_beam (Grob
*);
36 static Grob
*first_head (Grob
*);
37 static Grob
*last_head (Grob
*);
38 static Drul_array
<Grob
*> extremal_heads (Grob
*);
39 static Grob
*support_head (Grob
*);
40 static void add_head (Grob
*me
, Grob
*n
);
41 static Stem_info
get_stem_info (Grob
*);
42 static Real
chord_start_y (Grob
*);
43 static void set_stemend (Grob
*, Real
);
44 static Slice
beam_multiplicity (Grob
*);
45 static Direction
get_default_dir (Grob
*);
46 static Real
thickness (Grob
*);
47 static int head_count (Grob
*);
48 static bool is_invisible (Grob
*);
49 static bool is_normal_stem (Grob
*);
50 static bool is_cross_staff (Grob
*);
51 static Interval
head_positions (Grob
*);
52 static Real
stem_end_position (Grob
*);
53 static Stencil
flag (Grob
*);
54 static Stencil
get_translated_flag (Grob
*);
55 DECLARE_GROB_INTERFACE();
56 static void set_spacing_hints (Grob
*);
58 DECLARE_SCHEME_CALLBACK (print
, (SCM
));
59 DECLARE_SCHEME_CALLBACK (calc_default_direction
, (SCM
));
60 DECLARE_SCHEME_CALLBACK (offset_callback
, (SCM element
));
61 DECLARE_SCHEME_CALLBACK (calc_direction
, (SCM
));
62 DECLARE_SCHEME_CALLBACK (calc_beaming
, (SCM
));
63 DECLARE_SCHEME_CALLBACK (calc_length
, (SCM
));
64 DECLARE_SCHEME_CALLBACK (calc_stem_end_position
, (SCM
));
65 DECLARE_SCHEME_CALLBACK (calc_stem_info
, (SCM
));
66 DECLARE_SCHEME_CALLBACK (calc_positioning_done
, (SCM
));
67 DECLARE_SCHEME_CALLBACK (width
, (SCM smob
));
68 DECLARE_SCHEME_CALLBACK (pure_height
, (SCM
, SCM
, SCM
));
69 DECLARE_SCHEME_CALLBACK (height
, (SCM
));
70 DECLARE_SCHEME_CALLBACK (calc_cross_staff
, (SCM
));
71 DECLARE_SCHEME_CALLBACK (calc_flag
, (SCM
));