]> git.donarmstrong.com Git - lilypond.git/blob - scm/define-grob-properties.scm
cd122c5dbab2224f5a1411485601eb301387946a
[lilypond.git] / scm / define-grob-properties.scm
1 ;;;; grob-property-description.scm -- part of generated backend documentation
2 ;;;;
3 ;;;;  source file of the GNU LilyPond music typesetter
4 ;;;; 
5 ;;;; (c) 1998--2007  Han-Wen Nienhuys <hanwen@xs4all.nl>
6 ;;;;                 Jan Nieuwenhuizen <janneke@gnu.org>
7
8 (define (define-grob-property symbol type? description)
9   (if (not (equal? (object-property symbol 'backend-doc) #f))
10       (ly:error (_ "symbol ~S redefined") symbol))
11   
12   (set-object-property! symbol 'backend-type? type?)
13   (set-object-property! symbol 'backend-doc description)
14   symbol)
15
16 ;; put this in an alist?
17 (define-public
18   all-user-grob-properties
19
20   (map
21    (lambda (x)
22      (apply define-grob-property x))
23
24    `(
25      (X-extent ,number-pair? "Hard coded extent in X@tie{}direction.")
26      (X-offset ,number? "The horizontal amount that this object is
27 moved relative to its X-parent.")
28      (Y-extent ,number-pair? "Hard coded extent in Y@tie{}direction.")
29      (Y-offset ,number? "The vertical amount that this object is moved
30 relative to its Y-parent.")
31
32      (add-stem-support ,boolean? "If set, the @code{Stem} object is
33 included in this script's support.") 
34      (after-line-breaking ,boolean? "Dummy property, used to trigger
35 callback for @code{after-line-breaking}.")
36      (align-dir ,ly:dir? "Which side to align? @code{-1}: left side,
37 @code{0}: around center of width, @code{1}: right side.")
38      (allow-loose-spacing ,boolean? "If set, column can be detached
39 from main spacing.")
40      (allow-span-bar ,boolean? "If false, no inter-staff bar line will
41 be created below this bar line.")
42      (alteration ,number? "Alteration numbers for accidental.")
43      (alteration-alist ,list? "List of @code{(@var{pitch}
44 . @var{accidental})} pairs for key signature.")
45      (annotation ,string? "Annotate a grob for debug purposes.")
46      (arpeggio-direction ,ly:dir? "If set, put an arrow on the
47 arpeggio squiggly line.")
48      (arrow-length ,number? "Arrow length.")
49      (arrow-width ,number? "Arrow width.")
50      (auto-knee-gap ,ly:dimension? "If a gap is found between note
51 heads where a horizontal beam fits that is larger than this number,
52 make a kneed beam.")
53      (average-spacing-wishes ,boolean? "If set, the spacing wishes
54 are averaged over staves.")
55      (avoid-note-head ,boolean? "If set, the stem of a chord does not
56 pass through all note heads, but starts at the last note head.")
57      (avoid-slur ,symbol? "Method of handling slur collisions.
58 Choices are @code{around}, @code{inside}, @code{outside}.  If unset,
59 scripts and slurs ignore each other.  @code{around} only moves the
60 script if there is a collision; @code{outside} always moves the
61 script.")
62      (axes ,list? "List of axis numbers.  In the case of alignment
63 grobs, this should contain only one number.")
64
65      (bar-size ,ly:dimension? "The size of a bar line.")
66      (base-shortest-duration ,ly:moment? "Spacing is based on the
67 shortest notes in a piece.  Normally, pieces are spaced as if notes
68 at least as short as this are present.")
69      (baseline-skip ,ly:dimension? "Distance between base lines of
70 multiple lines of text.")
71      (beam-thickness ,ly:dimension? "Beam thickness, measured in
72 @code{staff-space} units.")
73      (beam-width ,ly:dimension? "Width of the tremolo sign.")
74      (beamed-stem-shorten ,list? "How much to shorten beamed stems,
75 when their direction is forced.  It is a list, since the value is
76 different depending on the number of flags and beams.")
77      (beaming ,pair? "Pair of number lists.  Each number list
78 specifies which beams to make.  @code{0}@tie{}is the central beam,
79 @code{1}@tie{}is the next beam toward the note, etc.  This
80 information is used to determine how to connect the beaming patterns
81 from stem to stem inside a beam.")
82      (before-line-breaking ,boolean? "Dummy property, used to trigger
83 a callback function.")
84      (between-cols ,pair? "Where to attach a loose column to.")
85      (bound-padding ,number? "The amount of padding to insert around
86 spanner bounds.")
87      (bound-details ,list? "An alist of properties for determining
88 attachments of spanners to edges.")
89      (bracket-flare ,number-pair? "A pair of numbers specifying how
90 much edges of brackets should slant outward.  Value @code{0.0} means
91 straight edges.")
92      (bracket-visibility ,boolean-or-symbol? "This controls the
93 visibility of the tuplet bracket.  Setting it to false prevents
94 printing of the bracket.  Setting the property to @code{if-no-beam}
95 makes it print only if there is no beam associated with this tuplet
96 bracket.")
97      (break-align-anchor ,number? "Grobs aligned to this break-align
98 grob will have their X-offsets shifted by this number.  In bar lines,
99 for example, this is used to position grobs relative to the (visual)
100 center of the bar line.")
101      (break-align-anchor-alignment ,number? "Read by
102 @code{ly:break-aligned-interface::calc-extent-aligned-anchor} for aligning
103 an anchor to a grob's extent")
104      (break-align-symbol ,symbol? "This key is used for aligning and
105 spacing breakable items.")
106      (break-align-symbols ,list? "A list of symbols that determine
107 which break-aligned grobs to align this to.  If the grob selected by
108 the first symbol in the list is invisible due to break-visibility,
109 we will align to the next grob (and so on).")
110      (break-align-orders ,vector? "Defines the order in which
111 prefatory matter (clefs, key signatures) appears.  The format is a
112 vector of length@tie{}3, where each element is one order for
113 end-of-line, middle of line, and start-of-line, respectively.  An
114 order is a list of symbols.
115
116 For example, clefs are put after key signatures by setting
117
118 @example
119 \\override Score.BreakAlignment #'break-align-orders =
120   #(make-vector 3 '(span-bar
121                     breathing-sign
122                     staff-bar
123                     key
124                     clef
125                     time-signature))
126 @end example")
127      (break-overshoot ,number-pair? "How much does a broken spanner
128 stick out of its bounds?")
129      (break-visibility ,vector? "A vector of 3@tie{}booleans,
130 @code{#(@var{end-of-line} @var{unbroken} @var{begin-of-line})}.
131 @code{#t} means visible, @code{#f} means killed.")
132      (breakable ,boolean? "Allow breaks here.")
133
134      (c0-position ,integer? "An integer indicating the position of
135 middle@tie{}C.")
136      (clip-edges ,boolean? "Allow outward pointing beamlets at the
137 edges of beams?")
138      (collapse-height ,ly:dimension? "Minimum height of system start
139 delimiter.  If equal or smaller, the bracket/brace/line is removed.")
140      (color ,color? "The color of this grob.")
141      (common-shortest-duration ,ly:moment? "The most common shortest
142 note length.  This is used in spacing.  Enlarging this sets the score
143 tighter.")
144      (concaveness ,number? "A beam is concave if its inner stems are
145 closer to the beam than the two outside stems.  This number is a
146 measure of the closeness of the inner stems.  It is used for damping
147 the slope of the beam.")
148      (connect-to-neighbor ,pair? "Pair of booleans, indicating whether
149 this grob looks as a continued break.")
150      (control-points ,list? "List of offsets (number pairs) that form
151 control points for the tie, slur, or bracket shape.  For B@'eziers,
152 this should list the control points of a third-order B@'ezier curve.")
153
154      (damping ,number? "Amount of beam slope damping.")
155      (dash-fraction ,number? "Size of the dashes, relative to
156 @code{dash-period}.  Should be between @code{0.0} (no line) and
157 @code{1.0} (continuous line).")
158      (dash-period ,number? "The length of one dash together with
159 whitespace.  If negative, no line is drawn at all.")
160      (default-direction ,ly:dir? "Direction determined by note head
161 positions.")
162      (digit-names ,vector "Names for string finger digits.")
163      (direction ,ly:dir? "If @code{side-axis} is @code{0} (or
164 @code{#X}), then this property determines whether the object is placed
165 @code{#LEFT}, @code{#CENTER} or @code{#RIGHT} with respect to the
166 other object.  Otherwise, it determines whether the object is placed
167 @code{#UP}, @code{#CENTER} or @code{#DOWN}.  Numerical values may also
168 be used: @code{#UP}=@code{1}, @code{#DOWN}=@code{-1},
169 @code{#LEFT}=@code{-1}, @code{#RIGHT}=@code{1}, @code{#CENTER}=@code{0}.")
170      (dot-count ,integer? "The number of dots.")
171      (dot-placement-list ,list? "List 
172 consisting of @code{(@var{description} @var{string-number} 
173 @var{fret-number} @var{finger-number})} 
174 entries used to define fret diagrams.")
175      (duration-log ,integer? "The 2-log of the note head duration,
176 i.e., @code{0} = whole note, @code{1} = half note, etc.")
177
178      (eccentricity ,number? "How asymmetrical to make a slur.
179 Positive means move the center to the right.")
180      (edge-height ,pair? "A pair of numbers specifying the heights of
181 the vertical edges: @code{(@var{left-height} . @var{right-height})}.")
182      (edge-text ,pair? "A pair specifying the texts to be set at the
183 edges: @code{(@var{left-text} . @var{right-text})}.")
184      (expand-limit ,integer? "Maximum number of measures expanded in
185 church rests.")
186      (extra-X-extent ,number-pair? "A grob is enlarged in
187 X@tie{}dimension by this much.")
188      (extra-Y-extent ,number-pair? "A grob is enlarged in
189 Y@tie{}dimension by this much.")
190      ;; remove me?
191      (extra-dy ,number? "Slope glissandi this much extra.")
192      (extra-offset ,number-pair? "A pair representing an offset.  This
193 offset is added just before outputting the symbol, so the typesetting
194 engine is completely oblivious to it.  The values are measured in
195 @code{staff-space} units of the staff's @code{StaffSymbol}.")
196      (extra-spacing-height ,number-pair? "In the horizontal spacing
197 problem, we increase the height of each item by this amount (by adding
198 the @q{car} to the bottom of the item and adding the @q{cdr} to the top
199 of the item. In order to make a grob infinitely high (to prevent the
200 horizontal spacing problem from placing any other grobs above or below
201 this grob), set this to @code{(-inf.0 . +inf.0)}.")
202      (extra-spacing-width ,number-pair? "In the horizontal spacing
203 problem, we pad each item by this amount (by adding the @q{car} on the
204 left side of the item and adding the @q{cdr} on the right side of the
205 item).  In order to make a grob take up no horizontal space at all,
206 set this to @code{(+inf.0 . -inf.0)}.")
207      (flag-count ,number? "The number of tremolo beams.")
208      (flag-style ,symbol? "A string determining what style of flag
209 glyph is typeset on a @code{Stem}.  Valid options include @code{()}
210 and @code{mensural}.  Additionally, @code{no-flag} switches off the
211 flag.")
212      (font-encoding ,symbol? "The font encoding is the broadest
213 category for selecting a font.  Options include: @code{fetaMusic},
214 @code{fetaNumber}, @code{TeX-text}, @code{TeX-math},
215 @code{fetaBraces}, @code{fetaDynamic}.")
216      (font-family ,symbol? "The font family is the broadest category
217 for selecting text fonts.  Options include: @code{sans},
218 @code{roman}.")
219      (font-name ,string? "Specifies a file name (without extension)
220 of the font to load.  This setting overrides selection using
221 @code{font-family}, @code{font-series} and @code{font-shape}.")
222      (font-series ,symbol? "Select the series of a font.  Choices
223 include @code{medium}, @code{bold}, @code{bold-narrow}, etc.")
224      (font-shape ,symbol? "Select the shape of a font.  Choices
225 include @code{upright}, @code{italic}, @code{caps}.")
226      (font-size ,number? "The font size, compared to the
227 @q{normal}@tie{}size.  @code{0}@tie{}is style-sheet's normal size,
228 @code{-1} is smaller, @code{+1} is bigger.  Each step of@tie{}1 is
229 approximately 12% larger; 6@tie{}steps are exactly a factor@tie{}2 larger.
230 Fractional values are allowed.")
231      (force-hshift ,number? "This specifies a manual shift for notes
232 in collisions.  The unit is the note head width of the first voice
233 note.  This is used by @rinternals{note-collision-interface}.")
234      (forced ,boolean? "Manually forced accidental.")
235      (fraction ,number-pair? "Numerator and denominator of a time
236 signature object.")
237      (french-beaming ,boolean? "Use French beaming style for this
238 stem.  The stem stops at the innermost beams.")
239
240      (fret-diagram-details ,list? "An alist of detailed grob properties
241 for fret diagrams.  Each alist entry consists of a
242 (@code{property} . @code{value}) pair.
243 The properties which can be included in fret-diagram-details
244 include the following:
245 @itemize @bullet
246 @item
247 @code{barre-type} -- Type of barre indication used.
248 Choices include @code{curved}, @code{straight}, and
249 @code{none}.  Default @code{curved}.
250 @item
251 @code{dot-color} -- Color of dots.  Options include
252 @code{black} and @code{white}.  Default @code{black}.
253 @item
254 @code{dot-label-font-mag} -- Magnification for font used to
255 label fret dots.  Default value 1.
256 @item
257 @code{dot-radius} -- Radius of dots, in terms of fret spaces.  
258 Default value 0.425 for labeled dots, 0.25 for unlabeled dots.
259 @item
260 @code{finger-code} -- Code for the type of fingering indication used.
261 Options include @code{none}, @code{in-dot}, and
262 @code{below-string}.  Default @code{none} for markup fret diagrams, 
263 @code{below-string} for @code{FretBoards} fret diagrams.
264 @item
265 @code{fret-count} -- The number of frets.  Default 4.
266 @item
267 @code{fret-label-font-mag} -- The magnification of the font used to label
268 the lowest fret number.  Default 0.5
269 @item
270 @code{fret-label-vertical-offset} -- The vertical offset of the fret label
271 from the fret.  Default -0.2
272 @item
273 @code{label-dir} -- Side to which the fret label is attached.
274 @code{-1}, @code{#LEFT}, or @code{#DOWN} for left or down;
275 @code{1}, @code{#RIGHT}, or @code{#UP} for right or up.
276 Default @code{#RIGHT}.
277 @item
278 @code{mute-string} -- Character string to be used to indicate muted 
279 string.  Default \"x\".
280 @item
281 @code{number-type} -- Type of numbers to use in fret label.  Choices
282 include @code{roman-lower}, @code{roman-upper}, and @code{arabic}.  Default
283 @code{roman-lower}.
284 @item
285 @code{open-string} -- Character string to be used to indicate open 
286 string.  Default \"o\".
287 @item
288 @code{orientation} -- Orientation of fret-diagram.  Options include
289 @code{normal} and @code{landscape}.  Default @code{normal}.
290 @item
291 @code{string-count} -- The number of strings.  Default 6.
292 @item
293 @code{string-label-font-mag} -- The magnification of the font used to label 
294 fingerings at the string, rather than in the dot.  Default value 0.6.
295 @item
296 @code{top-fret-thickness} -- The thickness of the top fret line, as a multiple
297 of the standard thickness.   Default value 3.
298 @item
299 @code{xo-font-magnification} -- Magnification used for mute and
300 open string indicators.  Default value 0.5.
301 @item
302 @code{xo-padding} -- Padding for open and mute indicators from top fret.  
303 Default value 0.25.
304 @end itemize")      ;"
305
306
307     ;; ugh: double, change.
308      (full-length-padding ,number? "How much padding to use at the right side of a full-length tuplet bracket.")
309      (full-length-to-extent ,boolean? "Run to the extent of the column for a full-length tuplet bracket.")
310      
311      (full-size-change ,boolean? "Don't make a change clef smaller.")
312
313      (gap ,ly:dimension? "Size of a gap in a variable symbol.")
314      (gap-count ,integer? "Number of gapped beams for tremolo.")
315      (glyph ,string? "A string determining what @q{style} of glyph is
316 typeset.  Valid choices depend on the function that is reading this
317 property.")
318      (glyph-name-alist ,list? "An alist of key-string pairs.")
319      (grow-direction ,ly:dir? "Crescendo or decrescendo?")
320
321      (hair-thickness ,number? "Thickness of the thin line in a bar
322 line.")
323      (harp-pedal-details ,list? "An alist of detailed grob properties
324 for harp pedal diagrams.  Each alist entry consists of a
325 (@code{property} . @code{value}) pair.
326 The properties which can be included in harp-pedal-details
327 include the following:
328 @itemize @bullet
329 @item
330 @code{box-offset} -- Vertical shift of the center of flat / sharp pedal
331 boxes above / below the horizontal line. Default value 0.8.
332 @item
333 @code{box-width} -- Width of each pedal box. Default value 0.4.
334 @item
335 @code{box-height} -- Height of each pedal box. Default value 1.0.
336 @item
337 @code{space-before-divider} -- Space between boxes before the first divider
338 (so that the diagram can be made symmetric). Default value 0.8.
339 @item
340 @code{space-after-divider} -- Space between boxes after the first divider.
341 Default value 0.8.
342 @item
343 @code{circle-thickness} -- Thickness (in unit of the line-thickness) of the
344 ellipse around circled pedals. Default value 0.5.
345 @item
346 @code{circle-x-padding} -- Padding in X direction of the ellipse around
347 circled pedals. Default value 0.15.
348 @item
349 @code{circle-y-padding} -- Padding in Y direction of the ellipse around
350 circled pedals. Default value 0.2.
351 @end itemize")
352
353      (head-direction ,ly:dir? "Are the note heads left or right in a
354 semitie?")
355      (height ,ly:dimension? "Height of an object in
356 @code{staff-space} units.")
357      (height-limit ,ly:dimension? "Maximum slur height: The longer the
358 slur, the closer it is to this height.")
359      (horizontal-shift ,integer? "An integer that identifies ranking
360 of @code{NoteColumn}s for horizontal shifting.  This is used by
361 @rinternals{note-collision-interface}.")
362      (horizontal-skylines ,ly:skyline-pair? "Two skylines, one to the
363 left and one to the right of this grob.")
364
365      (ignore-collision ,boolean? "If set, don't do note collision
366 resolution on this @code{NoteColumn}.")
367      (implicit ,boolean? "Is this an implicit bass figure?")
368      (inspect-index ,integer? "If debugging is set, set beam and slur
369 configuration to this index, and print the respective scores.")
370      (inspect-quants ,number-pair? "If debugging is set,
371 set beam and slur quants to this position, and print the respective
372 scores.")
373
374      (keep-fixed-while-stretching ,boolean? "A grob with this property
375 set to true is fixed relative to the staff above it when systems are
376 stretched.")
377      (keep-inside-line ,boolean? "If set, this column cannot have
378 objects sticking into the margin.")
379      (kern ,ly:dimension? "Amount of extra white space to add.  For
380 bar lines, this is the amount of space after a thick line.")
381      (knee ,boolean? "Is this beam kneed?")
382      (knee-spacing-correction ,number? "Factor for the optical
383 correction amount for kneed beams.  Set between @code{0} for no
384 correction and @code{1} for full correction.")
385
386      (labels ,list? "List of labels (symbols) placed on a column")
387      (layer ,integer? "The output layer (a value between 0 and@tie{}2:
388 Layers define the order of printing objects.  Objects in lower layers
389 are overprinted by objects in higher layers.")
390      (ledger-line-thickness ,number-pair? "The thickness of ledger
391 lines.  It is the sum of 2@tie{}numbers: The first is the factor for
392 line thickness, and the second for staff space.  Both contributions
393 are added.")
394      (left-bound-info ,list? "An alist of properties for determining
395 attachments of spanners to edges.")
396      (left-padding ,ly:dimension? "The amount of space that is put
397 left to an object (e.g., a group of accidentals).")
398      (length ,ly:dimension? "User override for the stem length of
399 unbeamed stems.")
400      (length-fraction ,number? "Multiplier for lengths.  Used for
401 determining ledger lines and stem lengths.")
402      (line-break-penalty ,number? "Penalty for a line break at this
403 column.  This affects the choices of the line breaker; it avoids a
404 line break at a column with a positive penalty and prefers a line break
405 at a column with a negative penalty.")
406      (line-break-permission ,symbol? "Instructs the line breaker on
407 whether to put a line break at this column.  Can be @code{force} or
408 @code{allow}.")
409      (line-break-system-details ,list? "An alist of properties to use
410 if this column is the start of a system.")
411      (line-count ,integer? "The number of staff lines.")
412      (line-positions ,list? "Vertical positions of staff lines.")
413      (line-thickness ,number? "The thickness of the tie or slur
414 contour.")
415      (long-text ,markup? "Text markup.  See @ruser{Formatting
416 text}.")
417
418      (max-beam-connect ,integer? "Maximum number of beams to connect
419 to beams from this stem.  Further beams are typeset as beamlets.")
420      (max-stretch ,number? "The maximum amount that this
421 @code{VerticalAxisGroup} can be vertically stretched (for example, in
422 order to better fill a page).")
423      (measure-count ,integer? "The number of measures for a
424 multi-measure rest.")
425      (measure-length ,ly:moment? "Length of a measure.  Used in some
426 spacing situations.")
427      (merge-differently-dotted ,boolean? "Merge note heads in
428 collisions, even if they have a different number of dots.  This is
429 normal notation for some types of polyphonic music.
430
431 @code{merge-differently-dotted} only applies to opposing stem
432 directions (i.e., voice 1 &@tie{}2).")
433      (merge-differently-headed ,boolean? "Merge note heads in
434 collisions, even if they have different note heads.  The
435 smaller of the two heads is rendered invisible.  This is used in
436 polyphonic guitar notation.  The value of this setting is used by
437 @rinternals{note-collision-interface}.
438
439 @code{merge-differently-headed} only applies to opposing stem
440 directions (i.e., voice 1 &@tie{}2).")
441      (minimum-X-extent ,number-pair? "Minimum size of an object in
442 X@tie{}dimension, measured in @code{staff-space} units.")
443      (minimum-Y-extent ,number-pair? "Minimum size of an object in
444 Y@tie{}dimension, measured in @code{staff-space} units.")
445      (minimum-distance ,ly:dimension? "Minimum distance between rest
446 and notes or beam.")
447      (minimum-length ,ly:dimension? "Try to make a spanner at least
448 this long, normally in the horizontal direction.  This requires an
449 appropriate callback for the @code{springs-and-rods} property.  If
450 added to a @code{Tie}, this sets the minimum distance between
451 noteheads.")
452      (minimum-length-fraction ,number? "Minimum length of ledger line
453 as fraction of note head size.")
454      (minimum-space ,ly:dimension? "Minimum distance that the victim
455 should move (after padding).")
456
457      (neutral-direction ,ly:dir? "Which direction to take in the
458 center of the staff.")
459      (neutral-position ,number? "Position (in half staff spaces) where
460 to flip the direction of custos stem.")
461      (next ,ly:grob? "Object that is next relation (e.g., the lyric
462 syllable following an extender.")
463      (no-alignment ,boolean? "If set, don't place this grob in a
464 @code{VerticalAlignment}; rather, place it using its own @code{Y-offset}
465 callback.")
466      (no-ledgers ,boolean? "If set, don't draw ledger lines on this
467 object.")
468      (no-stem-extend ,boolean? "If set, notes with ledger lines do not
469 get stems extending to the middle staff line.")
470      (non-default ,boolean? "Set for manually specified clefs.")
471      (non-musical ,boolean? "True if the grob belongs to a
472 @code{NonMusicalPaperColumn}.")
473      (note-names ,vector? "Vector of strings containing names for
474 easy-notation note heads.")
475
476      (outside-staff-horizontal-padding ,number? "By default, an
477 outside-staff-object can be placed so that is it very close to another
478 grob horizontally.  If this property is set, the outside-staff-object
479 is raised so that it is not so close to its neighbor.")
480      (outside-staff-padding ,number? "The padding to place between
481 this grob and the staff when spacing according to
482 @code{outside-staff-priority}.")
483      (outside-staff-priority ,number? "If set, the grob is positioned
484 outside the staff in such a way as to avoid all collisions.
485 In case of a potential collision, the grob with the smaller
486 @code{outside-staff-priority} is closer to the staff.")
487
488      (packed-spacing ,boolean? "If set, the notes are spaced as
489 tightly as possible.")
490      (padding ,ly:dimension? "Add this much extra space between
491 objects that are next to each other.")
492      (page-break-penalty ,number? "Penalty for page break at this
493 column.  This affects the choices of the page breaker; it avoids a
494 page break at a column with a positive penalty and prefers a page break
495 at a column with a negative penalty.")
496      (page-break-permission ,symbol? "Instructs the page breaker on
497 whether to put a page break at this column.  Can be @code{force} or
498 @code{allow}.")
499      (page-turn-penalty ,number? "Penalty for a page turn at this
500 column.  This affects the choices of the page breaker; it avoids a
501 page turn at a column with a positive penalty and prefers a page turn
502 at a column with a negative penalty.")
503      (page-turn-permission ,symbol? "Instructs the page breaker on
504 whether to put a page turn at this column.  Can be @code{force} or
505 @code{allow}.")
506      (parenthesized ,boolean? "Parenthesize this grob.")
507      (positions ,number-pair? "Pair of staff coordinates
508 @code{(@var{left} . @var{right})}, where both @var{left} and
509 @var{right} are in @code{staff-space} units of the current staff.
510 For slurs, this value selects which slur candidate to use; if
511 extreme positions are requested, the closest one is taken.")
512      (prefer-dotted-right ,boolean? "For note collisions, prefer to
513 shift dotted up-note to the right, rather than shifting just the
514 dot.")
515
516      (ratio ,number? "Parameter for slur shape.  The higher this
517 number, the quicker the slur attains its @code{height-limit}.")
518      (remove-empty ,boolean? "If set, remove group if it contains no
519 interesting items.")
520      (remove-first ,boolean? "Remove the first staff of a orchestral
521 score?")
522      (restore-first ,boolean? "Print a natural before the
523 accidental.")
524      (rhythmic-location ,rhythmic-location? "Where (bar number,
525 measure position) in the score.")
526      (right-bound-info ,list? "An alist of properties for determining
527 attachments of spanners to edges.")
528      (right-padding ,ly:dimension? "Space to insert on the right side
529 of an object (e.g., between note and its accidentals).")
530      (rotation ,list? "Number of degrees to rotate this object, and
531 what point to rotate around.  For example, @code{#'(45 0 0)} rotates
532 by 45 degrees around the center of this object.")
533
534      (same-direction-correction ,number? "Optical correction amount
535 for stems that are placed in tight configurations.  This amount is
536 used for stems with the same direction to compensate for note head to
537 stem distance.")
538      (script-priority ,number? "A sorting key that determines in what
539 order a script is within a stack of scripts.")
540      (self-alignment-X ,number? "Specify alignment of an object.  The
541 value @code{-1} means left aligned, @code{0}@tie{}centered, and
542 @code{1}@tie{}right-aligned in X@tie{}direction.  Other numerical
543 values may also be specified.")
544      (self-alignment-Y ,number? "Like @code{self-alignment-X} but for
545 the Y@tie{}axis.")
546      (shorten-pair ,number-pair? "The lengths to shorten a
547 text-spanner on both sides, for example a pedal bracket.  Positive
548 values shorten the text-spanner, while negative values lengthen it.")
549      (shortest-duration-space ,ly:dimension? "Start with this much
550 space for the shortest duration.  This is expressed in
551 @code{spacing-increment} as unit.  See also
552 @rinternals{spacing-spanner-interface}.")
553      (shortest-playing-duration ,ly:moment? "The duration of the
554 shortest note playing here.")
555      (shortest-starter-duration ,ly:moment? "The duration of the
556 shortest note that starts here.")
557      (side-axis ,number? "If the value is @code{#X} (or
558 equivalently@tie{}@code{0}), the object is placed horizontally next
559 to the other object.  If the value is @code{#Y} or@tie{}@code{1}, it
560 is placed vertically.")
561      (side-relative-direction ,ly:dir? "Multiply direction of
562 @code{direction-source} with this to get the direction of this
563 object.")
564      (size ,number? "Size of object, relative to standard size.")
565      (slope ,number? "The slope of this object.")
566      (slur-padding ,number? "Extra distance between slur and script.")
567      (space-alist ,list? "A table that specifies distances between
568 prefatory items, like clef and time-signature.  The format is an alist
569 of spacing tuples: @code{(@var{break-align-symbol} @var{type}
570 . @var{distance})}, where @var{type} can be the symbols
571 @code{minimum-space} or @code{extra-space}.")
572      (space-to-barline ,boolean? "If set, the distance between a note
573 and the following non-musical column will be measured to the bar line
574 instead of to the beginning of the non-musical column.  If there is a
575 clef change followed by a bar line, for example, this means that we will
576 try to space the non-musical column as though the clef is not there.")
577      (spacing-increment ,number? "Add this much space for a doubled
578 duration.  Typically, the width of a note head.  See also
579 @rinternals{spacing-spanner-interface}.")
580      (springs-and-rods ,boolean? "Dummy variable for triggering
581 spacing routines.")
582      (stacking-dir ,ly:dir? "Stack objects in which direction?")
583      (staff-padding ,ly:dimension? "Maintain this much space between
584 reference points and the staff.  Its effect is to align objects of
585 differing sizes (like the dynamics @b{p} and @b{f}) on their
586 baselines.")
587      (staff-position ,number? "Vertical position, measured in half
588 staff spaces, counted from the middle line.")
589      (staff-space ,ly:dimension? "Amount of space between staff lines,
590 expressed in global @code{staff-space}.")
591      (stem-attachment ,number-pair? "An @code{(@var{x} . @var{y})} pair
592 where the stem attaches to the notehead.")
593      (stem-end-position ,number? "Where does the stem end (the end is
594 opposite to the support-head)?")
595      ;;[TODO: doco]
596      (stem-spacing-correction ,number? "Optical correction amount for
597 stems that are placed in tight configurations.  For opposite
598 directions, this amount is the correction for two normal sized stems
599 that overlap completely.")
600      (stemlet-length ,number? "How long should a stem over a rest
601 be?")
602      (stencil ,ly:stencil? "The symbol to print.")
603      (stencils ,list? "Multiple stencils, used as intermediate
604 value.")
605      (strict-grace-spacing ,boolean? "If set, grace notes
606 are not spaced separately, but put before musical columns.")
607      (strict-note-spacing ,boolean? "If set, unbroken columns
608 with non-musical material (clefs, bar lines, etc.) are not spaced
609 separately, but put before musical columns.")
610      (stroke-style ,string? "Set to @code{\"grace\"} to turn stroke
611 through flag on.")
612      (style ,symbol? "This setting determines in what style a grob is
613 typeset.  Valid choices depend on the @code{stencil} callback reading
614 this property.")
615
616      (text ,markup? "Text markup.  See @ruser{Formatting text}.")
617 ;;FIXME -- Should both be the same?
618      (text-direction ,ly:dir? "This controls the ordering of the
619 words.  The default @code{RIGHT} is for roman text.  Arabic or Hebrew
620 should use @code{LEFT}.")
621      (thick-thickness ,number? "Bar line thickness, measured in
622 @code{line-thickness}.")
623      (thickness ,number? "Line thickness, generally measured in
624 @code{line-thickness}.")
625      (thin-kern ,number? "The space after a hair-line in a bar line.")
626      (threshold ,number-pair? "@code{(@var{min} . @var{max})}, where
627 @var{min} and @var{max} are dimensions in staff space.")
628      (to-barline ,boolean? "If true, the spanner will stop at the bar line
629 just before it would otherwise stop.")
630      (tie-configuration ,list? "List of @code{(@var{position} .
631 @var{dir})} pairs, indicating the desired tie configuration, where
632 @var{position} is the offset from the center of the staff in staff
633 space and @var{dir} indicates the direction of the tie
634 (@code{1}=>up, @code{-1}=>down, @code{0}=>center).  A non-pair entry
635 in the list causes the corresponding tie to be formatted
636 automatically.")
637      (transparent ,boolean? "This makes the grob invisible.")
638
639      (uniform-stretching ,boolean? "If set, items stretch
640 proportionally to their durations.  This looks better in complex
641 polyphonic patterns.")
642      (used ,boolean? "If set, this spacing column is kept in the
643 spacing problem.")
644
645      (vertical-skylines ,ly:skyline-pair? "Two skylines, one above and
646 one below this grob.")
647
648      (when ,ly:moment? "Global time step associated with this column
649 happen?")
650      (width ,ly:dimension? "The width of a grob measured in staff
651 space.")
652      (word-space ,ly:dimension? "Space to insert between words in
653 texts.")
654
655      (zigzag-length ,ly:dimension? "The length of the lines of a
656 zigzag, relative to @code{zigzag-width}.  A value of@tie{}@code{1}
657 gives 60-degree zigzags.")
658      (zigzag-width ,ly:dimension? "The width of one zigzag squiggle.
659 This number is adjusted slightly so that the glissando line can
660 be constructed from a whole number of squiggles.")
661      )))
662
663
664 ;;;;;;;;;;;;;;;;
665 ;;   INTERNAL
666
667
668 (define (define-internal-grob-property symbol type? description)
669   (define-grob-property symbol type? description)
670   (set-object-property! symbol 'backend-internal #t)
671   symbol
672   )
673
674
675 (define-public all-internal-grob-properties
676   (map
677    (lambda (x)
678      (apply define-internal-grob-property x))
679
680    `(
681      ;;;;;;;;;;;;;;;;
682      ;; grobs & grob arrays. (alphabetical)
683      (X-common ,ly:grob? "Common reference point for axis group.")
684
685      (Y-common ,ly:grob? "See @code{X-common}.")
686
687      (accidental-grob ,ly:grob? "The accidental for this note.")
688      (accidental-grobs ,list? "An alist with @code{(@var{notename} .
689 @var{groblist})} entries.")
690      (adjacent-pure-heights ,vector? "Used by a @code{VerticalAxisGroup} to
691 cache the @code{Y-extent}s of different column ranges.")
692      (adjacent-hairpins ,ly:grob-array? "A list of directly neighboring
693 hairpins.")
694      (all-elements ,ly:grob-array? "A list of all grobs in this line.  Its
695 function is to protect objects from being garbage collected.")
696      (arpeggio ,ly:grob? "A pointer to an @code{Arpeggio} object.")
697      (axis-group-parent-X ,ly:grob? "Containing X@tie{}axis group.")
698      (axis-group-parent-Y ,ly:grob? "Containing Y@tie{}axis group.")
699
700      (bar-extent ,number-pair? "The Y-extent of the actual bar line.
701 This may differ from @code{Y-extent} because it does not include the dots in
702 a repeat bar line.")
703      (bars ,ly:grob-array? "A list of bar line pointers.")
704      (beam ,ly:grob? "A pointer to the beam, if applicable.")
705      (bounded-by-me ,ly:grob-array? "A list of spanners that have this
706 column as start/begin point.  Only columns that have grobs or act as
707 bounds are spaced.")
708      (bracket ,ly:grob? "The bracket for a number.")
709
710      (columns ,ly:grob-array? "A list of grobs, typically containing
711 @code{PaperColumn} or @code{NoteColumn} objects.")
712      (conditional-elements ,ly:grob-array? "Internal use only.")
713      (cross-staff ,boolean? "For a beam or a stem, this is true if we
714 depend on inter-staff spacing.")
715
716      (direction-source ,ly:grob? "In case @code{side-relative-direction} is
717 set, which grob to get the direction from.")
718      (dot ,ly:grob? "A reference to a @code{Dots} object.")
719      (dots ,ly:grob-array? "Multiple @code{Dots} objects.")
720
721      (elements ,ly:grob-array? "A list of grobs; the type is depending on
722 the grob where this is set in.")
723      (encompass-objects ,ly:grob-array? "Objects that a slur should avoid
724 in addition to notes and stems.")
725
726      (figures ,ly:grob-array? "Figured bass objects for continuation line.")
727
728      (glyph-name ,string? "The glyph name within the font.")
729      (grace-spacing ,ly:grob? "A run of grace notes.")
730
731      (heads ,ly:grob-array? "A list of note heads.")
732
733      (important-column-ranks ,vector? "A cache of columns that contain
734 @code{items-worth-living} data.")
735      (items-worth-living ,ly:grob-array? "A list of interesting items.  If
736 empty in a particular staff, then that staff is erased.")
737
738      (left-items ,ly:grob-array? "DOCME")
739      (left-neighbors ,ly:grob-array? "A list of @code{spacing-wishes} grobs
740 that are close to the current column.
741
742 The closest @code{spacing-wishes} determine the actual distances between the
743 columns.")
744
745      (normal-stems ,ly:grob-array? "An array of visible stems.")
746      (note-columns ,pair? "A list of @code{NoteColumn} grobs.")
747      (note-head ,ly:grob? "A single note head.")
748      (note-heads ,ly:grob-array? "A list of note head grobs.")
749
750      (padding-pairs ,list? "An alist mapping @code{(@var{name} . @var{name})}
751 to distances.")
752      (pedal-text ,ly:grob? "A pointer to the text of a mixed-style piano
753 pedal.")
754      (pure-Y-common ,ly:grob? "A cache of the
755 @code{common_refpoint_of_array} of the @code{elements} grob set.")
756      (pure-Y-offset-in-progress ,boolean? "A debugging aid for catching
757 cyclic dependencies.")
758      (pure-relevant-items ,ly:grob-array? "A subset of elements that are
759 relevant for finding the @code{pure-Y-extent}.")
760      (pure-relevant-spanners ,ly:grob-array? "A subset of elements that are
761 relevant for finding the @code{pure-Y-extent}.")
762
763      (rest ,ly:grob? "A pointer to a @code{Rest} object.")
764      (rest-collision ,ly:grob? "A rest collision that a rest is in.")
765      (rests ,ly:grob-array? "A list of rest objects.")
766      (right-items ,ly:grob-array? "DOCME")
767      (right-neighbors ,ly:grob-array? "See @code{left-neighbors}.")
768
769      (separation-item ,ly:grob? "A separation item.")
770      (side-support-elements ,ly:grob-array? "The side support, a list of
771 grobs.")
772      (slur ,ly:grob? "A pointer to a @code{Slur} object.")
773      (spaceable-staves ,ly:grob-array? "Objects to be spaced during page
774 layout.")
775      (spacing ,ly:grob? "The spacing spanner governing this section.")
776      (spacing-wishes ,ly:grob-array? "List of note spacing or staff spacing
777 objects.")
778      (staff-symbol ,ly:grob? "The staff symbol grob that we are in.")
779      (stem ,ly:grob? "A pointer to a @code{Stem} object.")
780      (stems ,ly:grob-array? "A list of stem objects, corresponding to the
781 notes that the arpeggio has to be before.")
782
783      (tie ,ly:grob? "A pointer to a @code{Tie} object.")
784      (tremolo-flag ,ly:grob? "The tremolo object on a stem.")
785      (tuplet-number ,ly:grob? "The number for a bracket.")
786      (tuplets ,ly:grob-array? "A list of smaller tuplet brackets.")
787
788      ;;;;;;;;;;;;;;;;
789      ;; other
790      (begin-of-line-visible ,boolean? "Used for marking @code{ChordNames}
791 that should only show changes.")
792
793      (cause ,scheme? "Any kind of causation objects (i.e., music, or perhaps
794 translator) that was the cause for this grob.")
795      (circled-tip ,boolean? "Put a circle at start/end of hairpins (al/del
796 niente).")
797
798      (delta-position ,number? "The vertical position difference.")
799      (details ,list? "Alist of parameters for detailed grob behavior.
800
801 More information on the allowed parameters can be found by inspecting
802 @file{lily/slur-scoring.cc}, @file{lily/beam-quanting.cc}, and
803 @file{lily/tie-formatting-problem.cc}.  Setting @code{debug-tie-scoring},
804 @code{debug-beam-scoring} or @code{debug-slur-scoring} also provides
805 useful clues.")
806
807      (font ,ly:font-metric? "A cached font metric object.")
808
809      (head-width ,ly:dimension? "The width of this ligature head.")
810      
811      (ideal-distances ,list? "@code{(@var{obj} . (@var{dist} .
812 @var{strength}))} pairs.")
813      (interfaces ,list? "A list of symbols indicating the interfaces
814 supported by this object.  It is initialized from the @code{meta} field.")
815
816      (least-squares-dy ,number? "The ideal beam slope, without damping.")
817
818      (meta ,list? "Provide meta information.  It is an alist with the
819 entries @code{name} and @code{interfaces}.")
820      (minimum-distances ,list? "A list of rods that have the format
821 @code{(@var{obj} . @var{dist})}.")
822      
823      (positioning-done ,boolean? "Used to signal that a positioning element
824 did its job.  This ensures that a positioning is only done once.")
825      (pure-Y-extent ,number-pair? "The estimated height of a system.")
826
827      (quant-score ,string? "The beam quanting score; stored for
828 debugging.")
829      (quantize-position ,boolean? "If set, a vertical alignment is aligned
830 to be within staff spaces.")
831      (quantized-positions ,number-pair? "The beam positions after
832 quanting.")
833      
834      (script-stencil ,pair? "A pair @code{(@var{type} . @var{arg})} which
835 acts as an index for looking up a @code{Stencil} object.")
836      (shorten ,ly:dimension? "The amount of space that a stem is shortened.
837 Internally used to distribute beam shortening over stems.")
838      (skyline-distance ,number? "The distance between this staff and the
839 next one, as determined by a skyline algorithm.")
840      (skyline-horizontal-padding ,number? "For determining the vertical
841 distance between two staves, it is possible to have a configuration which
842 would result in a tight interleaving of grobs from the top staff and the
843 bottom staff.  The larger this parameter is, the farther apart the staves
844 are placed in such a configuration.")
845      (stem-info ,pair? "A cache of stem parameters.")
846
847      (use-breve-rest ,boolean? "Use breve rests for measures longer
848 than a whole rest.")
849
850      ;;;;;;;;;;;;;;;;
851      ;; ancient notation
852
853      ;;;;;;; TODO:
854      ;; There are too many properties for ancient notation;
855      ;; probably neume-types (a list of symbols) would also work.
856
857      ;; However, such a list would consist of a couple of dozens of
858      ;; entries, since head prefixes may be combined in many ways.  If
859      ;; the macros in `gregorian-init.ly' would directly set prefix-set,
860      ;; all the head prefixes could be junked; however, such macros
861      ;; would be quite numerous, I guess.  --jr
862
863      (add-cauda ,boolean? "Does this flexa require an additional cauda on
864 the left side?")
865      (add-join ,boolean? "Is this ligature head-joined with the next one
866 by a vertical line?")
867      (add-stem ,boolean? "Is this ligature head a virga and therefore needs
868 an additional stem on the right side?")
869      (ascendens ,boolean? "Is this neume of ascending type?")
870      (auctum ,boolean? "Is this neume liquescentically augmented?")
871
872      (cavum ,boolean? "Is this neume outlined?")
873      (context-info ,integer? "Within a ligature, the final glyph or shape of
874 a head may be affected by the left and/or right neighbour head.
875 @code{context-info} holds for each head such information about the left and
876 right neighbour, encoded as a bit mask.")
877
878      (descendens ,boolean? "Is this neume of descendent type?")
879      (deminutum ,boolean? "Is this neume deminished?")
880
881      (flexa-height ,ly:dimension? "The height of a flexa shape in a ligature
882 grob (in @code{staff-space} units).")
883      (flexa-width ,ly:dimension? "The width of a flexa shape in a
884 ligature grob in (in @code{staff-space} units).")
885
886      (inclinatum ,boolean? "Is this neume an inclinatum?")
887
888      (join-heads ,boolean? "Whether to join the note heads of an ambitus
889 grob with a vertical line.")
890      (join-right-amount ,number? "DOCME")
891
892      (linea ,boolean? "Attach vertical lines to this neume?")
893
894      (oriscus ,boolean? "Is this neume an oriscus?")
895
896      (pes-or-flexa ,boolean? "Shall this neume be joined with the previous
897 head?")
898      (prefix-set ,number? "A bit mask that holds all Gregorian head
899 prefixes, such as @code{\\virga} or @code{\\quilisma}.")
900      (primitive ,integer? "A pointer to a ligature primitive, i.e., an item
901 similar to a note head that is part of a ligature.")
902
903      (quilisma ,boolean? "Is this neume a quilisma?")
904
905      (stropha ,boolean? "Is this neume a stropha?")
906
907      (virga ,boolean? "Is this neume a virga?")
908
909      (x-offset ,ly:dimension? "Extra horizontal offset for ligature heads.")
910
911      )))
912
913 (define-public all-backend-properties
914   (append
915    all-internal-grob-properties
916    all-user-grob-properties))