]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/clef-item.cc
release: 1.3.56
[lilypond.git] / lily / clef-item.cc
index 21d97d80754d74e0a6d733e219f447ce4ce94e16..770694061d82b7744002573d4a77a0a3eac2fbdf 100644 (file)
 #include "molecule.hh"
 #include "text-item.hh"
 
+Clef_item::Clef_item (SCM s)
+  : Item (s)
+{}
+
+
+/*
+FIXME: should use symbol.
+
+FIXME: this should be schemified.
+*/
 void
 Clef_item::before_line_breaking ()
 {
@@ -21,25 +31,31 @@ Clef_item::before_line_breaking ()
     style = ly_scm2string (style_sym);
 
   SCM glyph = get_elt_property ("glyph");
+  
   if (gh_string_p (glyph))
     {
       String s = ly_scm2string (glyph);
-       
-      if (break_status_dir() != RIGHT && style != "fullSizeChanges")
+
+      /*
+       FIXME: should use fontsize property to set clef changes.
+       */
+      if (get_elt_property ("non-default") &&
+         break_status_dir() != RIGHT && style != "fullSizeChanges")
        {
          s += "_change";
+         set_elt_property ("glyph", ly_str02scm (s.ch_C()));     
        }
-      s = "clefs-" +  s;
-      set_elt_property ("glyph", ly_str02scm (s.ch_C()));
     }
   else
     {
-      set_elt_property ("transparent", SCM_BOOL_T);
+      suicide ();
+      return;
     }
-  
+
+  // ugh. 
   if (style == "transparent")  // UGH. JUNKME
     {
-      set_elt_property ("transparent", SCM_BOOL_T);
+      set_elt_property ("molecule-callback", SCM_BOOL_T);
       set_extent_callback (0, X_AXIS);
     }
 }