X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fscore-engraver.cc;h=94d269df9f2a8819531ba66314555f94bc7e9444;hb=7556e96abb66c88ae653c96898bcad2c3f18b645;hp=5c83021be4a58da27b63efccd586db0812385407;hpb=f2c2c5c43858f323e4708f83fd97e0f38017c275;p=lilypond.git diff --git a/lily/score-engraver.cc b/lily/score-engraver.cc index 5c83021be4..94d269df9f 100644 --- a/lily/score-engraver.cc +++ b/lily/score-engraver.cc @@ -3,11 +3,10 @@ source file of the GNU LilyPond music typesetter - (c) 1997--2005 Han-Wen Nienhuys + (c) 1997--2006 Han-Wen Nienhuys */ #include "all-font-metrics.hh" -#include "afm.hh" #include "warn.hh" #include "main.hh" #include "system.hh" @@ -21,9 +20,6 @@ #include "open-type-font.hh" #include "paper-column-engraver.hh" -/* - TODO: the column creation logic is rather hairy. Revise it. -*/ Score_engraver::Score_engraver () { system_ = 0; @@ -36,15 +32,14 @@ Score_engraver::derived_mark () const if (pscore_) scm_gc_mark (pscore_->self_scm ()); Score_translator::derived_mark (); - Engraver_group_engraver::derived_mark (); + Engraver_group::derived_mark (); } - void Score_engraver::prepare (Moment m) { (void) m; - + precomputed_recurse_over_translators (context (), START_TRANSLATION_TIMESTEP, DOWN); } @@ -71,22 +66,23 @@ Score_engraver::initialize () + "\n" + _ ("Music font has not been installed properly.") + "\n" - + _f ("Search path `%s'", global_path.to_string ().to_str0 ()) + + _f ("Search path `%s'", global_path.to_string ().c_str ()) + "\n" + _ ("Aborting")); } pscore_ = new Paper_score (dynamic_cast (context ()->get_output_def ())); - scm_gc_unprotect_object (pscore_->self_scm ()); + pscore_->unprotect (); SCM props = updated_grob_properties (context (), ly_symbol2scm ("System")); Object_key const *sys_key = context ()->get_grob_key ("System"); pscore_->typeset_system (new System (props, sys_key)); - system_ = pscore_->root_system (); - context ()->set_property ("rootSystem", system_->self_scm ()); - Engraver_group_engraver::initialize (); + system_ = pscore_->root_system (); + context ()->set_property ("rootSystem", system_->self_scm ()); + + Engraver_group::initialize (); } void @@ -103,7 +99,7 @@ Score_engraver::one_time_step () if (!to_boolean (context ()->get_property ("skipTypesetting"))) { precomputed_recurse_over_translators (context (), PROCESS_MUSIC, UP); - Engraver_group_engraver::do_announces (); + Engraver_group::do_announces (); } precomputed_recurse_over_translators (context (), STOP_TRANSLATION_TIMESTEP, UP); @@ -138,42 +134,46 @@ Score_engraver::get_output () return o->self_scm (); } - /* UGH UGH - */ +*/ void Score_engraver::forbid_breaks () { for (SCM s = simple_trans_list_; scm_is_pair (s); s = scm_cdr (s)) { Translator *tr = unsmob_translator (scm_car (s)); - if (Paper_column_engraver* pce = dynamic_cast (tr)) - { - pce->forbid_breaks (); - } + if (Paper_column_engraver *pce = dynamic_cast (tr)) + pce->forbid_breaks (); } } bool Score_engraver::try_music (Music *m) { - if (Engraver_group_engraver::try_music (m)) + if (Engraver_group::try_music (m)) return true; return false; } ADD_TRANSLATOR_GROUP (Score_engraver, - /* descr */ "Top level engraver. Takes care of generating columns and the complete system (ie. System) " - "\n\n " - "This engraver decides whether a column is breakable. The default is " - "that a column is always breakable. However, when every Bar_engraver " - "that does not have a barline at a certain point will call " - "Score_engraver::forbid_breaks to stop linebreaks. In practice, this " - "means that you can make a breakpoint by creating a barline (assuming " - "that there are no beams or notes that prevent a breakpoint.) ", - /* creats*/ "System PaperColumn NonMusicalPaperColumn", - /* accepts */ "break-event", - /* reads */ "currentMusicalColumn currentCommandColumn verticallySpacedContexts", - /* write */ ""); + /* doc */ "Top level engraver. Takes care of generating columns and the complete system (ie. System) " + "\n\n " + "This engraver decides whether a column is breakable. The default is " + "that a column is always breakable. However, when every Bar_engraver " + "that does not have a barline at a certain point will call " + "Score_engraver::forbid_breaks to stop linebreaks. In practice, this " + "means that you can make a breakpoint by creating a barline (assuming " + "that there are no beams or notes that prevent a breakpoint.) ", + /* create */ + "System ", + + /* accept */ + "break-event", + /* read */ + "currentMusicalColumn " + "currentCommandColumn " + "verticallySpacedContexts", + /* write */ + "");