]> git.donarmstrong.com Git - lilypond.git/blob - score.hh
release: 0.0.5
[lilypond.git] / score.hh
1 #ifndef SCORE_HH
2 #define SCORE_HH
3 #include "vray.hh"
4 #include "proto.hh"
5 #include "list.hh"
6
7
8 /// the total music def of one movement
9 struct Score {
10     /// paper_, staffs_ and commands_ form the problem definition.
11     Paperdef *paper_;
12     PointerList<Staff *> staffs_;
13     Score_commands *commands_;
14     
15     /// "runtime" fields for setting up spacing    
16     PointerList<Score_column*> cols_;
17     PScore *pscore_;
18
19     /****************************************************************/
20
21     /// construction
22     void add_staff(Staff *st);
23     void set(Paperdef*);
24     Score();
25     ~Score();    
26     void add(Staff*);        
27     void set(Score_commands*);
28
29
30     void OK() const;
31     Score_column *find_col(Real,bool);
32     void process();
33     void output(String fn);
34     PCursor<Score_column*> create_cols(Real);
35     void print() const;
36     Real last() const;
37     
38 private:
39     void do_pcols();    
40     void clean_cols();
41     void distribute_commands();
42     void do_connect(PCol *c1, PCol *c2, Real d);
43     void connect_nonmus(PCol* c1, PCol *c2, Real d);
44     /// add #Idealspacings# to #pscore_#
45     void calc_idealspacing();
46     /** add the score wide commands (bars, breaks) to each staff so
47     they can process (typeset) them if needed */
48 };
49 /**
50         
51     */
52 #endif