]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/tweak-registration.hh
61aab26f704dad1a601cf25251b191147566edb6
[lilypond.git] / lily / include / tweak-registration.hh
1 /*
2   tweak-registration.hh -- declare
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 2004 Han-Wen Nienhuys <hanwen@xs4all.nl>
7
8 */
9
10 #ifndef TWEAK_REGISTRATION_HH
11 #define TWEAK_REGISTRATION_HH
12
13 #include  <map>
14
15 #include "lily-proto.hh"
16 #include "smobs.hh"
17 #include "lily-guile.hh"
18
19 typedef std::map<Object_key const*, SCM, Object_key_less> Tweak_map ;
20
21 class Tweak_registry
22 {
23   Tweak_map tweaks_;
24   Object_key_undumper *undumper_;
25
26   DECLARE_SMOBS(Tweak_registry,);
27   
28 public:
29   Object_key_undumper *undumper() const;
30   void clear ();
31   void insert_grob_tweak (Grob*, SCM);
32   SCM get_tweaks (Grob *);
33   SCM list_tweaks ();
34   void insert_tweak_from_file (SCM);
35   Tweak_registry ();
36 };
37
38 extern Tweak_registry *global_registry_;
39
40 DECLARE_UNSMOB(Tweak_registry, tweak_registry);
41
42 #endif /* TWEAK_REGISTRATION_HH */
43