summaryrefslogtreecommitdiff
path: root/rhythmstaff.cc
blob: 7e2706e02dc723107c77723f50a11e6c8d4820a5 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#include "molecule.hh"
#include "stem.hh"
#include "linestaff.hh"
#include "rhythmstaff.hh"
#include "paper.hh"
#include "sccol.hh" 


void
Rhythmic_staff::set_output(PScore*ps)
{
    theline = new Linestaff(1,ps);
    Simple_staff::set_output(ps);
}


void
Rhythmic_column::typeset_command(Command *com, int breakst)
{
    Item *i =new Item;
    Molecule*m = create_command_mol(com);
    i->output=m;
    m->translate(Offset(0,
			-staff_->score_->paper_->standard_height()/2));
    typeset_item(i, breakst);
}

void
Rhythmic_column::typeset_req(Request *rq)
{
    Item *i =new Item;
    Molecule*m=create_req_mol(rq);
    i->output=m;
    typeset_item(i);
}

void
Rhythmic_column::typeset_stem(Stem_req*rq)
{
    Stem * s = new Stem(0);
    s->minnote = s->maxnote = 0;
    s->flag = rq->stem_number;
    s->calculate();
    typeset_item(s);
    s->brew_molecole();
}

/*
  creation
  */
Staff *
get_new_rhythmstaff()
{
    return new Rhythmic_staff;
}


Staff_column*
Rhythmic_staff::create_col(Score_column*s)
{
    return new Rhythmic_column(s,this);
}

Rhythmic_staff*
Rhythmic_staff::clone() const
{
    return new Rhythmic_staff(*this);
}