]> git.donarmstrong.com Git - lilypond.git/blob - hdr/staff.hh
release: 0.0.32
[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     /// remove unused cols
48     void clean_cols() ;
49     Staff();
50     
51     virtual void set_output(PScore * destination)=0;
52     virtual Staff_walker *get_walker_p()=0;    
53     virtual ~Staff() { }
54 protected:
55     virtual Staff_column * create_col()=0;
56 };
57 #endif