2 staff-margin-engraver.cc -- implement Staff_margin_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 1998 Jan Nieuwenhuizen <janneke@gnu.org>
9 #include "staff-margin-engraver.hh"
11 #include "time-description.hh"
12 #include "g-text-item.hh"
13 #include "g-staff-side.hh"
15 ADD_THIS_TRANSLATOR (Staff_margin_engraver);
17 Staff_margin_engraver::Staff_margin_engraver ()
22 = gh_eval_str ("(lambda (d) (if (= d 1) '(#f . #f) '(#t . #t)))");
31 should be able to set whole paragraph (multiple lines, centre) to
32 left (right?) of staff, e.g.:
35 2 Clarinetti |________
40 Staff_margin_engraver::acknowledge_element (Score_element_info i)
42 Bar * b =dynamic_cast<Bar *> (i.elem_l_);
46 if (i.origin_grav_l_arr_.size() != 1)
50 String long_str = get_property ("instrument", 0);
51 String str = get_property ("instr", 0);
52 if (now_mom () > Moment (0) && str.length_i ())
55 if (long_str.empty_b ())
59 text_p_->text_str_ = long_str;
60 staff_side_p_->dir_ = LEFT;
61 Bar_script_engraver::acknowledge_element(i);