]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/break-align-interface.cc
2003 -> 2004
[lilypond.git] / lily / break-align-interface.cc
index 3584e3d077cd625c2b6dafef9187102e919fa2b1..de8ba98a118c4f7554baa96e2d4d1e1707af33eb 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
@@ -32,9 +32,9 @@ Break_align_interface::alignment_callback (SCM element_smob, SCM axis)
 
   assert (a == X_AXIS);
   Grob *par = me->get_parent (a);
-  if (par && !to_boolean (par->get_grob_property ("break-alignment-done")))
+  if (par && !to_boolean (par->get_grob_property ("positioning-done")))
     {
-      par->set_grob_property ("break-alignment-done", SCM_BOOL_T);
+      par->set_grob_property ("positioning-done", SCM_BOOL_T);
       Break_align_interface::do_alignment (par);
     }
     
@@ -102,8 +102,7 @@ Break_align_interface::do_alignment (Grob *me)
     {
       int next_idx = idx+1;
       while (next_idx < elems.size() &&
-            extents[next_idx].is_empty ()
-           )
+            extents[next_idx].is_empty () )
        next_idx++;
       
       Grob *l = elems[idx];
@@ -188,7 +187,9 @@ Break_align_interface::do_alignment (Grob *me)
       if (r)
        {
          if (type == ly_symbol2scm ("extra-space"))
-           offsets[next_idx] = extents[idx][RIGHT] + distance;
+           offsets[next_idx] = extents[idx][RIGHT] + distance
+             - extents[next_idx][LEFT];
+         /* should probably junk minimum-space */
          else if (type == ly_symbol2scm("minimum-space"))
            offsets[next_idx] = extents[idx][RIGHT] >? distance;
        }
@@ -230,26 +231,33 @@ Break_align_interface::do_alignment (Grob *me)
 
 
 ADD_INTERFACE (Break_aligned_interface, "break-aligned-interface",
-              //
-"Items that are aligned in prefatory matter.\n"
-"\n"
-"The spacing of these items is controlled by the space-alist\n"
-"property. It contains a list break-align-symbols with a specification\n"
-"of the associated space. The space definition is either (extra-space\n"
-". @var{number}), which adds space after the symbol, (minimum-space\n"
-". @var{ms}), which pads the space until it it is @var{ms}.\n"
-"\n"
-"\n"
-"Special keys for the alist are 'first-note and 'next-note, signifyign\n"
-"the first note on a line, and the next note halfway a line.\n"
-"\n"
-"Rules for this spacing are much more complicated than this. \n"
-"See [Wanske] page 126 -- 134, [Ross] pg 143 -- 147\n",
-  "break-align-symbol break-alignment-done space-alist");
+              "Items that are aligned in prefatory matter.\n"
+              "\n"
+              "The spacing of these items is controlled by the space-alist\n"
+              "property. It contains a list break-align-symbols with a specification\n"
+              "of the associated space. The space specification can be "
+              "@table @code\n"
+              "@item (minimum-space . @var{spc}))\n"
+              "  Pad space until the distance is @var{spc}\n"
+              "@item (fixed-space . @var{spc})\n"
+              "  Set a fixed space\n" 
+              "@item (semi-fixed-space . @var{spc})\n"
+              "  Set a space. Half of it is fixed and half is stretchable. \n"
+              "(does not work at start of line. fixme)\n"
+              "@item (extra-space . @var{spc})\n"
+              "  Add @var{spc} amount of space.\n"
+              "@end table\n"
+              "\n"
+              "Special keys for the alist are 'first-note and 'next-note, signifying\n"
+              "the first note on a line, and the next note halfway a line.\n"
+              "\n"
+              "Rules for this spacing are much more complicated than this. \n"
+              "See [Wanske] page 126 -- 134, [Ross] pg 143 -- 147\n",
+              "break-align-symbol space-alist");
 
 ADD_INTERFACE (Break_align_interface, "break-alignment-interface",
   "See @ref{break-aligned-interface}.",
-  "break-alignment-done");
+  "positioning-done");