2 g-script.cc -- implement Script
4 source file of the GNU LilyPond music typesetter
6 (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
12 TODO: Quantisation support (staccato dots between stafflines)
18 #include "staff-side.hh"
19 #include "paper-def.hh"
27 Script::do_substitute_element_pointer (Score_element*o, Score_element*n)
29 if (o == staff_side_l_)
30 staff_side_l_ = dynamic_cast<Staff_side_item*>(n);
36 Script::get_molecule(Direction d) const
38 SCM s = get_elt_property (molecule_scm_sym);
39 assert (s != SCM_BOOL_F);
42 SCM key = SCM_CAR (s);
43 if (key == ly_symbol ("feta"))
45 return lookup_l ()->afm_find ("scripts-" +
46 ly_scm2string (index_cell (SCM_CDR (s), d)));
48 else if (key == ly_symbol ("accordion"))
50 return lookup_l ()->accordion (SCM_CDR(s), paper_l()->get_realvar(interline_scm_sym));
60 Script::do_pre_processing ()
63 = staff_side_l_->dim_cache_[X_AXIS]->parent_l_->element_l();
64 translate_axis (e->extent (X_AXIS).center (), X_AXIS);
68 Script::do_post_processing ()
70 Direction d = staff_side_l_->dir_;
71 Molecule m (get_molecule(d));
72 translate_axis (- m.dim_[Y_AXIS][Direction (-d)], Y_AXIS);
76 Script::set_staff_side (Staff_side_item*g)
80 dim_cache_[Y_AXIS]->parent_l_ = g->dim_cache_[Y_AXIS];
84 Script::do_brew_molecule_p () const
86 return new Molecule (get_molecule (staff_side_l_->dir_));
90 Script::do_print () const