X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fscore-engraver.cc;h=9566a43558021880cd770761e2d03b3d5437ade8;hb=e0e7ae9d391b2e393419182f8adb359b01cbe838;hp=258b55bd22d2dc43de820ebf016feecf8741243a;hpb=545092a25d8ca41dc90b87482474b3719f7130a9;p=lilypond.git diff --git a/lily/score-engraver.cc b/lily/score-engraver.cc index 258b55bd22..9566a43558 100644 --- a/lily/score-engraver.cc +++ b/lily/score-engraver.cc @@ -3,27 +3,25 @@ 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" #include "score-engraver.hh" -#include "paper-score.hh" -#include "paper-column.hh" -#include "output-def.hh" + +#include "all-font-metrics.hh" #include "axis-group-interface.hh" #include "context-def.hh" #include "global-context.hh" +#include "international.hh" +#include "main.hh" #include "open-type-font.hh" +#include "output-def.hh" #include "paper-column-engraver.hh" +#include "paper-column.hh" +#include "paper-score.hh" +#include "system.hh" +#include "warn.hh" -/* - TODO: the column creation logic is rather hairy. Revise it. -*/ Score_engraver::Score_engraver () { system_ = 0; @@ -70,7 +68,7 @@ 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")); } @@ -82,6 +80,7 @@ Score_engraver::initialize () 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 ()); @@ -112,15 +111,15 @@ Score_engraver::one_time_step () void Score_engraver::announce_grob (Grob_info info) { - announce_infos_.push (info); + announce_infos_.push_back (info); pscore_->root_system ()->typeset_grob (info.grob ()); - elems_.push (info.grob ()); + elems_.push_back (info.grob ()); } void Score_engraver::typeset_all () { - for (int i = 0; i < elems_.size (); i++) + for (vsize i = 0; i < elems_.size (); i++) { Grob *elem = elems_[i]; @@ -137,20 +136,6 @@ 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 (); - } -} - bool Score_engraver::try_music (Music *m) { @@ -164,9 +149,9 @@ ADD_TRANSLATOR_GROUP (Score_engraver, /* 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 " + "that a column is always breakable. However, every Bar_engraver " + "that does not have a barline at a certain point will set " + "forbidBreaks 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 */ @@ -174,9 +159,11 @@ ADD_TRANSLATOR_GROUP (Score_engraver, /* accept */ "break-event", + /* read */ "currentMusicalColumn " "currentCommandColumn " "verticallySpacedContexts", + /* write */ "");