source file of the GNU LilyPond music typesetter
- (c) 1997, 1998, 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
Jan Nieuwenhuizen <janneke@gnu.org>
*/
do_post_move_processing();
}
-
-
-
void
Bar_engraver::create_bar ()
{
if (!bar_p_)
{
bar_p_ = new Staff_bar;
- bar_p_->set_elt_property (break_priority_scm_sym, gh_int2scm (0));
+ bar_p_->set_elt_property ("break-align-symbol", ly_symbol2scm ("Staff_bar"));
// urg: "" != empty...
- SCM default_type = get_property ("defaultBarType", 0);
- if (gh_string_p (default_type))
- {
- bar_p_->type_str_ = ly_scm2string (default_type);
- }
-
/*
- urg. Why did I implement this?
+ TODO: use symbol.
*/
- SCM prop = get_property ("barAtLineStart", 0);
- if (gh_boolean_p (prop) && gh_scm2bool (prop))
+ SCM default_type = get_property ("defaultBarType");
+ if (gh_string_p (default_type))
{
- bar_p_->set_elt_property (at_line_start_scm_sym, SCM_BOOL_T);
+ bar_p_->set_elt_property ("glyph", default_type); // ugh
}
+
announce_element (Score_element_info (bar_p_, 0));
}
}
{
if (!now_mom ())
{
- SCM prop = get_property ("barAtLineStart", 0);
- if (!gh_boolean_p (prop) && gh_scm2bool (prop))
+ SCM prop = get_property ("barAtLineStart");
+ if (!to_boolean (prop))
return;
}
bool bar_existed = bar_p_;
{
return;
}
- else if (((requested_type == "|:") && (bar_p_->type_str_ == ":|"))
- || ((requested_type == ":|") && (bar_p_->type_str_ == "|:")))
- bar_p_->type_str_ = ":|:";
- else
- bar_p_->type_str_ = requested_type;
+
+ String current = ly_scm2string (bar_p_->get_elt_property ("glyph"));
+
+ if ((requested_type == "|:" && current== ":|")
+ || (requested_type == ":|" && current == "|:"))
+ requested_type = ":|:";
+
+
+ bar_p_->set_elt_property ("glyph",
+ ly_str02scm (requested_type.ch_C ()));
}
void
}
void
-Bar_engraver::do_process_requests()
+Bar_engraver::do_process_music()
{
Translator * t = daddy_grav_l ()->get_simple_translator ("Timing_engraver");
if (which.length_i ())
{
create_bar();
- bar_p_->type_str_ = which;
+ bar_p_->set_elt_property ("glyph", ly_str02scm (which.ch_C ()));
}
if (!bar_p_)
ADD_THIS_TRANSLATOR(Bar_engraver);
+