From: fred Date: Tue, 26 Mar 2002 23:23:33 +0000 (+0000) Subject: lilypond-1.3.64 X-Git-Tag: release/1.5.59~1548 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=048c2083bc2e7698f238789a40c4f523d410df2f;p=lilypond.git lilypond-1.3.64 --- diff --git a/lily/extender-engraver.cc b/lily/extender-engraver.cc index faf311ed83..8fc391ea0e 100644 --- a/lily/extender-engraver.cc +++ b/lily/extender-engraver.cc @@ -8,12 +8,12 @@ #include "proto.hh" #include "musical-request.hh" -#include "extender-spanner.hh" +#include "lyric-extender.hh" #include "paper-column.hh" #include "item.hh" #include "engraver.hh" #include "drul-array.hh" -#include "extender-spanner.hh" +#include "lyric-extender.hh" #include "pqueue.hh" @@ -28,8 +28,8 @@ then. */ class Extender_engraver : public Engraver { - Item * last_lyric_l_; - Item * current_lyric_l_; + Score_element *last_lyric_l_; + Score_element *current_lyric_l_; Extender_req* req_l_; Spanner* extender_p_; public: @@ -62,14 +62,15 @@ void Extender_engraver::acknowledge_element (Score_element_info i) { // -> text_item - if (Item* t = dynamic_cast (i.elem_l_)) + if (dynamic_cast (i.elem_l_) + && to_boolean (i.elem_l_->get_elt_property ("text-item-interface"))) { - current_lyric_l_ = t; + current_lyric_l_ = i.elem_l_; if (extender_p_ && !extender_p_->get_bound (RIGHT) ) { - Lyric_extender(extender_p_).set_textitem (RIGHT, t); + Lyric_extender(extender_p_).set_textitem (RIGHT, dynamic_cast (i.elem_l_)); } } } diff --git a/lily/hyphen-engraver.cc b/lily/hyphen-engraver.cc index 9fbbb77f5b..62341082df 100644 --- a/lily/hyphen-engraver.cc +++ b/lily/hyphen-engraver.cc @@ -22,8 +22,8 @@ then. */ class Hyphen_engraver : public Engraver { - Item *last_lyric_l_; - Item *current_lyric_l_; + Score_element *last_lyric_l_; + Score_element *current_lyric_l_; Hyphen_req* req_l_; Spanner* hyphen_p_; public: @@ -54,16 +54,16 @@ Hyphen_engraver::Hyphen_engraver () void Hyphen_engraver::acknowledge_element (Score_element_info i) { - // -> text-item - if (Item* t = dynamic_cast (i.elem_l_)) + if (dynamic_cast (i.elem_l_) + && to_boolean (i.elem_l_->get_elt_property ("text-item-interface"))) { - current_lyric_l_ = t; + current_lyric_l_ = i.elem_l_; if (hyphen_p_ && !hyphen_p_->get_bound (RIGHT) ) { - Hyphen_spanner (hyphen_p_).set_textitem (RIGHT, t); + Hyphen_spanner (hyphen_p_).set_textitem (RIGHT, i.elem_l_); } } } diff --git a/lily/include/extender-spanner.hh b/lily/include/extender-spanner.hh index 5d7e4c4af9..65296f8106 100644 --- a/lily/include/extender-spanner.hh +++ b/lily/include/extender-spanner.hh @@ -1,40 +1,2 @@ -/* - extender-spanner.hh -- part of GNU LilyPond - - (c) 1998--2000 Jan Nieuwenhuizen -*/ - -#ifndef EXTENDER_SPANNER_HH -#define EXTENDER_SPANNER_HH - -#include "spanner.hh" - -/** - simple extender line - - The extender is a simple line at the baseline of the lyric - that helps show the length of a melissima (tied/slurred note). - - Extenders must be entered manually for now. - - Although it would be possible for Lily to determine where to - put extender lines, it's quite a tricky thing to do. Also, - this would demand quite strict lyrics entries. - - Note: the extender is only used for one-syllable words, or - for on a word's last syllable. The extender should be aligned - with the left side of the last note of the melissima, and not - extend beond, lasting the whole duration of the melissima - (as in MUP, urg). - */ -class Lyric_extender // interface -{ -public: - Spanner*elt_l_; - Lyric_extender (Spanner*); - void set_textitem (Direction, Item*); - static SCM brew_molecule (SCM); -}; - -#endif // EXTENDER_SPANNER_HH +#error diff --git a/lily/include/lyric-extender.hh b/lily/include/lyric-extender.hh new file mode 100644 index 0000000000..8f0c746b86 --- /dev/null +++ b/lily/include/lyric-extender.hh @@ -0,0 +1,41 @@ + +/* + extender-spanner.hh -- part of GNU LilyPond + + (c) 1998--2000 Jan Nieuwenhuizen +*/ + +#ifndef EXTENDER_SPANNER_HH +#define EXTENDER_SPANNER_HH + +#include "spanner.hh" + +/** + simple extender line + + The extender is a simple line at the baseline of the lyric + that helps show the length of a melissima (tied/slurred note). + + Extenders must be entered manually for now. + + Although it would be possible for Lily to determine where to + put extender lines, it's quite a tricky thing to do. Also, + this would demand quite strict lyrics entries. + + Note: the extender is only used for one-syllable words, or + for on a word's last syllable. The extender should be aligned + with the left side of the last note of the melissima, and not + extend beond, lasting the whole duration of the melissima + (as in MUP, urg). + */ +class Lyric_extender // interface +{ +public: + Spanner*elt_l_; + Lyric_extender (Spanner*); + void set_textitem (Direction, Score_element*); + static SCM brew_molecule (SCM); +}; + +#endif // EXTENDER_SPANNER_HH + diff --git a/lily/lyric-extender.cc b/lily/lyric-extender.cc index 89f3eddf05..9ae0629bd6 100644 --- a/lily/lyric-extender.cc +++ b/lily/lyric-extender.cc @@ -13,7 +13,7 @@ #include "molecule.hh" #include "paper-column.hh" #include "paper-def.hh" -#include "extender-spanner.hh" +#include "lyric-extender.hh" MAKE_SCHEME_SCORE_ELEMENT_CALLBACK(Lyric_extender,brew_molecule) @@ -33,10 +33,10 @@ Lyric_extender::brew_molecule (SCM smob) } void -Lyric_extender::set_textitem (Direction d, Item* textitem_l) +Lyric_extender::set_textitem (Direction d, Score_element*s) { - elt_l_->set_bound (d, textitem_l); - elt_l_->add_dependency (textitem_l); + elt_l_->set_bound (d, s); + elt_l_->add_dependency (s); } Lyric_extender::Lyric_extender (Spanner*s)