]> git.donarmstrong.com Git - lilypond.git/commitdiff
mention LyricText
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 14 Jul 2004 21:44:18 +0000 (21:44 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 14 Jul 2004 21:44:18 +0000 (21:44 +0000)
ChangeLog
lily/lyric-engraver.cc
lily/metronome-engraver.cc
scm/define-grobs.scm
scm/define-markup-commands.scm
scm/translation-functions.scm

index dfa06f68c33b548b9d35fd370b768780036f96e9..ae096d4291ee55d4fa65638c351780d39ff82c80 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2004-07-14  Han-Wen Nienhuys   <hanwen@xs4all.nl>
+
+       * lily/lyric-engraver.cc: mention LyricText
+
+2004-07-13  Han-Wen Nienhuys   <hanwen@xs4all.nl>
+
+       * scm/translation-functions.scm (format-metronome-markup): backport.
+
+       * scm/define-markup-commands.scm (general-align): add  function.
+
 2004-07-09  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
        * lily/axis-group-engraver.cc (process_acknowledged_grobs):
index 4c914d4e90fca0ec2b5eb45e9801bf00a3c45e9b..71d449468a06d44bb2145020028189e3a2bdc907 100644 (file)
@@ -151,7 +151,7 @@ Lyric_engraver::stop_translation_timestep ()
 
 ENTER_DESCRIPTION (Lyric_engraver,
 /* descr */       "",
-/* creats*/       "",
+/* creats*/       "LyricText",
 /* accepts */     "lyric-event",
 /* acks  */      "",
 /* reads */       "",
index 63c7b04aad7601e13884feb071cdb4b52c4373ce..280eeb203127d8cb8fc44dc25b342f2de34a7289 100644 (file)
@@ -8,6 +8,7 @@
 
 #include <ctype.h>
 
+#include "note-column.hh"
 #include "bar-line.hh"
 #include "time-signature.hh"
 #include "engraver.hh"
@@ -26,16 +27,13 @@ public:
 protected:
   Item *text_;
   Grob *bar_line_;
+  Music *mark_ev_;
   
+  void create_items (Music*);
 protected:
   virtual void stop_translation_timestep ();
-  virtual void acknowledge_grob (Grob_info);
-  void create_items (Music*);
   virtual bool try_music (Music *ev);
   virtual void process_music ();
-  
-private:
-  Music *mark_ev_;
 };
 
 Metronome_mark_engraver::Metronome_mark_engraver ()
@@ -44,29 +42,15 @@ Metronome_mark_engraver::Metronome_mark_engraver ()
   mark_ev_ = 0;
 }
 
-void
-Metronome_mark_engraver::acknowledge_grob (Grob_info inf)
-{
-  if (Bar_line::has_interface (inf.grob_))
-    {
-      bar_line_ = inf.grob_;
-    }
-  else if (text_ && Time_signature::has_interface (inf.grob_))
-    {
-      text_->set_parent (inf.grob_, X_AXIS);
-    }
-}
-
 void 
 Metronome_mark_engraver::stop_translation_timestep ()
 {
   if (text_)
     {
-      if (bar_line_ && !text_->get_parent (X_AXIS))
-       text_->set_parent (bar_line_, X_AXIS);
-      
+      Grob*mc = unsmob_grob (get_property( "currentMusicalColumn"));
+      text_->set_parent (mc, X_AXIS);
       text_->set_property ("side-support-elements" , get_property ("stavesFound"));
-      typeset_grob (text_);
+      
       text_ =0;
     }
   mark_ev_ = 0;
@@ -80,8 +64,8 @@ Metronome_mark_engraver::create_items (Music *rq)
     return;
 
   text_ = make_item ("MetronomeMark");
-
   announce_grob (text_, rq->self_scm ());
+
 }
 
 
@@ -117,6 +101,6 @@ ENTER_DESCRIPTION (Metronome_mark_engraver,
                   ,
 /* creats*/       "MetronomeMark",
 /* accepts */     "metronome-change-event",
-/* acks  */       "time-signature-interface bar-line-interface",
+                  /* acks  */       "",
 /* reads */       "stavesFound metronomeMarkFormatter",
 /* write */       "");
index c3d497b3ec53d9d0fea688e8b292ea71f58d671a..18ae29fc18822110e4ca2ae269941add89db1c9c 100644 (file)
        (print-function . ,Text_item::print)
        (Y-offset-callbacks . (,Side_position_interface::aligned_side)) 
        (direction . 1)
-       (breakable . #t)
-       (break-visibility . ,end-of-line-invisible)
        (padding . 0.8)
-       (meta . ((interfaces . (text-interface side-position-interface font-interface metronome-mark-interface item-interface))))
+       (meta . ((interfaces . (text-interface side-position-interface
+                                              font-interface
+                                              metronome-mark-interface
+                                              item-interface))))
        ))
     (MeasureGrouping
      . (
index 046dee06f6d68bfebfb479ba2a175e9d8de42d09..b2734495e964b8004ad00fc732316d9e4056ae8d 100644 (file)
@@ -70,6 +70,14 @@ determines the space between each markup in @var{args}."
    (chain-assoc-get 'word-space props)
    (map (lambda (m) (interpret-markup paper props m)) args)))
 
+(def-markup-command (general-align paper props axis dir arg)  (integer? number? markup?)
+  "Align @var{arg} in @var{axis} direction to the @var{dir} side."
+  (let* ((m (interpret-markup paper props arg)))
+
+    (ly:stencil-align-to! m axis dir)
+    m
+  ))
+
 (def-markup-command (combine paper props m1 m2) (markup? markup?)
   "Print two markups on top of each other."
   (ly:stencil-add
index ded01eadfcd587ccd5e8888221e31eb28d389597..b4888a4ec9332cd1aa0014cb5b1446b243b6ee0b 100644 (file)
   (let*
       ((dur  (ly:music-property event 'tempo-unit))
        (count (ly:music-property event 'metronome-count))
-       (note-mark (make-note-by-number-markup (ly:duration-log dur)
+       (note-mark (make-smaller-markup
+                  (make-note-by-number-markup (ly:duration-log dur)
                                              (ly:duration-dot-count dur)
-                                             1) ) ) 
+                                             1))))
+    
     (make-line-markup
      (list
-      note-mark
+      (make-general-align-markup Y DOWN note-mark)
       (make-simple-markup  "=")
       (make-simple-markup (number->string count))