]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/col-info.cc
release: 0.1.61
[lilypond.git] / lily / col-info.cc
index deb2dee7308191acecace5d4a7cddfbb99fd9c61..85287257b0647f6ac480ea90a9db72a010e19fd5 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
 */
 
 #include "p-col.hh"
@@ -14,28 +14,59 @@ void
 Colinfo::print() const
 {
 #ifndef NPRINT
-    DOUT << "column { ";
-    if (fixed())
-       DOUT << "fixed at " << fixed_position()<<", ";
-    assert (pcol_l_);
-    DOUT << "[" << minleft() << ", " << minright () << "]";
-    DOUT <<"}\n";
+  DOUT << "column { ";
+  if (fixed_b())
+    DOUT << "fixed at " << fixed_position()<<", ";
+  assert (pcol_l_);
+  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)
+Colinfo::Colinfo (Paper_column *col_l, Real const *fixed_C)
 {
-    if (fixed_C)
-       fixpos_p_.set_l (fixed_C);
-    ugh_b_ = false;
-    pcol_l_ = col_l;
-    width = pcol_l_->width();
+  if (fixed_C)
+    fixpos_p_.set_l (fixed_C);
+  ugh_b_ = false;
+  pcol_l_ = col_l;
+  width_ = pcol_l_->width();
+  if (width_.empty_b())
+    width_ = Interval(0,0);
 }
 
 
 Colinfo::Colinfo()
 {
-    ugh_b_ = false;
-    pcol_l_ =0;
+  ugh_b_ = false;
+  pcol_l_ =0;
 }
 
+bool
+Colinfo::fixed_b () const
+{
+ return fixpos_p_.get_C();
+}
+
+Real
+Colinfo::fixed_position () const
+{
+  return *fixpos_p_;
+}
+
+int
+Colinfo::rank_i () const
+{
+  return pcol_l_->rank_i ();
+}
+
+void
+Spacer_rod::print ()const
+{
+  DOUT << "Other " << other_idx_ << "dist = " << distance_f_ << '\n';
+}