]> git.donarmstrong.com Git - lilypond.git/blob - hdr/staff.hh
74b7df13408e0122e47d12ae668005b9a85fcf5c
[lilypond.git] / hdr / staff.hh
1 /*
2   staff.hh -- declare Staff
3
4   source file of the LilyPond music typesetter
5
6   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
7 */
8
9 #ifndef STAFF_HH
10 #define STAFF_HH
11
12 #include "plist.hh"
13 #include "proto.hh"
14 #include "moment.hh"
15
16 /// base class for a collection of voices.
17 class Staff {
18     Staff_column *get_col(Moment, PCursor<Staff_column*> * last= 0);
19     Staff(const Staff&src);
20     
21     /// synchronous horizontal stuff
22     IPointerList<Voice*> voice_list_;
23
24 public:
25
26     /// runtime field
27     IPointerList<Staff_column*> cols;
28
29     Score *score_l_;
30     PScore *pscore_l_;
31
32     /* *************************************************************** */
33
34     void add(const PointerList<Voice*> &s);
35
36     void add_voice(Voice *v);
37     Paperdef*paper()const;
38
39     void setup_staffcols();
40
41     void OK() const;
42     void print() const;
43
44     /// when does the last *musical* element finish?
45     Moment last() const;
46
47 //    /// extract midi info
48 //    Midi_track* midi_track_p();
49
50     /// remove unused cols
51     void clean_cols() ;
52     Staff();
53     
54     virtual void set_output(PScore * destination)=0;
55     virtual Staff_walker *get_walker_p()=0;    
56     virtual ~Staff() { }
57 protected:
58     virtual Staff_column * create_col()=0;
59 };
60 #endif