]> git.donarmstrong.com Git - lilypond.git/blob - lily/grace-align-item.cc
6a6f432ccff08bf7f791ad9d815706ad3f31714c
[lilypond.git] / lily / grace-align-item.cc
1 /*   
2   grace-align-item.cc --  implement Grace_align_item
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 #include "grace-align-item.hh"
11 #include "align-interface.hh"
12 #include "lookup.hh"
13 #include "paper-column.hh"
14 #include "paper-def.hh"
15
16 Grace_align_item::Grace_align_item (SCM s)
17   : Item (s)
18 {
19   set_elt_property ("stacking-dir", gh_int2scm (RIGHT));
20   Align_interface (this).set_interface();
21   Align_interface (this).set_axis (X_AXIS);
22 }
23
24 /*
25   TODO: cfg-able
26  */
27 GLUE_SCORE_ELEMENT(Grace_align_item,before_line_breaking);
28 SCM
29 Grace_align_item::member_before_line_breaking ()
30 {
31   Real nhw = // lookup_l ()->notehead (2, "")..extent (X_AXIS).length();
32     paper_l ()->get_var ("quartwidth");
33   
34   set_elt_property ("threshold",
35                     gh_cons (gh_double2scm (nhw* 1.5),
36                              gh_double2scm (infinity_f)));
37   column_l ()->set_elt_property ("contains-grace", SCM_BOOL_T);
38
39   return SCM_UNDEFINED;
40
41 }
42
43
44