2004-02-11 Han-Wen Nienhuys <hanwen@xs4all.nl>
- * GNUmakefile.in (README_FILES): remove TODO.
+ * lily/side-position-interface.cc (general_side_position): if
+ staff-padding is set, then include staff in support too.
+
+ * GNUmakefile.in (README_FILES): remove TODO. Put in new CVS
+ module workbook
* TODO: Remove. Put in new CVS module /cvsroot/lilypond/workbook/
Real ss = Staff_symbol_referencer::staff_space (me);
SCM support = me->get_grob_property ("side-support-elements");
Grob *common = common_refpoint_of_list (support, me->get_parent (a), a);
-
+ Grob * st = Staff_symbol_referencer::get_staff_symbol (me);
+ bool include_staff = (st
+ && a == Y_AXIS
+ && gh_number_p (me->get_grob_property ("staff-padding")));
+
Interval dim;
+ if (include_staff)
+ {
+ common = st->common_refpoint (common, Y_AXIS);
+ dim = st->extent (common, Y_AXIS);
+ }
+
for (SCM s = support; s != SCM_EOL; s = ly_cdr (s))
{
Grob * e = unsmob_grob (ly_car (s));
-// ugh. doesn't cactch all variants.
+// ugh. doesn't catch all variants.
Axis
Side_position_interface::get_axis (Grob*me)
{
"Position a victim object (this one) next to other objects (the "
"support). In this case, the property @code{direction} signifies where to put the "
"victim object relative to the support (left or right, up or down?)\n\n "
- "The routine puts objects at a distance of the staff if the property "
- "@code{staff-padding} is defined. If undefined, the staff symbol is ignored."
+ "The routine also takes the size the staff into account if "
+ "@code{staff-padding} is set. If undefined, the staff symbol is ignored."
,
"staff-padding side-support-elements direction-source "
"direction side-relative-direction minimum-space padding");
(avoid-note-head ,boolean? "if set, the stem of a chord does not pass through all note head, but start at the last note head. Used by tablature.")
(staff-padding ,ly:dimension?
- "Maintain this much space to the staff. It's
-effect is similar to the padding mechanism, but this will keep objects
-above and below the staff in a row more often, when the heights of the
-notes vary.
-")
-
+ "Maintain this much space between reference points
+and the staff. Its effect is to align objects of differing sizes (like the dynamic @b{p} and @b{f}) on their baselines.")
(use-breve-rest ,boolean? "boolean that tells multi-measure-rest
to use a breve rest to represent the duration of 1 measure instead of
whole rest. It defaults to false. It is set to true when the
))
(define (put-range x a b)
+ (display (list "put range " x a b "\n"))
(do
((i a (1+ i)))
((> i b) b)
(set! (configuration (vector-ref result i)) x)
))
(define (put x)
- (set! (configuration (vector-ref result ri)) x))
+
+ (display (list "putting " x "\n"))
+ (set! (configuration (vector-ref result ri)) x))
(define (try-solo type start-idx current-idx)
+ "Find a maximum stretch that can be marked as solo. Only set
+the mark when there are no spanners active."
(if (< current-idx (vector-length result))
(let*
((now-state (vector-ref result current-idx))
(1- current-idx)))
(define (analyse-moment ri)
- "Analyse 'apart starting at RI. Return next index.
-"
-
+ "Analyse 'apart starting at RI. Return next index. "
(let*
((now-state (vector-ref result ri))
(vs1 (car (voice-states now-state)))
(n1 (length notes1))
(n2 (length notes2)) )
+ (display (list "analysing " (when now-state)
+ "\n1= " vs1
+ "\n2= " vs2
+ "\n"))
+
(cond
((and (= n1 0) (= n2 0))
(put 'apart-silence)
))
(analyse-time-step 0)
- (analyse-a2 0)
+; (display result)
+; (analyse-a2 0)
; (display result)
(analyse-solo12 0)
-; (if pc-debug (display result))
+ (display result)
(set! result (map
(lambda (x) (cons (when x) (configuration x)))