~ubuntu-branches/ubuntu/precise/lilypond/precise

« back to all changes in this revision

Viewing changes to lily/tweak-engraver.cc

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Bushnell, BSG
  • Date: 2006-12-19 10:18:12 UTC
  • mfrom: (3.1.4 feisty)
  • Revision ID: james.westby@ubuntu.com-20061219101812-7awtjkp0i393wxty
Tags: 2.8.7-3
scripts/midi2ly.py: When setting DATADIR, find Lilypond python files
in the @TOPLEVEL_VERSION@ directory, not 'current'.  Patch thanks to
Chris Lamb (chris@chris-lamb.co.uk).  (Closes: #400550)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
  tweak-engraver.cc -- implement Tweak_engraver
 
3
 
 
4
  source file of the GNU LilyPond music typesetter
 
5
 
 
6
  (c) 2005--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
7
 
 
8
*/
 
9
 
 
10
#include "engraver.hh"
 
11
 
 
12
#include "music.hh"
 
13
#include "grob.hh"
 
14
#include "translator.icc"
 
15
 
 
16
class Tweak_engraver : public Engraver
 
17
{
 
18
  TRANSLATOR_DECLARATIONS (Tweak_engraver);
 
19
 
 
20
protected:
 
21
  DECLARE_ACKNOWLEDGER (grob);
 
22
};
 
23
 
 
24
Tweak_engraver::Tweak_engraver()
 
25
{
 
26
}
 
27
 
 
28
void
 
29
Tweak_engraver::acknowledge_grob (Grob_info info)
 
30
{
 
31
  if (Music *music = info.music_cause ())
 
32
    {
 
33
      for (SCM s = music->get_property ("tweaks");
 
34
           scm_is_pair (s); s = scm_cdr (s))
 
35
        {
 
36
          info.grob ()->internal_set_property (scm_caar (s), scm_cdar (s));
 
37
        }
 
38
    }
 
39
}
 
40
 
 
41
ADD_ACKNOWLEDGER (Tweak_engraver, grob);
 
42
ADD_TRANSLATOR (Tweak_engraver,
 
43
                /* doc */ "Read the @code{tweaks} property from the originating Music event, and set properties." ,
 
44
                
 
45
                /* create */ "",
 
46
                /* accept */ "",
 
47
                /* read */ "",
 
48
                /* write */ "");