]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/engraver-group.hh
release: 0.1.11
[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     Pointer_list<Engraver*> grav_list_;
28     Link_array<Engraver_group_engraver> group_l_arr_;
29     Link_array<Engraver> nongroup_l_arr_;
30     
31     Array<Score_elem_info> announce_info_arr_;
32     
33     virtual void do_print() const;
34     virtual bool removable_b() const;
35 public:
36     Engraver*get_simple_engraver (char const*typeinfo) const;
37     virtual void print() const ;
38
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     
55     DECLARE_MY_RUNTIME_TYPEINFO;
56     
57     /**
58       Remove #grav_l# from the list, and return it.
59      */
60     virtual Engraver * remove_engraver_p (Engraver*grav_l);
61     virtual void set_feature (Feature i);
62     virtual void sync_features();
63
64     virtual void do_pre_move_processing();
65     virtual void do_post_move_processing();
66     virtual void do_removal_processing();
67     virtual bool do_try_request (Request*);
68     virtual bool try_request (Request*);
69     virtual void do_process_requests();
70
71     virtual Staff_info get_staff_info() const;
72     
73     virtual Engraver_group_engraver * find_engraver_l (String name,String id);
74     virtual void do_announces();    
75     virtual void announce_element (Score_elem_info);
76     virtual void add (Engraver* grav_p);
77     virtual bool contains_b (Engraver*) const;
78
79     virtual Translator* find_get_translator_l (String name, String id);
80     virtual Translator * get_default_interpreter();
81     /**
82       Go up in the tree. default: choose next parent
83      */
84     Translator * ancestor_l (int l=1);
85     int depth_i() const;
86 };
87
88 #endif // ENGRAVERGROUP_HH
89
90