]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/side-position-interface.hh
patch::: 1.3.96.jcn9
[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--2000 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    Position victim object (ELT_L_) next to other objects (the support).
18
19    side-support -- list of score elements
20
21    direction-source -- in case side-relative-direction is set, where
22      to get the direction
23
24    TODO: move  out unrelated callbacks.
25
26    TODO: reduce number of methods.
27 */
28 struct Side_position
29 {
30 public:
31   DECLARE_SCHEME_CALLBACK(side_position, (SCM  element, SCM axis));
32   DECLARE_SCHEME_CALLBACK(aligned_on_self, (SCM  element, SCM axis));
33   DECLARE_SCHEME_CALLBACK(aligned_side, (SCM element, SCM axis));  
34   DECLARE_SCHEME_CALLBACK(quantised_position, (SCM element, SCM axis));
35   DECLARE_SCHEME_CALLBACK(centered_on_parent, (SCM element, SCM axis));
36   static void set_axis (Score_element*,Axis);
37   static void set_minimum_space (Score_element*,Real);
38   static void set_padding (Score_element*,Real);
39   static Axis get_axis (Score_element*) ;
40   static bool supported_b (Score_element*) ;
41   static bool has_interface (Score_element*) ;
42   static void add_support (Score_element*,Score_element*);
43   static void add_staff_support (Score_element*);
44   static Direction get_direction (Score_element*);
45   static void set_direction (Score_element*,Direction);
46 };
47
48
49 #endif /* SIDE_POSITION_INTERFACE_HH */
50