source file of the GNU LilyPond music typesetter
- (c) 2000--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 2000--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
#include "engraver.hh"
-#include "translator-group.hh"
+#include "context.hh"
#include "volta-bracket.hh"
#include "item.hh"
#include "note-column.hh"
class Volta_engraver : public Engraver
{
public:
- TRANSLATOR_DECLARATIONS(Volta_engraver);
+ TRANSLATOR_DECLARATIONS (Volta_engraver);
protected:
virtual void acknowledge_grob (Grob_info);
volta engraver in score context or somesuch.
*/
- if (!gh_pair_p (staffs))
+ if (!ly_c_pair_p (staffs))
{
programming_error ("Huh? Volta engraver can't find staffs?");
return false;
bool end = false;
start_string_ = SCM_EOL;
- while (gh_pair_p (cs))
+ while (ly_c_pair_p (cs))
{
SCM c = ly_car (cs);
- if (gh_pair_p (c)
+ if (ly_c_pair_p (c)
&& ly_car (c) == ly_symbol2scm ("volta")
- && gh_pair_p (ly_cdr (c)))
+ && ly_c_pair_p (ly_cdr (c)))
{
if (ly_cadr (c) == SCM_BOOL_F)
end = true;
}
if (volta_span_ &&
- (gh_string_p (start_string_) || gh_pair_p (start_string_)))
+ (ly_c_string_p (start_string_) || ly_c_pair_p (start_string_)))
{
warning (_ ("Already have a volta spanner. Stopping that one prematurely."));
}
if (!volta_span_ &&
- (gh_string_p (start_string_) || gh_pair_p (start_string_)))
+ (ly_c_string_p (start_string_) || ly_c_pair_p (start_string_)))
{
started_mom_ = now_mom () ;
- volta_span_ = new Spanner (get_property ("VoltaBracket"));
+ volta_span_ = make_spanner ("VoltaBracket", SCM_EOL);
- announce_grob (volta_span_, SCM_EOL);
- volta_span_->set_grob_property ("text", start_string_);
+
+ volta_span_->set_property ("text", start_string_);
}
}
staff_ = SCM_UNDEFINED;
if (staff_ != SCM_UNDEFINED)
- staff_ = i.grob_->self_scm();
+ staff_ = i.grob_->self_scm ();
}
}
THIS IS A KLUDGE.
we need to do this here, because STAFF_ is not initialized yet
- in the 1st call of process_music()
+ in the 1st call of process_music ()
*/
- volta_span_->suicide( );
+ volta_span_->suicide ( );
volta_span_ = 0;
}
TODO: should attach volta to paper-column if no bar is found.
*/
-ENTER_DESCRIPTION(Volta_engraver,
+ENTER_DESCRIPTION (Volta_engraver,
/* descr */ "Make volta brackets",
/* creats*/ "VoltaBracket",
/* accepts */ "",