]> git.donarmstrong.com Git - lilypond.git/blob - scm/define-grob-properties.scm
Fix off-by-one error in constrained-breaking.
[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--2006  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-offset ,number? "The horizontal amount that this object is moved relative to its X-parent")
26      (Y-offset ,number? "The vertical amount that this object is moved
27 relative to its Y-parent")
28      (accidentals ,list? "List of alteration numbers")
29      (after-line-breaking ,boolean? "Dummy property, used to trigger callback for after-line-breaking")
30      (alteration-alist ,list? "List of @code{(@var{pitch}
31 . @var{accidental})} pairs for key signature.")
32      (add-stem-support ,boolean? "If set, the Stem object is included in this script's support") 
33      (align-dir ,ly:dir? "Which side to align? @code{-1}: left side,
34 @code{0}: around center of width, @code{1}: right side.")
35      (allow-loose-spacing ,boolean? "If set, column can be detached from main spacing.")
36      (arpeggio-direction ,ly:dir? "If set, put an
37 arrow on the arpeggio squiggly line.")
38      (arrow ,boolean? "Add an arrow to the line.")
39      (arrow-length ,number? "Arrow length.")
40      (arrow-width ,number? "Arrow width.")
41      (auto-knee-gap ,ly:dimension? "If a gap is found between note heads
42 where a horizontal beam fits that is larger than this number, make a kneed beam.")
43      (average-spacing-wishes ,boolean? "If set, the spacing wishes are averaged over staves.")
44      (avoid-note-head ,boolean? "If set, the stem of a chord does not
45 pass through all note heads, but starts at the last note head. ")
46      (axes ,list? "list of axis numbers.
47 In the case of alignment grobs, this should contain only one number.")
48      (bar-size ,ly:dimension? "size of a bar line.")
49      (barre-type ,symbol? "Type of barre indication used in a fret diagram.
50 Choices include @code{curved} and @code{straight}.")
51      (base-shortest-duration ,ly:moment?
52                              "Spacing is based on the shortest notes in a piece. Normally, pieces are spaced as if notes at least as short as this are present.")
53      (baseline-skip ,ly:dimension? "Distance between base lines of
54  multiple lines of text.")
55      (beam-thickness ,ly:dimension? "thickness, measured in staff-space.")
56      (beam-width ,ly:dimension? "width of the tremolo sign.")
57      (beamed-stem-shorten ,list? "How much to shorten beamed stems,
58 when their direction is forced. It is a list, since the value is different
59 depending on the number flags/beams.")
60      (beaming ,pair?
61               "Pair of number lists. Each number list specifies which
62 beams to make. 0 is the central beam, 1 is the next beam toward the
63 note etc. This information is used to determine how to connect the
64 beaming patterns from stem to stem inside a beam.")
65      (before-line-breaking ,boolean? "Dummy property, used to trigger a callback function.")
66      (between-cols ,pair? "Where to attach a loose column to")
67      (bound-padding ,number? "The amount of padding to insert around spanner bounds.")
68      (bracket-flare ,number-pair? "A pair of numbers specifying how
69 much edges of brackets should slant outward.  Value 0.0 means straight
70 edges")
71      (break-align-symbol ,symbol? "This key is used for aligning and
72 spacing breakable items.")
73      (break-align-orders ,vector? " Defines the order in which
74 prefatory matter (clefs, key signatures) appears. The format is a
75 vector of length 3, where each element is one order for end-of-line,
76 middle of line, and start-of-line respectively. An order is a list of
77 symbols.
78
79 For example, clefs are put after key signatures by setting
80
81 @example
82         \\override Score.BreakAlignment #'break-align-orders = #(make-vector  3
83           '(span-bar
84           breathing-sign
85           staff-bar
86           key
87           clef
88           time-signature))
89 @end example")
90      (break-overshoot ,number-pair? "How much does a broken spanner
91 stick out of its bounds?")
92      (bracket-visibility ,boolean-or-symbol? "This controls the
93 visibility of the tuplet bracket.  Setting it to false will prevent
94 printing of the bracket. Setting the property to @code{'if-no-beam}
95 will make it print only if there is no beam associated with this
96 tuplet bracket.")
97      (break-visibility ,vector? "A vector of 3 booleans, #(end-of-line unbroken begin-of-line).
98 #t means visible, #f means killed.")
99      (c0-position ,integer? "An integer indicating the position of
100 middle C.")
101      (cautionary-style ,symbol? "How to print cautionary
102 accidentals. Choices are @code{smaller} or
103 @code{parentheses}.")
104      (cautionary ,boolean? "Is this a cautionary accidental?")
105      (concaveness ,number? "A beam is concave when its inner stems are
106 closer to the beam than the two outside stems. This number is a
107 measure of the closeness of the inner stems. It is used for damping
108 the slope of the beam.")
109      (collapse-height ,ly:dimension? "Minimum height of system start delimiter.  If equal or smaller, the bracket is removed.")
110      (color ,color? "The color of this grob.")
111      (control-points ,list? "List of offsets (number-pairs) that form
112 control points for the tie/slur/bracket shape. For beziers, this
113 should list the control points of a 3rd order bezier curve." )
114      (connect-to-neighbor ,pair? "Pair of booleans, indicating whether this
115 grob looks as a continued break.")
116      (damping ,number? "Amount of beam slope damping. ")
117      (dash-period ,number? "the length of one dash + white space. If
118 negative, no line is drawn at all.")
119      (dash-fraction ,number? "Size of the dashes, relative to
120 dash-period. Should be between 0.0 (no line) and 1.0 (continuous
121 line).")
122      (default-direction ,ly:dir? "Direction determined by note head positions.")
123      (digit-names ,vector "Names for string finger digits. ")
124      (direction ,ly:dir? "If side-position is 1 (#X), then this property determines if the object is placed #LEFT, #CENTER or #RIGHT with respect to the other object. Otherwise, it determines if the object is placed #UP #CENTER or #DOWN.  Numerical values may also be used. #UP=1, #DOWN=-1, #LEFT=-1, #RIGHT=1, CENTER=0 but also other numerical values are permitted.")
125      (dot-color ,symbol? "Color of dots.  Options include 
126 @code{black} and @code{white}.")
127      (dot-radius ,number? "Radius of dots.")
128      (dot-count ,integer? "The number of dots.")
129      (duration-log ,integer? "The 2-log of the note head duration, i.e. 0=whole note, 1 = half note, etc.")
130      (edge-height ,pair? "A pair of number specifying the heights of
131 the vertical edges '(@var{left-height} . @var{right-height}).")
132      (edge-text ,pair? "A pair specifying the texts to be set at the
133 edges '(@var{left-text} . @var{right-text}).")
134      (eccentricity ,number? "How asymmetrical to make a slur. Positive means move the center to the right.")
135      (enclose-bounds ,number?
136                      "How much of the bound a spanner should enclose:
137 +1 = completely, 0 = center, -1 not at all.")
138      (expand-limit ,integer? "maximum number of measures expanded in church rests.")
139      ;; remove me?
140      (extra-dy ,number? "Slope glissandi this much extra.")
141      (extra-X-extent ,number-pair? "A grob is enlarged in X dimension
142 by this much.")
143      (extra-Y-extent ,number-pair? "See @code{extra-X-extent}.")
144      (extra-spacing-width ,number-pair? "In the horizontal spacing problem, we pad each item by this amount (by adding the car on the left side of the item and adding the cdr on the right side of the item). In order to make a grob take up no horizontal space at all, set this to (+inf.0 . -inf.0)")
145      (X-extent ,number-pair? "Hard coded extent in X direction. ")
146      (Y-extent ,number-pair? "See @code{X-extent}.")
147      (extra-offset ,number-pair? "A pair representing an offset. This
148 offset is added just before outputting the symbol, so the typesetting
149 engine is completely oblivious to it.")
150      (finger-code ,symbol? "Code for the type of fingering indication in a
151 fret diagram.  Options include @code{none}, @code{in-dot}, and @code{below-string}.")
152      (flag-count ,number? "The number of tremolo beams.")
153      (flag-style ,symbol?
154                  "a string determining what style of flag-glyph is
155 typeset on a Stem. Valid options include @code{()} and
156 @code{mensural}.  Additionally, @code{\"no-flag\"} switches off the
157 flag.")
158      (font-family ,symbol? "The font family is the broadest category for selecting text fonts. Options include: @code{sans}, @code{roman} ")
159      (font-encoding ,symbol? "The font encoding is the broadest
160 category for selecting a font. Options include: @code{fetaMusic},
161 @code{fetaNumber}, @code{TeX-text}, @code{TeX-math}, @code{fetaBraces},
162 @code{fetaDynamic}")
163      (font-name ,string? "Specifies a file name (without extension) of
164 the font to load.  This setting override selection using
165 @code{font-family}, @code{font-series} and @code{font-shape}.")
166      (font-size ,number? "The font size, compared the `normal'
167 size.  0 is style-sheet's normal size, -1 is smaller, +1 is bigger.
168 Each step of 1 is approximately 12% larger, 6 steps are exactly a
169 factor 2 larger. Fractional values are allowed.")
170      (font-series ,symbol? "Select the series of a font. Choices
171 include @code{medium}, @code{bold}, @code{bold-narrow}, etc.")
172      (font-shape ,symbol? "Select the shape of a font. Choices include @code{upright},
173 @code{italic}, @code{caps}.")
174      (forced ,boolean? "manually forced accidental")
175      (forced-distance ,ly:dimension? "A fixed distance between object
176 reference points in an alignment.")
177      (force-hshift ,number? "This specifies a manual shift for notes
178 in collisions. The unit is the note head width of the first voice
179 note.  This is used by @internalsref{note-collision-interface}.")
180      (fraction ,number-pair? "Numerator and denominator of a time
181 signature object.")
182      (french-beaming ,boolean? "Use French beaming style for this
183 stem. The stem will stop at the innermost beams.")
184      (fret-count ,integer? "The number of frets in a fret diagram.")
185      ;; ugh: double, change.
186      (full-size-change ,boolean? "Don't make a change clef smaller.")
187      (non-default ,boolean? "Set for manually specified clefs.")
188      (glyph ,string? "a string determining what (style) of glyph is
189 typeset. Valid choices depend on the function that is reading this
190 property.")
191      (gap ,ly:dimension? "Size of a gap in a variable symbol.")
192      (gap-count ,integer? "Number of gapped beams for tremolo.")
193      (grow-direction ,ly:dir? "Crescendo or decrescendo?")
194      (hair-thickness ,number? "Thickness of the thin line in a bar line.")
195      (head-direction ,ly:dir? "Are the note heads left or right in a semitie?")
196      (height ,ly:dimension? "Height of an object in staff-space.")
197      (height-limit ,ly:dimension? "Maximum slur height: the longer the
198 slur, the closer it is to this height.")
199      (horizontal-shift ,integer? "An integer that identifies ranking
200 of note-column for horizontal shifting. This is used by
201 @internalsref{note-collision-interface}.")
202      (avoid-slur ,symbol? "Method of handling slur collisions.
203 Choices are @code{around}, @code{inside}, @code{outside}.  If unset, script
204 and slur ignore eachother.")
205      (ignore-collision ,boolean? "If set, don't do note collision resolution on this NoteColumn.")
206      (infinite-spacing-height ,boolean? "If true, then for the purposes of
207 horizontal spacing, treat this item as though it were infinitely tall. That
208 is, no object from another column will be allowed to stick above or below this item.")
209      (inspect-quants ,number-pair? "If debugging is set,
210 set beam/slur quant to this position, and print the respective scores.")
211      (inspect-index ,integer? "If debugging is set,
212 set beam/slur configuration to this index, and print the respective scores.")
213      (implicit ,boolean? "Is this an implicit bass figure?")
214      (keep-inside-line ,boolean? "If set, this column cannot have
215 things sticking into the margin.")
216      (kern ,ly:dimension? "Amount of extra white space to add. For
217 bar line, this is the amount of space after a thick line.")
218      (knee ,boolean? "Is this beam kneed?")
219      (knee-spacing-correction ,number? "Factor for the optical
220 correction amount for kneed beams. Set between 0 for no correction and
221 1 for full correction.")
222      (label-dir ,ly:dir? "Side to which label is attached. @code{-1} for left, @code{1} for right.")
223      (layer ,number? "The output layer [0..2]: layers define the order
224 of printing objects. Objects in lower layers are overprinted by
225 objects in higher layers.")
226      (ledger-line-thickness ,number-pair?
227                             "The thickness of ledger lines: it is the
228 sum of 2 numbers.  The first is the factor for line thickness, and the
229 second for staff space. Both contributions are added.")
230      (left-padding ,ly:dimension? "The amount of space that is put
231 left to an object (eg. a group of accidentals).")
232      (length ,ly:dimension? "User override for the stem length of
233 unbeamed stems.")
234      (length-fraction ,number? "Multiplier for lengths. Used for
235 determining ledger lines and stem lengths.")
236      (line-break-system-details ,list?
237                                 "Alist of properties to use when this
238 column is the start of a system.")
239      (line-count ,integer? "The number of staff lines.")
240      (line-positions ,list? "Vertical positions of staff lines.")
241      (line-thickness ,number? "The thickness of the tie/slur contour.")
242      (long-text ,markup? "Text markup.  See @usermanref{Text markup}.")
243      (max-beam-connect ,integer? "Maximum number of beams to connect
244 to beams from this stem. Further beams are typeset as beamlets.")
245      (measure-length ,ly:moment? "Length of a
246 measure. Used in some spacing situations.")
247      (measure-count ,integer? "The number of measures for a
248 multimeasure rest.")
249      (merge-differently-headed ,boolean? "Merge
250 note heads in collisions, even if they have different note heads. The
251 smaller of the two heads will be rendered invisible. This used
252 polyphonic guitar notation. The value of this setting is used by
253 @internalsref{note-collision-interface} .")
254      (merge-differently-dotted ,boolean? "Merge note heads in
255 collisions, even if they have a different number of dots. This normal
256 notation for some types of polyphonic music. ")
257      (minimum-length-fraction ,number? "Minimum length of ledger line as fraction of note head size.")
258      (minimum-distance ,ly:dimension? "Minimum distance between rest
259 and notes or beam.")
260      (minimum-X-extent ,number-pair? "Minimum size of an object in X
261 dimension, measured in staff space.")
262      (minimum-Y-extent ,number-pair? "See @code{minimum-X-extent}.")
263      (minimum-length ,ly:dimension? "Try to make a spanner at least
264 this long. This requires an appropriate callback for the
265 @code{springs-and-rods} property.")
266      (minimum-space ,ly:dimension? "Minimum distance that the victim
267 should move (after padding).")
268      (neutral-direction ,ly:dir? "Which direction to take in the
269 center of the staff.")
270      (neutral-position ,number? "Position (in half staff spaces) where
271 to flip the direction of custos stem.")
272      (next ,ly:grob? "Object that is next relation (eg. the lyric syllable following an extender.")
273      (note-names ,vector? "Vector of strings containing names for
274 easy-notation note heads.")
275      (no-ledgers ,boolean? "If set, don't draw ledger lines on this object.")
276      (no-stem-extend ,boolean? "If set, notes with ledger lines do not
277 get stems extending to the middle staff line.")
278      (non-musical ,boolean? "True if the grob belongs in a NonMusicalPaperColumn.")
279      (number-type ,symbol? "Type of numbers to use in label.  Choices
280 include @code{roman-lower}, @code{roman-upper}, and @code{arabic}.")
281      (outside-staff-horizontal-padding ,number? "By default, an outside-staff-object can be
282 placed so that is it very close to another grob horizontally. If this property is set,
283 the outside-staff-object will be raised so that it is not so close to its neighbour.")
284      (outside-staff-padding ,number? "The padding to place between this grob and the staff when
285 spacing according to outside-staff-priority.")
286      (outside-staff-priority ,number? "When set, the grob will be positioned outside the staff
287 in such a way as to avoid all collisions. In case of a potential collision, the grob with
288 the smaller outside-staff-priority will be closer to the staff.")
289      (packed-spacing ,boolean? "If set, the notes are spaced as
290 tightly as possible.")
291      (padding ,ly:dimension? "Add this much extra space between
292 objects that are next to each other.")
293      (page-break-permission ,symbol? "Instructs the page breaker on whether to
294 put a page break at this column. Can be 'force, or 'allow.")
295      (page-turn-permission ,symbol? "Instructs the page breaker on whether to
296 put a page turn at this column. Can be 'force, or 'allow.")
297      (line-break-permission ,symbol? "Instructs the line breaker on whether to
298 put a line break at this column. Can be 'force, or 'allow.")
299      (page-break-penalty ,number? "Penalty for page break at
300 this column. This affects the choices of the page breaker; it will avoid a page
301 break at a column with a positive penalty and prefer a page break at a column
302 with a negative penalty.")
303      (page-turn-penalty ,number? "Penalty for a page turn at this column.
304 This affects the choices of the page breaker; it will avoid a page
305 turn at a column with a positive penalty and prefer a page turn at a column
306 with a negative penalty.")
307      (line-break-penalty ,number? "Penalty for a line break at this column.
308 This affects the choices of the line breaker; it will avoid a line
309 break at a column with a positive penalty and prefer a line break at a column
310 with a negative penalty.")
311      (positions ,pair?
312                 "Pair of staff coordinates @code{(@var{left}
313 . @var{right})}, where both @var{left} and @var{right} are in the
314 staff-space unit of the current staff.")
315      (ratio ,number? "Parameter for slur shape. The higher this number, the
316 quicker the slur attains it @code{height-limit}.")
317      (remove-empty ,boolean? "If set, remove group if it contains no
318 @code{interesting-items}")
319      (remove-first ,boolean? "Remove the first staff of a orchestral score?")
320      (rhythmic-location ,rhythmic-location? "Where (bar number, measure position) in the score.")
321      (right-padding ,ly:dimension? "Space to insert on the right side  of an object (eg. between note and its accidentals.)")
322      (rotation ,list? "Number of degrees to rotate this object, and what point
323 to rotate around. #'(45 0 0) means rotate 45 degrees around the center of this object.")
324      (same-direction-correction ,number? "Optical correction amount
325 for stems that are placed in tight configurations. This amount is used
326 for stems with the same direction to compensate for note-head to stem distance.")
327      (script-priority ,number? "A sorting key that determines in what
328 order a script is within a stack of scripts.")
329      (self-alignment-X ,number? "Specify alignment of an object.  The
330 value -1 means left aligned, 0 centered, and 1 right-aligned in X
331 direction. Values in between may also be specified.")
332      (self-alignment-Y ,number? "like @code{self-alignment-X} but for
333 Y axis.")
334      (shorten-pair ,number-pair? "The lengths to shorten a
335 text-spanner on both sides, for example a pedal bracket.  Positive values
336 shorten the text-spanner, while negative values lengthen it.")
337      (clip-edges ,boolean? "Allow outward pointing beamlets at the edges of beams?")
338      (common-shortest-duration ,ly:moment?
339                                "The most common shortest note length.
340 This is used in spacing. Enlarging this will set the score tighter.")
341      (shortest-duration-space ,ly:dimension? "Start with this much
342 space for the shortest duration. This is expressed in
343 @code{spacing-increment} as unit. See also
344 @internalsref{spacing-spanner-interface}.")
345      (shortest-playing-duration ,ly:moment? "The duration of the shortest playing here.")
346      (shortest-starter-duration ,ly:moment? "The duration of the shortest
347 note that starts here.")
348      (side-relative-direction ,ly:dir?
349                               "Multiply direction of
350 @code{direction-source} with this to get the direction of this
351 object.")
352      (side-axis ,number? "If the value is #X (or equivalently 1), the object is placed horizontally next to the other object. If the value is #Y or 0, it is placed vertically.")
353      (size ,number? "Size of object, relative to standard size.")
354      (skylines ,ly:skyline-pair? "Two skylines, one above and one below this grob (or, for some grobs, to the left and to the right).")
355      (slope ,number? "The slope of this object.")
356      (slur-padding ,number? "Extra distance between slur and script.")
357      (space-alist ,list? "A table that specifies distances between
358 prefatory items, like clef and time-signature. The format is an alist
359 of spacing tuples: @code{(@var{break-align-symbol} @var{type}
360 . @var{distance})}, where @var{type} can be the symbols
361 @code{minimum-space} or @code{extra-space}.")
362      (spacing-increment ,number? "Add this much space for a doubled
363 duration. Typically, the width of a note head. See also
364 @internalsref{spacing-spanner-interface}.")
365      (springs-and-rods ,boolean? "Dummy variable for triggering spacing routines.")
366      (stacking-dir ,ly:dir? "Stack objects in which direction?")
367      (staff-padding ,ly:dimension?
368                     "Maintain this much space between reference points
369 and the staff.  Its effect is to align objects of differing
370 sizes (like the dynamic @b{p} and @b{f}) on their baselines.")
371      (staff-position ,number? "Vertical position, measured in half
372 staff spaces, counted from the middle line.")
373      (staff-space ,ly:dimension? "Amount of space between staff lines,
374 expressed in global staff-space.")
375      (stemlet-length ,number? "How long should a stem over a rest be?")
376      (stem-attachment ,number-pair? "A  (@var{x} . @var{y}) pair where the stem attaches to the notehead.")
377      (stem-end-position ,number? "Where does the stem end (the end is opposite to the support-head.")
378      ;;[TODO: doco]
379      (stem-spacing-correction ,number? "Optical correction amount for
380 stems that are placed in tight configurations. For opposite
381 directions, this amount is the correction for two normal sized stems
382 that overlap completely.")
383      (stencil ,ly:stencil? "The symbol to print.")
384      (stencils ,list? "Multiple stencils, used as intermediate value.")
385      (strict-note-spacing ,boolean? "If set, unbroken columns
386 with non-musical material (clefs, barlines, etc.) are not spaced
387 separately, but put before musical columns.")
388      (strict-grace-spacing ,boolean? "If set, grace notes 
389 are not spaced separately, but put before musical columns.")
390      (string-count ,integer? "The number of strings in a fret diagram.")
391      (string-fret-finger-combinations ,list? "List consisting of (string-number fret-number finger-number) entries.")
392      (stroke-style ,string? "set to \"grace\" to turn stroke through flag on.")
393      (style ,symbol? "This setting determines in what style a grob is
394 typeset. Valid choices depend on the @code{stencil} callback reading
395 this property.")
396      (text ,markup? "Text markup.  See @usermanref{Text markup}.")
397 ;;FIXME -- Should both be the same?
398      (text-direction ,ly:dir? "This controls the ordering of the
399 words. The default RIGHT is for roman text. Arabic or hebrew should
400 use LEFT.")
401      (thick-thickness ,number? "Bar line thickness, measured in
402 @code{line-thickness}.")
403      (thickness ,number? "Line thickness, generally measured in
404 @code{line-thickness}.")
405      (thin-kern ,number? "The space after a hair-line in a bar line.")
406      (threshold ,number-pair? "(@var{min} . @var{max}), where
407 @var{min} and @var{max} are dimensions in staff space.")
408      (tie-configuration ,list? "List of (@var{position} . @var{dir})
409 pairs, indicating the desired tie configuration. A non-pair entry in
410 the list will cause said tie to be formatted automatically. ")
411      (transparent ,boolean? "This makes the grob invisible.")
412      (uniform-stretching ,boolean? "If set, items stretch proportional
413 to their durations. This looks better in complex polyphonic patterns")
414      (used ,boolean? "If set, this spacing column is kept in the spacing problem")
415      (when ,ly:moment? "Global time step associated with this column
416 happen?")
417      (word-space ,ly:dimension? "space to insert between words in texts.")
418      (width ,ly:dimension? "The width of a grob measured in staff space.")
419      (zigzag-length ,ly:dimension? "The length of the lines of a
420 zigzag, relative to @code{zigzag-width}. A value of 1 gives 60-degree
421 zigzags.")
422      (zigzag-width ,ly:dimension? "The width of one
423 zigzag-squiggle. This number will be adjusted slightly so that the
424 glissando line can be constructed from a whole number of squiggles.")
425      )))
426
427
428 ;;;;;;;;;;;;;;;;
429 ;;   INTERNAL
430
431
432 (define (define-internal-grob-property symbol type? description)
433   (define-grob-property symbol type? description)
434   (set-object-property! symbol 'backend-internal #t)
435   symbol
436   )
437
438
439 (define-public all-internal-grob-properties
440   (map
441    (lambda (x)
442      (apply define-internal-grob-property x))
443    
444    `(
445      (pure-relevant-elements ,ly:grob-array? "The subset of elements that are relevant for finding the pure-Y-extent.")
446      (cached-pure-extents ,vector? "Used by a VerticalAxisGroup to cache the Y-extents of different column ranges.")
447      (common-refpoint-of-elements ,ly:grob? "Caches the common_refpoint_of_array of the elements grob-set")
448      (axis-group-parent-X ,ly:grob? "Containing X axis group")
449      (axis-group-parent-Y ,ly:grob? "Containing Y axis group")
450      (accidental-grobs ,list? "Alist with (NOTENAME . GROBLIST) entries")
451      (adjacent-hairpins ,ly:grob-array? "List of directly neighboring hairpins")
452      (all-elements ,ly:grob-array? "list of all grobs in this line. Its
453 function is to protect objects from being garbage collected.")
454      (arpeggio ,ly:grob? "pointer to arpeggio object.")
455      (beam ,ly:grob? "pointer to the beam, if applicable.")
456      (bracket ,ly:grob? "the bracket for a  number.")
457      (direction-source ,ly:grob? "in case side-relative-direction is
458 set, which grob to get the direction from .")
459      (dot ,ly:grob? "reference to Dots object.")
460      (dots ,ly:grob-array? "multiple Dots objects.")
461      (figures ,ly:grob-array? "Figured bass objects for continuation line.")
462      (important-column-ranks ,vector? "Cache of columns that contain items-worth-living.")
463      (glyph-name ,string? "a name of character within font.")
464      (pedal-text ,ly:grob? "Pointer to the text of a mixed-style piano pedal.")
465      (stem ,ly:grob? "pointer to Stem object.")
466      (tremolo-flag ,ly:grob? "The tremolo object on a stem.")
467      (tie ,ly:grob? "")
468      (staff-symbol ,ly:grob? "the staff symbol grob that we're in.")
469      (rest ,ly:grob? "the staff symbol grob that we're in.")
470      (rests ,ly:grob-array? "A list of rest objects.")
471      (rest-collision ,ly:grob? "rest collision that a rest is in.")
472      (accidental-grob ,ly:grob? "Accidental for this note.")
473      (bars ,ly:grob-array? "list of bar line pointers.")
474      (bounded-by-me ,ly:grob-array? "list of spanners that have this
475 column as start/begin point. Only columns that have grobs or act as
476 bounds are spaced.")
477      (circled-tip ,boolean? "Put a circle at start/end of hairpins (al/del niente)")
478      (columns ,ly:grob-array? "list of grobs, typically containing
479 paper-columns or note-column objects.")
480      (conditional-elements ,ly:grob-array? "Internal use only")
481      (encompass-objects ,ly:grob-array? "Objects that a slur should avoid
482 in addition to notes and stems.")
483      (elements ,ly:grob-array? "list of grobs, type depending on the Grob
484 where this is set in.")
485      (grace-spacing ,ly:grob? "a run of grace notes.")
486      (spacing ,ly:grob? "the spacing spanner governing this section.")
487      (heads ,ly:grob-array? "List of note heads.")
488      (items-worth-living ,ly:grob-array? "A list of interesting items. If
489 empty in a particular staff, then that staff is erased.")
490      (details ,list? "alist of parameters for detailed grob behavior.
491
492 more information on the allowed parameters can be found by inspecting
493 lily/slur-scoring.cc, lily/beam-quanting.cc, and
494 lily/tie-formatting-problem.cc.  Setting @code{debug-tie-scoring},
495 @code{debug-beam-scoring} or @code{debug-slur-scoring} also provides
496 useful clues.
497
498 ")
499      (note-heads ,ly:grob-array? "List of note head grobs")
500      (note-head ,ly:grob? "A single note head")
501      (side-support-elements ,ly:grob-array? "the support, a list of grobs.")
502      (spacing-wishes ,ly:grob-array? "List of note spacing or staff spacing objects.")
503      (stems ,ly:grob-array? "list of stem objects, corresponding to the notes that the arpeggio has to be before.")
504      (tuplets ,ly:grob-array? "list of smaller tuplet brackets")
505      (tuplet-number ,ly:grob? "the number for a bracket.")
506
507      (left-neighbors ,ly:grob-array? " List of
508 spacing-wish grobs that are close to the current column.
509
510 The closest spacing-wishes determine the actual distances between the
511 columns.
512 ")
513      (right-neighbors ,ly:grob-array? "see left-neighbors")
514      (left-items ,ly:grob-array? "")
515      (right-items ,ly:grob-array? "")
516      (cause ,scheme? "Any kind of causation objects (i.e. music, or perhaps translator) that was the cause for this grob.  ")
517      (font ,ly:font-metric? "Cached font metric object")
518
519      (positioning-done ,boolean?
520                        "Used to signal that a positioning element
521 did its job. This ensures that a positioning is only done once.")
522      (pure-Y-extent ,number-pair? "The estimated height of a system")
523
524
525      (script-stencil ,pair? "Pair (@code{type} . @code{arg}), which
526 acts as an index for looking up a Stencil object.")
527
528      (meta ,list? "Contains meta information. It is an alist with the
529 entries @code{name} and @code{interfaces}.")
530
531
532      ;; TODO: use interface for this!
533      (quantized-positions ,number-pair? "Beam positions after quanting.")
534      (begin-of-line-visible ,boolean? "Used for marking ChordNames that should only show changes.")
535
536      (quantize-position ,boolean? "If set, a vertical alignment is aligned to be within staff spaces.")
537      (quant-score ,string? "Beam quanting score -- can be stored for
538 debugging")
539      
540      (least-squares-dy ,number? 
541                        "ideal beam slope, without damping.")
542      (stem-info ,pair? "caching of stem parameters")
543      (note-columns ,pair? "list of NoteColumn grobs.")
544
545 ;;; add-join would be enough if in ly:mensural-ligature::brew-ligature-primitive
546 ;;; the next note could be seen
547      (join-right-amount ,number? "")
548
549      (delta-position ,number? "vertical position difference")
550      (head-width ,ly:dimension? "width of this ligature head")
551
552      ;; [TODO: change this]
553      (primitive ,integer? "Pointer to a ligature primitive, i.e. an item similar to a note head that is part of a ligature. ")
554      (ideal-distances ,list? "(@var{obj} . (@var{dist} . @var{strength})) pairs.")
555      (minimum-distances ,list? "list of rods, that have the format (@var{obj} . @var{dist}).")
556
557      (interfaces ,list? "list of symbols indicating the interfaces supported by this object. Is initialized from the @code{meta} field.")
558      (shorten ,ly:dimension? "The amount of space that a
559 stem. Internally used to distribute beam shortening over stems. ")
560      (slur ,ly:grob? "A pointer to a slur object")
561      (use-breve-rest ,boolean? "Use breve rests for measures longer
562 than a whole rest.")
563      
564
565      (spaceable-staves ,ly:grob-array? "Objects to be spaced during page layout.")
566      (skyline-distance ,number? "The distance between this staff and the next one, as determined by a skyline algorithm.")
567      (skyline-horizontal-padding ,number? "For determining the vertical distance between 2 staves, it is possible to have a configuration which would result in a tight interleaving of grobs from the top staff and the bottom staff. The larger this parameter is, the farther apart the staves will be placed in such a configuration.")
568
569      
570 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
571      ;; ancient notation
572 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
573      ;;;;;;; TODO:
574      ;; there are too many properties for ancient notation
575      ;; probably neume-types (a list of symbols) would also work.
576
577      ;; However, such this list would consist of a couple of dozens of
578      ;; entries, since head prefixes may be combined in many ways.  If
579      ;; the macros in gregorian-init.ly would directly set prefix-set,
580      ;; all the head prefixes could be junked; however, such macros
581      ;; would be quite numerous, I guess.  --jr
582
583      (auctum ,boolean? "is this neume liquescentically augmented?")
584      (ascendens ,boolean? "is this neume of an ascending type?")
585      (add-cauda ,boolean? "does this flexa require an additional cauda on the left side?")
586      (add-join ,boolean? "is this ligature head joined with the next one by a vertical line?")
587      (cavum ,boolean? "is this neume outlined?")
588      (descendens ,boolean? "is this neume of a descendent type?")
589      (deminutum ,boolean? "is this neume deminished?")
590      (flexa-height ,ly:dimension? "height of a flexa shape in a ligature grob in staff_space.")
591      (flexa-width ,ly:dimension? "width of a flexa shape in a ligature grob in staff_space.")
592      (join-heads ,boolean? "Whether to join the note heads of an ambitus grob with a vertical line.")
593      (linea ,boolean? "attach vertical lines to this neume?")
594      (add-stem ,boolean? "is this ligature head a virga and therefore needs an additional stem on the right side?")
595      (context-info ,integer? "Within a ligature, the final glyph or shape of a head may be affected by the left and/or right neighbour head.  context-info holds for each head such information about the left and right neighbour, encoded as a bit mask.")
596      (inclinatum ,boolean? "is this neume an inclinatum?")
597      (oriscus ,boolean? "is this neume an oriscus?")
598      (quilisma ,boolean? "is this neume a quilisma?")
599      (pes-or-flexa ,boolean? "shall this neume be joined with the previous head?")
600      (prefix-set ,number? "a bit mask that holds all Gregorian head prefixes, such as @code{\\virga} or @code{\\quilisma}")
601      (stropha ,boolean? "Is this neume a stropha?")
602      (virga ,boolean? "Is this neume a virga?")
603      (x-offset ,ly:dimension? "Extra horizontal offset for ligature heads.")
604
605      ;; end ancient notation
606
607      )))
608
609 (define-public all-backend-properties
610   (append
611    all-internal-grob-properties
612    all-user-grob-properties))