]> git.donarmstrong.com Git - lilypond.git/blob - lily/clef-item.cc
21d97d80754d74e0a6d733e219f447ce4ce94e16
[lilypond.git] / lily / clef-item.cc
1 /*
2   clef-item.cc -- implement Clef_item
3
4   source file of the GNU LilyPond music typesetter
5
6   (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
8
9
10 #include "clef-item.hh"
11 #include "string.hh"
12 #include "molecule.hh"
13 #include "text-item.hh"
14
15 void
16 Clef_item::before_line_breaking ()
17 {
18   SCM style_sym =get_elt_property ("style");
19   String style;
20   if (gh_string_p (style_sym))
21     style = ly_scm2string (style_sym);
22
23   SCM glyph = get_elt_property ("glyph");
24   if (gh_string_p (glyph))
25     {
26       String s = ly_scm2string (glyph);
27         
28       if (break_status_dir() != RIGHT && style != "fullSizeChanges")
29         {
30           s += "_change";
31         }
32       s = "clefs-" +  s;
33       set_elt_property ("glyph", ly_str02scm (s.ch_C()));
34     }
35   else
36     {
37       set_elt_property ("transparent", SCM_BOOL_T);
38     }
39   
40   if (style == "transparent")   // UGH. JUNKME
41     {
42       set_elt_property ("transparent", SCM_BOOL_T);
43       set_extent_callback (0, X_AXIS);
44     }
45 }
46
47
48