]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/script-column.cc
lilypond-manuals.css: edit color scheme and some spacing
[lilypond.git] / lily / script-column.cc
index 2456f8b00b05d5c13e9969fce2bb5ea77fe408b5..a12560bf8e19426eaec8f254b782a8e6108ccefb 100644 (file)
@@ -46,8 +46,8 @@ LY_DEFINE (ly_grob_script_priority_less, "ly:grob-script-priority-less",
            2, 0, 0, (SCM a, SCM b),
            "Compare two grobs by script priority.  For internal use.")
 {
-  Grob *i1 = Grob::unsmob (a);
-  Grob *i2 = Grob::unsmob (b);
+  Grob *i1 = unsmob<Grob> (a);
+  Grob *i2 = unsmob<Grob> (b);
 
   SCM p1 = i1->get_property ("script-priority");
   SCM p2 = i2->get_property ("script-priority");
@@ -59,7 +59,7 @@ MAKE_SCHEME_CALLBACK (Script_column, row_before_line_breaking, 1);
 SCM
 Script_column::row_before_line_breaking (SCM smob)
 {
-  Grob *me = Grob::unsmob (smob);
+  Grob *me = unsmob<Grob> (smob);
   vector<Grob *> horizontal_grobs;
   extract_grob_set (me, "scripts", scripts);
 
@@ -72,13 +72,13 @@ Script_column::row_before_line_breaking (SCM smob)
       /*
         Don't want to consider scripts horizontally next to notes.
       */
-      if (Accidental_placement::has_interface (sc)
-          || Arpeggio::has_interface (sc))
+      if (has_interface<Accidental_placement> (sc)
+          || has_interface<Arpeggio> (sc))
         {
           affect_all_grobs.push_back (sc);
         }
-      else if (sc->get_property_data ("Y-offset")
-               != Side_position_interface::y_aligned_side_proc)
+      else if (!scm_is_eq (sc->get_property_data ("Y-offset"),
+                           Side_position_interface::y_aligned_side_proc))
         {
           head_scripts_map[sc->get_parent (Y_AXIS)].push_back (sc);
         }
@@ -102,7 +102,7 @@ MAKE_SCHEME_CALLBACK (Script_column, before_line_breaking, 1);
 SCM
 Script_column::before_line_breaking (SCM smob)
 {
-  Grob *me = Grob::unsmob (smob);
+  Grob *me = unsmob<Grob> (smob);
   vector<Grob *> staff_sided;
 
   extract_grob_set (me, "scripts", scripts);
@@ -112,8 +112,8 @@ Script_column::before_line_breaking (SCM smob)
       /*
         Don't want to consider scripts horizontally next to notes.
       */
-      if (sc->get_property_data ("X-offset")
-          != Side_position_interface::x_aligned_side_proc)
+      if (!scm_is_eq (sc->get_property_data ("X-offset"),
+                      Side_position_interface::x_aligned_side_proc))
         staff_sided.push_back (sc);
     }
 
@@ -147,7 +147,7 @@ Script_column::order_grobs (vector<Grob *> grobs)
       for (SCM s = ss; scm_is_pair (s);
            s = scm_cdr (s), last = g, last_initial_outside_staff = initial_outside_staff)
         {
-          g = Grob::unsmob (scm_car (s));
+          g = unsmob<Grob> (scm_car (s));
           initial_outside_staff = g->get_property ("outside-staff-priority");
           if (last)    //not the first grob in the list
             {
@@ -158,7 +158,7 @@ Script_column::order_grobs (vector<Grob *> grobs)
               */
               if (!scm_is_number (last_outside_staff))
                 for (SCM t = ss; !scm_is_eq (t, s); t = scm_cdr (t))
-                  Side_position_interface::add_support (g, Grob::unsmob (scm_car (t)));
+                  Side_position_interface::add_support (g, unsmob<Grob> (scm_car (t)));
               /*
                 if outside_staff_priority is missing or is equal to original
                 outside_staff_priority of previous grob, set new