X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fgrob-pq-engraver.cc;h=a9fa75eda51d9708252519adc7f7e34b89ad9927;hb=5d84bfad4626892bcffd05adcced53c8a2329047;hp=a869f031eeee7c3aede84186ea270083398ba392;hpb=59a6d1a06432fc0ca88c3023c646182f389ec1b5;p=lilypond.git diff --git a/lily/grob-pq-engraver.cc b/lily/grob-pq-engraver.cc index a869f031ee..a9fa75eda5 100644 --- a/lily/grob-pq-engraver.cc +++ b/lily/grob-pq-engraver.cc @@ -24,8 +24,6 @@ #include "translator.icc" -using std::vector; - struct Grob_pq_entry { Grob *grob_; @@ -44,7 +42,7 @@ public: TRANSLATOR_DECLARATIONS (Grob_pq_engraver); protected: virtual void initialize (); - DECLARE_ACKNOWLEDGER (grob); + void acknowledge_grob (Grob_info); void start_translation_timestep (); void stop_translation_timestep (); void process_acknowledged (); @@ -52,7 +50,8 @@ protected: vector started_now_; }; -Grob_pq_engraver::Grob_pq_engraver () +Grob_pq_engraver::Grob_pq_engraver (Context *c) + : Engraver (c) { } @@ -101,7 +100,7 @@ Grob_pq_engraver::acknowledge_grob (Grob_info gi) void Grob_pq_engraver::process_acknowledged () { - vector_sort (started_now_, std::less ()); + vector_sort (started_now_, less ()); SCM lst = SCM_EOL; SCM *tail = &lst; for (vsize i = 0; i < started_now_.size (); i++) @@ -146,11 +145,16 @@ Grob_pq_engraver::start_translation_timestep () busy = scm_cdr (busy); } - if (start_busy != busy) + if (!scm_is_eq (start_busy, busy)) context ()->set_property ("busyGrobs", busy); } -ADD_ACKNOWLEDGER (Grob_pq_engraver, grob); +void +Grob_pq_engraver::boot () +{ + ADD_ACKNOWLEDGER (Grob_pq_engraver, grob); +} + ADD_TRANSLATOR (Grob_pq_engraver, /* doc */ "Administrate when certain grobs (e.g., note heads) stop"