]> git.donarmstrong.com Git - lilypond.git/blob - lily/tab-staff-symbol-engraver.cc
* ly/engraver-init.ly: set ignoreFiguredBassRest in Staff context.
[lilypond.git] / lily / tab-staff-symbol-engraver.cc
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 "engraver.hh"
10 #include "spanner.hh"
11
12 class Tab_staff_symbol_engraver : public Engraver
13 {
14 public:
15   TRANSLATOR_DECLARATIONS (Tab_staff_symbol_engraver);
16 protected:
17   DECLARE_ACKNOWLEDGER(staff_symbol);
18 };
19
20 void
21 Tab_staff_symbol_engraver::acknowledge_staff_symbol (Grob_info gi)
22 {
23   int k = scm_ilength (get_property ("stringTunings"));
24   if (k >= 0)
25     gi.grob ()->set_property ("line-count", scm_from_int (k));
26 }
27
28 Tab_staff_symbol_engraver::Tab_staff_symbol_engraver ()
29 {
30 }
31
32 #include "translator.icc"
33
34 ADD_ACKNOWLEDGER (Tab_staff_symbol_engraver, staff_symbol);
35 ADD_TRANSLATOR (Tab_staff_symbol_engraver,
36                 /* doc */
37                 "Create a staff-symbol, but look at "
38                 "stringTunings for the number of lines. "
39                 ,
40                 /* create */ "StaffSymbol",
41                 /* accept */ "staff-span-event",
42                 /* read */ "stringTunings",
43                 /* write */ "");