]> git.donarmstrong.com Git - lilypond.git/blob - lily/grace-align-item.cc
4da8f4b6b52d4c45f69664cda1a6234f84cf25dc
[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 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7   
8  */
9
10 #include "grace-align-item.hh"
11 #include "lookup.hh"
12 #include "paper-column.hh"
13
14 Grace_align_item::Grace_align_item ()
15 {
16   stacking_dir_ = RIGHT;
17   set_axis (X_AXIS);
18 }
19   
20 void
21 Grace_align_item::do_pre_processing ()
22 {
23   Real nhw = lookup_l ()->notehead (2, "").dim_[X_AXIS].length();
24   threshold_interval_[MIN] = nhw* 1.5;
25   column_l ()->set_elt_property (contains_grace_scm_sym, SCM_BOOL_T);
26
27   
28   Axis_align_item::do_pre_processing ();
29   Note_head_side::do_pre_processing ();
30
31   translate_axis (-0.5* nhw, X_AXIS); // ugh.
32 }
33
34 void
35 Grace_align_item::do_substitute_element_pointer (Score_element*o, Score_element*n)
36 {
37   Axis_align_item::do_substitute_element_pointer (o,n);
38   Note_head_side::do_substitute_element_pointer( o,n);
39 }
40 void
41 Grace_align_item::do_add_processing ()
42 {
43 }