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

« back to all changes in this revision

Viewing changes to lily/tab-staff-symbol-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
  tab-staff-symbol-engraver.cc -- implement Tab_staff_symbol_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
#include "staff-symbol-engraver.hh"
 
10
#include "spanner.hh"
 
11
 
 
12
class Tab_staff_symbol_engraver : public Staff_symbol_engraver
 
13
{
 
14
public:
 
15
  TRANSLATOR_DECLARATIONS (Tab_staff_symbol_engraver);
 
16
protected:
 
17
  virtual void start_spanner ();
 
18
};
 
19
 
 
20
void
 
21
Tab_staff_symbol_engraver::start_spanner ()
 
22
{
 
23
  bool init = !span_;
 
24
  Staff_symbol_engraver::start_spanner ();
 
25
  if (init)
 
26
    {
 
27
      int k = scm_ilength (get_property ("stringTunings"));
 
28
      if (k >= 0)
 
29
        span_->set_property ("line-count", scm_from_int (k));
 
30
    }
 
31
}
 
32
 
 
33
Tab_staff_symbol_engraver::Tab_staff_symbol_engraver ()
 
34
{
 
35
}
 
36
 
 
37
#include "translator.icc"
 
38
 
 
39
ADD_ACKNOWLEDGER (Tab_staff_symbol_engraver, grob);
 
40
ADD_TRANSLATOR (Tab_staff_symbol_engraver,
 
41
                /* doc */ "Create a staff-symbol, but look at stringTunings for the number of lines."
 
42
                "staff lines.",
 
43
                /* create */ "StaffSymbol",
 
44
                /* accept */ "staff-span-event",
 
45
                /* read */ "stringTunings",
 
46
                /* write */ "");