2 extender-engraver.hh -- declare Extender_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 1998--1999 Jan Nieuwenhuizen <janneke@gnu.org>
9 #ifndef EXTENDER_ENGRAVER_HH
10 #define EXTENDER_ENGRAVER_HH
12 #include "engraver.hh"
13 #include "drul-array.hh"
14 #include "extender-spanner.hh"
17 struct Text_lyric_tuple {
18 Rhythmic_req *req_l_ ;
23 Text_lyric_tuple (Text_item*, Rhythmic_req*, Moment);
24 static int time_compare (Text_lyric_tuple const &, Text_lyric_tuple const &);
27 inline int compare (Text_lyric_tuple const &a, Text_lyric_tuple const &b)
29 return Text_lyric_tuple::time_compare (a,b);
36 Generate an extender. Should make an Extender_spanner that typesets
39 We remember all Text_items that come across, and store their
40 termination times. When we get a request, we create the spanner, and
41 attach the left point to the finished lyrics, and the right point to
42 any lyrics we receive by then.
44 class Extender_engraver : public Engraver
46 PQueue<Text_lyric_tuple> past_lyrics_pq_;
47 Array<Text_lyric_tuple> now_lyrics_;
48 Array<Text_lyric_tuple> stopped_lyrics_;
51 Extender_spanner* extender_spanner_p_;
56 VIRTUAL_COPY_CONS (Translator);
59 virtual void acknowledge_element (Score_element_info);
60 virtual void do_removal_processing();
61 virtual void do_process_requests();
62 virtual bool do_try_music (Music*);
63 virtual void do_pre_move_processing();
64 virtual void do_post_move_processing ();
69 #endif // EXTENDER_ENGRAVER_HH