]> git.donarmstrong.com Git - lilypond.git/blob - hdr/simplestaff.hh
release: 0.0.9
[lilypond.git] / hdr / simplestaff.hh
1 /*
2   simplestaff.hh -- part of LilyPond
3
4   (c) 1996 Han-Wen Nienhuys
5 */
6
7 #ifndef SIMPLESTAFF_HH
8 #define SIMPLESTAFF_HH
9
10 #include "stcol.hh"
11 #include "staff.hh"
12 #include "swalker.hh"
13 /*
14    mega-stupido staffs and cols: they do notes one at each moment.   
15    */
16
17 struct Simple_staff;
18
19 /// column of Simple_staff: store one request
20 struct Simple_column : Staff_column {
21
22     svec<Rhythmic_req *> notes;
23     Stem_req *stem_;
24     Beam_req *beam_;
25     Simple_staff* staff_;
26
27     /****************/
28
29     virtual void typeset_item(Item *, int=1);
30
31     Molecule *create_command_mol(Command *com);
32
33     void take_request(Request *rq);   
34     virtual void process_requests();
35
36     Simple_column(Score_column*s,Simple_staff*rs);
37 };
38
39
40 /// Simple  staff: one voicegroup  at a time
41 struct Simple_staff : Staff {
42     /// indirection to the PStaff.
43     PStaff *theline;
44
45     /****************/
46     Staff_column*create_col(Score_column*);
47     
48     virtual Item *get_TYPESET_item(Command*);
49     virtual Stem *get_stem(Stem_req *rq)=0;
50     virtual Notehead *get_notehead(Note_req *rq)=0;
51     virtual Rest *get_rest(Rest_req *rq);
52     virtual void set_output(PScore *);
53
54     void process_commands( PCursor<Command*> &where);
55     virtual void walk();
56
57     Simple_staff();
58 };
59
60 struct Simple_walker: Staff_walker {
61     Stem *stem_;
62     svec<Notehead *>noteheads;
63     Beam *beam_;
64     
65     /****************/
66     
67     virtual void process_command(Command*);
68     virtual void process_requests();
69     Simple_walker(Simple_staff*);
70     Simple_column *col();
71     Simple_staff *staff();
72 };
73
74
75 #endif // SIMPLESTAFF_HH
76
77
78
79