summaryrefslogtreecommitdiff
path: root/score.hh
blob: 176d7fa47a0f7e55f9217eb2666f8c9346e6bf10 (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
50
51
52
#ifndef SCORE_HH
#define SCORE_HH
#include "vray.hh"
#include "proto.hh"
#include "plist.hh"


/// the total music def of one movement
struct Score {
    /// paper_, staffs_ and commands_ form the problem definition.
    Paperdef *paper_;
    PointerList<Staff *> staffs_;
    Score_commands *commands_;
    
    /// "runtime" fields for setting up spacing    
    PointerList<Score_column*> cols_;
    PScore *pscore_;

    /****************************************************************/

    /// construction
    void add_staff(Staff *st);
    void set(Paperdef*);
    Score();
    ~Score();    
    void add(Staff*);        
    void set(Score_commands*);


    void OK() const;
    Score_column *find_col(Real,bool);
    void process();
    void output(String fn);
    PCursor<Score_column*> create_cols(Real);
    void print() const;
    Real last() const;
    
private:
    void do_pcols();    
    void clean_cols();
    void distribute_commands();
    void do_connect(PCol *c1, PCol *c2, Real d);
    void connect_nonmus(PCol* c1, PCol *c2, Real d);
    /// add #Idealspacings# to #pscore_#
    void calc_idealspacing();
    /** add the score wide commands (bars, breaks) to each staff so
    they can process (typeset) them if needed */
};
/**
        
    */
#endif