]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/volta-bracket.cc
* lily/lookup.cc (triangle): rewrite, obviating symmetric_x_triangle().
[lilypond.git] / lily / volta-bracket.cc
index 1309e98837255a1cdd9d07cbcf4f9dc3ca533d47..9b96d0f950a0c61df69e5636527b5e754f9036e0 100644 (file)
@@ -14,7 +14,7 @@
 #include "line-interface.hh"
 #include "stencil.hh"
 #include "paper-column.hh"
-#include "paper-def.hh"
+#include "output-def.hh"
 #include "text-item.hh"
 #include "volta-bracket.hh"
 #include "group-interface.hh"
@@ -37,12 +37,6 @@ SCM
 Volta_bracket_interface::print (SCM smob) 
 {
   Grob *me = unsmob_grob (smob);
-  Link_array<Item> bars
-    = Pointer_group_interface__extract_grobs (me, (Item*)0, "bars");
-
-  if (!bars.size ())
-    return SCM_EOL;
-
   Spanner *orig_span =  dynamic_cast<Spanner*> (me->original_);
 
   bool broken_first_bracket = orig_span && (orig_span->broken_intos_[0] == (Spanner*)me);
@@ -52,21 +46,21 @@ Volta_bracket_interface::print (SCM smob)
   bool no_vertical_start = orig_span && !broken_first_bracket;
   bool no_vertical_end = orig_span && !broken_last_bracket;
   SCM s = me->get_property ("bars");
-  Grob * endbar =   unsmob_grob (ly_car (s));
-  SCM glyph = endbar->get_property ("glyph");
+  Grob * endbar = scm_is_pair (s) ?  unsmob_grob (scm_car (s)) : 0;
+  SCM glyph = endbar ? endbar->get_property ("glyph") : SCM_EOL;
   
   String str;
-  if (ly_c_string_p (glyph))
+  if (scm_is_string (glyph))
     str = ly_scm2string (glyph);
   else
-    return SCM_EOL;
+    str = "|";
   
   const char* cs = str.to_str0 ();
   no_vertical_end |=
     (strcmp (cs,":|")!=0 && strcmp (cs,"|:")!=0 && strcmp (cs,"|.")!=0
      && strcmp (cs,":|:")!=0 && strcmp (cs,".|")!=0);
 
-  Paper_def * paper =me->get_paper ();
+  Output_def * layout =me->get_layout ();
   Real half_space = 0.5;
 
   Item * bound = dynamic_cast<Spanner*> (me)->get_bound (LEFT);
@@ -106,7 +100,7 @@ Volta_bracket_interface::print (SCM smob)
     {
       SCM text = me->get_property ("text");
       SCM properties = me->get_property_alist_chain (SCM_EOL);
-      SCM snum  = Text_item::interpret_markup (paper->self_scm (), properties, text);
+      SCM snum  = Text_interface::interpret_markup (layout->self_scm (), properties, text);
       Stencil num = *unsmob_stencil (snum);
 
       mol.add_at_edge (X_AXIS, LEFT, num, - num.extent (X_AXIS).length ()