-done property.
* scm/grob-property-description.scm (rest-collision-done): add property.
* lilypond.vim: add file (<hjunes@cc.hut.fi>)
.gdbinit
GNUmakefile
TAGS
+a
afm
autom4te.cache
config.cache
config.make
config.status
configure
+conv.py
+fetchmail-5.9.0-21.i386.rpm
fonts
+foo.hh
l
+lilypond-internals.texi
log
ls-R
ly2dvi.dir
stepmake
tfm
tfm.[0-9]
+to-xml.texidoc
+xml.py
+2002-10-27 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ * lily/rest-collision.cc (force_shift_callback): rewrite using
+ -done property.
+
+ * scm/grob-property-description.scm (rest-collision-done): add property.
+
+ * lilypond.vim: add file (<hjunes@cc.hut.fi>)
+
2002-10-23 Han-Wen Nienhuys <hanwen@cs.uu.nl>
* input/regression/multi-measure-rest-center.ly: new file.
static bool has_interface (Grob*);
DECLARE_SCHEME_CALLBACK (force_shift_callback, (SCM element, SCM axis));
- static SCM do_shift (Grob*,SCM);
+ static SCM do_shift (Grob*);
};
#endif // REST_COLLISION_HH
Grob * rc = unsmob_grob (them->get_grob_property ("rest-collision"));
- if (rc)
+ if (rc && !to_boolean (rc->get_grob_property ("rest-collision-done")))
{
- /*
- Done: destruct pointers, so we do the shift only once.
-
- TODO: use rest-collision-done
- */
- SCM elts = rc->get_grob_property ("elements");
- rc->set_grob_property ("elements", SCM_EOL);
+ rc->set_grob_property ("rest-collision-done", SCM_BOOL_T);
- do_shift (rc, elts);
+ do_shift (rc);
}
return gh_double2scm (0.0);
Pointer_group_interface::add_grob (me, ly_symbol2scm ("elements"), p);
/*
- only add callback for the rests, since we don't move anything else.
+ only add callback for the rests, since we don't move anything
+ else.
(not?)
*/
for more than two voices.
*/
SCM
-Rest_collision::do_shift (Grob *me, SCM elts)
+Rest_collision::do_shift (Grob *me)
{
- /*
- ugh. -> score elt type
- */
+ SCM elts = me->get_grob_property ("elements");
+
Link_array<Grob> rests;
Link_array<Grob> notes;
for (; i > display_count; i--)
{
Grob* r = unsmob_grob (rests[i-1]->get_grob_property ("rest"));
+#if 1
if (r)
r->suicide ();
rests[i-1]->suicide ();
+#else
+ if (r)
+ {
+
+ r->set_grob_property ("transparent", gh_bool2scm(1));
+ r = unsmob_grob (r->get_grob_property ("dot"));
+ if (r)
+ r->set_grob_property ("transparent", gh_bool2scm(1));
+ }
+#endif
}
}
else
ADD_INTERFACE (Rest_collision,"rest-collision-interface",
- "Move around ordinary rests (not multi-measure-rests) to avoid
-conflicts.",
- "maximum-rest-count minimum-distance elements");
+ "Move around ordinary rests (not multi-measure-rests) to avoid "
+"conflicts.",
+ "maximum-rest-count minimum-distance rest-collision-done elements");
--- /dev/null
+" Vim syntax file
+" Language: LilyPond
+" Maintainer: Heikki Junes <hjunes@cc.hut.fi>
+" Created: Oct 17, 2002
+" Last Change: Oct 17, 2002
+" Version: 6.1-1
+" Latest:
+" http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lilypond.vim
+
+" For version 5.x: Clear all syntax items
+" For version 6.x: Quit when a syntax file was already loaded
+if version < 600
+ syntax clear
+elseif exists("b:current_syntax")
+ finish
+endif
+
+" Match also parethesis of angle type
+set mps+=<:>
+
+syn cluster lilyMatchGroup contains=lilyMatcher,lilyString,lilyComment,lilyStatement,lilyNote,lilyNumber,lilyEquation,lilySlur,lilySpecial
+
+syn region lilyMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{<>}]" end="}" contains=@lilyMatchGroup fold
+syn region lilyMatcher matchgroup=Delimiter start="\[" end="]" contains=@lilyMatchGroup fold
+syn region lilyMatcher matchgroup=Delimiter start="<" skip="\\\\\|\\[{<>}]" end=">" contains=@lilyMatchGroup fold
+
+syn region lilyString start=/"/ end=/"/ skip=/\\"/
+syn region lilyComment start="%{" skip="%$" end="%}"
+syn region lilyComment start="%\([^{]\|$\)" end="$"
+
+syn match lilyStatement "[-_^]\?\\\a\+"
+syn match lilyNote "\<\(\(\(bb\|as[ae]s\|[ae]s\|eses\|[a-h]\([ei]s\)\{,2}\)\([,']\)\{,4}\([?!]\)\?\|[srR]\)\(\(128\|6\?4\|3\?2\|16\?\|8\|\\breve\)[.]*\)\?\)\(\A\|\n\)"me=e-1
+syn match lilyNumber "[-_^.]\?\d\+[.]\?"
+syn match lilyEquation "\(#['`]\)\?\(\a*[-]\)*\a*\s*=\s*\(#[#'`]\?\)\?\a*"
+syn match lilySlur "[(~)]"
+syn match lilySlur "\\[()]"
+syn match lilySpecial "\\[<!>\\]"
+
+" Rest of syntax highlighting rules start here
+"
+" " Define the default highlighting.
+" " For version 5.7 and earlier: only when not done already
+" " For version 5.8 and later: only when an item doesn't have highlighting yet
+if version >= 508 || !exists("did_lily_syn_inits")
+ if version < 508
+ let did_lily_syn_inits = 1
+ command -nargs=+ HiLink hi link <args>
+ else
+ command -nargs=+ HiLink hi def link <args>
+ endif
+
+ HiLink Delimiter Identifier
+
+ HiLink lilyString String
+ HiLink lilyComment Comment
+
+ HiLink lilyNote Identifier
+ HiLink lilyNumber Constant
+ HiLink lilyStatement Statement
+ HiLink lilySpecial Special
+ HiLink lilySlur ModeMsg
+
+ delcommand HiLink
+endif
(grob-property-description 'collision-done boolean? "")
(grob-property-description 'rest ly:grob? "the staff symbol grob that we're in.")
(grob-property-description 'rest-collision ly:grob? "rest collision that a rest is in.")
+(grob-property-description 'rest-collision-done boolean? "Is this rest collision processed yet?")
(grob-property-description 'staff-support boolean? " JUNKME.")
(grob-property-description 'script-molecule pair? "index code for script.")
a queue of (END-MOMENT . GROB) conses. This is for internal (C++) use only.
Use at your own risk. This property contains the grobs for which END-MOMENT >= NOW.
")
-(translator-property-description 'centralCPosition number? "Place of the central C. Usually determined by looking at clefPosition and clefGlyph.")
+
+(translator-property-description 'centralCPosition number? "Place of
+the central C, measured in half staffspaces. Usually determined by
+looking at clefPosition and clefGlyph.")
+
(translator-property-description
'changeMoment moment-pair?
"duration that voices are examined for differences, when
(translator-property-description 'clefGlyph string? "Name of the symbol within the music font")
(translator-property-description 'clefOctavation integer? "Add
this much extra octavation. Values of 7 and -7 are common.")
-(translator-property-description 'clefPosition number? "Where should the center of the symbol go?")
+
+(translator-property-description 'clefPosition number? "Where should
+the center of the clef symbol go? On systems with an odd number of
+stafflines, the value 0 puts the clef on the middle staffline; a
+positive value shifts it up, a negative value shifts it down. The
+unit of this distance is the half staff space.")
+
(translator-property-description 'combineParts boolean? "try to combine parts?")
(translator-property-description 'connectArpeggios boolean? " If
set, connect all arpeggios that are found. In this way, you can make