]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/side-position-interface.hh
make implementation for Class::has_interface automatically. Junk all
[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--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7   
8  */
9
10 #ifndef SIDE_POSITION_INTERFACE_HH
11 #define SIDE_POSITION_INTERFACE_HH
12
13 #include "spanner.hh"
14 #include "item.hh"
15
16 /*
17   TODO: move out unrelated callbacks.
18
19   TODO: reduce number of methods.
20 */
21 struct Side_position_interface
22 {
23 public:
24   DECLARE_SCHEME_CALLBACK (aligned_on_support_extents, (SCM element, SCM axis));
25   DECLARE_SCHEME_CALLBACK (aligned_on_support_refpoints, (SCM element, SCM axis));
26   
27   DECLARE_SCHEME_CALLBACK (aligned_side, (SCM element, SCM axis));  
28   
29   DECLARE_SCHEME_CALLBACK (quantised_position, (SCM element, SCM axis));
30
31   static SCM general_side_position (Grob*, Axis, bool);
32   static void set_axis (Grob*,Axis);
33   static void set_minimum_space (Grob*,Real);
34   static void set_padding (Grob*,Real);
35   static Axis get_axis (Grob*) ;
36   static bool supported_b (Grob*) ;
37   static bool has_interface (Grob*) ;
38   static void add_support (Grob*,Grob*);
39   static void add_staff_support (Grob*);
40   static Direction get_direction (Grob*);
41   static void set_direction (Grob*,Direction);
42 };
43
44
45 struct Self_alignment_interface
46 {
47   static bool has_interface (Grob*);
48   DECLARE_SCHEME_CALLBACK (aligned_on_self, (SCM element, SCM axis));
49 DECLARE_SCHEME_CALLBACK (centered_on_parent, (SCM element, SCM axis));
50 };
51
52
53 #endif /* SIDE_POSITION_INTERFACE_HH */
54