]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/tweak-registration.hh
f0aa5f2c8c648242d0b16fdcdaa4ff9d3ba33024
[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--2005 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 "object-key.hh"
17
18 typedef std::map<Object_key const*, SCM, Object_key_less> Tweak_map ;
19
20 class Tweak_registry
21 {
22   Tweak_map tweaks_;
23   Object_key_undumper *undumper_;
24
25   DECLARE_SMOBS(Tweak_registry,);
26   
27 public:
28   Object_key_undumper *undumper() const;
29   void clear ();
30   void insert_grob_tweak (Grob*, SCM);
31   SCM get_tweaks (Grob *);
32   SCM list_tweaks ();
33   void insert_tweak_from_file (SCM);
34   Tweak_registry ();
35 };
36
37 extern Tweak_registry *global_registry_;
38
39 DECLARE_UNSMOB(Tweak_registry, tweak_registry);
40
41 #endif /* TWEAK_REGISTRATION_HH */
42