Next: , Previous: horizontal-bracket-interface, Up: Graphical Object Interfaces



item-interface

Grobs can be distinguished in their role in the horizontal spacing. Many grobs define constraints on the spacing by their sizes. For example, note heads, clefs, stems, and all other symbols with a fixed shape. These grobs form a subtype called Item.

Some items need special treatment for line breaking. For example, a clef is normally only printed at the start of a line (i.e. after a line break). To model this, `breakable' items (clef, key signature, bar lines, etc.) are copied twice. Then we have three versions of each breakable item: one version if there is no line break, one version that is printed before the line break (at the end of a system), one version that is printed after the line break.

Whether these versions are visible and take up space, is determined by the outcome of the break-visibility. This grob property is a function taking a direction (-1, 0 or 1) as argument. It returns a cons of booleans, signifying whether this grob should be transparent and have no extent.

The following variables for break-visibility are predefined:

                grob will show:   before  no     after
                                  break   break  break
       all-invisible              no      no     no
       begin-of-line-visible      no      no     yes
       end-of-line-visible        yes     no     no
       all-visible                yes     yes    yes
       begin-of-line-invisible    yes     yes    no
       end-of-line-invisible      no      yes    yes
User settable properties:
break-visibility (procedure)
A function that takes the break direction and returns a cons of booleans containing (transparent . empty). The following variables are predefined: all-visible, begin-of-line-visible, end-of-line-visible, begin-of-line-invisible, end-of-line-invisible, all-invisible.
breakable (boolean)
Can this object appear at a line break, like clefs and bar lines?
no-spacing-rods (boolean)
Items with this property do not cause spacing constraints.

This grob interface is used in the following graphical objects: Accidental, AccidentalPlacement, Ambitus, Arpeggio, BarLine, BarNumber, BassFigure, BreakAlignGroup, BreakAlignGroup, BreakAlignment, BreathingSign, ChordName, Clef, ClusterSpannerBeacon, CombineTextScript, Custos, DotColumn, Dots, DoublePercentRepeat, DynamicText, Fingering, InstrumentName, KeySignature, LeftEdge, LyricText, MetronomeMark, NonMusicalPaperColumn, NoteCollision, NoteColumn, NoteHead, NoteName, NoteSpacing, OctavateEight, PaperColumn, RehearsalMark, RemoveEmptyVerticalGroup, RepeatSlash, Rest, RestCollision, Script, ScriptColumn, SeparationItem, SostenutoPedal, SpanBar, StaffSpacing, StanzaNumber, Stem, StemTremolo, SustainPedal, TabNoteHead, TextScript, TimeSignature, UnaCordaPedal and VocalName

Read comments on this page, or add one.

This page is for LilyPond-2.2.6 (stable-branch).

Report errors to <bug-lilypond@gnu.org>.