lilypond-0.0.35
[lilypond.git] / hdr / complexwalker.hh
bloba67d5b881a2ee5bae0a14ba7a51fccd4e46824fb
1 /*
2 complexwalker.hh -- declare Complex_walker
4 (c) 1996,97 Han-Wen Nienhuys
5 */
7 #ifndef COMPLEXWALKER_HH
8 #define COMPLEXWALKER_HH
10 #include "proto.hh"
11 #include "assoc.hh"
12 #include "staffwalker.hh"
13 #include "staffeleminfo.hh"
14 #include "plist.hh"
16 /**
17 A staff walker which uses registers to decide what to print
19 class Complex_walker: public Staff_walker {
20 bool try_command_request(Command_req *req_l);
21 void do_change_group( Voice * v, String group_id_str);
22 void do_announces();
23 void try_request(Request*req);
24 int c0_position_i_;
26 Array<Item*> prebreak_item_p_arr_;
27 Array<Item*> nobreak_item_p_arr_;
28 Array<Item*> postbreak_item_p_arr_;
30 public:
32 IPointerList<Voice_registers *> voice_reg_list_;
33 IPointerList<Voice_group_registers*> group_reg_list_;
34 Assoc<Voice *, Voice_group_registers *> voice_group_map_;
36 Array<Staff_elem_info> announce_info_arr_;
37 Walker_registers *walk_regs_p_;
39 /* *************** */
41 Voice_registers *find_voice_reg(Voice*v_l)const;
42 Voice_registers *get_voice_reg(Voice*v_l);
44 /** search for voice_group containing #v_l#
46 @return
47 pointer if found, 0 if not found.
49 Voice_group_registers *find_voice_group(Voice* v_l)const;
51 /// search. Create if necessary
52 Voice_group_registers *get_voice_group(Voice* v_l);
53 /** search for voice_group named #id#
55 @return
56 pointer if found, 0 if not found.
58 Voice_group_registers *find_voice_group(const char* id)const;
60 /**
61 search for voice_group named #id#, create if necessary
63 Voice_group_registers *get_voice_group(const char*);
65 Array<Voice_registers *> get_voice_regs(Voice_group_registers *) const;
67 void regs_process_requests();
68 void typeset_breakable_item(Item * pre_p ,
69 Item * nobreak_p, Item * post_p);
70 void typeset_element(Staff_elem *elem_p);
71 void announce_element(Staff_elem_info);
72 virtual void process_requests();
73 virtual void do_post_move();
74 virtual void do_pre_move();
75 /**
76 @return the position of central c.
78 int c0_position_i() const;
80 /**
81 set the position of central c.
82 @param the new position
84 void set_c0_position(int j);
85 Complex_walker(Complex_staff*);
86 ~Complex_walker();
88 Complex_staff *staff();
89 private:
93 #endif // COMPLEXWALKER_HH