1 #include "lookupsyms.hh"
7 Symtables the_sym_tables("symbol.ini");
13 Symtable * st = the_sym_tables("balls");
14 return st->lookup(String(j));
20 return the_sym_tables("rests")->lookup(String(j));
27 return the_sym_tables("bars")->lookup(s);
34 return the_sym_tables("dots")->lookup(j);
37 /****************************************************************/
40 struct Linestaf_symbol : Parametric_symbol {
42 Linestaf_symbol(int n) { lines = n;}
43 Symbol eval(svec<String>)const;
48 Linestaf_symbol::eval(svec<String> w)const
50 Real wid = w[0].fvalue();
53 s.dim.x = Interval(0,wid);
54 s.dim.y = Interval(0, lines*convert_dimen(5,"pt"));
58 s.tex = the_sym_tables("param")->lookup("linestaf").tex;
59 s.tex = substitute_args(s.tex, a);
63 /****************************************************************
67 struct Meter_sym:Parametric_symbol {
69 Symbol eval(svec<String> a) const{
71 s.dim.x = Interval( convert_dimen(-5,"pt"), convert_dimen(10,"pt"));
72 s.dim.y = Interval(0, convert_dimen(10,"pt") ); // todo
73 String src = the_sym_tables("param")->lookup("meter").tex;
74 s.tex = substitute_args(src,a);
78 /****************************************************************/
81 Lookup::meter(String )
87 Lookup::linestaff(int n)
89 return new Linestaf_symbol(n);