+#include "stream-event.hh"
+#include "string-convert.hh"
+#include "warn.hh"
+#include "protected-scm.hh"
+#include "translator.icc"
+
+/*
+ Urgh. This engraver is too complex. rewrite. --hwn
+*/
+
+/* Ugh: This declaration is duplicated in piano-pedal-performer */
+typedef enum Pedal_type {SOSTENUTO, SUSTAIN, UNA_CORDA, NUM_PEDAL_TYPES};
+
+/*
+ Static precalculated data (symbols and strings) for the different
+ pedal types
+*/
+struct Pedal_type_info
+{
+ string base_name_;
+ SCM event_class_sym_;
+ SCM style_sym_;
+ SCM strings_sym_;
+
+ const char *pedal_line_spanner_c_str_;
+ const char *pedal_c_str_;
+
+ Pedal_type_info ()
+ {
+ event_class_sym_ = SCM_EOL;
+ style_sym_ = SCM_EOL;
+ strings_sym_ = SCM_EOL;
+ pedal_line_spanner_c_str_ = 0;
+ pedal_c_str_ = 0;
+ }
+ void protect ()
+ {
+ scm_gc_protect_object (event_class_sym_);
+ scm_gc_protect_object (style_sym_);
+ scm_gc_protect_object (strings_sym_);
+ }
+};
+
+struct Pedal_info
+{
+ const Pedal_type_info *type_;
+
+ /*
+ Event for currently running pedal.
+ */
+ Stream_event *current_bracket_ev_;
+
+ /*
+ Event for currently starting pedal, (necessary?
+
+ distinct from current_bracket_ev_, since current_bracket_ev_ only
+ necessary for brackets, not for text style.
+ */
+ Stream_event *start_ev_;
+
+ /*
+ Events that were found in this timestep.
+ */
+ Drul_array<Stream_event *> event_drul_;
+ Item *item_;
+ Spanner *bracket_; // A single portion of a pedal bracket
+ Spanner *finished_bracket_;
+
+ /*
+ This grob contains all the pedals of the same type on the same staff
+ */
+ Spanner *line_spanner_;
+ Spanner *finished_line_spanner_;
+};
+
+static Pedal_type_info pedal_types_[NUM_PEDAL_TYPES];