11 texsetting = "\\unknowntexsetting";
12 symtables_ = new Symtables;
15 Lookup::Lookup(Lookup const &s)
17 texsetting = s.texsetting;
18 symtables_ = new Symtables(*s.symtables_);
26 Lookup::add(String s, Symtable*p)
28 symtables_->add(s, p);
32 Lookup::text(String style, String text, int dir)
37 Symbol tsym = (*symtables_)("style")->lookup(style);
38 a[0] = substitute_args(tsym.tex,a);
40 Symbol s = (*symtables_)("align")->lookup(dir);
41 s.tex = substitute_args(s.tex,a);
51 return ball(4).dim.y.length()/2;
60 Symtable * st = (*symtables_)("balls");
61 return st->lookup(String(j));
67 return (*symtables_)("rests")->lookup(String(j));
73 Symbol s( (*symtables_)("param")->lookup("fill"));
79 Lookup::accidental(int j)
81 return (*symtables_)("accidentals")->lookup(String(j));
88 return (*symtables_)("bars")->lookup(s);
92 Lookup::script(String s)
94 return (*symtables_)("scripts")->lookup(s);
98 Lookup::clef(String s)
100 return (*symtables_)("clefs")->lookup(s);
108 return (*symtables_)("dots")->lookup(j);
114 return (*symtables_)("flags")->lookup(j);
118 Lookup::streepjes(int i)
132 Symbol ret = (*symtables_)("streepjes")->lookup(idx);
136 ret.tex = substitute_args(ret.tex, a);
144 Lookup::linestaff(int lines, Real wid)
147 s.dim.x = Interval(0,wid);
148 Real dy = (lines >0) ? (lines-1)*internote()*2 : 0;
149 s.dim.y = Interval(0,dy);
153 a.push(print_dimen(wid));
155 s.tex = (*symtables_)("param")->lookup("linestaf").tex;
156 s.tex = substitute_args(s.tex, a);
163 Lookup::meter(Array<Scalar> a)
166 s.dim.x = Interval( convert_dimen(0,"pt"),
167 convert_dimen(10,"pt"));
168 s.dim.y = Interval(0, convert_dimen(20,"pt") ); // todo
169 String src = (*symtables_)("param")->lookup("meter").tex;
170 s.tex = substitute_args(src,a);
176 Lookup::stem(Real y1,Real y2)
181 s.dim.x = Interval(0,0);
182 s.dim.y = Interval(y1,y2);
185 a.push(print_dimen(y1));
186 a.push(print_dimen(y2));
188 String src = (*symtables_)("param")->lookup("stem").tex;
189 s.tex = substitute_args(src,a);