From 283734747d7f0f1d74be35617e69851b665d4858 Mon Sep 17 00:00:00 2001 From: Mark Polesky Date: Fri, 12 Nov 2010 17:18:12 -0800 Subject: [PATCH] vert. spacing: Clean up affected files. --- lily/axis-group-interface.cc | 30 +++++++------- scm/define-grob-properties.scm | 76 +++++++++++++++++----------------- scm/define-grobs.scm | 10 ++--- 3 files changed, 58 insertions(+), 58 deletions(-) diff --git a/lily/axis-group-interface.cc b/lily/axis-group-interface.cc index 205e76a3f1..35ad189c13 100644 --- a/lily/axis-group-interface.cc +++ b/lily/axis-group-interface.cc @@ -364,7 +364,7 @@ Axis_group_interface::combine_skylines (SCM smob) } return ret.smobbed_copy (); } - + SCM Axis_group_interface::generic_group_extent (Grob *me, Axis a) { @@ -403,7 +403,7 @@ SCM Axis_group_interface::calc_pure_relevant_grobs (SCM smob) { Grob *me = unsmob_grob (smob); - + extract_grob_set (me, "elements", elts); vector relevant_grobs; @@ -693,7 +693,7 @@ Axis_group_interface::skyline_spacing (Grob *me, vector elements) SCM priority = elements[i]->get_property ("outside-staff-priority"); vector current_elts; current_elts.push_back (elements[i]); - while (i + 1 < elements.size () + while (i + 1 < elements.size () && scm_eq_p (elements[i+1]->get_property ("outside-staff-priority"), priority)) { if (!to_boolean (elements[i+1]->get_property ("cross-staff"))) @@ -731,9 +731,9 @@ SCM Axis_group_interface::calc_pure_staff_staff_spacing (SCM smob, SCM start, SCM end) { return calc_maybe_pure_staff_staff_spacing (unsmob_grob (smob), - true, - scm_to_int (start), - scm_to_int (end)); + true, + scm_to_int (start), + scm_to_int (end)); } MAKE_SCHEME_CALLBACK (Axis_group_interface, calc_staff_staff_spacing, 1) @@ -741,9 +741,9 @@ SCM Axis_group_interface::calc_staff_staff_spacing (SCM smob) { return calc_maybe_pure_staff_staff_spacing (unsmob_grob (smob), - false, - 0, - INT_MAX); + false, + 0, + INT_MAX); } SCM @@ -781,24 +781,24 @@ ADD_INTERFACE (Axis_group_interface, // VerticalAxisGroup. We should split off a // vertical-axis-group-interface. /* properties */ - "X-common " - "Y-common " "adjacent-pure-heights " "axes " "default-staff-staff-spacing " "elements " + "max-stretch " + "no-alignment " "nonstaff-nonstaff-spacing " "nonstaff-relatedstaff-spacing " - "max-stretch " "nonstaff-unrelatedstaff-spacing " - "staff-staff-spacing " - "no-alignment " - "pure-Y-common " "pure-relevant-grobs " "pure-relevant-items " "pure-relevant-spanners " + "pure-Y-common " "staff-affinity " "staff-grouper " + "staff-staff-spacing " "system-Y-offset " "vertical-skylines " + "X-common " + "Y-common " ); diff --git a/scm/define-grob-properties.scm b/scm/define-grob-properties.scm index 29c72d4fc1..db11d27a8a 100644 --- a/scm/define-grob-properties.scm +++ b/scm/define-grob-properties.scm @@ -38,10 +38,6 @@ ;; (add-stem-support ,boolean? "If set, the @code{Stem} object is included in this script's support.") - (staffgroup-staff-spacing ,list? "An alist of spacing variables -that controls the spacing after the last staff in this staff group. -See @var{staff-staff-spacing} for a description of the elements of -this alist.") (after-line-breaking ,boolean? "Dummy property, used to trigger callback for @code{after-line-breaking}.") (align-dir ,ly:dir? "Which side to align? @code{-1}: left side, @@ -110,10 +106,6 @@ beamlet, as a proportion of the distance between two adjacent stems.") (before-line-breaking ,boolean? "Dummy property, used to trigger a callback function.") (between-cols ,pair? "Where to attach a loose column to.") - (staff-staff-spacing ,list? "An alist of spacing variables -that controls the spacing between staves within this staff group. -See @var{staff-staff-spacing} for a description of the elements of -this alist.") (bound-details ,list? "An alist of properties for determining attachments of spanners to edges.") (bound-padding ,number? "The amount of padding to insert around @@ -475,12 +467,6 @@ resolution on this @code{NoteColumn}.") configuration to this index, and print the respective scores.") (inspect-quants ,number-pair? "If debugging is set, set beam and slur quants to this position, and print the respective scores.") - (nonstaff-nonstaff-spacing ,list? "Specifies how to vertically -position a non-spaced line relative to the other non-spaced lines -around it. See @var{staff-staff-spacing} for the format of this list.") - (nonstaff-relatedstaff-spacing ,list? "Specifies how to vertically -position a non-spaced line relative to the staff for which it -has affinity. See @var{staff-staff-spacing} for the format of this list.") ;; @@ -585,42 +571,29 @@ center of the staff.") to flip the direction of custos stem.") (next ,ly:grob? "Object that is next relation (e.g., the lyric syllable following an extender).") - (staff-staff-spacing ,list? "An alist of properties used to position -the next staff in the system. The symbols that can be defined in the alist -are -@itemize @bullet -@item @var{space} -- the amount of stretchable space between the center -of this staff and the center of the next staff; -@item @var{padding} -- the minimum amount of whitespace that must be -present between this staff and the next staff; -@item @var{stretchability} -- the ease with which the stretchable -space increases when the system to which this staff belongs is stretched. -If this is zero, the distance to the next staff will be fixed either at -@var{space} or at @var{padding} plus the minimum distance to ensure -there is no overlap, whichever is larger; -@item @var{minimum-distance} -- the minimum distance to place between -the center of this staff and the center of the next. This differs -from @var{padding} in that the height of a staff has no effect on -the application of @var{minimum-distance} (whereas the height of a -staff is crucial for @var{padding}). -@end itemize") (no-alignment ,boolean? "If set, don't place this grob in a @code{VerticalAlignment}; rather, place it using its own @code{Y-offset} callback.") - (non-break-align-symbols ,list? "A list of symbols that determine -which NON-break-aligned interfaces to align this to.") (no-ledgers ,boolean? "If set, don't draw ledger lines on this object.") (no-stem-extend ,boolean? "If set, notes with ledger lines do not get stems extending to the middle staff line.") + (non-break-align-symbols ,list? "A list of symbols that determine +which NON-break-aligned interfaces to align this to.") + (non-default ,boolean? "Set for manually specified clefs.") + (non-musical ,boolean? "True if the grob belongs to a +@code{NonMusicalPaperColumn}.") + (nonstaff-nonstaff-spacing ,list? "Specifies how to vertically +position a non-spaced line relative to the other non-spaced lines +around it. See @var{staff-staff-spacing} for the format of this list.") + (nonstaff-relatedstaff-spacing ,list? "Specifies how to vertically +position a non-spaced line relative to the staff for which it +has affinity. See @var{staff-staff-spacing} for the format of this list.") (nonstaff-unrelatedstaff-spacing ,list? "An alist of spacing variables that controls the spacing from a loose line (see @var{staff-affinity}) to the staff for which the loose line does not have affinity. See @var{staff-staff-spacing} for a description of the elements of this alist.") - (non-default ,boolean? "Set for manually specified clefs.") - (non-musical ,boolean? "True if the grob belongs to a -@code{NonMusicalPaperColumn}.") (note-names ,vector? "Vector of strings containing names for easy-notation note heads.") @@ -778,6 +751,33 @@ baselines.") staff spaces, counted from the middle line.") (staff-space ,ly:dimension? "Amount of space between staff lines, expressed in global @code{staff-space}.") + (staff-staff-spacing ,list? "An alist of spacing variables +that controls the spacing between staves within this staff group. +See @var{staff-staff-spacing} for a description of the elements of +this alist.") + (staff-staff-spacing ,list? "An alist of properties used to position +the next staff in the system. The symbols that can be defined in the alist +are +@itemize @bullet +@item @var{space} -- the amount of stretchable space between the center +of this staff and the center of the next staff; +@item @var{padding} -- the minimum amount of whitespace that must be +present between this staff and the next staff; +@item @var{stretchability} -- the ease with which the stretchable +space increases when the system to which this staff belongs is stretched. +If this is zero, the distance to the next staff will be fixed either at +@var{space} or at @var{padding} plus the minimum distance to ensure +there is no overlap, whichever is larger; +@item @var{minimum-distance} -- the minimum distance to place between +the center of this staff and the center of the next. This differs +from @var{padding} in that the height of a staff has no effect on +the application of @var{minimum-distance} (whereas the height of a +staff is crucial for @var{padding}). +@end itemize") + (staffgroup-staff-spacing ,list? "An alist of spacing variables +that controls the spacing after the last staff in this staff group. +See @var{staff-staff-spacing} for a description of the elements of +this alist.") (stem-attachment ,number-pair? "An @code{(@var{x} . @var{y})} pair where the stem attaches to the notehead.") (stem-end-position ,number? "Where does the stem end (the end is diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm index bc72e2c1f6..5dfaa60030 100644 --- a/scm/define-grobs.scm +++ b/scm/define-grobs.scm @@ -1690,8 +1690,8 @@ (StaffGrouper . ( (staff-staff-spacing . ((space . 9) - (minimum-distance . 7) - (padding . 1))) + (minimum-distance . 7) + (padding . 1))) (staffgroup-staff-spacing . ((space . 10.5) (minimum-distance . 8) (padding . 1))) @@ -2263,10 +2263,10 @@ (adjacent-pure-heights . ,ly:axis-group-interface::adjacent-pure-heights) (axes . (,Y)) (default-staff-staff-spacing . ((space . 9) - (minimum-distance . 8) - (padding . 1))) - (staff-staff-spacing . ,ly:axis-group-interface::calc-staff-staff-spacing) + (minimum-distance . 8) + (padding . 1))) (nonstaff-unrelatedstaff-spacing . ((padding . 0.5))) + (staff-staff-spacing . ,ly:axis-group-interface::calc-staff-staff-spacing) (stencil . ,ly:axis-group-interface::print) (vertical-skylines . ,ly:hara-kiri-group-spanner::calc-skylines) (X-extent . ,ly:axis-group-interface::width) -- 2.39.2