.py too.
* lily/grob-property.cc (del_property): new function.
2005-10-21 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ * scripts/convert-ly.py (datadir): add prefix switching hack to
+ .py too.
+
* input/mutopia/W.A.Mozart/mozart-hrn3-defs.ily (cresc): remove
space-function tweak.
@itemize @bullet
+
+@item
+Each grob property can be a procedure. If this is the case, it is
+assumed to be a routine that calculates said property. This is a
+major internal cleanup, which also provides advanced tweakability for
+power users. For example,
+
+@verbatim
+\override Beam #'direction
+ = #(lambda (grob)
+ (if (> 4 (ly:grob-array-length (ly:grob-object grob 'stems)))
+ DOWN
+ UP))
+@end verbatim
+
+@noindent
+With this code fragment, the direction of a beam is decided to be up
+or down, depending on the number of stems in the beam.
+
@item
Support for figured bass has been rewritten. Now it supports
continuation lines, slashed figures, and its figures, brackets, and alignments may
This rewrite was sponsored by Trent Johnston and John Mandereau.
-@item
-For each grob, a subproperty in @code{callbacks} property defines the
-procedure which computes it. This is a major internal cleanup, which
-also provides advanced tweakability for power users. For example,
-
-@verbatim
-\override Beam #'callbacks #'direction
- = #(lambda (grob)
- (if (> 4 (ly:grob-array-length (ly:grob-object grob 'stems)))
- DOWN
- UP))
-@end verbatim
-
-@noindent
-With this code fragment, the direction of a beam is decided to be up
-or down, depending on the number of stems in the beam.
-
@item
Subproperties, like the @code{details} field of @code{Slur} and
@code{Tie} may now be tuned with @code{\override}. For example,
}
{
- \override Staff.TimeSignature #'callbacks #'stencil = #Text_interface::print
+ \override Staff.TimeSignature #'stencil = #Text_interface::print
\override Staff.TimeSignature #'text = #tsMarkup
\time 3/2
c'2 \bar ":" c'4 c'4.
measure rest with a different print function,
@lilypond[fragment,verbatim]
-\override MultiMeasureRest #'callbacks #'stencil
+\override MultiMeasureRest #'stencil
= #Multi_measure_rest::percent
R1
@end lilypond
(ly:grob-set-property! grob 'extra-offset '(-2 . 5)))))
\relative c'' {
- \override Tie #'callbacks #'after-line-breaking =
+ \override Tie #'after-line-breaking =
#my-callback
c1 ~ \break c2 ~ c
}
An -- ti -- cons -- ti --
tu -- tion -- nel -- le --
\override LyricHyphen #'minimum-length = #0.7
- \override LyricHyphen #'callbacks #'springs-and-rods =
+ \override LyricHyphen #'springs-and-rods =
#Hyphen_spanner::set_spacing_rods
men -- taire -- ment. ouf~!
}
\set autoBeaming = ##f
\time 2/4
<d f g>4
- \once \override NoteHead #'callbacks #'stencil = #Note_head::brew_ez_stencil
+ \once \override NoteHead #'stencil = #Note_head::brew_ez_stencil
<d f g>
\once \override NoteHead #'style = #'cross
<d f g>
mkdir -p $(tree-prefix)/fonts/enc
mkdir -p $(tree-prefix)/tex
cd $(top-build-dir)/$(outbase)/lib && \
- ln -s ../../../python/$(outconfbase) python
+ ln -s ../../../../python/$(outconfbase) python
cd $(tree-prefix) && \
ln -s $(top-src-dir)/ly ly && \
ln -s ../../../../mf mf && \
ln -s $(top-src-dir)/ps && \
- ln -s ../../../python/$(outconfbase) python && \
+ ln -s ../../../../python/$(outconfbase) python && \
ln -s $(top-src-dir)/scm && \
ln -s $(top-src-dir)/scripts scripts
cd $(tree-prefix)/dvips && \
PACKAGE_NAME=LilyPond
MAJOR_VERSION=2
MINOR_VERSION=7
-PATCH_LEVEL=13
+PATCH_LEVEL=14
MY_PATCH_LEVEL=
\relative c' {
%% by hand:
- \once\override Stem #'callbacks #'stencil = #Balloon_interface::print
- \once\override Stem #'balloon-original-callback = #Stem::print
+ \once\override Stem #'stencil = #Balloon_interface::print
+ \once\override Stem #'original-stencil = #Stem::print
\once\override Stem #'balloon-text = #"I'm a stem"
\once\override Stem #'balloon-text-offset = #'(3 . 4)
\once\override Stem #'balloon-text-props
-\version "2.7.13"
+\version "2.7.14"
\header {
bla -- bla -- bla -- bla --
\override LyricHyphen #'minimum-length = #0.7
- \override LyricHyphen #'callbacks #'springs-and-rods =
+ \override LyricHyphen #'springs-and-rods =
#Hyphen_spanner::set_spacing_rods
bla -- bla -- bla -- bla
-\version "2.7.13"
+\version "2.7.14"
\header {
R2.^"4"
R2.*3_\markup { \roman "a1b2c3" }
R2.*10^"inner"^"top"_"inner"_"bot"
- \override MultiMeasureRestText #'callbacks #'springs-and-rods
+ \override MultiMeasureRestText #'springs-and-rods
= #Multi_measure_rest::set_text_rods
R2.^"very very very very very very long text"
-\version "2.7.13"
+\version "2.7.14"
\header {
texidoc = "A clef can be folded below notes in a different staff, if
\context {
\Score
- \override NonMusicalPaperColumn #'callbacks #'stencil = #Paper_column::print
- \override PaperColumn #'callbacks #'stencil = #Paper_column::print
+ \override NonMusicalPaperColumn #'stencil = #Paper_column::print
+ \override PaperColumn #'stencil = #Paper_column::print
\override NonMusicalPaperColumn #'font-family = #'roman
\override PaperColumn #'font-family = #'roman
-\version "2.7.13"
+\version "2.7.14"
\header { texidoc=" You can write stencil callbacks in Scheme, thus
providing custom glyphs for notation elements. A simple example is
(subject-dim-x (ly:stencil-extent subject 0))
(subject-dim-y (ly:stencil-extent subject 1)))
- ; add parens
+ ;; add parens
(set! subject
(ly:stencil-combine-at-edge
(ly:stencil-combine-at-edge subject 0 1 pclose 0.2)
\relative c' {
c4 e
- \override NoteHead #'callbacks #'stencil
+ \override NoteHead #'stencil
=
#(parenthesize-callback Note_head::print)
g bes
- \revert NoteHead #'callbacks % stencil
+ \revert NoteHead % stencil
- \override Beam #'callbacks #'stencil
+ \override Beam #'stencil
=
#(parenthesize-callback Beam::print)
-\version "2.7.13"
+\version "2.7.14"
\header {
texidoc = "The size of every system is correctly determined; this
\layout {
\context {
\Score
- \override System #'callbacks #'stencil = #box-grob-stencil
+ \override System #'stencil = #box-grob-stencil
}
}
struct Cluster_beacon
{
public:
- DECLARE_SCHEME_CALLBACK (height, (SCM, SCM));
+ DECLARE_SCHEME_CALLBACK (height, (SCM));
static bool has_interface (Grob *);
};
-MAKE_SCHEME_CALLBACK (Cluster_beacon, height, 2);
+MAKE_SCHEME_CALLBACK (Cluster_beacon, height, 1);
SCM
-Cluster_beacon::height (SCM g, SCM)
+Cluster_beacon::height (SCM g)
{
Grob *me = unsmob_grob (g);
Interval v = robust_scm2interval (me->get_property ("positions"),
"cluster-beacon-interface",
"A place holder for the cluster spanner to determine the vertical "
"extents of a cluster spanner at this X position.",
- "positions");
+
+ /* properties */
+ "positions ");
bool ok = true;
if (!scm_is_pair (scm_cdr (grob_property_path)))
{
- ok = type_check_assignment (symbol, new_value, ly_symbol2scm ("backend-type?"));
+ ok = !ly_is_procedure (new_value)
+ && type_check_assignment (symbol, new_value,
+ ly_symbol2scm ("backend-type?"));
/*
tack onto alist. We can use set_car, since
if (do_internal_type_checking_global)
{
- if (!type_check_assignment (sym, v, ly_symbol2scm ("backend-type?")))
+ if (!ly_is_procedure (v)
+ && !type_check_assignment (sym, v, ly_symbol2scm ("backend-type?")))
abort ();
check_interfaces_for_property (this, sym);
}
if (do_internal_type_checking_global && scm_is_pair (handle))
{
- if (!type_check_assignment (sym, scm_cdr (handle),
+ SCM val = scm_cdr (handle);
+ if (!ly_is_procedure (val)
+ && !type_check_assignment (sym, val,
ly_symbol2scm ("backend-type?")))
abort ();
SCM_ASSERT_TYPE (sc, grob, SCM_ARG1, __FUNCTION__, "grob");
SCM_ASSERT_TYPE (scm_is_symbol (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");
- if (!type_check_assignment (sym, val, ly_symbol2scm ("backend-type?")))
+ if (!ly_is_procedure (val)
+ && !type_check_assignment (sym, val, ly_symbol2scm ("backend-type?")))
error ("typecheck failed");
sc->internal_set_property (sym, val);
LY_DEFINE (ly_grob_property, "ly:grob-property",
2, 0, 0, (SCM grob, SCM sym),
"Return the value of a value in grob @var{g} of property @var{sym}. "
- "It will return @code{' ()} (end-of-list) "
+ "It will return @code{'()} (end-of-list) "
"if @var{sym} is undefined in @var{g}."
"\n\n")
{
conversions.append (((2, 7, 13), conv,
'''layout engine refactoring. [FIXME] '''))
+
+
+
+def conv (str):
+ str = re.sub (r"#'callbacks", '', str)
+ str = re.sub (r"([XY]-extent)-callback", r'\1', str)
+ return str
+
+conversions.append (((2, 7, 14), conv,
+ '''Remove callbacks property, deprecate XY-extent-callback. '''))
(ly:add-interface
'ligature-bracket-interface
"A bracket indicating a ligature in the original edition"
- '(width thickness height ligature-primitive-callback))
+ '(width thickness height))
(ly:add-interface
if os.environ.has_key ('LILYPONDPREFIX'):
datadir = os.environ['LILYPONDPREFIX']
while datadir[-1] == os.sep:
- datadir= datadir[:-1]
+ datadir = datadir[:-1]
+
+if os.path.exists (os.path.join (datadir, 'share/lilypond/@TOPLEVEL_VERSION@/')):
+ datadir = os.path.join (datadir, 'share/lilypond/@TOPLEVEL_VERSION@/')
sys.path.insert (0, os.path.join (datadir, 'python'))