]> git.donarmstrong.com Git - lilypond.git/blob - hdr/sccol.hh
release: 0.0.10
[lilypond.git] / hdr / sccol.hh
1 /*
2   sccol.hh -- part of LilyPond
3
4   (c) 1996 Han-Wen Nienhuys
5 */
6
7 #ifndef SCCOL_HH
8 #define SCCOL_HH
9 #include "pcol.hh"
10
11
12 struct Score_column {
13
14     /// indirection to column
15     PCol * pcol_;
16     /// length of notes/rests in this column
17     svec<Real> durations;
18     
19     Real when;
20
21     /// 
22     bool musical;
23     
24     /****************/
25     
26     Score_column(Real when);       
27     static int compare(Score_column & c1, Score_column &c2) {
28         return sgn(c1.when - c2.when);
29     }
30     void set_breakable() {
31          pcol_->set_breakable();
32     }
33     bool used();
34     void print() const;
35 };
36 /**
37
38     When typesetting hasn't started on PScore yet, the columns which
39     contain data have a rhythmical position. Score_column is the type
40     with a rhythmical time attached to it. The calculation of
41     idealspacing is done with data in these columns. (notably: the
42     #durations# field)
43
44     */
45
46 instantiate_compare(Score_column&, Score_column::compare);
47
48 #endif // SCCOL_HH
49