]> git.donarmstrong.com Git - lilypond.git/blob - hdr/simplestaff.hh
531f994d6e8594ca0b84a0ae111b2a45e1d085b8
[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     Lyric_req* lreq_p_;
38     
39     /****************/
40     Slur_req  * find_slur(Voice *);
41     void typeset_item(Item *, int=1);
42     void typeset_item_directional(Item *, int dir, int=1);
43
44     Molecule *create_command_mol(Command *com);
45
46     void take_request(Request *rq);   
47     virtual void process_requests();
48
49     Simple_column(Score_column*s,Simple_staff*rs);
50 };
51
52
53 /// Simple  staff: one voicegroup  at a time
54 struct Simple_staff : Staff {
55     /// indirection to the PStaff.
56     PStaff *theline_l_;
57
58     /****************/
59     Staff_column*create_col(Score_column*);
60     
61     virtual Item *get_TYPESET_item(Command*);
62     virtual Stem *get_stem(Stem_req *rq, Moment)=0;
63     virtual Notehead *get_notehead(Note_req *rq, int b)=0;
64     virtual Rest *get_rest(Rest_req *rq);
65     virtual void set_output(PScore *);
66     virtual Local_key_item* get_local_key_item();
67
68     void process_commands( PCursor<Command*> &where);
69     virtual void walk();
70
71     Simple_staff();
72 };
73
74 #endif // SIMPLESTAFF_HH
75
76
77
78