2 side-position-interface.hh -- declare Side_position_interface
4 source file of the GNU LilyPond music typesetter
6 (c) 1999--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
10 #ifndef SIDE_POSITION_INTERFACE_HH
11 #define SIDE_POSITION_INTERFACE_HH
18 Position victim object (ELT_L_) next to other objects (the support).
20 side-support -- list of score elements
22 direction -- where to put the victim object (left or right?)
24 side-relative-direction -- if set: get the direction from a different object, and multiply by this.
26 direction-source -- in case side-relative-direction is set, where
29 minimum-space -- minimum distance that the victim should move
32 padding -- add this much extra space between victim and support
34 TODO: move out unrelated callbacks.
37 struct Side_position_interface
39 Score_element * elt_l_;
41 Side_position_interface (Score_element const*);
42 static Real side_position (Dimension_cache const *);
43 static Real aligned_on_self (Dimension_cache const *);
44 static Real aligned_side (Dimension_cache const *);
45 static Real quantised_position (Dimension_cache const*);
46 static Real centered_on_parent (Dimension_cache const*);
48 void set_minimum_space (Real);
49 void set_padding (Real);
50 void set_quantised (Axis);
51 Axis get_axis () const;
53 bool supported_b () const;
54 bool has_interface_b () const;
55 void add_support (Score_element*);
57 void add_staff_support ();
58 Direction get_direction () const;
59 void set_direction (Direction);
62 Side_position_interface side_position (Score_element*);
64 #endif /* SIDE_POSITION_INTERFACE_HH */