+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):
ENTER_DESCRIPTION (Lyric_engraver,
/* descr */ "",
-/* creats*/ "",
+/* creats*/ "LyricText",
/* accepts */ "lyric-event",
/* acks */ "",
/* reads */ "",
#include <ctype.h>
+#include "note-column.hh"
#include "bar-line.hh"
#include "time-signature.hh"
#include "engraver.hh"
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 ()
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;
return;
text_ = make_item ("MetronomeMark");
-
announce_grob (text_, rq->self_scm ());
+
}
,
/* creats*/ "MetronomeMark",
/* accepts */ "metronome-change-event",
-/* acks */ "time-signature-interface bar-line-interface",
+ /* acks */ "",
/* reads */ "stavesFound metronomeMarkFormatter",
/* write */ "");
(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
. (
(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
(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))