]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/staff-symbol-referencer.hh
Merge branch 'jneeman' of git+ssh://jneem@git.sv.gnu.org/srv/git/lilypond into jneeman
[lilypond.git] / lily / include / staff-symbol-referencer.hh
1 /*
2   staff-sym-referencer.hh -- declare staff_symbol_referencer
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1999--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
7 */
8
9 #ifndef STAFF_SYMBOL_REFERENCER_HH
10 #define STAFF_SYMBOL_REFERENCER_HH
11
12 #include "grob-interface.hh"
13 #include "lily-proto.hh"
14
15 /**
16    A notation object that needs access to variables of the staff (no
17    lines, leading).
18 */
19 class Staff_symbol_referencer
20 {
21 public:
22   DECLARE_GROB_INTERFACE();
23   static bool ugly_hack (Grob *);
24   static void set_position (Grob *, Real);
25   DECLARE_SCHEME_CALLBACK (callback, (SCM element));
26
27   /**
28      Leading are the lead strips between the sticks (lines) of
29      typeface. ie. leading is vertical space.
30   */
31   static Real line_thickness (Grob *);
32   static Real staff_space (Grob *);
33   static Grob *get_staff_symbol (Grob *);
34   static bool on_line (Grob *);
35   static bool on_line (Grob *, int);
36   static bool on_staff_line (Grob *, int);
37   static bool on_staff_line (Grob *);
38   static int line_count (Grob *);
39   static Real get_position (Grob *);
40   static Real staff_radius (Grob *);
41   static int get_rounded_position (Grob *);
42 };
43
44 int compare_position (Grob *const &, Grob *const &);\
45 bool position_less (Grob *const &, Grob *const &);
46 #endif /* STAFF_SYMBOL_REFERENCER_HH */
47