summaryrefslogtreecommitdiff
path: root/hdr/sccol.hh
blob: f18b659e7e65943fc2c36af5c2341b7f20499d53 (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
/*
  sccol.hh -- part of LilyPond

  (c) 1996 Han-Wen Nienhuys
*/

#ifndef SCCOL_HH
#define SCCOL_HH
#include "pcol.hh"


struct Score_column {

    /// indirection to column
    PCol * pcol;
    /// length of notes/rests in this column
    svec<Real> durations;
    
    Real when;

    /// 
    bool musical;
    
    /****************/
    
    Score_column(Real when);       
    static int compare(Score_column & c1, Score_column &c2) {
	return sgn(c1.when - c2.when);
    }
    void set_breakable() {
	 pcol->set_breakable();
    }
    bool used();
    void print() const;
};
/**

    When typesetting hasn't started on PScore yet, the columns which
    contain data have a rhythmical position. Score_column is the type
    with a rhythmical time attached to it. The calculation of
    idealspacing is done with data in these columns. (notably: the
    #durations# field)

    */

instantiate_compare(Score_column&, Score_column::compare);

#endif // SCCOL_HH