]> git.donarmstrong.com Git - lilypond.git/blob - lily/chord-name.cc
3ffc591bd83f649988cef92f41f53138cca542c4
[lilypond.git] / lily / chord-name.cc
1 /*
2   chord-name.cc -- implement Chord_name
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1999--2007 Jan Nieuwenhuizen <janneke@gnu.org>
7 */
8
9 #include "chord-name.hh"
10
11 #include "output-def.hh"
12 #include "font-interface.hh"
13 #include "paper-column.hh"
14 #include "system.hh"
15 #include "staff-symbol-referencer.hh"
16 #include "text-interface.hh"
17
18 MAKE_SCHEME_CALLBACK (Chord_name, after_line_breaking, 1);
19 SCM
20 Chord_name::after_line_breaking (SCM smob)
21 {
22   Item *me = unsmob_item (smob);
23   assert (me);
24
25   SCM s = me->get_property ("begin-of-line-visible");
26   if (to_boolean (s))
27     {
28       if (me->get_column ()->get_rank ()
29           - me->get_system ()->spanned_rank_interval ()[LEFT] > 1)
30         me->suicide ();
31     }
32   return SCM_UNSPECIFIED;
33 }
34
35 ADD_INTERFACE (Chord_name,
36                "A chord name.",
37
38                /* properties */        
39                "begin-of-line-visible "
40                );