2 script.cc -- implement Script
4 source file of the GNU LilyPond music typesetter
6 (c) 1999--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
13 #include "side-position-interface.hh"
14 #include "paper-def.hh"
15 #include "dimension-cache.hh"
17 Script ::Script (SCM s
)
23 Script::get_molecule(Direction d
) const
25 SCM s
= get_elt_property ("molecule");
26 assert (gh_pair_p (s
));
29 if (key
== ly_symbol2scm ("feta"))
31 return lookup_l ()->afm_find ("scripts-" +
32 ly_scm2string (index_cell (gh_cdr (s
), d
)));
34 else if (key
== ly_symbol2scm ("accordion"))
36 return lookup_l ()->accordion (gh_cdr (s
), paper_l()->get_var("interline"));
45 GLUE_SCORE_ELEMENT(Script
,before_line_breaking
);
47 Script::member_before_line_breaking ()
50 center my self on the note head.
52 Score_element
* e
= parent_l(X_AXIS
);
53 translate_axis (e
->extent (X_AXIS
).center (), X_AXIS
);
58 GLUE_SCORE_ELEMENT(Script
,after_line_breaking
);
60 Script::member_after_line_breaking ()
62 Side_position_interface
i (this);
63 Direction d
= i
.get_direction ();
70 GLUE_SCORE_ELEMENT(Script
,brew_molecule
);
73 Script::member_brew_molecule () const
76 SCM d
= get_elt_property ("direction");
80 return get_molecule (dir
).create_scheme();