]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/grob.cc
Issue 4410: Part_combine_iterator: treat child iterators as a set
[lilypond.git] / lily / grob.cc
index 660a34d07243c7d5296cfcb73a3f9a9d51d9f7c1..2377a5d963f92d794916185c6518b395fcf29aca 100644 (file)
@@ -75,17 +75,17 @@ Grob::Grob (SCM basicprops)
         }
     }
 
-  if (get_property_data ("X-extent") == SCM_EOL)
+  if (scm_is_null (get_property_data ("X-extent")))
     set_property ("X-extent", Grob::stencil_width_proc);
-  if (get_property_data ("Y-extent") == SCM_EOL)
+  if (scm_is_null (get_property_data ("Y-extent")))
     set_property ("Y-extent",
                   Unpure_pure_container::make_smob (Grob::stencil_height_proc,
                                                     Grob::pure_stencil_height_proc));
-  if (get_property_data ("vertical-skylines") == SCM_EOL)
+  if (scm_is_null (get_property_data ("vertical-skylines")))
     set_property ("vertical-skylines",
                   Unpure_pure_container::make_smob (Grob::simple_vertical_skylines_from_extents_proc,
                                                     Grob::pure_simple_vertical_skylines_from_extents_proc));
-  if (get_property_data ("horizontal-skylines") == SCM_EOL)
+  if (scm_is_null (get_property_data ("horizontal-skylines")))
     set_property ("horizontal-skylines",
                   Unpure_pure_container::make_smob (Grob::simple_horizontal_skylines_from_extents_proc,
                                                     Grob::pure_simple_horizontal_skylines_from_extents_proc));
@@ -127,7 +127,7 @@ Grob::get_stencil () const
     return 0;
 
   SCM stil = get_property ("stencil");
-  return Stencil::unsmob (stil);
+  return unsmob<Stencil> (stil);
 }
 
 Stencil
@@ -136,7 +136,7 @@ Grob::get_print_stencil () const
   SCM stil = get_property ("stencil");
 
   Stencil retval;
-  if (Stencil *m = Stencil::unsmob (stil))
+  if (Stencil *m = unsmob<Stencil> (stil))
     {
       retval = *m;
       bool transparent = to_boolean (get_property ("transparent"));
@@ -180,7 +180,7 @@ Grob::get_print_stencil () const
           /* Call the scheme procedure stencil-whiteout in scm/stencils.scm */
           /* to add a round-filled-box stencil to the stencil list */
           retval
-            = *Stencil::unsmob (scm_call_1 (ly_lily_module_constant ("stencil-whiteout"),
+            = *unsmob<Stencil> (scm_call_1 (ly_lily_module_constant ("stencil-whiteout"),
                                            retval.smobbed_copy ()));
         }
 
@@ -720,13 +720,13 @@ void
 Grob::programming_error (const string &s) const
 {
   SCM cause = self_scm ();
-  while (Grob *g = Grob::unsmob (cause))
+  while (Grob *g = unsmob<Grob> (cause))
     cause = g->get_property ("cause");
 
   /* ES TODO: cause can't be Music*/
-  if (Music *m = Music::unsmob (cause))
+  if (Music *m = unsmob<Music> (cause))
     m->origin ()->programming_error (s);
-  else if (Stream_event *ev = Stream_event::unsmob (cause))
+  else if (Stream_event *ev = unsmob<Stream_event> (cause))
     ev->origin ()->programming_error (s);
   else
     ::programming_error (s);
@@ -736,13 +736,13 @@ void
 Grob::warning (const string &s) const
 {
   SCM cause = self_scm ();
-  while (Grob *g = Grob::unsmob (cause))
+  while (Grob *g = unsmob<Grob> (cause))
     cause = g->get_property ("cause");
 
   /* ES TODO: cause can't be Music*/
-  if (Music *m = Music::unsmob (cause))
+  if (Music *m = unsmob<Music> (cause))
     m->origin ()->warning (s);
-  else if (Stream_event *ev = Stream_event::unsmob (cause))
+  else if (Stream_event *ev = unsmob<Stream_event> (cause))
     ev->origin ()->warning (s);
   else
     ::warning (s);
@@ -818,6 +818,7 @@ ADD_INTERFACE (Grob,
                "meta "
                "minimum-X-extent "
                "minimum-Y-extent "
+               "parenthesis-friends "
                "pure-Y-offset-in-progress "
                "rotation "
                "skyline-horizontal-padding "
@@ -847,7 +848,7 @@ MAKE_SCHEME_CALLBACK (Grob, stencil_height, 1);
 SCM
 Grob::stencil_height (SCM smob)
 {
-  Grob *me = Grob::unsmob (smob);
+  Grob *me = unsmob<Grob> (smob);
   return grob_stencil_extent (me, Y_AXIS);
 }
 
@@ -855,8 +856,8 @@ MAKE_SCHEME_CALLBACK (Grob, pure_stencil_height, 3);
 SCM
 Grob::pure_stencil_height (SCM smob, SCM /* beg */, SCM /* end */)
 {
-  Grob *me = Grob::unsmob (smob);
-  if (Stencil::is_smob (me->get_property_data ("stencil")))
+  Grob *me = unsmob<Grob> (smob);
+  if (unsmob<Stencil> (me->get_property_data ("stencil")))
     return grob_stencil_extent (me, Y_AXIS);
 
   return ly_interval2scm (Interval ());
@@ -867,7 +868,7 @@ MAKE_SCHEME_CALLBACK (Grob, y_parent_positioning, 1);
 SCM
 Grob::y_parent_positioning (SCM smob)
 {
-  Grob *me = Grob::unsmob (smob);
+  Grob *me = unsmob<Grob> (smob);
   Grob *par = me->get_parent (Y_AXIS);
   if (par)
     (void) par->get_property ("positioning-done");
@@ -879,7 +880,7 @@ MAKE_SCHEME_CALLBACK (Grob, x_parent_positioning, 1);
 SCM
 Grob::x_parent_positioning (SCM smob)
 {
-  Grob *me = Grob::unsmob (smob);
+  Grob *me = unsmob<Grob> (smob);
 
   Grob *par = me->get_parent (X_AXIS);
   if (par)
@@ -892,7 +893,7 @@ MAKE_SCHEME_CALLBACK (Grob, stencil_width, 1);
 SCM
 Grob::stencil_width (SCM smob)
 {
-  Grob *me = Grob::unsmob (smob);
+  Grob *me = unsmob<Grob> (smob);
   return grob_stencil_extent (me, X_AXIS);
 }
 
@@ -900,7 +901,7 @@ Grob *
 common_refpoint_of_list (SCM elist, Grob *common, Axis a)
 {
   for (; scm_is_pair (elist); elist = scm_cdr (elist))
-    if (Grob *s = Grob::unsmob (scm_car (elist)))
+    if (Grob *s = unsmob<Grob> (scm_car (elist)))
       {
         if (common)
           common = common->common_refpoint (s, a);