(all-user-translation-properties): add verticallySpacedContexts.
* scm/define-grob-interfaces.scm (vertically-spaceable-interface):
add interface
* scm/define-grob-properties.scm (all-internal-grob-properties):
add spaceable-staves
* scm/define-grobs.scm (all-grob-descriptions): set
vertically-spaceable-interface for VerticalAxisGroup and
RemoveEmptyVerticalGroup
* lily/system.cc (get_line): determine staff_refpoints_
using spaceable-staves.
* lily/score-engraver.cc (acknowledge_grob): ack
vertically-spaceable-interface and verticallySpacedContexts to
set spaceable-staves.
* input/regression/new-slur.ly: add slur under 16th subbeam case.
* lily/slur-scoring.cc (fill): init has_same_beam_ before use.
+2004-10-25 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * scm/define-context-properties.scm
+ (all-user-translation-properties): add verticallySpacedContexts.
+
+ * scm/define-grob-interfaces.scm (vertically-spaceable-interface):
+ add interface
+
+ * scm/define-grob-properties.scm (all-internal-grob-properties):
+ add spaceable-staves
+
+ * scm/define-grobs.scm (all-grob-descriptions): set
+ vertically-spaceable-interface for VerticalAxisGroup and
+ RemoveEmptyVerticalGroup
+
+ * lily/system.cc (get_line): determine staff_refpoints_
+ using spaceable-staves.
+
+ * lily/score-engraver.cc (acknowledge_grob): ack
+ vertically-spaceable-interface and verticallySpacedContexts to
+ set spaceable-staves.
+
+ * input/regression/new-slur.ly: add slur under 16th subbeam case.
+
+ * lily/slur-scoring.cc (fill): init has_same_beam_ before use.
+
2004-10-24 Han-Wen Nienhuys <hanwen@xs4all.nl>
* input/mutopia/F.Schubert/morgenlied.ly (pianoLH): tune
\\
{r8 <as es> r <f des> r }
>>
- s4
-
+ \new Voice { \voiceOne b='8[ c16( d]) }
g='8[( a b b! ] c4 bes)
bes='8( f' des bes) as4( bes)
r8 d( f e d c b a)
ly_symbol2scm ("spacing-wishes"),
gi.grob_);
}
+
+ if (Axis_group_interface::has_interface (gi.grob_)
+ && gi.grob_->internal_has_interface (ly_symbol2scm ("vertically-spaceable-interface")))
+ {
+ SCM spaceable = get_property ("verticallySpacedContexts");
+ Context *orig = gi.origin_contexts (this)[0];
+
+ if (scm_memq (ly_symbol2scm (orig->context_name ().to_str0()),
+ spaceable) != SCM_BOOL_F)
+ {
+ Pointer_group_interface::add_grob (system_,
+ ly_symbol2scm ("spaceable-staves"),
+ gi.grob_);
+ }
+ }
+
}
,
/* creats*/ "System PaperColumn NonMusicalPaperColumn",
/* accepts */ "break-event",
-/* acks */ "note-spacing-interface staff-spacing-interface",
-/* reads */ "currentMusicalColumn currentCommandColumn",
+/* acks */ "note-spacing-interface staff-spacing-interface axis-group-interface",
+/* reads */ "currentMusicalColumn currentCommandColumn verticallySpacedContexts",
/* write */ "");
is_broken_ = (!extremes_[LEFT].note_column_
|| !extremes_[RIGHT].note_column_);
+ has_same_beam_ =
+ (extremes_[LEFT].stem_ && extremes_[RIGHT].stem_
+ && Stem::get_beam (extremes_[LEFT].stem_) == Stem::get_beam (extremes_[RIGHT].stem_));
base_attachments_ = get_base_attachments ();
= (extremes_[LEFT].stem_ && Stem::get_beam (extremes_[LEFT].stem_))
|| (extremes_[RIGHT].stem_ && Stem::get_beam (extremes_[RIGHT].stem_));
- has_same_beam_ =
- (extremes_[LEFT].stem_ && extremes_[RIGHT].stem_
- && Stem::get_beam (extremes_[LEFT].stem_) == Stem::get_beam (extremes_[RIGHT].stem_));
set_next_direction ();
Start with layer 3, since scm_cons prepends to list. */
SCM all = get_property ("all-elements");
- Interval staff_refpoints;
- staff_refpoints.set_empty();
for (int i = LAYER_COUNT; i--;)
for (SCM s = all; scm_is_pair (s); s = scm_cdr (s))
Grob *g = unsmob_grob (scm_car (s));
Stencil *stil = g->get_stencil ();
- if (i == 0
- && Axis_group_interface::has_interface (g)
- && !Align_interface::has_interface (g)
- && dynamic_cast<Spanner*> (g)
- /*
- UGH.
- */
- && !g->internal_has_interface (ly_symbol2scm ("dynamic-interface"))
- && !g->internal_has_interface (ly_symbol2scm ("piano-pedal-interface"))
- )
- {
- staff_refpoints.add_point (g->relative_coordinate (this, Y_AXIS));
- }
-
/* Skip empty stencils and grobs that are not in this layer. */
if (!stil
|| robust_scm2int (g->get_property ("layer"), 1) != i)
Stencil sys_stencil (Box (x,y),
scm_cons (ly_symbol2scm ("combine-stencil"),
exprs));
+
+ Interval staff_refpoints;
+ staff_refpoints.set_empty();
+ for (SCM s = get_property ("spaceable-staves");
+ scm_is_pair (s); s = scm_cdr (s))
+ {
+ Grob *g = unsmob_grob (scm_car (s));
+ staff_refpoints.add_point (g->relative_coordinate (this, Y_AXIS));
+ }
+
Paper_system *pl = new Paper_system (sys_stencil, false);
pl->staff_refpoints_ = staff_refpoints;
Item * break_point =this->get_bound(LEFT);
ADD_INTERFACE (System,"system-interface",
"This is the toplevel object: each object in a score "
"ultimately has a System object as its X and Y parent. ",
- "all-elements columns")
+ "all-elements spaceable-staves columns")
quotedEventTypes = #'(note-event rest-event time-scaled-music tie-event)
instrumentTransposition = #(ly:make-pitch 0 0 0)
+
+ verticallySpacedContexts = #'(Staff)
}
EasyNotation = \context { % TODO: why \context override?
This does not work for Voice or any other context that doesn't form a
vertical group.")
-
+
+ (verticallySpacedContexts ,list? "List of symbols, containing
+context names whose vertical axis groups should be taken into account for
+vertical spacing of systems.")
+
(vocalName ,markup? "Name of a vocal line.")
(vocNam ,markup? "Name of a vocal line, short version.")
"An interface for any notes set in a tablature staff"
'())
+
+(ly:add-interface
+ 'vertically-spaceable-interface
+ "Objects that should be kept at constant vertical distances. Typically:
+@internalsref{VerticalAxisGroup} objects of @internalsref{Staff} contexts."
+ '())
than a whole rest.")
-
+ (spaceable-staves ,grob-list? "Objects to be spaced during page layout.")
;; ancient notation
(Y-extent-callback . ,Hara_kiri_group_spanner::y_extent)
(remove-first . #t)
(axes . (1))
- (meta . ((interfaces . (axis-group-interface hara-kiri-group-interface item-interface spanner-interface))))
+ (meta . ((interfaces . (axis-group-interface vertically-spaceable-interface hara-kiri-group-interface item-interface spanner-interface))))
))
(RepeatSlash
(Y-extent-callback . ,Axis_group_interface::group_extent_callback)
(X-extent-callback . ,Axis_group_interface::group_extent_callback)
- (meta . ((interfaces . (axis-group-interface spanner-interface))))
+ (meta . ((interfaces . (axis-group-interface vertically-spaceable-interface spanner-interface))))
))
)
)