#include "item.hh"
#include "symbol.hh"
-/// items grouped vertically.
+/// items grouped horizontally
struct PStaff {
- Parametric_symbol *stafsym;
+ Molecule * stafsym;
PScore * pscore_;
PointerList<Item*> its;
/****************/
- virtual Symbol get_stafsym(Real width)const=0; // maybe overkill
+ virtual void brew_molecule(Real width)=0; // maybe overkill
void add(Item*i);
PStaff(PScore*);
- virtual ~PStaff() {}
+ virtual ~PStaff();
};
#endif
/****************************************************************/
// bare bones.
-struct Linestaf_symbol : Parametric_symbol {
- int lines;
- Linestaf_symbol(int n, Symtables*s): Parametric_symbol(s) { lines = n;}
- Symbol eval(svec<String>)const;
-};
-
Symbol
-Linestaf_symbol::eval(svec<String> w)const
+Lookup::linestaff(int lines, Real wid)
{
- Real wid = w[0].fvalue();
-
Symbol s;
s.dim.x = Interval(0,wid);
- Real dy=(lines-1)*convert_dimen(5,"pt"); // TODO!
+ Real dy=(lines-1)*internote()*2;
s.dim.y = Interval(0,dy);
+
svec<String> a;
a.add(lines);
- a.add(w[0]);
+ a.add(print_dimen(wid));
+
s.tex = (*symtables_)("param")->lookup("linestaf").tex;
s.tex = substitute_args(s.tex, a);
+
return s;
}
}
-Parametric_symbol *
-Lookup::linestaff(int n)
-{
- return new Linestaf_symbol(n,symtables_);
-}
-