#define SCRIPTDEF_HH
#include "string.hh"
-struct Script_def{
- int stemdir;
- int staffdir;
+/** The characteristics of a certain kind of accent. It is not the
+ accent itself. */
+struct Script_def {
- bool invertsym;
+ /// on the other side of the stem?
+ int rel_stem_dir_i_;
+
+ /// below or above staff?
+ int staff_dir_i_;
+
+ /// how close to the note do we want to be?
+ int priority_i_;
+
+ /// follow the ball inside staff?
+ bool inside_staff_b_;
+
+ /// invert if below staff?
+ bool invertsym_b_;
String symidx;
/* *************** */
int compare(Script_def const &);
void print() const;
- Script_def(String, int, int ,bool);
+ Script_def(String, bool, int, int ,bool);
};
#include "debug.hh"
#include "script-def.hh"
-Script_def::Script_def(String idx, int stem, int staff ,bool invert)
+Script_def::Script_def(String idx, bool follow, int stem, int staff ,bool invert)
{
+ inside_staff_b_ = follow;
symidx = idx ;
- stemdir =stem;
- staffdir = staff;
- invertsym = invert;
+ rel_stem_dir_i_ =stem;
+ staff_dir_i_ = staff;
+ invertsym_b_ = invert;
+ priority_i_ =0;
}
+
void
Script_def::print() const
{
mtor << "Script_def{ idx: " << symidx
- << " direction, stem: " << stemdir << " staff : " << staffdir << "}\n";
+ << " direction, stem: " << rel_stem_dir_i_ << " staff : " << staff_dir_i_ << "}\n";
}
int
Script_def::compare(Script_def const & c)
{
return !(symidx == c.symidx &&
- stemdir == c.stemdir&&
- staffdir == c.staffdir&&
- invertsym == c.invertsym);
+ rel_stem_dir_i_ == c.rel_stem_dir_i_&&
+ staff_dir_i_ == c.staff_dir_i_&&
+ invertsym_b_ == c.invertsym_b_);
}