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;
26 Script_def::set_from_input(String idx, bool follow, int stem, int staff ,bool invert)
28 inside_staff_b_ = follow;
30 rel_stem_dir_i_ =stem;
32 invertsym_b_ = invert;
38 Script_def::print() const
40 mtor << "Script_def{ idx: " << symidx
41 << " direction, stem: " << rel_stem_dir_i_ << " staff : " << staff_dir_i_ << "}\n";
45 Script_def::do_equal_b(General_script_def const &g)const
47 Script_def const & c = (Script_def const&) g;
48 return !(symidx == c.symidx &&
49 rel_stem_dir_i_ == c.rel_stem_dir_i_&&
50 staff_dir_i_ == c.staff_dir_i_&&
51 invertsym_b_ == c.invertsym_b_);
55 Script_def::staff_dir_i() const
61 Script_def::rel_stem_dir_i() const
63 return rel_stem_dir_i_;
67 Script_def::inside_b() const
69 return inside_staff_b_;
73 Script_def::get_atom(Paper_def *p , int d)const
75 String preidx_str ="";
76 if (invertsym_b_&& d < 0)
79 return p->lookup_l()->script(preidx_str + symidx);
82 IMPLEMENT_STATIC_NAME(Script_def);
85 Script_def::priority_i()const