]> git.donarmstrong.com Git - lilypond.git/blob - hdr/sccol.hh
release: 0.0.14
[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 #include "vray.hh"
11
12
13 struct Score_column {
14
15     /// indirection to column
16     PCol * pcol_;
17
18     /// length of notes/rests in this column
19     svec<Real> durations;
20     
21     Real when;
22
23     /// 
24     bool musical;
25     
26     /****************/
27     
28     Score_column(Real when);       
29     static int compare(Score_column & c1, Score_column &c2) {
30         return sgn(c1.when - c2.when);
31     }
32     void add_duration(Real );
33     void preprocess();
34     void set_breakable() {
35          pcol_->set_breakable();
36     }
37     bool used();
38     void print() const;
39 };
40 /**
41
42     When typesetting hasn't started on PScore yet, the columns which
43     contain data have a rhythmical position. Score_column is the type
44     with a rhythmical time attached to it. The calculation of
45     idealspacing is done with data in these columns. (notably: the
46     #durations# field)
47
48     */
49
50 instantiate_compare(Score_column&, Score_column::compare);
51
52 #endif // SCCOL_HH
53
54
55
56