]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/separation-item.cc
* mf/GNUmakefile: always trace pfa fonts.
[lilypond.git] / lily / separation-item.cc
index f85866f4c8320d503dcec25bc210fc97af2b9024..3ca590a50044f5ec628b694d09c43cbd38cb99f2 100644 (file)
@@ -3,7 +3,7 @@
   
   source file of the GNU LilyPond music typesetter
   
-  (c) 1998--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1998--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   
  */
 
@@ -27,13 +27,17 @@ Separation_item::add_conditional_item (Grob* me , Grob *e)
   Pointer_group_interface::add_grob (me, ly_symbol2scm ("conditional-elements"), e);
 }
 
+/*
+  Return the width of ME given that we are considering the object on
+  the LEFT.
+ */
 Interval
 Separation_item::conditional_width (Grob * me, Grob * left)
 {
   Interval w = width (me);
-
+  
   Item *item = dynamic_cast<Item*> (me);
-  Paper_column * pc = item->column_l ();
+  Paper_column * pc = item->get_column ();
   
   
   for (SCM s =  me->get_grob_property ("conditional-elements"); gh_pair_p (s); s = ly_cdr (s))
@@ -43,7 +47,7 @@ Separation_item::conditional_width (Grob * me, Grob * left)
        continue;
       
       Item *il = unsmob_item (elt);
-      if (pc != il->column_l ())
+      if (pc != il->get_column ())
        {
          /* this shouldn't happen, but let's continue anyway. */
          programming_error (_ ("Separation_item:  I've been drinking too much"));
@@ -74,14 +78,14 @@ Separation_item::conditional_width (Grob * me, Grob * left)
 Interval
 Separation_item::width (Grob *me)
 {
-  SCM sw = me->get_grob_property ("extent-X");
-  if (ly_number_pair_p (sw))
+  SCM sw = me->get_grob_property ("X-extent");
+  if (is_number_pair (sw))
     {
       return ly_scm2interval (sw);
     }
 
   Item *item = dynamic_cast<Item*> (me);
-  Paper_column * pc = item->column_l ();
+  Paper_column * pc = item->get_column ();
   Interval w;
   
   for (SCM s =  me->get_grob_property ("elements"); gh_pair_p (s); s = ly_cdr (s))
@@ -91,7 +95,7 @@ Separation_item::width (Grob *me)
        continue;
 
       Item *il = unsmob_item (elt);
-      if (pc != il->column_l ())
+      if (pc != il->get_column ())
        {
          /* this shouldn't happen, but let's continue anyway. */
          programming_error (_ ("Separation_item:  I've been drinking too much"));
@@ -118,12 +122,9 @@ Separation_item::width (Grob *me)
     w[LEFT] -= gh_scm2double (pad)/2;    
   }
 
-
-  me->set_grob_property ("extent-X", ly_interval2scm (w));
-  
+  me->set_grob_property ("X-extent", ly_interval2scm (w));
   
   return w;
- // add this->offset_ ? this-> relative_coordinate ()? 
 }
 
 
@@ -131,10 +132,8 @@ Separation_item::width (Grob *me)
 
 
 ADD_INTERFACE (Separation_item,"separation-item-interface",
-  "Item that computes widths to generate spacing rods.
-
-Calc dimensions for the Separating_group_spanner; this has to be
-an item to get dependencies correct.  It can't be an grob_group
-since these usually are in a different X_group
-",
-  "extent-X conditional-elements elements");
+  "Item that computes widths to generate spacing rods.\n"
+"\n"
+"Calculate dimensions for the Separating_group_spanner; this has to be "
+"an item to get dependencies correct.  "
+, "padding X-extent conditional-elements elements");