]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/col-info.cc
patch::: 1.1.8.hwn1
[lilypond.git] / lily / col-info.cc
index e05498f0e15c489718c901b3c25d72ca4f33237d..581a9491b74db9a14cee9babe7a2179000cb2e59 100644 (file)
@@ -1,9 +1,9 @@
 /*
-  col-info.cc -- implement Colinfo
+  col-info.cc -- implement Column_info
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "p-col.hh"
 #include "debug.hh"
 
 void
-Colinfo::print() const
+Column_info::print() const
 {
 #ifndef NPRINT
   DOUT << "column { ";
-  if (fixed())
-       DOUT << "fixed at " << fixed_position()<<", ";
+  if (fixed_b())
+    DOUT << "fixed at " << fixed_position() << ", ";
   assert (pcol_l_);
-  DOUT << "[" << minleft() << ", " << minright () << "]";
+  DOUT << width_.str();
+  Direction d = LEFT;
+  do {
+    for (int i=0; i < rods_[d].size (); i++)
+      rods_[d][i].print ();
+  } while (flip (&d) != LEFT);
+  
   DOUT <<"}\n";
 #endif
 }
 
-Colinfo::Colinfo (PCol *col_l, Real const *fixed_C)
+Column_info::Column_info (Paper_column *col_l, Real const *fixed_C)
 {
   if (fixed_C)
-       fixpos_p_.set_l (fixed_C);
+    fixpos_p_.set_l (fixed_C);
   ugh_b_ = false;
   pcol_l_ = col_l;
-  width = pcol_l_->width();
+  width_ = pcol_l_->width();
+  if (width_.empty_b())
+    width_ = Interval(0,0);
 }
 
 
-Colinfo::Colinfo()
+Column_info::Column_info()
 {
   ugh_b_ = false;
   pcol_l_ =0;
 }
 
+bool
+Column_info::fixed_b () const
+{
+ return fixpos_p_.get_C();
+}
+
+Real
+Column_info::fixed_position () const
+{
+  return *fixpos_p_;
+}
+
+int
+Column_info::rank_i () const
+{
+  return pcol_l_->rank_i ();
+}
+
+void
+Spacer_rod::print ()const
+{
+  DOUT << "Other " << other_idx_ << "dist = " << distance_f_ << '\n';
+}