]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/score.hh
ecd4f8cc109c5dd342fe44fcadd2d48bfe28f84a
[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     PScore *pscore_p_;
30     Audio_score* audio_score_p_;
31
32     int errorlevel_i_;
33     
34     /* *************************************************************** */
35
36     /// construction
37     Score();
38     Score(Score const&);
39     ~Score();    
40
41     /// do everything except outputting to file
42     void process();
43     
44     /// output to file
45     void output(String fn);
46
47     
48     ///
49     void set(Midi_def* midi_p);
50     ///
51     void set(Paper_def* midi_p);
52
53     void print() const;
54
55 private:
56     void run_translator(Global_translator*);
57     void midi_output();
58     void paper_output();
59
60     /// do midi stuff
61     void midi();
62
63     /// do paper stuff
64     void paper();
65
66     // utils:
67     PCursor<Score_column*> create_cols(Moment, PCursor<Score_column*> &last);
68
69
70     /**
71       make the pcol_l_ fields of each Score_column point to the correct PCol,
72       remove any unnecessary Score_column's
73      */
74     void do_cols();
75
76     /// remove unused cols
77     void clean_cols();
78     
79     /// add #Idealspacings# to #pscore_#
80     void calc_idealspacing();
81 };
82 #endif