]> git.donarmstrong.com Git - lilypond.git/blob - hdr/staff.hh
release: 0.0.34
[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(const Staff&src);
19     
20     /// synchronous horizontal stuff
21     IPointerList<Voice*> voice_list_;
22     Staff_column *get_col(Moment, PCursor<Staff_column*> * last= 0);
23
24 public:
25
26     /// runtime field
27     IPointerList<Staff_column*> cols_;
28
29     Score *score_l_;
30     PScore *pscore_l_;
31     PStaff *pstaff_l_;
32     
33     /* *************************************************************** */
34
35     void add(const PointerList<Voice*> &s);
36
37     void add_voice(Voice *v);
38     Paperdef*paper()const;
39
40     void setup_staffcols();
41
42     void OK() const;
43     void print() const;
44
45     /// when does the last *musical* element finish?
46     Moment last() const;
47
48 //    /// extract midi info
49 //    Midi_track* midi_track_p();
50
51     /// remove unused cols
52     void clean_cols() ;
53     Staff();
54     
55     virtual void set_output(PScore * destination)=0;
56     virtual Staff_walker *get_walker_p()=0;    
57     virtual ~Staff() { }
58 protected:
59
60 };
61 #endif