CVSROOT: /cvsroot/lilypond Module name: lilypond Branch: Changes by: Han-Wen Nienhuys <[EMAIL PROTECTED]> 05/05/19 22:24:08
Modified files: . : ChangeLog lily : axis-group-engraver.cc Added files: lily : hara-kiri-engraver.cc lily/include : axis-group-engraver.hh Log message: (acknowledge_grob): split Hara_kiri_engraver in separate file. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ChangeLog.diff?tr1=1.3638&tr2=1.3639&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/hara-kiri-engraver.cc.diff?tr1=1.9&tr2=1.10&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/axis-group-engraver.cc.diff?tr1=1.87&tr2=1.88&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/include/axis-group-engraver.hh.diff?tr1=1.5&tr2=1.6&r1=text&r2=text Patches: Index: lilypond/ChangeLog diff -u lilypond/ChangeLog:1.3638 lilypond/ChangeLog:1.3639 --- lilypond/ChangeLog:1.3638 Thu May 19 22:18:40 2005 +++ lilypond/ChangeLog Thu May 19 22:24:08 2005 @@ -1,5 +1,8 @@ 2005-05-20 Han-Wen Nienhuys <[EMAIL PROTECTED]> + * lily/hara-kiri-engraver.cc (acknowledge_grob): split + Hara_kiri_engraver in separate file. + * lily/slur-configuration.cc (score_encompass): oops, <? to min() translation went wrong. Fixes vertically translated slurs. Index: lilypond/lily/axis-group-engraver.cc diff -u lilypond/lily/axis-group-engraver.cc:1.87 lilypond/lily/axis-group-engraver.cc:1.88 --- lilypond/lily/axis-group-engraver.cc:1.87 Sun May 8 23:30:50 2005 +++ lilypond/lily/axis-group-engraver.cc Thu May 19 22:24:08 2005 @@ -6,6 +6,8 @@ (c) 1999--2005 Han-Wen Nienhuys <[EMAIL PROTECTED]> */ +#include "axis-group-engraver.hh" + #include "spanner.hh" #include "paper-column.hh" #include "axis-group-interface.hh" @@ -13,25 +15,6 @@ #include "warn.hh" #include "context.hh" -/** - Put stuff in a Spanner with an Axis_group_interface. - Use as last element of a context. -*/ -class Axis_group_engraver : public Engraver -{ -protected: - Spanner *staffline_; - Link_array<Grob> elts_; - virtual void process_music (); - virtual void finalize (); - virtual void acknowledge_grob (Grob_info); - virtual void process_acknowledged_grobs (); - virtual Spanner *get_spanner (); - virtual void add_element (Grob *); -public: - TRANSLATOR_DECLARATIONS (Axis_group_engraver); -}; - Axis_group_engraver::Axis_group_engraver () { must_be_last_ = true; @@ -138,79 +121,6 @@ Axis_group_interface::add_element (staffline_, e); } -/****************************************************************/ - -/* - maybenot such a good idea after all., to put class declarations in - .cc -*/ - -#include "hara-kiri-group-spanner.hh" -#include "rhythmic-head.hh" - -class Hara_kiri_engraver : public Axis_group_engraver -{ -protected: - virtual Spanner *get_spanner (); - virtual void acknowledge_grob (Grob_info); - virtual void add_element (Grob *e); - virtual void start_translation_timestep (); - - SCM interesting_; -public: - TRANSLATOR_DECLARATIONS (Hara_kiri_engraver); -}; - -void -Hara_kiri_engraver::start_translation_timestep () -{ - Axis_group_engraver::start_translation_timestep (); - interesting_ = get_property ("keepAliveInterfaces"); -} - - -void -Hara_kiri_engraver::add_element (Grob *e) -{ - Hara_kiri_group_spanner::add_element (staffline_, e); -} - -Spanner * -Hara_kiri_engraver::get_spanner () -{ - Spanner *sp = make_spanner ("RemoveEmptyVerticalGroup", SCM_EOL); - - return sp; -} - -void -Hara_kiri_engraver::acknowledge_grob (Grob_info i) -{ - Axis_group_engraver::acknowledge_grob (i); - if (staffline_) - { - for (SCM s = interesting_; scm_is_pair (s); s = scm_cdr (s)) - { - if (i.grob ()->internal_has_interface (scm_car (s))) - Hara_kiri_group_spanner::add_interesting_item (staffline_, i.grob ()); - } - } -} - -Hara_kiri_engraver::Hara_kiri_engraver () -{ - interesting_ = SCM_EOL; -} - -ADD_TRANSLATOR (Hara_kiri_engraver, - /* descr */ "Like Axis_group_engraver, but make a hara-kiri spanner, and add " - "interesting items (ie. note heads, lyric syllables and normal rests) ", - /* creats*/ "RemoveEmptyVerticalGroup", - /* accepts */ "", - /* acks */ "grob-interface", - /* reads */ "keepAliveInterfaces", - /* write */ ""); - ADD_TRANSLATOR (Axis_group_engraver, /* descr */ "Group all objects created in this context in a VerticalAxisGroup spanner.", /* creats*/ "VerticalAxisGroup", _______________________________________________ Lilypond-cvs mailing list Lilypond-cvs@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-cvs