lilypond-1.3.62
authorfred <fred>
Tue, 26 Mar 2002 23:23:18 +0000 (23:23 +0000)
committerfred <fred>
Tue, 26 Mar 2002 23:23:18 +0000 (23:23 +0000)
26 files changed:
flower/include/pointer.hh
lily/align-note-column-engraver.cc
lily/break-align-item.cc
lily/chord.cc
lily/clef-item.cc
lily/collision.cc
lily/dot-column.cc
lily/grace-align-item.cc
lily/include/break-align-item.hh
lily/include/clef-item.hh
lily/include/collision.hh
lily/include/dot-column.hh
lily/include/grace-align-item.hh
lily/include/note-column.hh
lily/include/rest-collision.hh
lily/include/rhythmic-head.hh
lily/include/script-column.hh
lily/include/span-bar.hh
lily/include/tie-column.hh
lily/note-column.cc
lily/rest-collision.cc
lily/rhythmic-head.cc
lily/script-column.cc
lily/span-bar-engraver.cc
lily/span-bar.cc
lily/tie-column.cc

index 726f3c7e34caedbbd8d37a82e4e85bba89cef49a..850ec183486e8f16bda41c6a433d7e44a46752dd 100644 (file)
@@ -10,6 +10,8 @@
 #ifndef POINTER_HH
 #define POINTER_HH
 
+#error
+
 /** P<T> is a handy template to use iso T*. It inits to 0, deletes on
   destruction, deep copies upon copying
 
index c034b0df9cd2411f1c97ab1d98fafe1d3bcdff2b..74d165a141f7fb6270a374f4c846c34e8663302a 100644 (file)
@@ -45,7 +45,7 @@ Align_note_column_engraver::Align_note_column_engraver()
 void
 Align_note_column_engraver::do_creation_processing ()
 {
-  align_item_p_ = new Grace_align_item (SCM_EOL);
+  align_item_p_ = new Grace_align_item (get_property ("basicGraceAlignItemProperties"));
   Side_position_interface (align_item_p_).set_axis (X_AXIS);
   Side_position_interface (align_item_p_).set_direction (LEFT);
   
index 6e5722ca1282658e9bf4bb6c39ae18758fd02c5a..bbea713e2bb8d1f711fad9d141242db4371b5c9a 100644 (file)
@@ -20,8 +20,9 @@
 #include "group-interface.hh"
 #include "align-interface.hh"
 
-void
-Break_align_item::before_line_breaking ()
+GLUE_SCORE_ELEMENT(Break_align_item,before_line_breaking);
+SCM
+Break_align_item::member_before_line_breaking ()
 {
   if (break_status_dir() == LEFT)
     {
@@ -48,7 +49,7 @@ Break_align_item::before_line_breaking ()
     }
   
   if (!elems.size ())
-    return;
+    return SCM_UNDEFINED;
 
   SCM symbol_list = SCM_EOL;
   Array<Real> dists;
@@ -168,7 +169,9 @@ Break_align_item::before_line_breaking ()
   column_l ()->set_elt_property ("stretch-distance",
                                 gh_cons (gh_double2scm (-dists[0]),
                                          gh_double2scm (stretch_distance)));
-                                
+
+
+  return SCM_UNDEFINED;
 }
 
 Break_align_item::Break_align_item (SCM s)
index 8fa7611e55d49aef2194a453789f8cc4d54ef736..2eb762b7786e075da698b1a4be1a1d3a127927f7 100644 (file)
@@ -49,7 +49,7 @@ to_chord (Musical_pitch tonic, Array<Musical_pitch>* add_arr_p, Array<Musical_pi
       int j = Chord::find_pitch_i (add_arr_p, (*add_arr_p)[i]);
       if ((j != -1) && (i != j))
         {
-           add_arr_p->get (i);
+         add_arr_p->get (i);
        } 
     }
 
@@ -400,7 +400,7 @@ Chord::find_tonic_i (Array<Musical_pitch> const* pitch_arr_p)
     find tonic
     
     first try: base of longest line of thirds
-   */
+  */
   int tonic_i = 0;
   int longest_i = 0;
   for (int i = 0; i < pitch_arr_p->size (); i++)
@@ -437,7 +437,7 @@ Chord::find_tonic_i (Array<Musical_pitch> const* pitch_arr_p)
       {
        int gap = (*pitch_arr_p)[i].notename_i_
          - (*pitch_arr_p)[(i - 1 + pitch_arr_p->size ()) 
-         % pitch_arr_p->size ()].notename_i_;
+                         % pitch_arr_p->size ()].notename_i_;
        while (gap < 0)
          gap += 7;
        gap %= 7;
index 64df471244c0e382e22044c2c403ef914670fd56..781522d697009792392ab1029d5e34dbcaa6d97a 100644 (file)
@@ -22,8 +22,9 @@ FIXME: should use symbol.
 
 FIXME: this should be schemified.
 */
-void
-Clef_item::before_line_breaking ()
+GLUE_SCORE_ELEMENT(Clef_item,before_line_breaking);
+SCM
+Clef_item::member_before_line_breaking ()
 {
   SCM style_sym =get_elt_property ("style");
   String style;
@@ -49,7 +50,7 @@ Clef_item::before_line_breaking ()
   else
     {
       suicide ();
-      return;
+      return SCM_UNDEFINED;
     }
 
   // ugh.
@@ -59,6 +60,8 @@ Clef_item::before_line_breaking ()
       set_elt_property ("molecule-callback", SCM_BOOL_T);
       set_extent_callback (0, X_AXIS);
     }
+
+  return SCM_UNDEFINED;
 }
 
 
index 52498e533a5d0195230756152dfeceb3d81b3a3b..4807e47b7adae1a4989262ea8cdfe7d30ad0d36c 100644 (file)
@@ -27,10 +27,12 @@ Collision::add_column (Note_column* ncol_l)
   add_dependency (ncol_l);
 }
 
-void
-Collision::before_line_breaking ()
+GLUE_SCORE_ELEMENT(Collision,before_line_breaking);
+SCM
+Collision::member_before_line_breaking ()
 {
   do_shifts();
+      return SCM_UNDEFINED;
 }
 
 /*
index 75b86cf65785a6b166e27ee89eb23204599ad78d..1caf93797849862849291611f95fec7c5be9508f 100644 (file)
@@ -74,14 +74,16 @@ Dot_column::Dot_column (SCM s)
 
    Should be smarter.
  */
-void
-Dot_column::after_line_breaking ()
+
+GLUE_SCORE_ELEMENT(Dot_column,after_line_breaking);
+SCM
+Dot_column::member_after_line_breaking ()
 {
   Link_array<Dots> dots = Pointer_group_interface__extract_elements (this, (Dots*)0 , "dots"); 
   dots.sort (Dot_column::compare);
   
   if (dots.size () < 2)
-    return;
+    return SCM_UNDEFINED;
   Slice s;
   s.set_empty ();
 
@@ -101,7 +103,8 @@ Dot_column::after_line_breaking ()
     }
 
   if (!conflicts)
-    return;
+  return SCM_UNDEFINED;
+
   
   int  middle = s.center ();
   /*
@@ -111,8 +114,10 @@ Dot_column::after_line_breaking ()
   if (!(pos % 2))
     pos ++;                    // center () rounds down.
 
-  for (int i=0; i  <dots.size (); pos += 2, i++)
+  for (int i=0; i dots.size (); pos += 2, i++)
     {
       staff_symbol_referencer (dots[i]).set_position(pos);
     }
+
+  return SCM_UNDEFINED;
 }
index 654f44139edaa4c3ed7c5235c88f11cd18775faa..e4467a9e3fe1bb0a6fe6d2af12f18fcdf9362cac 100644 (file)
@@ -24,8 +24,9 @@ Grace_align_item::Grace_align_item (SCM s)
 /*
   TODO: cfg-able
  */
-void
-Grace_align_item::before_line_breaking ()
+GLUE_SCORE_ELEMENT(Grace_align_item,before_line_breaking);
+SCM
+Grace_align_item::member_before_line_breaking ()
 {
   Real nhw = // lookup_l ()->notehead (2, "")..extent (X_AXIS).length();
     paper_l ()->get_var ("quartwidth");
@@ -34,6 +35,9 @@ Grace_align_item::before_line_breaking ()
                    gh_cons (gh_double2scm (nhw* 1.5),
                             gh_double2scm (infinity_f)));
   column_l ()->set_elt_property ("contains-grace", SCM_BOOL_T);
+
+  return SCM_UNDEFINED;
+
 }
 
 
index 6ba3cc1b7a8a4c90c10e63b24efb05039c7477f2..0a4a42b59749cffe94e3b152f12928b45191394b 100644 (file)
 
 class Break_align_item : public Item
 {
-protected:
-  virtual void before_line_breaking ();
 public:
+  SCM member_before_line_breaking ();
+  static SCM before_line_breaking (SCM);
+
   Break_align_item (SCM s);
   VIRTUAL_COPY_CONS(Score_element);
 };
index 75aad9b0d83ea5036d3721ec25a87fdb80b8d8ce..e14276ba6783cab7ab058c920c15e743012a53b6 100644 (file)
  */
 class Clef_item : public Item
 {
-protected:
-  virtual void before_line_breaking ();
 public:
+  SCM member_before_line_breaking ();
+  static SCM before_line_breaking (SCM);
+
   VIRTUAL_COPY_CONS(Score_element);
   Clef_item (SCM);
 };
index 4cb199385686502cff424b420d957762860d50f8..e1297545da24326e47ed29099e664ed146522557 100644 (file)
 */
 class Collision : public Item
 {
-protected:
+public:
   SCM automatic_shift ();
   SCM forced_shift ();
   void do_shifts ();  
-  virtual void before_line_breaking ();
-public:
+  SCM member_before_line_breaking ();
+  static SCM before_line_breaking (SCM);
+
     
   void add_column (Note_column*ncol_l);
   Collision(SCM);
index 9fd7150b82bc2abfcf9775f7a907b85791d029ab..c91d05d3d45089830abd5d1e88f7607b0af425cd 100644 (file)
@@ -25,7 +25,8 @@ public:
   void add_head (Rhythmic_head*);
   Dot_column (SCM);
 
-protected:
-  virtual void after_line_breaking ();
+
+  SCM member_after_line_breaking ();
+  static SCM after_line_breaking (SCM);
 };
 #endif // DOT_COLUMN_HH
index b4f9e94e99de3adebeff72287b445dbd30618061..301178afd3481e458d91274afd663c0876bedda2 100644 (file)
@@ -18,9 +18,10 @@ class Grace_align_item : public Item
 public:
   VIRTUAL_COPY_CONS (Score_element);
   Grace_align_item (SCM);
-protected:
+
   virtual void do_add_processing ();
-  virtual void before_line_breaking ();
+  SCM member_before_line_breaking ();
+  static SCM before_line_breaking (SCM);
 };
 #endif /* GRACE_ALIGN_ITEM_HH */
 
index 88c2c3601627add17fb4d1e24c5384407a9bddac..c8cf7959e9f2bdd5158a9dfc104e51f1cdaae944 100644 (file)
@@ -17,9 +17,9 @@
 */
 class Note_column : public Item
 {
-protected:
-  virtual void after_line_breaking () ;
 public:
+  SCM member_after_line_breaking ();
+  static SCM after_line_breaking (SCM);
   static int shift_compare (Note_column *const &, Note_column*const&);
   
   /** The relative position of the "voice" containing this
index d6f26fa718f32bc5ec803a784246b7512d7558bc..550ed5e0f45a844239b64c0bb44dee5f913cc2f0 100644 (file)
@@ -19,7 +19,8 @@ public:
   Interval rest_dim () const;
     
   Rest_collision(SCM);
-protected:
-  virtual void before_line_breaking ();
+
+  SCM member_before_line_breaking ();
+  static SCM before_line_breaking (SCM);
 };
 #endif // REST_COLLISION_HH
index b9fc4415b60c01a7051a956c80e1630650ab5d3c..8145bd911827b9611d598fb4d520ecc73007145f 100644 (file)
@@ -34,8 +34,9 @@ public:
   Stem * stem_l () const;
   Dots * dots_l () const;
   int dot_count () const;
-protected:
-  virtual void after_line_breaking ();
+
+  SCM member_after_line_breaking ();
+  static SCM after_line_breaking (SCM);
   Rhythmic_head (SCM s);
 };
 
index d79e25f3f8071bfb2391d76e4855e09400307283..9c580c50833b3699d43b068c5363e73a81e3022c 100644 (file)
@@ -17,8 +17,9 @@ class Script_column : public Item
 public:
   Script_column(SCM);
   void add_staff_sided (Item*);
-protected:
-  virtual void before_line_breaking ();
+
+  SCM member_before_line_breaking ();
+  static SCM before_line_breaking (SCM);
 };
 
 
index 17886676cdf2fb56bf0b5f55779fb2b8ee060f65..9ccb4d65b37e571d17cce28aee606001240e1f89 100644 (file)
@@ -29,14 +29,15 @@ public:
     
   VIRTUAL_COPY_CONS(Score_element);
   void add_bar (Score_element*);
-protected:
   void evaluate_empty ();
 
   static Interval width_callback(Score_element const*, Axis) ;
   
   virtual Real get_bar_size () const;
-  virtual void before_line_breaking ();
-  virtual void after_line_breaking ();
+  SCM member_before_line_breaking ();
+  static SCM before_line_breaking (SCM);
+  SCM member_after_line_breaking ();
+  static SCM after_line_breaking (SCM);
 };
 
 #endif // SPAN_BAR_HH
index 6dfe54d82b30e85c8f2af2d528d99da3027882de..d4ff9f41e7d41986c7f8dc4a4edefe7011301944 100644 (file)
@@ -19,8 +19,9 @@ public:
   VIRTUAL_COPY_CONS (Score_element);
   void add_tie (Tie*);
   Tie_column (SCM s);
-protected:
-  virtual void after_line_breaking ();
+
+  SCM member_after_line_breaking ();
+  static SCM after_line_breaking (SCM);
   void set_directions ();
 };
 
index 7c1dd5ae9cf481c0079d358102a42535ab487eec..db93c4370bd36a02172fef096482da15745cee8a 100644 (file)
@@ -149,15 +149,16 @@ Note_column::set_dotcol (Dot_column *d)
     rest -> stem -> beam -> interpolate_y_position ()
 */
 
-void
-Note_column::after_line_breaking ()
+GLUE_SCORE_ELEMENT(Note_column,after_line_breaking);
+SCM
+Note_column::member_after_line_breaking ()
 {
   if (!stem_l () || !rest_b ())
-    return;
+    return SCM_UNDEFINED;
 
   Beam * b = stem_l ()->beam_l ();
   if (!b || !b->visible_stem_count ())
-    return;
+    return SCM_UNDEFINED;
   
   /* ugh. Should be done by beam.
      (what? should be done --jcn)
@@ -204,6 +205,8 @@ Note_column::after_line_breaking ()
     discrete_dist = int (ceil (discrete_dist / 2.0)* 2.0);
 
   translate_rests (-d *  discrete_dist);
+
+  return SCM_UNDEFINED;
 }
 
 
index f5be97061c97cfda84d0da7690e0965a5fe141b3..f7474eccb33de0678df690d1ff6115eeb9f5ee9b 100644 (file)
@@ -60,8 +60,9 @@ col2rhythmic_head (Note_column* c)
   return dynamic_cast<Rhythmic_head*> (e);
 }
 
-void
-Rest_collision::before_line_breaking ()
+GLUE_SCORE_ELEMENT(Rest_collision,before_line_breaking);
+SCM
+Rest_collision::member_before_line_breaking ()
 {
   Link_array<Note_column> rest_l_arr =
     Pointer_group_interface__extract_elements (this, (Note_column*) 0, "rests");
@@ -80,11 +81,11 @@ Rest_collision::before_line_breaking ()
 
   // no rests to collide
   if (!rest_l_arr.size())
-    return;
+    return SCM_UNDEFINED;
 
   // no partners to collide with
   if (rest_l_arr.size() + ncol_l_arr.size () < 2)
-    return;
+    return SCM_UNDEFINED;
 
   // meisjes met meisjes
   if (!ncol_l_arr.size()) 
@@ -145,7 +146,7 @@ Rest_collision::before_line_breaking ()
 
       Interval restdim = rcol->rest_dim ();
       if (restdim.empty_b ())
-       return;
+       return SCM_UNDEFINED;
       
       // staff ref'd?
       Real staff_space = paper_l()->get_var ("interline");
@@ -188,6 +189,7 @@ Rest_collision::before_line_breaking ()
       
       rcol->translate_rests (dir * discrete_dist);
     }
+  return SCM_UNDEFINED;
 }
 
 
index 1b735cd5eed77d679ee4976ba0cb7d4e948e17ee..b6a83b6d438ca5a33b91d0ebaebff7874ba391f5 100644 (file)
@@ -47,8 +47,9 @@ Rhythmic_head::dot_count () const
     ? gh_scm2int (dots_l ()->get_elt_property ("dot-count")) : 0;
 }
   
-void
-Rhythmic_head::after_line_breaking ()
+GLUE_SCORE_ELEMENT(Rhythmic_head,after_line_breaking);
+SCM
+Rhythmic_head::member_after_line_breaking ()
 {
   if (Dots *d = dots_l ())
     {
@@ -56,6 +57,8 @@ Rhythmic_head::after_line_breaking ()
       Staff_symbol_referencer_interface me (d);      
       si.set_position(int (me.position_f ()));
     }
+
+  return SCM_UNDEFINED;
 }
 
 
index c4123815d435e7080fe78dbb32fb2d043920886e..cc8cfcacb0b5d0d22ce005a1e644ef83c96322ee 100644 (file)
@@ -41,8 +41,9 @@ staff_side_compare (Item * const &i1,
   return gh_scm2int (p1) - gh_scm2int (p2);
 }
 
-void
-Script_column::before_line_breaking ()
+GLUE_SCORE_ELEMENT(Script_column,before_line_breaking);
+SCM
+Script_column::member_before_line_breaking ()
 {
   Drul_array<Link_array<Item> > arrs;
   Link_array<Item> staff_sided 
@@ -75,5 +76,7 @@ Script_column::before_line_breaking ()
       }
     
   } while (flip (&d) != DOWN);
+
+  return SCM_UNDEFINED;
 }
 
index f2659b09230e6ad55c1202e5e994e141c27c44f5..17c713b453e5419ff37ba13e56e72270df4c3c88 100644 (file)
@@ -59,7 +59,11 @@ Span_bar_engraver::acknowledge_element (Score_element_info i)
 
       if (bar_l_arr_.size() >= 2 && !spanbar_p_) 
        {
-         spanbar_p_ = get_span_bar_p( bar_l_arr_[0]->property_alist_);
+         spanbar_p_ = get_span_bar_p (get_property ("basicSpanBarProperties"));
+         spanbar_p_->set_elt_property ("glyph", bar_l_arr_[0]->get_elt_property ("glyph"));
+         spanbar_p_->set_elt_property ("visibility-lambda",
+                                       bar_l_arr_[0]->get_elt_property ("visibility-lambda"));   
+                                       
          spanbar_p_->set_parent (bar_l_arr_[0], Y_AXIS);
          spanbar_p_->set_parent (bar_l_arr_[0], X_AXIS);
 
index 415f1cac8b33d4c93b4d2ef3a83049a3577e9f10..91ab2a0ab291a43a9a41da542c970af3e5a4f682 100644 (file)
@@ -39,16 +39,20 @@ Span_bar::width_callback (Score_element const *se, Axis )
   return m.extent (X_AXIS);
 }
 
-void
-Span_bar::before_line_breaking ()
+GLUE_SCORE_ELEMENT(Span_bar,before_line_breaking);
+SCM
+Span_bar::member_before_line_breaking ()
 {
-  Bar::before_line_breaking ();
+  Bar::member_before_line_breaking ();
   
   evaluate_empty ();
+
+  return SCM_UNDEFINED;
 }
 
-void
-Span_bar::after_line_breaking ()
+GLUE_SCORE_ELEMENT(Span_bar,after_line_breaking);
+SCM
+Span_bar::member_after_line_breaking ()
 {
   Interval i (get_spanned_interval ());
 
@@ -57,6 +61,7 @@ Span_bar::after_line_breaking ()
     we have to translate ourselves to be in the center of the 
     interval that we span.  */
   translate_axis (i.center (), Y_AXIS);
+  return SCM_UNDEFINED;
 }
 
 void
index 5ef23866d270f7c4712c79d523f593cf51c07a41..08e242bb6180db35b2852b196d56b6e9b07fe608 100644 (file)
@@ -85,14 +85,15 @@ Tie_column::set_directions ()
       Direction d = (Direction) sign (p);
       if (!d)
        d = UP;
-
       directional_element (s[i]).set (d);
     }
   
 }
 
-void
-Tie_column::after_line_breaking ()
+GLUE_SCORE_ELEMENT(Tie_column,after_line_breaking);
+SCM
+Tie_column::member_after_line_breaking ()
 {
   set_directions ();
+  return SCM_UNDEFINED;
 }