5 #include "simplestaff.hh"
13 Simple_staff::get_TYPESET_item(Command *com)
16 svec<String> arg( com->args);
20 s = new Bar(com->args[1]);
21 } else if (type == "METER") {
23 } else if (type == "CLEF") {
26 WARN << "ignoring TYPESET command for " << type << '\n';
34 itemlist_width(const svec<Item*> &its)
37 for (int j =0; j < its.sz(); j++)
38 iv.unite(its[j]->width());
43 Simple_column::typeset_item(Item *i, int breakst)
47 staff_->pscore_->typeset_item(i, score_column->pcol_,
48 staff_->theline,breakst);
50 if (breakst == BREAK_PRE - BREAK_PRE) {
53 staff_->pscore_->select_items(staff_->theline,
54 score_column->pcol_->prebreak));
55 Interval column_wid = itemlist_width(to_move);
56 assert(!column_wid.empty());
58 for (int j=0; j < to_move.sz(); j++) {
59 to_move[j]->translate(Offset(-column_wid.max, 0));
65 Simple_column::typeset_item_directional(Item *i, int dir, int breakst)
68 PCol * c=score_column->pcol_;
71 else if (breakst == 2)
74 svec<Item*> to_move(staff_->pscore_->select_items(staff_->theline,
76 typeset_item(i, breakst);
78 Interval column_wid = itemlist_width(to_move);
79 if (column_wid.empty())
80 column_wid = Interval(0,0);
81 i->translate(Offset(column_wid[dir] - i->width()[-dir], 0));
85 Simple_staff::set_output(PScore* ps )
88 pscore_->add(theline);
93 Simple_staff::get_rest(Rest_req*rq)
95 int b = rq->rhythmic()->balltype;
96 int d = rq->rhythmic()->dots;
97 return new Rest(b, d);
101 Simple_staff::get_local_key_item()