]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/score.hh
release: 0.0.74pre
[lilypond.git] / lily / include / score.hh
1 /*
2   score.hh -- declare Score
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_HH
11 #define SCORE_HH
12
13 #include "varray.hh"
14 #include "lily-proto.hh"
15 #include "plist.hh"
16 #include "moment.hh"
17 #include "assoc.hh"
18 #include "string.hh"
19 #include "input.hh"
20 #include "lily-proto.hh"
21
22 /// the total music def of one movement
23 class Score: public Input {
24 public:
25     /// paper_, staffs_ and commands_ form the problem definition.
26     Paper_def *paper_p_;
27     Midi_def *midi_p_;
28     Music * music_p_;
29     
30     
31     Pointer_list<Score_column*> cols_;
32     PScore *pscore_p_;
33
34     int errorlevel_i_;
35     
36     /* *************************************************************** */
37
38     /// construction
39     Score();
40     ~Score();    
41
42     /// do everything except outputting to file
43     void process();
44     
45     /// output to file
46     void output(String fn);
47
48     
49     ///
50     void set(Midi_def* midi_p);
51     ///
52     void set(Paper_def* midi_p);
53
54     // standard
55     void OK() const;
56     void print() const;
57
58     /// find a column.
59     PCursor<Score_column *> find_col(Moment,bool);
60     
61     Score(Score const&);
62
63 private:
64     void run_translator(Global_translator*);
65     void paper_output();
66     /// do midi stuff
67     void midi();
68
69     /// do paper stuff
70     void paper();
71
72     // utils:
73     PCursor<Score_column*> create_cols(Moment, PCursor<Score_column*> &last);
74
75
76     /**
77       make the pcol_l_ fields of each Score_column point to the correct PCol,
78       remove any unnecessary Score_column's
79      */
80     void do_cols();
81
82     /// remove unused cols
83     void clean_cols();
84     
85     /// add #Idealspacings# to #pscore_#
86     void calc_idealspacing();
87 };
88 #endif