X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Frepeat-tie-engraver.cc;h=9c59ac01c9a85131360b31e84da92676dc1df4e1;hb=47db9a3883d726ca53e2133a3b2298f78dd6a32e;hp=1285848a32446b0417fdb79c5e60fdea28a56efa;hpb=8ec36f8d499d423c927bdecccd6b0b2a84f9ce59;p=lilypond.git diff --git a/lily/repeat-tie-engraver.cc b/lily/repeat-tie-engraver.cc index 1285848a32..9c59ac01c9 100644 --- a/lily/repeat-tie-engraver.cc +++ b/lily/repeat-tie-engraver.cc @@ -1,12 +1,22 @@ /* - repeat-tie-engraver.cc -- implement Repeat_tie_engraver + This file is part of LilyPond, the GNU music typesetter. - source file of the GNU LilyPond music typesetter + Copyright (C) 2005--2015 Han-Wen Nienhuys - (c) 2005--2007 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" @@ -19,12 +29,12 @@ class Repeat_tie_engraver : public Engraver { Stream_event *event_; Grob *semi_tie_column_; - vector semi_ties_; - - void stop_translation_timestep (); + vector semi_ties_; + + void stop_translation_timestep (); DECLARE_ACKNOWLEDGER (note_head); DECLARE_TRANSLATOR_LISTENER (repeat_tie); - + public: TRANSLATOR_DECLARATIONS (Repeat_tie_engraver); }; @@ -64,27 +74,32 @@ Repeat_tie_engraver::acknowledge_note_head (Grob_info inf) SCM cause = event_->self_scm (); Grob *semi_tie = make_item ("RepeatTie", cause); semi_tie->set_object ("note-head", inf.grob ()->self_scm ()); - + Pointer_group_interface::add_grob (semi_tie_column_, ly_symbol2scm ("ties"), - semi_tie); + semi_tie); semi_tie->set_parent (semi_tie_column_, Y_AXIS); semi_ties_.push_back (semi_tie); - - if (is_direction (unsmob_stream_event (cause)->get_property ("direction"))) + if (is_direction (Stream_event::unsmob (cause)->get_property ("direction"))) { - Direction d = to_dir (unsmob_stream_event (cause)->get_property ("direction")); - semi_tie->set_property ("direction", scm_from_int (d)); + Direction d = to_dir (Stream_event::unsmob (cause)->get_property ("direction")); + semi_tie->set_property ("direction", scm_from_int (d)); } } ADD_ACKNOWLEDGER (Repeat_tie_engraver, note_head); -ADD_TRANSLATOR (Repeat_tie_engraver, - /* doc */ "Create repeat ties.", - - /* create */ - "RepeatTie " - "RepeatTieColumn ", - /* read */ "", - /* write */ ""); +ADD_TRANSLATOR (Repeat_tie_engraver, + /* doc */ + "Create repeat ties.", + + /* create */ + "RepeatTie " + "RepeatTieColumn ", + + /* read */ + "", + + /* write */ + "" + );