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