]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/rest-collision.cc
patch::: 1.3.57.jcn2
[lilypond.git] / lily / rest-collision.cc
index df842f8f33cbdf5c273f687f9df7fd14adbd2617..f5be97061c97cfda84d0da7690e0965a5fe141b3 100644 (file)
@@ -24,7 +24,7 @@ void
 Rest_collision::add_column (Note_column *nc_l)
 {
   add_dependency (nc_l);
-  Group_interface gi (this);  
+  Pointer_group_interface gi (this);  
   if (nc_l->rest_b ())
     gi.name_ = "rests";
   else
@@ -48,10 +48,13 @@ rhythmic_head2mom (Rhythmic_head* r)
   return to_duration (r->balltype_i (), r->dot_count ()).length_mom ();
 }
 
+/*
+  ugh
+ */
 static Rhythmic_head*
 col2rhythmic_head (Note_column* c)
 {
-  SCM s = c->get_elt_property ("rests");
+  SCM s = c->get_elt_pointer ("rests");
   assert (gh_pair_p (s));
   Score_element* e = unsmob_element (gh_car (s));
   return dynamic_cast<Rhythmic_head*> (e);
@@ -61,9 +64,9 @@ void
 Rest_collision::before_line_breaking ()
 {
   Link_array<Note_column> rest_l_arr =
-    Group_interface__extract_elements (this, (Note_column*) 0, "rests");
+    Pointer_group_interface__extract_elements (this, (Note_column*) 0, "rests");
   Link_array<Note_column> ncol_l_arr =
-    Group_interface__extract_elements (this, (Note_column*) 0, "notes");
+    Pointer_group_interface__extract_elements (this, (Note_column*) 0, "notes");
                                      
   
   /* 
@@ -109,7 +112,7 @@ Rest_collision::before_line_breaking ()
          display_count = gh_scm2int (s);
          for (; i > display_count; i--)
            col2rhythmic_head (rest_l_arr[i-1])
-             ->set_elt_property ("transparent", SCM_BOOL_T);
+             ->set_elt_property ("molecule-callback", SCM_BOOL_T);
        }
       else
        display_count = rest_l_arr.size ();
@@ -188,11 +191,11 @@ Rest_collision::before_line_breaking ()
 }
 
 
-Rest_collision::Rest_collision()
+Rest_collision::Rest_collision(SCM s)
+  : Item (s)
 {
-  set_elt_property ("rests", SCM_EOL);
-  set_elt_property ("notes", SCM_EOL);
-  set_elt_property ("transparent", SCM_BOOL_T);
+  set_elt_pointer ("rests", SCM_EOL);
+  set_elt_pointer ("notes", SCM_EOL);
   set_extent_callback (0, X_AXIS);
   set_extent_callback (0, Y_AXIS);
 }