for (vsize i = 0; i < axis_groups_.size (); i++)
Pointer_group_interface::add_grob (text_spanner_,
- ly_symbol2scm ("system-start-text-alignment-elements"),
+ ly_symbol2scm ("elements"),
axis_groups_[i]);
text_spanner_->set_bound (RIGHT,
unsmob_grob (get_property ("currentCommandColumn")));
Pointer_group_interface::set_ordered (text_spanner_,
- ly_symbol2scm ("system-start-text-alignment-elements"),
+ ly_symbol2scm ("elements"),
false);
text_spanner_ = 0;
dim.set_minimum_height (staff_extents[dir]);
}
+ // this seems kinda kludgy, as there is no apparent logic to it
+ // however, it is a holdover from the previous code and
+ // necessary for the InstrumentName grob
+ // TODO: find a better way to deal with this...
+ if (dim.is_empty ())
+ {
+ dim = Skyline (dim.direction ());
+ dim.set_minimum_height (0.0);
+ }
+
// Many cross-staff grobs do not have good height estimations.
// We give the grob the best chance of not colliding by shifting
// it to the maximum height in the case of cross-staff alignment.
(ly:add-interface
'system-start-text-interface
"Text in front of the system."
- '(system-start-text-alignment-elements long-text
- padding self-alignment-X self-alignment-Y text))
+ '(long-text self-alignment-X self-alignment-Y text))
(ly:add-interface
'tab-note-head-interface
(staff-symbol ,ly:grob? "The staff symbol grob that we are in.")
(stem ,ly:grob? "A pointer to a @code{Stem} object.")
(stems ,ly:grob-array? "An array of stem objects.")
- (system-start-text-alignment-elements ,ly:grob-array? "Elements
-used to align system start text.")
(tie ,ly:grob? "A pointer to a @code{Tie} object.")
(ties ,ly:grob-array? "A grob array of @code{Tie} objects.")
(direction . ,LEFT)
(font-series . bold)
(padding . 1.0)
- (self-alignment-X . ,RIGHT)
(side-axis . ,X)
(stencil . ,ly:text-interface::print)
- (X-offset . ,stanza-number::calc-x-offset)
+ (X-offset . ,ly:side-position-interface::x-aligned-side)
(Y-extent . ,grob::always-Y-extent-from-stencil)
(meta . ((class . Item)
(interfaces . (font-interface
- self-alignment-interface
side-position-interface
stanza-number-interface
text-interface))))))
0.0))))
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; stanza-number
-
-(define-public (stanza-number::calc-x-offset grob)
- "We want @code{StanzaNumbers} to side-align to lyrics.
-Sometimes, however, this is not possible, as the lyrics
-they align to are hara-kiri'd. In this case, we self-align
-them to the right and tack on any padding."
- (if (null? (ly:grob-object grob 'side-support-elements))
- (+ (ly:self-alignment-interface::x-aligned-on-self grob)
- (* (ly:grob-property grob 'direction LEFT)
- (ly:grob-property grob 'padding 0.0)))
- (ly:side-position-interface::x-aligned-side grob)))
-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; instrument names
(common (ly:grob-common-refpoint-of-array system elements X))
(total-ext empty-interval)
(align-x (ly:grob-property grob 'self-alignment-X 0))
- (my-padding (ly:grob-property grob 'padding 0))
- (ss (ly:staff-symbol-staff-space grob))
(padding (min 0 (- (interval-length my-extent) indent)))
(right-padding (- padding
(/ (* padding (1+ align-x)) 2))))
(unite-delims (1- l)))))
(+
- (- (interval-length my-extent))
- (* -1 my-padding ss)
+ (ly:side-position-interface::x-aligned-side grob)
right-padding
(- (interval-length total-ext)))))
(define-public (system-start-text::calc-y-offset grob)
(define (live-elements-list me)
- (let ((elements (ly:grob-object me 'system-start-text-alignment-elements)))
+ (let ((elements (ly:grob-object me 'elements)))
(filter! grob::is-live?
(ly:grob-array->list elements))))