2 clef-item.cc -- implement Clef_item
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
12 #include "molecule.hh"
16 FIXME: should use symbol.
19 MAKE_SCHEME_CALLBACK(Clef
,before_line_breaking
);
21 Clef::before_line_breaking (SCM smob
)
23 Item
* s
= dynamic_cast<Item
*> (unsmob_element (smob
));
25 SCM style_sym
=s
->get_elt_property ("style");
27 if (gh_string_p (style_sym
))
28 style
= ly_scm2string (style_sym
);
30 SCM glyph
= s
->get_elt_property ("glyph");
32 if (gh_string_p (glyph
))
34 String str
= ly_scm2string (glyph
);
37 FIXME: should use fontsize property to set clef changes.
39 if (s
->get_elt_property ("non-default") &&
40 s
->break_status_dir() != RIGHT
&& style
!= "fullSizeChanges")
43 s
->set_elt_property ("glyph", ly_str02scm (str
.ch_C()));
49 return SCM_UNSPECIFIED
;
52 return SCM_UNSPECIFIED
;
56 Clef::has_interface (Score_element
* me
)
58 return me
->has_interface (ly_symbol2scm ("clef-interface"));
63 Clef::set_interface (Score_element
* me
)
65 me
->set_interface (ly_symbol2scm ("clef-interface"));