X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Flaissez-vibrer-engraver.cc;fp=lily%2Flaissez-vibrer-engraver.cc;h=49c64ce772d8908ef7d70e0206fb8c3523f2fd66;hb=941dff9d2a67080e0dd8474f1e70f0c72ace6424;hp=762d56d9805580a8cd5092e5a022c1417174f1eb;hpb=5a22d6233a39d3164e1ca043244794c268be4ad0;p=lilypond.git diff --git a/lily/laissez-vibrer-engraver.cc b/lily/laissez-vibrer-engraver.cc index 762d56d980..49c64ce772 100644 --- a/lily/laissez-vibrer-engraver.cc +++ b/lily/laissez-vibrer-engraver.cc @@ -1,12 +1,22 @@ /* - laissez-vibrer-engraver.cc -- implement Laissez_vibrer_engraver + This file is part of LilyPond, the GNU music typesetter. - source file of the GNU LilyPond music typesetter + Copyright (C) 2005--2011 Han-Wen Nienhuys - (c) 2005--2009 Han-Wen Nienhuys -*/ + LilyPond is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + LilyPond is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with LilyPond. If not, see . +*/ #include "engraver.hh" #include "item.hh" @@ -20,8 +30,8 @@ class Laissez_vibrer_engraver : public Engraver Stream_event *event_; Grob *lv_column_; vector lv_ties_; - - void stop_translation_timestep (); + + void stop_translation_timestep (); DECLARE_ACKNOWLEDGER (note_head); protected: DECLARE_TRANSLATOR_LISTENER (laissez_vibrer); @@ -56,34 +66,33 @@ Laissez_vibrer_engraver::acknowledge_note_head (Grob_info inf) if (!event_) return; + SCM cause = event_->self_scm (); + if (!lv_column_) - { - lv_column_ = make_item ("LaissezVibrerTieColumn", event_->self_scm ()); - } + lv_column_ = make_item ("LaissezVibrerTieColumn", cause); - SCM cause = event_->self_scm (); Grob *lv_tie = make_item ("LaissezVibrerTie", cause); lv_tie->set_object ("note-head", inf.grob ()->self_scm ()); - + Pointer_group_interface::add_grob (lv_column_, ly_symbol2scm ("ties"), lv_tie); if (is_direction (unsmob_stream_event (cause)->get_property ("direction"))) { Direction d = to_dir (unsmob_stream_event (cause)->get_property ("direction")); - lv_tie->set_property ("direction", scm_from_int (d)); + lv_tie->set_property ("direction", scm_from_int (d)); } - + lv_tie->set_parent (lv_column_, Y_AXIS); lv_ties_.push_back (lv_tie); } ADD_ACKNOWLEDGER (Laissez_vibrer_engraver, note_head); -ADD_TRANSLATOR (Laissez_vibrer_engraver, +ADD_TRANSLATOR (Laissez_vibrer_engraver, /* doc */ "Create laissez vibrer items.", - + /* create */ "LaissezVibrerTie " "LaissezVibrerTieColumn ",