2 translator-group.hh -- declare Translator_group
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
10 #ifndef TRANSLATOR_GROUP_HH
11 #define TRANSLATOR_GROUP_HH
14 #include "lily-proto.hh"
15 #include "virtual-methods.hh"
16 #include "translator.hh"
21 typedef void (Translator::*Method_pointer) (void);
22 #define set_property(x,y) internal_set_property(ly_symbol2scm(x),y)
24 class Scheme_hash_table;
27 /** Make some kind of Elements from Events. Elements are made by
28 hierarchically grouped Translators
30 class Translator_group : public virtual Translator {
35 friend class Interpretation_context_handle;
37 Scheme_hash_table *properties_dict () const;
38 SCM add_translator (SCM, Translator*);
42 virtual SCM get_simple_trans_list ();
45 void execute_pushpop_property (SCM prop, SCM sym, SCM val);
46 SCM internal_get_property (SCM name_sym) const;
47 SCM properties_as_alist () const;
48 void unset_property (SCM var_sym);
49 void internal_set_property (SCM var_sym, SCM value);
51 Translator_group *where_defined (SCM name_sym) const;
52 String context_name () const;
53 Translator_group (Translator_group const &);
56 bool is_alias (SCM) const;
57 void add_fresh_group_translator (Translator *trans);
58 void add_used_group_translator (Translator *trans);
59 bool is_bottom_context () const;
60 bool is_removable () const;
61 void terminate_translator (Translator*r);
62 Translator *remove_translator (Translator*trans);
63 void check_removal ();
64 Translator_group *find_existing_translator (SCM context_name, String id);
65 Translator_group *find_create_translator (SCM context_name,
67 Link_array<Translator_group>
68 path_to_acceptable_translator (SCM alias,
69 Music_output_def*) const;
70 Translator_group*get_default_interpreter ();
71 VIRTUAL_COPY_CONS (Translator);
73 bool try_music_on_nongroup_children (Music *m);
75 virtual void do_announces ();
76 virtual bool try_music (Music* req);
77 virtual void stop_translation_timestep ();
78 virtual void start_translation_timestep ();
79 virtual void initialize ();
80 virtual void finalize ();
81 virtual void each (Method_pointer);
85 bool melisma_busy (Translator* tr); // where to put this? --hwn
86 void apply_property_operations (Translator_group*tg, SCM pre_init_ops);
87 SCM names_to_translators (SCM namelist, Translator_group*tg);
88 void execute_pushpop_property (Translator_group * trg,
89 SCM prop, SCM eltprop, SCM val);
90 SCM updated_grob_properties (Translator_group* tg, SCM sym);
92 #endif // TRANSLATOR_GROUP_HH