X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fbreak-align-interface.cc;h=0a1678172eca7252366ac07db687b9dcba28f446;hb=9a38b47c4a4589f2e7c413fcdfff83de454719e6;hp=3a7e953811299bdc25821a10a11199c4898c79ce;hpb=ce521e79fd7669b45c8c1132e4b5693a03b5d90a;p=lilypond.git diff --git a/lily/break-align-interface.cc b/lily/break-align-interface.cc index 3a7e953811..0a1678172e 100644 --- a/lily/break-align-interface.cc +++ b/lily/break-align-interface.cc @@ -58,7 +58,7 @@ Break_align_interface::self_align_callback (SCM element_smob, SCM axis) /* Force break alignment itself to be done first, in the case */ - return Side_position_interface::aligned_on_self (element_smob, axis); + return Self_alignment_interface::aligned_on_self (element_smob, axis); } void @@ -67,13 +67,6 @@ Break_align_interface::add_element (Grob*me, Grob *toadd) Axis_group_interface::add_element (me, toadd); } -void -Break_align_interface::set_interface (Grob*me) -{ - Align_interface::set_interface (me); - Align_interface::set_axis (me,X_AXIS); -} - void Break_align_interface::do_alignment (Grob *me) { @@ -92,7 +85,7 @@ Break_align_interface::do_alignment (Grob *me) int idx = 0; - while (extents[idx].empty_b ()) + while (idx < extents.size () && extents[idx].empty_b ()) idx++; Array offsets; @@ -162,17 +155,17 @@ Break_align_interface::do_alignment (Grob *me) bool entry_found = gh_pair_p (entry); if (!entry_found) { - String sym_str; - if(gh_symbol_p(rsym)) - sym_str = ly_symbol2string (rsym); + String sym_string; + if(gh_symbol_p (rsym)) + sym_string = ly_symbol2string (rsym); - String orig_str ; + String orig_string ; if (unsmob_grob (l->get_grob_property ("cause"))) - orig_str = unsmob_grob (l->get_grob_property ("cause"))->name (); + orig_string = unsmob_grob (l->get_grob_property ("cause"))->name (); programming_error (_f("No spacing entry from %s to `%s'", - orig_str.ch_C (), - sym_str.ch_C())); + orig_string.to_str0 (), + sym_string.to_str0 ())); } Real distance = 1.0; @@ -222,3 +215,29 @@ Break_align_interface::do_alignment (Grob *me) } +ADD_INTERFACE (Break_aligned_interface, "break-aligned-interface", + "Items that are aligned in prefatory matter. + +The spacing of these items is controlled by the space-alist +property. It contains a list break-align-symbols with a specification +of the associated space. The space definition is either (extra-space +. @var{number}), which adds space after the symbol, (minimum-space +. @var{ms}), which pads the space until it it is @var{ms}. + + +Special keys for the alist are 'first-note and 'next-note, signifyign +the first note on a line, and the next note halfway a line. + +Rules for this spacing are much more complicated than this. +See [Wanske] page 126 -- 134, [Ross] pg 143 -- 147 + + +", + "break-align-symbol break-alignment-done space-alist"); + +ADD_INTERFACE (Break_align_interface, "break-alignment-interface", + "See @ref{break-aligned-interface}.", + "break-alignment-done"); + + +