]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.3.64
authorfred <fred>
Tue, 26 Mar 2002 23:23:33 +0000 (23:23 +0000)
committerfred <fred>
Tue, 26 Mar 2002 23:23:33 +0000 (23:23 +0000)
lily/extender-engraver.cc
lily/hyphen-engraver.cc
lily/include/extender-spanner.hh
lily/include/lyric-extender.hh [new file with mode: 0644]
lily/lyric-extender.cc

index faf311ed83b254e24f5831f70211c4d20ee6111d..8fc391ea0e8de693e8071454485366876c0d59fb 100644 (file)
@@ -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<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_));
          }
     }
 }
index 9fbbb77f5b95bee47d76c4655230a4c36e600a3d..62341082df9547a3b3e70dbfc2d8a1d418748df1 100644 (file)
@@ -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<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_);
          }
     }
 }
index 5d7e4c4af93115f68463e4d58fc4e3d6862a1b7e..65296f81060baccd891380179b283fc7515acef0 100644 (file)
@@ -1,40 +1,2 @@
-/*
-  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
diff --git a/lily/include/lyric-extender.hh b/lily/include/lyric-extender.hh
new file mode 100644 (file)
index 0000000..8f0c746
--- /dev/null
@@ -0,0 +1,41 @@
+
+/*
+  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
+
index 89f3eddf05ddf9891d88b4e4ee019a61a5c1fca9..9ae0629bd6ce96be01bec049d69eb8e2afdef35a 100644 (file)
@@ -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)