X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fstaff-margin-engraver.cc;h=e69de29bb2d1d6434b8b29ae775ad8c2e48c5391;hb=07dc00d6c83be5b05f5ec16f1ed36b1cf41b885c;hp=7fdba6a601eac1937cdae7df164d565af116769b;hpb=685452c8675e89a84692420fb9891756d318e771;p=lilypond.git diff --git a/lily/staff-margin-engraver.cc b/lily/staff-margin-engraver.cc index 7fdba6a601..e69de29bb2 100644 --- a/lily/staff-margin-engraver.cc +++ b/lily/staff-margin-engraver.cc @@ -1,64 +0,0 @@ -/* - staff-margin-engraver.cc -- implement Staff_margin_engraver - - source file of the GNU LilyPond music typesetter - - (c) 1998--1999 Jan Nieuwenhuizen -*/ - -#include "staff-margin-engraver.hh" -#include "bar.hh" -#include "time-description.hh" -#include "text-item.hh" -#include "staff-side.hh" - -ADD_THIS_TRANSLATOR (Staff_margin_engraver); - -Staff_margin_engraver::Staff_margin_engraver () -{ - axis_ = X_AXIS; - type_ = "margin"; - visibility_lambda_ = ly_ch_C_eval_scm ("postbreak_only_visibility"); -} - - -/* - TODO - - should be able to set whole paragraph (multiple lines, center) to - left (right?) of staff, e.g.: - ______ - |_______ - 2 Clarinetti |________ - (Bb) |___________ - |______________ -*/ -void -Staff_margin_engraver::acknowledge_element (Score_element_info inf) -{ - Item *i = cast_to_interesting_item (inf.elem_l_); - if (!i || inf.origin_trans_l_arr_.size() != 1) - return; - - - SCM long_name = get_property ("instrument", 0); - SCM short_name = get_property ("instr", 0); - - if (now_mom () > Moment (0)) - long_name = short_name; - - if (gh_string_p (long_name)) - { - create_items (0); - text_p_->text_str_ = ly_scm2string (long_name); - staff_side_p_->dir_ = LEFT; - Bar_script_engraver::attach_script_to_item (i); - - /* - UGH. ignores font size settings. - */ - Interval iv(text_p_->extent (Y_AXIS)); - text_p_->translate_axis (- iv.center (), Y_AXIS); - } -} -