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