2 script-def.cc -- implement
4 source file of the GNU LilyPond music typesetter
6 (c) 1996,1997 Han-Wen Nienhuys <hanwen@stack.nl>
10 #include "script-def.hh"
12 #include "paper-def.hh"
15 Script_def::Script_def()
17 inside_staff_b_ = false;
18 symidx_str_ = "unknown" ;
19 rel_stem_dir_ =CENTER;
26 Script_def::set_from_input (String idx, bool follow, int stem, int staff ,bool invert, int priority_i)
28 inside_staff_b_ = follow;
30 rel_stem_dir_ =Direction(stem);
31 staff_dir_ = Direction(staff);
32 invertsym_b_ = invert;
33 priority_i_ =priority_i;
38 Script_def::do_print() const
41 DOUT << "Script_def{ idx: " << symidx_str_
42 << " direction, stem: " << rel_stem_dir_ << " staff : " << staff_dir_ << "}\n";
47 Script_def::do_equal_b (General_script_def const *g) const
49 Script_def const * c = (Script_def const*) g;
50 return (symidx_str_ == c->symidx_str_ &&
51 rel_stem_dir_ == c->rel_stem_dir_&&
52 staff_dir_ == c->staff_dir_&&
53 invertsym_b_ == c->invertsym_b_);
57 Script_def::staff_dir() const
63 Script_def::rel_stem_dir() const
69 Script_def::inside_b() const
71 return inside_staff_b_;
75 Script_def::get_atom (Paper_def *p , Direction d) const
77 String preidx_str ="";
78 if (invertsym_b_&& d < 0)
81 return p->lookup_l()->script (preidx_str + symidx_str_);
85 IMPLEMENT_IS_TYPE_B1(Script_def,General_script_def);
88 Script_def::priority_i() const