#include "directional-element-interface.hh"
#include "engraver.hh"
#include "hairpin.hh"
+#include "international.hh"
#include "interval.hh"
#include "note-column.hh"
#include "paper-column.hh"
+#include "pointer-group-interface.hh"
#include "script-interface.hh"
+#include "self-alignment-interface.hh"
#include "side-position-interface.hh"
#include "staff-symbol-referencer.hh"
#include "warn.hh"
-#include "self-alignment-interface.hh"
-#include "pointer-group-interface.hh"
#include "translator.icc"
Drul_array<Music *> accepted_spanevents_drul_;
- Link_array<Note_column> pending_columns_;
- Link_array<Grob> pending_elements_;
+ vector<Note_column*> pending_columns_;
+ vector<Grob*> pending_elements_;
void typeset_all ();
TRANSLATOR_DECLARATIONS (Dynamic_engraver);
+ DECLARE_ACKNOWLEDGER (accidental);
DECLARE_ACKNOWLEDGER (script);
DECLARE_ACKNOWLEDGER (stem_tremolo);
DECLARE_ACKNOWLEDGER (note_column);
{
if (current_cresc_ev_)
{
- String msg = _ ("already have a decrescendo");
+ string msg = _ ("already have a decrescendo");
if (current_cresc_ev_->is_mus_type ("decrescendo-event"))
msg = _ ("already have a crescendo");
TODO: Use symbols.
*/
- String start_type
+ string start_type
= ly_symbol2string (current_cresc_ev_->get_property ("name"));
-
- /*
- ugh. Use push/pop?
- */
+
if (start_type == "DecrescendoEvent")
start_type = "decrescendo";
else if (start_type == "CrescendoEvent")
start_type = "crescendo";
+
+
+ /*
+ UGH. TODO: should read from original event, so appearance
+ may be altered with \tweak.
+ */
SCM s = get_property ((start_type + "Spanner").c_str ());
if (!scm_is_symbol (s) || s == ly_symbol2scm ("hairpin"))
{
{
if (finished_cresc_)
{
- if (!finished_cresc_->get_bound (RIGHT))
+ bool use_bar = to_boolean (get_property ("hairpinToBarline"))
+ && scm_is_string (get_property ("whichBar"))
+ && !script_ev_;
+
+
+ if (!finished_cresc_->get_bound (RIGHT)
+ || use_bar)
{
+ Grob *column_bound = unsmob_grob (use_bar
+ ? get_property ("currentCommandColumn")
+ : get_property ("currentMusicalColumn"));
+
finished_cresc_->set_bound (RIGHT, script_
? script_
- : unsmob_grob (get_property ("currentMusicalColumn")));
+ : column_bound);
if (finished_line_spanner_)
add_bound_item (finished_line_spanner_,
}
+void
+Dynamic_engraver::acknowledge_accidental (Grob_info info)
+{
+ if (line_spanner_)
+ Side_position_interface::add_support (line_spanner_, info.grob ());
+}
+
+
void
Dynamic_engraver::acknowledge_stem_tremolo (Grob_info info)
{
Side_position_interface::add_support (line_spanner_, info.grob ());
}
+ADD_ACKNOWLEDGER (Dynamic_engraver, accidental);
ADD_ACKNOWLEDGER (Dynamic_engraver, script);
ADD_ACKNOWLEDGER (Dynamic_engraver, note_column);
ADD_ACKNOWLEDGER (Dynamic_engraver, slur);