/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 1997--2014 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ Copyright (C) 1997--2015 Han-Wen Nienhuys <hanwen@xs4all.nl>
LilyPond is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
void stop_translation_timestep ();
void process_music ();
- DECLARE_TRANSLATOR_LISTENER (articulation);
- DECLARE_ACKNOWLEDGER (rhythmic_head);
- DECLARE_ACKNOWLEDGER (stem);
- DECLARE_ACKNOWLEDGER (stem_tremolo);
- DECLARE_ACKNOWLEDGER (tie);
- DECLARE_END_ACKNOWLEDGER (tie);
- DECLARE_ACKNOWLEDGER (note_column);
- DECLARE_ACKNOWLEDGER (inline_accidental);
+ void listen_articulation (Stream_event *);
+ void acknowledge_rhythmic_head (Grob_info);
+ void acknowledge_stem (Grob_info);
+ void acknowledge_stem_tremolo (Grob_info);
+ void acknowledge_tie (Grob_info);
+ void acknowledge_end_tie (Grob_info);
+ void acknowledge_note_column (Grob_info);
+ void acknowledge_inline_accidental (Grob_info);
public:
TRANSLATOR_DECLARATIONS (Script_engraver);
{
}
-IMPLEMENT_TRANSLATOR_LISTENER (Script_engraver, articulation);
void
Script_engraver::listen_articulation (Stream_event *ev)
{
void
copy_property (Grob *g, SCM sym, SCM alist)
{
- if (g->internal_get_property (sym) == SCM_EOL)
+ if (scm_is_null (g->get_property (sym)))
{
SCM entry = scm_assoc (sym, alist);
if (scm_is_pair (entry))
SCM alist = tg->get_property ("scriptDefinitions");
SCM art = scm_assoc (art_type, alist);
- if (art == SCM_BOOL_F)
+ if (scm_is_false (art))
{
/* FIXME: */
warning (_ ("do not know how to interpret articulation:"));
SCM val = scm_cdar (s);
- if (sym == ly_symbol2scm ("script-priority"))
+ if (scm_is_eq (sym, ly_symbol2scm ("script-priority")))
{
priority_found = true;
/* Make sure they're in order of user input by adding index i.
}
SCM preset = p->get_property_data (sym);
- if (val == SCM_EOL
- || scm_call_1 (type, preset) == SCM_BOOL_F)
+ if (scm_is_null (val)
+ || scm_is_false (scm_call_1 (type, preset)))
p->set_property (sym, val);
}
scripts_.clear ();
}
-ADD_ACKNOWLEDGER (Script_engraver, rhythmic_head);
-ADD_ACKNOWLEDGER (Script_engraver, stem);
-ADD_ACKNOWLEDGER (Script_engraver, tie);
-ADD_END_ACKNOWLEDGER (Script_engraver, tie);
-ADD_ACKNOWLEDGER (Script_engraver, note_column);
-ADD_ACKNOWLEDGER (Script_engraver, stem_tremolo);
-ADD_ACKNOWLEDGER (Script_engraver, inline_accidental);
+
+void
+Script_engraver::boot ()
+{
+ ADD_LISTENER (Script_engraver, articulation);
+ ADD_ACKNOWLEDGER (Script_engraver, rhythmic_head);
+ ADD_ACKNOWLEDGER (Script_engraver, stem);
+ ADD_ACKNOWLEDGER (Script_engraver, tie);
+ ADD_END_ACKNOWLEDGER (Script_engraver, tie);
+ ADD_ACKNOWLEDGER (Script_engraver, note_column);
+ ADD_ACKNOWLEDGER (Script_engraver, stem_tremolo);
+ ADD_ACKNOWLEDGER (Script_engraver, inline_accidental);
+}
ADD_TRANSLATOR (Script_engraver,
/* doc */