]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/align-interface.hh
f570a60509603c28bf7a2e2f42ff61ba34089fdb
[lilypond.git] / lily / include / align-interface.hh
1 /*
2   align-interface.hh -- declare Align_interface
3   
4   source file of the GNU LilyPond music typesetter
5   
6   (c) 2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7   
8  */
9
10 #ifndef ALIGN_INTERFACE_HH
11 #define ALIGN_INTERFACE_HH
12
13 #include "axes.hh"
14 #include "lily-proto.hh"
15
16 /*
17   Order elements top to bottom/left to right/right to left etc.
18
19
20   *******
21   
22   element properties
23
24   stacking-dir -- stack contents of elements in which direction ?
25
26   align-dir -- Which side to align? -1: left side, 0: centered (around
27     center_l_ if not nil, or around center of width), 1: right side
28
29   threshold -- (cons MIN MAX), where MIN and MAX are dimensions in
30     staffspace
31
32   alignment-done -- boolean to administrate whether we've done the alignment already (to ensure that the process is done only once)
33
34   group-center-element -- element which will be at the center of the group
35     after aligning (when using Align_interface::center_on_element)
36
37   elements -- to be aligned elements 
38
39   axes -- list of axis numbers. Should contain only one number.
40   
41   *******
42   
43   Reads the following from its elements
44   
45   
46   minimum-space --  (cons LEFT RIGHT)
47
48   extra-space -- (cons LEFT RIGHT)
49   
50 */
51 struct Align_interface {
52   static Real alignment_callback (Score_element *,Axis);
53   static void do_side_processing (Score_element*,Axis a);
54   static void set_axis (Score_element*,Axis);
55   static Axis axis (Score_element*) ;
56   static void add_element (Score_element*,Score_element*);
57   static int get_count (Score_element*,Score_element*);
58   static void set_interface (Score_element*);
59   static bool has_interface (Score_element*);
60   static Real center_on_element (Score_element *c, Axis);
61 };
62
63 #endif /* ALIGN_INTERFACE_HH */
64