/*
- script-reg.cc -- implement Script_engraver
+ script-engraver.cc -- implement Script_engraver
(c) 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
}
bool
-Script_engraver::do_try_request (Request *r_l)
+Script_engraver::do_try_music (Music *r_l)
{
- if (!dynamic_cast <Musical_script_req *> (r_l))
- return false ;
-
- for (int i=0; i < script_req_l_arr_.size(); i++)
+ if (Musical_script_req *mr = dynamic_cast <Musical_script_req *> (r_l))
{
- if (r_l->equal_b (script_req_l_arr_[i]))
- return true;
+ for (int i=0; i < script_req_l_arr_.size(); i++)
+ {
+ if (script_req_l_arr_[i]->equal_b (mr))
+ return true;
+ }
+ script_req_l_arr_.push (mr);
+ return true;
}
- script_req_l_arr_.push (dynamic_cast <Script_req *> (r_l));
-
- return true;
+ return false;
}
void
if (!script_p->specs_p_->inside_b())
script_p->add_support (s_l);
- if (script_p->specs_p_->is_type_b (Text_def::static_name ()))
+ if (dynamic_cast<Text_def *> (script_p->specs_p_)) // UGH
{
Text_def * td_l = (Text_def*)script_p->specs_p_;
- Scalar style = get_property ("textstyle");
- if (style.to_bool ())
+ if (!td_l->style_str_.length_i ())
{
- td_l->style_str_= style;
+ Scalar style = get_property ("textstyle", 0);
+ if (style.to_bool ())
+ td_l->style_str_= style;
}
- Scalar alignment = get_property ("textalignment");
+ // urg, what if this is already set? in-band signaling...
+ Scalar alignment = get_property ("textalignment", 0);
if (alignment.isnum_b())
{
td_l->align_dir_= (Direction)(int)alignment;
}
-IMPLEMENT_IS_TYPE_B1(Script_engraver,Engraver);
+
ADD_THIS_TRANSLATOR(Script_engraver);