summaryrefslogtreecommitdiff
path: root/src/rhythmstaff.cc
blob: e584254bfd21dd60a457354f9edd9f1e569d934d (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
#include "molecule.hh"
#include "notehead.hh"
#include "stem.hh"
#include "linestaff.hh"
#include "rhythmstaff.hh"
#include "paper.hh"
#include "sccol.hh" 
#include "rest.hh"

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

Item *
Rhythmic_staff::get_TYPESET_item(Command *com)
{
    Item *i = Simple_staff::get_TYPESET_item(com);
    i->translate(Offset(0,
			-score_->paper_->standard_height()/2));
    return i;
}

Notehead*
Rhythmic_staff::get_notehead(Note_req *rq)
{
    int b = rq->rhythmic()->balltype;
    int d = rq->rhythmic()->dots;

    Notehead *n =new Notehead(1);
    n->balltype = b;
    n->dots =d;
    n->position = 0;
    return n;
}

Stem *
Rhythmic_staff::get_stem(Stem_req*rq)
{
    Stem * s = new Stem(0);
    s->flag = rq->stem_number;
    return s;    
}

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



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