]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.3.33
authorfred <fred>
Tue, 26 Mar 2002 22:46:55 +0000 (22:46 +0000)
committerfred <fred>
Tue, 26 Mar 2002 22:46:55 +0000 (22:46 +0000)
12 files changed:
lily/audio-item.cc
lily/axis-group-engraver.cc
lily/crescendo.cc
lily/include/spanner.hh
lily/line-group-group-engraver.cc
lily/line-of-score.cc
lily/score-engraver.cc
lily/separating-line-group-engraver.cc
lily/spacing-engraver.cc
lily/staff-symbol-engraver.cc
lily/staff-symbol.cc
lily/vertical-align-engraver.cc

index 410222f0e5520552cfca1f9f152118697b69fd7e..60b15abb5c6a4b29865a4e35b734685df12d07c6 100644 (file)
@@ -78,7 +78,7 @@ Audio_tie::set_note (Direction d, Audio_note* note_l)
 {
   assert (!note_l_drul_[d]);
   note_l_drul_[d] = note_l;
-  //set_bounds (d, head_l);
+  //set_bound (d, head_l);
 
   //  add_dependency (head_l);
 }
index 9ae9db643886ebd331494387bfef89d138756714..e4182d8f5a071e8a8fa5da28a445165782790b33 100644 (file)
@@ -20,7 +20,7 @@ Axis_group_engraver::do_creation_processing ()
 {
   staffline_p_ = get_spanner_p ();
   staffline_p_->set_axes (Y_AXIS, Y_AXIS);
-  staffline_p_->set_bounds(LEFT,get_staff_info().command_pcol_l ());
+  staffline_p_->set_bound(LEFT,get_staff_info().command_pcol_l ());
   announce_element (Score_element_info (staffline_p_, 0));
 }
 
@@ -32,7 +32,7 @@ Axis_group_engraver::get_spanner_p () const
 void
 Axis_group_engraver::do_removal_processing ()
 {
-  staffline_p_->set_bounds(RIGHT,get_staff_info().command_pcol_l ());
+  staffline_p_->set_bound(RIGHT,get_staff_info().command_pcol_l ());
   typeset_element (staffline_p_);
   staffline_p_ = 0;
 }
index 36bdcbdbec6a308431b2dd4cb560907aee1f99d1..ffe11eaefb9becbee5967236e7dbab864e46d4dc 100644 (file)
@@ -72,7 +72,7 @@ Crescendo::do_brew_molecule () const
   Direction d = LEFT;
   do
     {
-      Paper_column* s = dynamic_cast<Paper_column*>(spanned_drul_[d]); // UGH
+      Paper_column* s = dynamic_cast<Paper_column*>(get_bound (d)); // UGH
       broken[d] = (!s->musical_b ());
     }
   while (flip (&d) != LEFT);
index 7736ed8610c3539b1d6d153991aa7b9992eeaf1f..130604b86303cdfc1b4dedcbf960471b29580d7b 100644 (file)
@@ -35,11 +35,12 @@ class Axis_group_spanner;
 
   */
 class Spanner : public virtual Score_element {
-public:
   Drul_array<Item*> spanned_drul_;
-  Link_array<Spanner> broken_into_l_arr_;
-  void set_bounds (Direction d, Item*);
 
+public:
+  Link_array<Spanner> broken_into_l_arr_;
+  void set_bound (Direction d, Item*);
+  Item *get_bound (Direction d) const;
   
   Spanner ();
   Spanner (Spanner const &);
index f30e40959fff4ecf89413ba334f7fe73c133f260..a0f8d10dbce7b8afc283e3df34a4e6a1dc624d03 100644 (file)
@@ -34,7 +34,7 @@ Line_group_engraver_group::do_removal_processing()
 {
   Engraver_group_engraver::do_removal_processing ();
 
-  staffline_p_->set_bounds(RIGHT,get_staff_info().command_pcol_l ());
+  staffline_p_->set_bound(RIGHT,get_staff_info().command_pcol_l ());
   Engraver_group_engraver::typeset_element (staffline_p_);
   staffline_p_ = 0;
 }
@@ -43,7 +43,7 @@ void
 Line_group_engraver_group::do_creation_processing()
 {
   create_line_spanner ();
-  staffline_p_->set_bounds(LEFT,get_staff_info().command_pcol_l ());
+  staffline_p_->set_bound(LEFT,get_staff_info().command_pcol_l ());
   
   Engraver::announce_element (Score_element_info (staffline_p_,0));
 }
index 69d7f363397482f90ab9db253b6abdd214fec784..cde8965e03456c9c9a4a84d46d3937c066d1306e 100644 (file)
@@ -48,8 +48,8 @@ Line_of_score::break_into_pieces (Array<Column_x_positions> const &breaking)
       line_l->rank_i_ = i;
       Link_array<Paper_column> c (breaking[i].cols_);
       pscore_l_->typeset_element (line_l);
-      line_l->set_bounds(LEFT,c[0]);
-      line_l->set_bounds(RIGHT,c.top ());
+      line_l->set_bound(LEFT,c[0]);
+      line_l->set_bound(RIGHT,c.top ());
       for (int j=0; j < c.size(); j++)
        {
          c[j]->translate_axis (breaking[i].config_[j],X_AXIS);
index ed74043951ade9dc3910b25d933193ee158543e3..09c7ffd47fb9073c28844e412a8eef4b0071e0ee 100644 (file)
@@ -53,7 +53,7 @@ Score_engraver::do_creation_processing ()
 {
   scoreline_l_ = pscore_p_->line_l_;
 
-  scoreline_l_->set_bounds(LEFT, command_column_l_);
+  scoreline_l_->set_bound(LEFT, command_column_l_);
   
   command_column_l_->set_elt_property ("breakable", SCM_BOOL_T);
 
@@ -65,10 +65,15 @@ void
 Score_engraver::do_removal_processing()
 {
   Engraver_group_engraver::do_removal_processing();
-  scoreline_l_->set_bounds(RIGHT,command_column_l_);
+  scoreline_l_->set_bound(RIGHT,command_column_l_);
   command_column_l_->set_elt_property ("breakable", SCM_BOOL_T);
 
+  
   typeset_all ();
+
+
+  if (musical_column_l_->linked_b ())
+    programming_error ("Last column in score should be non-musical");
   set_columns (0,0);
 }
 
@@ -128,9 +133,9 @@ Score_engraver::typeset_all()
           */
          Direction d = LEFT;
          do {
-           if (!s->spanned_drul_[d])
+           if (!s->get_bound (d))
              {
-               s->set_bounds(d, command_column_l_);
+               s->set_bound(d, command_column_l_);
                ::warning (_f ("unbound spanner `%s'", classname(s)));
              }
          } while (flip(&d) != LEFT);
@@ -189,7 +194,11 @@ Score_engraver::set_columns (Paper_column *new_command_l,
                We're forgetting about this column. Dump it, and make SCM
                forget it.
 
-               (UGH.)  */
+               FIXME: we should have another way of not putting this
+               column into the spacing problem. Maybe we shouldn't
+               even prevent this.
+
+             */
              scm_unprotect_object ((*current[i])->self_scm_);
              *current[i]  =0;
            }
index 9cd56f58b618399e31c8250d1cc33cd0df49f641..7d99122fd5c4f1ceb2f61f43c678b33bf5a6fca6 100644 (file)
@@ -25,13 +25,13 @@ Separating_line_group_engraver::do_creation_processing ()
 {
   sep_span_p_ = new Separating_group_spanner;
   announce_element (Score_element_info (sep_span_p_, 0));
-  sep_span_p_->set_bounds (LEFT, get_staff_info ().command_pcol_l ());
+  sep_span_p_->set_bound (LEFT, get_staff_info ().command_pcol_l ());
 }
 
 void
 Separating_line_group_engraver::do_removal_processing ()
 {
-  sep_span_p_->set_bounds (RIGHT, get_staff_info ().command_pcol_l ());
+  sep_span_p_->set_bound (RIGHT, get_staff_info ().command_pcol_l ());
   typeset_element (sep_span_p_);
   sep_span_p_ =0;
 }
index 7f3ac132fce5c00f41ab4c8cda00e155f739f34a..5caefdf72ed4adaf9749f66d74a5ad9aaf556700 100644 (file)
@@ -35,7 +35,7 @@ void
 Spacing_engraver::do_creation_processing ()
 {
   spacing_p_  =new Spacing_spanner;
-  spacing_p_->set_bounds (LEFT, get_staff_info ().command_pcol_l ());  
+  spacing_p_->set_bound (LEFT, get_staff_info ().command_pcol_l ());  
   announce_element (Score_element_info (spacing_p_, 0));
 }
 
@@ -44,7 +44,7 @@ Spacing_engraver::do_removal_processing ()
 {
   Paper_column * p = get_staff_info ().command_pcol_l ();
 
-  spacing_p_->set_bounds (RIGHT, p);
+  spacing_p_->set_bound (RIGHT, p);
   typeset_element (spacing_p_);
   spacing_p_ =0;
 }
index a84f393a52d125d8fa36eb197415a489cb24baaa..4bed0bf75264e00da63edfe0fbd094aa1f2112c9 100644 (file)
@@ -47,7 +47,7 @@ void
 Staff_symbol_engraver::do_creation_processing()
 {
   span_p_ = new Staff_symbol;
-  span_p_->set_bounds(LEFT,get_staff_info().command_pcol_l ());
+  span_p_->set_bound(LEFT,get_staff_info().command_pcol_l ());
   announce_element (Score_element_info (span_p_, 0));
 }
 
@@ -62,7 +62,7 @@ Staff_symbol_engraver::do_removal_processing()
   if (gh_number_p (n))
     span_p_->set_elt_property ("line-count", n);
 
-  span_p_->set_bounds(RIGHT,get_staff_info().command_pcol_l ());
+  span_p_->set_bound(RIGHT,get_staff_info().command_pcol_l ());
   typeset_element (span_p_);
   span_p_ =0;
 }
index 21123e75d96de75f9bfe88e3bd1e97fc08f37a2a..4419d8dc126ea043d2a587eb71e1fd070f75c6bc 100644 (file)
@@ -19,12 +19,12 @@ Molecule
 Staff_symbol::do_brew_molecule() const
 {
   Score_element * common
-    = spanned_drul_[LEFT]->common_refpoint (spanned_drul_[RIGHT], X_AXIS);
+    = get_bound (LEFT)->common_refpoint (get_bound (RIGHT), X_AXIS);
   
   Real width =
     // right_shift     - left_shift
-    + spanned_drul_[RIGHT]->relative_coordinate (common , X_AXIS)
-    - spanned_drul_[LEFT]->relative_coordinate (common, X_AXIS)
+    + get_bound (RIGHT)->relative_coordinate (common , X_AXIS)
+    - get_bound (LEFT)->relative_coordinate (common, X_AXIS)
     ;
 
   Real t = paper_l ()->get_var ("stafflinethickness");
index 464e7e3df21defc27b8fb59409625949b857ad00..001d79f494e15be082a74fec17e7cae1688a54a2 100644 (file)
@@ -25,7 +25,7 @@ Vertical_align_engraver::do_creation_processing()
   valign_p_->set_axis (Y_AXIS);
   valign_p_->set_elt_property ("stacking-dir",  gh_int2scm (DOWN));
   
-  valign_p_->set_bounds(LEFT,get_staff_info().command_pcol_l ());
+  valign_p_->set_bound(LEFT,get_staff_info().command_pcol_l ());
   announce_element (Score_element_info (valign_p_ , 0));
 }
 
@@ -44,7 +44,7 @@ Vertical_align_engraver::do_removal_processing()
       valign_p_->threshold_interval_[SMALLER]  = gh_scm2double (dist);
     }
 
-  valign_p_->set_bounds(RIGHT,get_staff_info().command_pcol_l ());
+  valign_p_->set_bound(RIGHT,get_staff_info().command_pcol_l ());
   typeset_element (valign_p_);
   valign_p_ =0;
 }