]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/score-column.hh
release: 0.0.72pre
[lilypond.git] / lily / include / score-column.hh
1 /*
2   score-column.hh -- declare Score_column
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
7 */
8
9
10 #ifndef SCORE_COLUMN_HH
11 #define SCORE_COLUMN_HH
12
13 #include "lily-proto.hh"
14 #include "varray.hh"
15 #include "moment.hh"
16
17
18 /**
19
20     When typesetting hasn't started on PScore yet, the columns which
21     contain data have a rhythmical position. Score_column is the type
22     with a rhythmical time attached to it. The calculation of
23     idealspacing is done with data in these columns. (notably: the
24     #durations# field)
25
26     */
27
28 class Score_column {
29     friend class Score;
30     friend class Score_engraver;
31
32     bool musical_b_;
33     Moment when_;
34     void set_breakable();
35 public:
36     /// indirection to column
37     PCol * pcol_l_;
38
39     /// length of notes/rests in this column
40     Array<Moment> durations;
41     
42     /* *************** */
43
44     Moment when() {  return when_; }
45     Score_column(Moment when);       
46     static int compare(Score_column & c1, Score_column &c2);
47     void add_duration(Moment );
48     void preprocess();
49     bool breakable_b();
50     bool musical_b() { return musical_b_; }
51     bool used_b();
52     void print() const;
53
54
55 };
56
57 #include "compare.hh"
58
59 instantiate_compare(Score_column&, Score_column::compare);
60
61 #endif // SCORE_COLUMN_HH
62
63
64
65
66
67