]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/tweak-registration.hh
468145f7aa4f8b1aa9c64a1fcc027bde4d28c954
[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 #ifndef TWEAK_REGISTRATION_HH
10 #define TWEAK_REGISTRATION_HH
11
12 #include <map>
13 using namespace std;
14
15 #include "lily-proto.hh"
16 #include "object-key.hh"
17
18 typedef 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   Tweak_registry ();
29
30   Object_key_undumper *undumper () const;
31   void clear ();
32   void insert_grob_tweak (Grob *, SCM);
33   void replace_grob_tweak (Grob *, SCM);
34   SCM get_tweaks (Grob *);
35   SCM list_tweaks ();
36   void insert_tweak_from_file (SCM);
37 };
38
39 extern Tweak_registry *global_registry_;
40
41 DECLARE_UNSMOB (Tweak_registry, tweak_registry);
42
43 #endif /* TWEAK_REGISTRATION_HH */