]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/staff-symbol-referencer.hh
51fe44fc466fdd3a26280b294e6823c28119be77
[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--2007 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 *, int);
35   static bool on_staff_line (Grob *, int);
36   static int line_count (Grob *);
37   static Real get_position (Grob *);
38   static Real staff_radius (Grob *);
39   static int get_rounded_position (Grob *);
40   static Interval extent_in_staff (Grob *); 
41 };
42
43 int compare_position (Grob *const &, Grob *const &);\
44 bool position_less (Grob *const &, Grob *const &);
45 #endif /* STAFF_SYMBOL_REFERENCER_HH */
46