#include "musical-request.hh"
#include "score-element.hh"
#include "item.hh"
-#include "lookup.hh"
#include "lily-guile.hh"
#include "rhythmic-head.hh"
#include "stem.hh"
#include "item.hh"
-/*
- TODO:
- * it would be really cool if an engraver could be initialised with a
- string, ie:
-
- Piano_pedal_engraver::"sostenuto"
- Piano_pedal_engraver::"sustain"
- Piano_pedal_engraver::"una-chorda"
-
- */
-
-/*
- Would it? The semantics are unclear, and real benefits are muddy
- too. --hwn
-*/
{
for (Pedal_info*p = info_list_; p->name_; p ++)
{
- if (s->span_type_str_ == p->name_)
+ if (scm_equal_p (s->get_mus_property ("span-type"),
+ ly_str02scm (p->name_))==SCM_BOOL_T)
{
- p->req_l_drul_[s->span_dir_] = s;
+ p->req_l_drul_[s->get_span_dir()] = s;
return true;
}
}
{
for (Pedal_info*p = info_list_; p->name_; p ++)
{
- SCM s = SCM_UNDEFINED;
+ SCM s = SCM_EOL;
if (p->req_l_drul_[STOP] && p->req_l_drul_[START])
{
if (!p->start_req_l_)
if (gh_string_p (s))
{
- String propname = String ("basic")+ p->name_ + "PedalProperties";
+ String propname = String (p->name_) + "Pedal";
p->item_p_ = new Item (get_property (propname.ch_C()));
p->item_p_->set_elt_property ("text", s);
- // guh
-
- Side_position::set_axis (p->item_p_,Y_AXIS);
- // todo: init with basic props.
- p->item_p_->add_offset_callback (Side_position::aligned_on_self, X_AXIS);
- p->item_p_->add_offset_callback (Side_position::centered_on_parent, X_AXIS);
announce_element (p->item_p_,
p->req_l_drul_[START]
? p->req_l_drul_[START]