--- /dev/null
+\version "2.15.27"
+
+\header {
+ texidoc = "Shows the id property of a grob being set. This should have
+no effect in the PS backend.
+"
+}
+
+{ \override NoteHead #'id = #"foo" c }
= *unsmob_stencil (scm_call_1 (ly_lily_module_constant ("stencil-whiteout"),
retval.smobbed_copy ()));
}
+
+ SCM id = get_property ("id");
+ if (scm_is_string (id))
+ {
+ SCM expr = scm_list_3 (ly_symbol2scm ("id"),
+ id,
+ retval.expr ());
+
+ retval = Stencil (retval.extent_box (), expr);
+ }
+
}
return retval;
"cause "
"color "
"cross-staff "
+ "id "
"extra-X-extent "
"extra-Y-extent "
"extra-offset "
interpret_stencil_expression (scm_caddr (expr), func, func_arg, o);
(*func) (func_arg, scm_list_1 (ly_symbol2scm ("resetcolor")));
+ return;
+ }
+ else if (head == ly_symbol2scm ("id"))
+ {
+ SCM id = scm_cadr (expr);
+
+ (*func) (func_arg, scm_list_2 (ly_symbol2scm ("start-enclosing-id-node"), id));
+ interpret_stencil_expression (scm_caddr (expr), func, func_arg, o);
+ (*func) (func_arg, scm_list_1 (ly_symbol2scm ("end-enclosing-id-node")));
+
return;
}
else if (head == ly_symbol2scm ("rotate-stencil"))
;;
;; i
;;
+ (id ,string? "An id string for the grob. Depending on the typestting
+backend being used, this id will be assigned to a group containing all of
+the stencils that comprise a given grob. For example, in the svg backend,
+the string will be assigned to the @code{id} attribute of a group (<g>)
+that encloses the stencils that comprise the grob. In the Postscript
+backend, as there is no way to group items, the setting of the id property
+will have no effect.")
(ignore-collision ,boolean? "If set, don't do note collision
resolution on this @code{NoteColumn}.")
(implicit ,boolean? "Is this an implicit bass figure?")
ellipse
embedded-ps
embedded-svg
+ end-enclosing-id-node
glyph-string
grob-cause
named-glyph
setcolor
setrotation
setscale
+ start-enclosing-id-node
text
unknown
url-link
combine-stencil
delay-stencil-evaluation
footnote
+ id
rotate-stencil
scale-stencil
translate-stencil
"false")
radius thick))
+(define (start-enclosing-id-node s)
+ "")
+
+(define (end-enclosing-id-node)
+ "")
+
(define (dashed-line thick on off dx dy phase)
(ly:format "~4f ~4f ~4f [ ~4f ~4f ] ~4f draw_dashed_line"
dx
"c = close"
(format #f "</~S>\n" entity))
+(define (start-enclosing-id-node s)
+ (string-append "<g id=\"" s "\">\n"))
+
+(define (end-enclosing-id-node)
+ "</g>\n")
+
(define-public (comment s)
(string-append "<!-- " s " -->\n"))