]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/side-position-interface.hh
c706e7e6ad8e0d8c35e55a930ddd5cd44c5820b5
[lilypond.git] / lily / include / side-position-interface.hh
1 /*
2   side-position-interface.hh -- declare Side_position_interface
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 SIDE_POSITION_INTERFACE_HH
10 #define SIDE_POSITION_INTERFACE_HH
11
12 #include "grob-interface.hh"
13 #include "lily-proto.hh"
14
15 /*
16   TODO: move out unrelated callbacks.
17
18   TODO: reduce number of methods.
19 */
20 struct Side_position_interface
21 {
22 public:
23
24   DECLARE_SCHEME_CALLBACK (y_aligned_on_support_refpoints, (SCM element));
25   DECLARE_SCHEME_CALLBACK (pure_y_aligned_on_support_refpoints, (SCM element, SCM start, SCM end));
26   DECLARE_SCHEME_CALLBACK (x_aligned_side, (SCM element, SCM current));
27   DECLARE_SCHEME_CALLBACK (y_aligned_side, (SCM element, SCM current));
28   DECLARE_SCHEME_CALLBACK (pure_y_aligned_side, (SCM element, SCM start, SCM end, SCM current));
29   DECLARE_SCHEME_CALLBACK (calc_cross_staff, (SCM element));
30
31   static SCM aligned_side (Grob*me, Axis a, bool pure, int start, int end, Real *current_off_ptr);
32
33   static SCM general_side_position (Grob *, Axis, bool, bool my_extents,
34                                     bool pure, int start, int end, Real *current_off);
35   static Axis get_axis (Grob *);
36   static void set_axis (Grob *, Axis);
37   DECLARE_GROB_INTERFACE();
38   static void add_support (Grob *, Grob *);
39   static void add_staff_support (Grob *);
40   static Direction get_direction (Grob *);
41 };
42
43 #endif /* SIDE_POSITION_INTERFACE_HH */
44