]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/align-interface.hh
patch::: 1.3.93.jcn2
[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 #include "lily-guile.hh"
16
17 extern SCM Align_interface_alignment_callback_proc;
18 /*
19   Order elements top to bottom/left to right/right to left etc.
20
21
22   *******
23   
24   element properties
25
26   stacking-dir -- stack contents of elements in which direction ?
27
28   align-dir -- Which side to align? -1: left side, 0: centered (around
29     center_l_ if not nil, or around center of width), 1: right side
30
31   threshold -- (cons MIN MAX), where MIN and MAX are dimensions in
32     staffspace
33
34   alignment-done -- boolean to administrate whether we've done the alignment already (to ensure that the process is done only once)
35
36   center-element -- element which will be at the center of the group
37     after aligning (when using
38     Align_interface::center_on_element). The center element should
39     have this object as a reference point.
40
41   elements -- to be aligned elements 
42
43   axes -- list of axis numbers. Should contain only one number.
44   
45   *******
46   
47   Reads the following from its elements
48   
49   
50   minimum-space --  (cons LEFT RIGHT)
51
52   extra-space -- (cons LEFT RIGHT)
53   
54 */
55 struct Align_interface {
56   static SCM alignment_callback (SCM element, SCM axis);
57   static void do_side_processing (Score_element*,Axis a);
58   static void set_axis (Score_element*,Axis);
59   static Axis axis (Score_element*) ;
60   static void add_element (Score_element*,Score_element*);
61   static int get_count (Score_element*,Score_element*);
62   static void set_interface (Score_element*);
63   static bool has_interface (Score_element*);
64   static SCM center_on_element (SCM element, SCM axis);
65 };
66
67 #endif /* ALIGN_INTERFACE_HH */
68