]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/engraver-group.hh
patch::: 0.0.74pre.jcn1: pats
[lilypond.git] / lily / include / engraver-group.hh
1 /*
2   engravergroup.hh -- declare Engraver_group_engraver
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
7 */
8
9
10 #ifndef ENGRAVERGROUP_HH
11 #define ENGRAVERGROUP_HH
12
13 #include "lily-proto.hh"
14 #include "parray.hh"
15 #include "plist.hh"
16 #include "score-elem-info.hh"
17 #include "engraver.hh"
18 #include "translator.hh"
19
20
21 /**
22   Group a number of engravers. Usually delegates everything to its contents.
23   Postfix: group
24   */
25 class Engraver_group_engraver : public Engraver, public virtual Translator {
26 protected:
27     
28     Pointer_list<Engraver*> grav_list_;
29     Link_array<Engraver_group_engraver> group_l_arr_;
30     Link_array<Engraver> nongroup_l_arr_;
31     
32     Array<Score_elem_info> announce_info_arr_;
33     
34     virtual void do_print()const;
35
36     virtual bool removable_b()const;
37
38 public:
39     Input_translator * itrans_l_;
40     void check_removal();
41     Engraver_group_engraver();
42     ~Engraver_group_engraver();
43     
44     bool is_bottom_engraver_b() const;
45
46     
47     /**
48       Junk #grav_l#.
49       Pre:
50       #grav_l# is in #grav_list_#
51      */
52     virtual void terminate_engraver(Engraver * grav_l);
53     
54    NAME_MEMBERS();
55     
56     /**
57       Remove #grav_l# from the list, and return it.
58      */
59     virtual Engraver * remove_engraver_p(Engraver*grav_l);
60     virtual void set_feature(Feature i);
61     virtual void sync_features();
62
63     virtual void do_pre_move_processing();
64     virtual void do_post_move_processing();
65     virtual void do_removal_processing();
66     virtual bool do_try_request(Request*);
67     virtual bool try_request(Request*);
68     virtual void do_process_requests();
69
70     virtual Staff_info get_staff_info()const;
71     
72     virtual Engraver_group_engraver * find_engraver_l(String name,String id);
73     virtual void do_announces();    
74     virtual void announce_element(Score_elem_info);
75     virtual void add(Engraver* grav_p);
76     virtual bool contains_b(Engraver*)const;
77
78     virtual Translator* find_get_translator_l(String name, String id);
79     virtual Translator * get_default_interpreter();
80     /**
81       Go up in the tree. default: choose next parent
82      */
83     Translator * ancestor_l(int l=1);
84     int depth_i() const;
85
86 };
87
88 #endif // ENGRAVERGROUP_HH
89
90