#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"
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:
Extender_engraver::acknowledge_element (Score_element_info i)
{
// -> text_item
- if (Item* t = dynamic_cast<Item*> (i.elem_l_))
+ if (dynamic_cast<Item*> (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<Item*> (i.elem_l_));
}
}
}
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:
void
Hyphen_engraver::acknowledge_element (Score_element_info i)
{
-
// -> text-item
- if (Item* t = dynamic_cast<Item*> (i.elem_l_))
+ if (dynamic_cast<Item*> (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_);
}
}
}
-/*
- extender-spanner.hh -- part of GNU LilyPond
-
- (c) 1998--2000 Jan Nieuwenhuizen <janneke@gnu.org>
-*/
-
-#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
--- /dev/null
+
+/*
+ extender-spanner.hh -- part of GNU LilyPond
+
+ (c) 1998--2000 Jan Nieuwenhuizen <janneke@gnu.org>
+*/
+
+#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
+
#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)
}
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)