lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bar-line-engraver and breakpoints


From: Joe Neeman
Subject: bar-line-engraver and breakpoints
Date: Mon, 27 Feb 2006 08:25:03 +1100
User-agent: Mozilla Thunderbird 1.0.7 (X11/20051121)

Is there a reason why breaks are on by default and the barline engraver forbids them whenever there is no bar line? It seems simpler for breaks to be off by default and to have Paper_column_engraver acknowledge bar lines by setting the current column to be breakable. The patch should show you what I mean.

If this is an acceptable change then I will use the same structure for marking possible page turns.
Index: lily/paper-column-engraver.cc
===================================================================
RCS file: /sources/lilypond/lilypond/lily/paper-column-engraver.cc,v
retrieving revision 1.12
diff -u -r1.12 paper-column-engraver.cc
--- lily/paper-column-engraver.cc       31 Jan 2006 00:30:43 -0000      1.12
+++ lily/paper-column-engraver.cc       26 Feb 2006 21:22:34 -0000
@@ -55,6 +55,8 @@
   p1->set_property ("when", m);
   p2->set_property ("when", m);
 
+  p1->set_property ("breakable", SCM_BOOL_F);
+
   set_columns (p1, p2);
 }
 
@@ -90,6 +92,13 @@
 }
 
 void
+Paper_column_engraver::acknowledge_bar_line (Grob_info gi)
+{
+  if (command_column_)
+    command_column_->set_property ("breakable", SCM_BOOL_T);
+}
+
+void
 Paper_column_engraver::set_columns (Paper_column *new_command,
                                    Paper_column *new_musical)
 {
@@ -108,8 +117,8 @@
 void
 Paper_column_engraver::forbid_breaks ()
 {
-  if (command_column_ && !first_)
-    command_column_->set_property ("breakable", SCM_EOL);
+  /*if (command_column_ && !first_)
+    command_column_->set_property ("breakable", SCM_EOL);*/
 }
 
 bool
@@ -204,6 +213,7 @@
 ADD_ACKNOWLEDGER (Paper_column_engraver, item);
 ADD_ACKNOWLEDGER (Paper_column_engraver, note_spacing);
 ADD_ACKNOWLEDGER (Paper_column_engraver, staff_spacing);
+ADD_ACKNOWLEDGER (Paper_column_engraver, bar_line);
 
 ADD_TRANSLATOR (Paper_column_engraver,
                /* doc */ "Takes care of generating columns."
Index: lily/include/paper-column-engraver.hh
===================================================================
RCS file: /sources/lilypond/lilypond/lily/include/paper-column-engraver.hh,v
retrieving revision 1.8
diff -u -r1.8 paper-column-engraver.hh
--- lily/include/paper-column-engraver.hh       11 Feb 2006 11:35:16 -0000      
1.8
+++ lily/include/paper-column-engraver.hh       26 Feb 2006 21:22:35 -0000
@@ -28,6 +28,7 @@
   DECLARE_ACKNOWLEDGER (item);
   DECLARE_ACKNOWLEDGER (note_spacing);
   DECLARE_ACKNOWLEDGER (staff_spacing);
+  DECLARE_ACKNOWLEDGER (bar_line);
 
   System *system_;
   Music *break_event_;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]