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"
18 Script::get_molecule(Score_element * me, Direction d)
20 SCM s = me->get_elt_property ("molecule");
21 assert (gh_pair_p (s));
24 if (key == ly_symbol2scm ("feta"))
26 return me->lookup_l ()->afm_find ("scripts-" +
27 ly_scm2string (index_cell (gh_cdr (s), d)));
29 else if (key == ly_symbol2scm ("accordion"))
31 return me->lookup_l ()->accordion (gh_cdr (s), me->paper_l()->get_var("staffspace"));
39 MAKE_SCHEME_CALLBACK(Script,after_line_breaking);
41 Script::after_line_breaking (SCM smob)
43 Score_element * me = unsmob_element (smob);
45 Direction d = Side_position::get_direction (me);
46 Side_position::set_direction (me,d);
48 return SCM_UNSPECIFIED;
51 MAKE_SCHEME_CALLBACK(Script,brew_molecule);
54 Script::brew_molecule (SCM smob)
56 Score_element *me= unsmob_element (smob);
57 // Direction dir = DOWN;
58 // SCM d = me->get_elt_property ("direction");
61 Direction dir = Side_position::get_direction(me);
62 return get_molecule (me, dir).create_scheme();
66 Script::has_interface (Score_element*me)
68 return me->has_interface (ly_symbol2scm ("script-interface"));
72 Script::set_interface (Score_element*me)
74 return me->set_interface (ly_symbol2scm ("script-interface"));