5 #include "simplestaff.hh"
13 Simple_staff::get_TYPESET_item(Command *com)
16 svec<Scalar> arg( com->args);
20 s = new Bar(com->args[1]);
21 } else if (type == "METER") {
23 } else if (type == "CLEF" ||type == "CURRENTCLEF") {
24 Clef_item * c = new Clef_item;
26 c->change = (type == "CLEF");
28 WARN << "ignoring TYPESET command for " << type << '\n';
35 itemlist_width(const svec<Item*> &its)
40 for (int j =0; j < its.sz(); j++){
41 iv.unite (its[j]->width());
48 Simple_column::typeset_item(Item *i, int breakst)
52 staff_->pscore_->typeset_item(i, score_column->pcol_,
53 staff_->theline,breakst);
55 if (breakst == BREAK_PRE - BREAK_PRE) {
58 staff_->pscore_->select_items(staff_->theline,
59 score_column->pcol_->prebreak));
60 Interval column_wid = itemlist_width(to_move);
61 assert(!column_wid.empty());
63 for (int j=0; j < to_move.sz(); j++) {
64 to_move[j]->translate(Offset(-column_wid.right, 0));
70 Simple_column::typeset_item_directional(Item *i, int dir, int breakst)
73 PCol * c=score_column->pcol_;
76 else if (breakst == 2)
79 svec<Item*> to_move(staff_->pscore_->select_items(staff_->theline,
81 typeset_item(i, breakst);
83 Interval column_wid = itemlist_width(to_move);
84 if (column_wid.empty())
85 column_wid = Interval(0,0);
86 i->translate(Offset(column_wid[dir] - i->width()[-dir], 0));
90 Simple_staff::set_output(PScore* ps )
93 pscore_->add(theline);
98 Simple_staff::get_rest(Rest_req*rq)
100 int b = rq->rhythmic()->balltype;
101 int d = rq->rhythmic()->dots;
102 return new Rest(b, d);
106 Simple_staff::get_local_key_item()