CVSROOT: /cvsroot/lilypond
Module name: lilypond
Branch:
Changes by: Han-Wen Nienhuys <[EMAIL PROTECTED]> 05/07/23 11:00:00
Modified files:
lily : pitch-squash-engraver.cc
rest-collision-engraver.cc
staff-symbol-engraver.cc
stanza-number-align-engraver.cc
stanza-number-engraver.cc
trill-spanner-engraver.cc tuplet-engraver.cc
Log message:
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/pitch-squash-engraver.cc.diff?tr1=1.37&tr2=1.38&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/rest-collision-engraver.cc.diff?tr1=1.44&tr2=1.45&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/staff-symbol-engraver.cc.diff?tr1=1.54&tr2=1.55&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/stanza-number-align-engraver.cc.diff?tr1=1.12&tr2=1.13&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/stanza-number-engraver.cc.diff?tr1=1.39&tr2=1.40&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/trill-spanner-engraver.cc.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/tuplet-engraver.cc.diff?tr1=1.75&tr2=1.76&r1=text&r2=text
Patches:
Index: lilypond/lily/pitch-squash-engraver.cc
diff -u lilypond/lily/pitch-squash-engraver.cc:1.37
lilypond/lily/pitch-squash-engraver.cc:1.38
--- lilypond/lily/pitch-squash-engraver.cc:1.37 Mon Jul 18 23:37:25 2005
+++ lilypond/lily/pitch-squash-engraver.cc Sat Jul 23 11:00:00 2005
@@ -14,15 +14,14 @@
{
public:
TRANSLATOR_DECLARATIONS (Pitch_squash_engraver);
- virtual void acknowledge_grob (Grob_info);
+ DECLARE_ACKNOWLEDGER(note_head);
};
void
-Pitch_squash_engraver::acknowledge_grob (Grob_info i)
+Pitch_squash_engraver::acknowledge_note_head (Grob_info i)
{
SCM newpos = get_property ("squashedPosition");
- if (scm_is_number (newpos)
- && Note_head::has_interface (i.grob ()))
+ if (scm_is_number (newpos))
{
i.grob ()->set_property ("staff-position", newpos);
}
@@ -33,7 +32,7 @@
}
#include "translator.icc"
-
+ADD_ACKNOWLEDGER(Pitch_squash_engraver,note_head);
ADD_TRANSLATOR (Pitch_squash_engraver,
/* descr */
"Set the vertical position of noteheads to "
@@ -44,6 +43,6 @@
/* creats*/ "",
/* accepts */ "",
- /* acks */ "note-head-interface",
+ /* acks */ "",
/* reads */ "squashedPosition",
/* write */ "");
Index: lilypond/lily/rest-collision-engraver.cc
diff -u lilypond/lily/rest-collision-engraver.cc:1.44
lilypond/lily/rest-collision-engraver.cc:1.45
--- lilypond/lily/rest-collision-engraver.cc:1.44 Mon Jul 18 23:37:25 2005
+++ lilypond/lily/rest-collision-engraver.cc Sat Jul 23 11:00:00 2005
@@ -17,7 +17,7 @@
int rest_count_;
Link_array<Grob> note_columns_;
protected:
- virtual void acknowledge_grob (Grob_info);
+ DECLARE_ACKNOWLEDGER(note_column);
PRECOMPUTED_VIRTUAL void process_acknowledged ();
PRECOMPUTED_VIRTUAL void stop_translation_timestep ();
public:
@@ -47,14 +47,11 @@
}
void
-Rest_collision_engraver::acknowledge_grob (Grob_info i)
+Rest_collision_engraver::acknowledge_note_column (Grob_info i)
{
- if (Note_column::has_interface (i.grob ()))
- {
- note_columns_.push (i.grob ());
- if (Note_column::has_rests (i.grob ()))
- rest_count_++;
- }
+ note_columns_.push (i.grob ());
+ if (Note_column::has_rests (i.grob ()))
+ rest_count_++;
}
void
@@ -67,10 +64,11 @@
#include "translator.icc"
+ADD_ACKNOWLEDGER(Rest_collision_engraver, note_column);
ADD_TRANSLATOR (Rest_collision_engraver,
/* descr */ "Handles collisions of rests.",
/* creats*/ "RestCollision",
/* accepts */ "",
- /* acks */ "note-column-interface",
+ /* acks */ "",
/* reads */ "",
/* write */ "");
Index: lilypond/lily/staff-symbol-engraver.cc
diff -u lilypond/lily/staff-symbol-engraver.cc:1.54
lilypond/lily/staff-symbol-engraver.cc:1.55
--- lilypond/lily/staff-symbol-engraver.cc:1.54 Sat Jul 23 01:24:27 2005
+++ lilypond/lily/staff-symbol-engraver.cc Sat Jul 23 11:00:00 2005
@@ -93,10 +93,12 @@
stop_spanner ();
}
+/*
+ Todo: staff-symbol-referencer iface.
+ */
void
Staff_symbol_engraver::acknowledge_grob (Grob_info s)
{
-
/*
Perhaps should try to take SeparationItem as bound of the staff
symbol?
Index: lilypond/lily/stanza-number-align-engraver.cc
diff -u lilypond/lily/stanza-number-align-engraver.cc:1.12
lilypond/lily/stanza-number-align-engraver.cc:1.13
--- lilypond/lily/stanza-number-align-engraver.cc:1.12 Mon Jul 18 23:37:25 2005
+++ lilypond/lily/stanza-number-align-engraver.cc Sat Jul 23 11:00:00 2005
@@ -1,6 +1,5 @@
-
/*
- stanza-number-align-engraver.cc -- implement
+ stanza-number-align-engraver.cc -- implement Stanza_number_align_engraver
source file of the GNU LilyPond music typesetter
@@ -14,6 +13,8 @@
#include "pointer-group-interface.hh"
#include "side-position-interface.hh"
+#include "translator.icc"
+
class Stanza_number_align_engraver : public Engraver
{
public:
@@ -22,7 +23,9 @@
protected:
Link_array<Grob> lyrics_;
Link_array<Grob> stanza_numbers_;
- virtual void acknowledge_grob (Grob_info);
+
+ DECLARE_ACKNOWLEDGER(lyric_syllable);
+ DECLARE_ACKNOWLEDGER(stanza_number);
PRECOMPUTED_VIRTUAL void stop_translation_timestep ();
};
@@ -31,14 +34,17 @@
}
void
-Stanza_number_align_engraver::acknowledge_grob (Grob_info gi)
+Stanza_number_align_engraver::acknowledge_lyric_syllable (Grob_info gi)
{
Grob *h = gi.grob ();
+ lyrics_.push (h);
+}
- if (h->internal_has_interface (ly_symbol2scm ("lyric-syllable-interface")))
- lyrics_.push (h);
- else if (h->internal_has_interface (ly_symbol2scm
("stanza-number-interface")))
- stanza_numbers_.push (h);
+void
+Stanza_number_align_engraver::acknowledge_stanza_number (Grob_info gi)
+{
+ Grob *h = gi.grob ();
+ stanza_numbers_.push (h);
}
void
@@ -52,13 +58,13 @@
lyrics_.clear ();
}
-#include "translator.icc"
-
+ADD_ACKNOWLEDGER(Stanza_number_align_engraver,lyric_syllable);
+ADD_ACKNOWLEDGER(Stanza_number_align_engraver,stanza_number);
ADD_TRANSLATOR (Stanza_number_align_engraver,
"This engraver ensures that stanza numbers are neatly aligned.
",
"",
"",
- "stanza-number-interface lyric-syllable-interface ",
+ " ",
"",
"");
Index: lilypond/lily/stanza-number-engraver.cc
diff -u lilypond/lily/stanza-number-engraver.cc:1.39
lilypond/lily/stanza-number-engraver.cc:1.40
--- lilypond/lily/stanza-number-engraver.cc:1.39 Mon Jul 18 23:37:25 2005
+++ lilypond/lily/stanza-number-engraver.cc Sat Jul 23 11:00:00 2005
@@ -23,7 +23,7 @@
TRANSLATOR_DECLARATIONS (Stanza_number_engraver);
PRECOMPUTED_VIRTUAL void process_music ();
PRECOMPUTED_VIRTUAL void stop_translation_timestep ();
- virtual void acknowledge_grob (Grob_info);
+ DECLARE_ACKNOWLEDGER(lyric_syllable);
};
/*
@@ -52,10 +52,9 @@
}
void
-Stanza_number_engraver::acknowledge_grob (Grob_info inf)
+Stanza_number_engraver::acknowledge_lyric_syllable (Grob_info inf)
{
- if (text_
- && inf.grob ()->internal_has_interface (ly_symbol2scm
("lyric-syllable-interface")))
+ if (text_)
{
Side_position_interface::add_support (text_, inf.grob ());
}
@@ -69,10 +68,11 @@
#include "translator.icc"
+ADD_ACKNOWLEDGER(Stanza_number_engraver,lyric_syllable);
ADD_TRANSLATOR (Stanza_number_engraver,
/* descr */ "",
/* creats*/ "StanzaNumber",
/* accepts */ "",
- /* acks */ "lyric-syllable-interface",
+ /* acks */ "",
/* reads */ "stanza",
/* write */ "");
Index: lilypond/lily/trill-spanner-engraver.cc
diff -u lilypond/lily/trill-spanner-engraver.cc:1.9
lilypond/lily/trill-spanner-engraver.cc:1.10
--- lilypond/lily/trill-spanner-engraver.cc:1.9 Mon Jul 18 23:37:25 2005
+++ lilypond/lily/trill-spanner-engraver.cc Sat Jul 23 11:00:00 2005
@@ -25,7 +25,7 @@
TRANSLATOR_DECLARATIONS (Trill_spanner_engraver);
protected:
virtual void finalize ();
- virtual void acknowledge_grob (Grob_info);
+ DECLARE_ACKNOWLEDGER(note_column);
virtual bool try_music (Music *);
PRECOMPUTED_VIRTUAL void stop_translation_timestep ();
PRECOMPUTED_VIRTUAL void process_music ();
@@ -94,12 +94,12 @@
}
void
-Trill_spanner_engraver::acknowledge_grob (Grob_info info)
+Trill_spanner_engraver::acknowledge_note_column (Grob_info info)
{
Spanner *spans[2] ={span_, finished_};
for (int i = 0; i < 2; i++)
{
- if (spans[i] && Note_column::has_interface (info.grob ()))
+ if (spans[i])
{
Side_position_interface::add_support (spans[i], info.grob ());
add_bound_item (spans[i], dynamic_cast<Item *> (info.grob ()));
@@ -146,11 +146,11 @@
span_ = 0;
}
}
-
+ADD_ACKNOWLEDGER(Trill_spanner_engraver,note_column);
ADD_TRANSLATOR (Trill_spanner_engraver,
/* descr */ "Create trill spanner from a Music.",
/* creats*/ "TrillSpanner",
/* accepts */ "trill-span-event",
- /* acks */ "note-column-interface",
+ /* acks */ "",
/* reads */ "",
/* write */ "");
Index: lilypond/lily/tuplet-engraver.cc
diff -u lilypond/lily/tuplet-engraver.cc:1.75
lilypond/lily/tuplet-engraver.cc:1.76
--- lilypond/lily/tuplet-engraver.cc:1.75 Mon Jul 18 23:37:25 2005
+++ lilypond/lily/tuplet-engraver.cc Sat Jul 23 11:00:00 2005
@@ -35,7 +35,7 @@
protected:
Array<Tuplet_description> tuplets_;
- virtual void acknowledge_grob (Grob_info);
+ DECLARE_ACKNOWLEDGER(note_column);
virtual bool try_music (Music *r);
PRECOMPUTED_VIRTUAL void start_translation_timestep ();
PRECOMPUTED_VIRTUAL void process_music ();
@@ -87,15 +87,12 @@
}
void
-Tuplet_engraver::acknowledge_grob (Grob_info i)
+Tuplet_engraver::acknowledge_note_column (Grob_info i)
{
- if (Note_column::has_interface (i.grob ()))
- {
- for (int j = 0; j < tuplets_.size (); j++)
- if (tuplets_[j].spanner_)
- Tuplet_bracket::add_column (tuplets_[j].spanner_,
- dynamic_cast<Item *> (i.grob ()));
- }
+ for (int j = 0; j < tuplets_.size (); j++)
+ if (tuplets_[j].spanner_)
+ Tuplet_bracket::add_column (tuplets_[j].spanner_,
+ dynamic_cast<Item *> (i.grob ()));
}
void
@@ -134,11 +131,11 @@
Tuplet_engraver::Tuplet_engraver ()
{
}
-
+ADD_ACKNOWLEDGER(Tuplet_engraver,note_column);
ADD_TRANSLATOR (Tuplet_engraver,
/* descr */ "Catch Time_scaled_music and generate appropriate
bracket ",
/* creats*/ "TupletBracket",
/* accepts */ "time-scaled-music",
- /* acks */ "note-column-interface",
+ /* acks */ "",
/* reads */ "tupletNumberFormatFunction tupletSpannerDuration",
/* write */ "");
_______________________________________________
Lilypond-cvs mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-cvs