(Which properties to
[lilypond.git] / lily / chord-name.cc
blob92f8c2418b32783da2dc43071a12cb8d724c1517
1 /*
2 chord-name.cc -- implement Chord_name
4 source file of the GNU LilyPond music typesetter
6 (c) 1999--2004 Jan Nieuwenhuizen <janneke@gnu.org>
7 */
9 #include "chord-name.hh"
10 #include "stencil.hh"
11 #include "paper-def.hh"
12 #include "font-interface.hh"
13 #include "grob.hh"
14 #include "paper-column.hh"
15 #include "system.hh"
16 #include "staff-symbol-referencer.hh"
17 #include "text-item.hh"
19 MAKE_SCHEME_CALLBACK (Chord_name,after_line_breaking,1);
20 SCM
21 Chord_name::after_line_breaking (SCM smob)
23 Item* me = unsmob_item (smob);
24 assert (me);
26 SCM s = me->get_property ("begin-of-line-visible");
27 if (to_boolean (s))
29 if (Paper_column::get_rank (me->get_column ()) -
30 me->get_system ()->spanned_rank_iv ()[LEFT] > 1)
31 me->suicide ();
33 return SCM_UNSPECIFIED;
37 ADD_INTERFACE (Chord_name, "chord-name-interface",
38 "A chord name.",
39 "begin-of-line-visible");