X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fspan-arpeggio-engraver.cc;h=dac5b91ab59cd643b423cd7dcfe886da8510d040;hb=90e4d7057f3857da049dfda3d130017d4719bd6b;hp=049f4f2d65fbc13df23c9ace32b684c99537532c;hpb=5ab8335d106d736335698245af3c1b2b2455aed6;p=lilypond.git diff --git a/lily/span-arpeggio-engraver.cc b/lily/span-arpeggio-engraver.cc index 049f4f2d65..dac5b91ab5 100644 --- a/lily/span-arpeggio-engraver.cc +++ b/lily/span-arpeggio-engraver.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 2000--2012 Jan Nieuwenhuizen + Copyright (C) 2000--2015 Jan Nieuwenhuizen Han-Wen Nienhuys @@ -27,6 +27,8 @@ #include "side-position-interface.hh" #include "staff-symbol-referencer.hh" +#include "translator.icc" + /** Make arpeggios that span multiple staves. Catch arpeggios, and span a Span_arpeggio over them if we find more than two arpeggios. @@ -35,8 +37,8 @@ class Span_arpeggio_engraver : public Engraver { public: TRANSLATOR_DECLARATIONS (Span_arpeggio_engraver); - DECLARE_ACKNOWLEDGER (arpeggio); - DECLARE_ACKNOWLEDGER (note_column); + void acknowledge_arpeggio (Grob_info); + void acknowledge_note_column (Grob_info); protected: void process_acknowledged (); @@ -48,7 +50,8 @@ private: vector note_columns_; }; -Span_arpeggio_engraver::Span_arpeggio_engraver () +Span_arpeggio_engraver::Span_arpeggio_engraver (Context *c) + : Engraver (c) { span_arpeggio_ = 0; } @@ -78,10 +81,8 @@ Span_arpeggio_engraver::process_acknowledged () */ if (!span_arpeggio_ && arpeggios_.size () > 1 && to_boolean (get_property ("connectArpeggios"))) - { - span_arpeggio_ = make_item ("Arpeggio", SCM_EOL); - span_arpeggio_->set_property ("cross-staff", SCM_BOOL_T); - } + span_arpeggio_ = make_item ("Arpeggio", SCM_EOL); + if (span_arpeggio_) { for (vsize i = 0; i < note_columns_.size (); i++) @@ -125,10 +126,13 @@ Span_arpeggio_engraver::stop_translation_timestep () note_columns_.clear (); } -#include "translator.icc" +void +Span_arpeggio_engraver::boot () +{ + ADD_ACKNOWLEDGER (Span_arpeggio_engraver, arpeggio); + ADD_ACKNOWLEDGER (Span_arpeggio_engraver, note_column); +} -ADD_ACKNOWLEDGER (Span_arpeggio_engraver, arpeggio); -ADD_ACKNOWLEDGER (Span_arpeggio_engraver, note_column); ADD_TRANSLATOR (Span_arpeggio_engraver, /* doc */ "Make arpeggios that span multiple staves.",