]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.3.62
authorfred <fred>
Tue, 26 Mar 2002 23:23:19 +0000 (23:23 +0000)
committerfred <fred>
Tue, 26 Mar 2002 23:23:19 +0000 (23:23 +0000)
33 files changed:
lily/bar.cc
lily/beam.cc
lily/breathing-sign.cc
lily/chord-name.cc
lily/crescendo.cc
lily/dots.cc
lily/hyphen-spanner.cc
lily/include/bar.hh
lily/include/beam.hh
lily/include/breathing-sign.hh
lily/include/chord-name.hh
lily/include/crescendo.hh
lily/include/dots.hh
lily/include/extender-spanner.hh
lily/key-item.cc
lily/local-key-item.cc
lily/lyric-extender.cc
lily/multi-measure-rest.cc
lily/note-head.cc
lily/rest.cc
lily/score-element.cc
lily/script.cc
lily/slur.cc
lily/staff-symbol.cc
lily/stem-tremolo.cc
lily/stem.cc
lily/sustain-pedal.cc
lily/system-start-delimiter.cc
lily/text-item.cc
lily/tie.cc
lily/time-signature.cc
lily/tuplet-spanner.cc
lily/volta-spanner.cc

index ea076435857e0096f56c8d37a1d758ac1c249185..8b9ecadc6069c728991e3d419cc7005caf880a2b 100644 (file)
@@ -33,7 +33,7 @@ Bar::get_bar_size () const
 
 
 SCM 
-Bar::scheme_molecule (SCM smob) 
+Bar::brew_molecule (SCM smob) 
 {
   Score_element * self = unsmob_element (smob);
   Bar * fly = dynamic_cast<Bar*> (self);
@@ -46,7 +46,7 @@ Bar::scheme_molecule (SCM smob)
   return SCM_EOL;
 }
 
-MAKE_SCHEME_SCORE_ELEMENT_NON_DEFAULT_CALLBACKS(Bar);
+MAKE_SCHEME_SCORE_ELEMENT_CALLBACK(Bar,brew_molecule);
 
 Molecule
 Bar::compound_barline (String str, Real h) const
@@ -132,8 +132,9 @@ Bar::simple_barline (Real w, Real h) const
 }
 
 
-void
-Bar::before_line_breaking ()
+GLUE_SCORE_ELEMENT(Bar,before_line_breaking );
+SCM
+Bar::member_before_line_breaking  ()
 {
   SCM g = get_elt_property ("glyph");
   SCM orig = g;
@@ -162,6 +163,9 @@ Bar::before_line_breaking ()
     }
   else if (! gh_equal_p  (g, orig))
     set_elt_property ("glyph", g);
+
+
+  return SCM_UNDEFINED;
 }
   
 
index e131cbc17c176f47794847a9f7f1af67b28e4dd4..08173a742f8b9d194b0a1659810ddcd26bed85d4 100644 (file)
@@ -81,8 +81,9 @@ Beam::get_multiplicity () const
   [Alternatively, stems could set its own directions, according to
    their beam, during 'final-pre-processing'.]
  */
-void
-Beam::before_line_breaking ()
+GLUE_SCORE_ELEMENT(Beam,before_line_breaking);
+SCM
+Beam::member_before_line_breaking ()
 {
   // Why?
   if (visible_stem_count () < 2)
@@ -96,7 +97,9 @@ Beam::before_line_breaking ()
 
   auto_knees ();
   set_stem_directions ();
-  set_stem_shorten (); 
+  set_stem_shorten ();
+
+  return SCM_EOL;
 }
 
 /*
@@ -267,8 +270,9 @@ Beam::set_stem_shorten ()
   Set elt properties height and y-position if not set.
   Adjust stem lengths to reach beam.
  */
-void
-Beam::after_line_breaking ()
+GLUE_SCORE_ELEMENT(Beam,after_line_breaking);
+SCM
+Beam::member_after_line_breaking ()
 {
   /* first, calculate y, dy */
   Real y, dy;
@@ -333,7 +337,10 @@ Beam::after_line_breaking ()
   // UGH. Y is not in staff position unit?
   // Ik dacht datwe daar juist van weg wilden?
   set_stem_length (y, dy);
-  set_elt_property ("y-position", gh_double2scm (y)); 
+  set_elt_property ("y-position", gh_double2scm (y));
+
+
+  return SCM_UNDEFINED;
 }
 
 /*
@@ -719,14 +726,13 @@ Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const
   return leftbeams;
 }
 
-MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS (Beam);
-
-Molecule 
-Beam::do_brew_molecule () const
+GLUE_SCORE_ELEMENT(Beam,brew_molecule);
+SCM
+Beam::member_brew_molecule () const
 {
   Molecule mol;
   if (!stem_count ())
-    return mol;
+    return SCM_EOL;
   Real x0,dx;
   if (visible_stem_count ())
     {
@@ -757,7 +763,7 @@ Beam::do_brew_molecule () const
   mol.translate_axis (x0 
     - get_bound (LEFT)->relative_coordinate (0, X_AXIS), X_AXIS);
 
-  return mol;
+  return mol.create_scheme ();
 }
 
 int
index a78e6106450d7bb521548a410d086b4667d42358..6c337642d1fa21efbb0ff64c57735a3e0f80265a 100644 (file)
@@ -28,10 +28,10 @@ Breathing_sign::Breathing_sign (SCM  s)
 
 
 
-MAKE_SCHEME_SCORE_ELEMENT_NON_DEFAULT_CALLBACKS(Breathing_sign);
+MAKE_SCHEME_SCORE_ELEMENT_CALLBACK(Breathing_sign,brew_molecule);
 
 SCM 
-Breathing_sign::scheme_molecule (SCM smob)
+Breathing_sign::brew_molecule (SCM smob)
 {
   Score_element * sc = unsmob_element (smob);
   Staff_symbol_referencer_interface si (sc);
@@ -45,8 +45,9 @@ Breathing_sign::scheme_molecule (SCM smob)
   return sc->lookup_l()->filledbox(b).create_scheme ();
 }
 
-void
-Breathing_sign::after_line_breaking ()
+GLUE_SCORE_ELEMENT(Breathing_sign,after_line_breaking);
+SCM
+Breathing_sign::member_after_line_breaking ()
 {
   Real space = staff_symbol_referencer (this).staff_space();
   Direction d = directional_element (this). get ();
@@ -57,5 +58,7 @@ Breathing_sign::after_line_breaking ()
     }
 
   translate_axis(2.0 * space * d, Y_AXIS);
+
+  return SCM_UNDEFINED;
 }
 
index b2ed2442674dcb42b82a8ed34c22b8e6a6caab0e..0d4ff138499a7b2fe91603e5b84df0bfaa033951 100644 (file)
@@ -128,10 +128,10 @@ Chord_name::ly_text2molecule (SCM text) const
   return mol;
 }
 
-MAKE_SCHEME_SCORE_ELEMENT_NON_DEFAULT_CALLBACKS(Chord_name);
+MAKE_SCHEME_SCORE_ELEMENT_CALLBACK(Chord_name,brew_molecule);
 
 SCM
-Chord_name::scheme_molecule (SCM smob) 
+Chord_name::brew_molecule (SCM smob) 
 {
   Score_element *sc = unsmob_element (smob);
   SCM style = sc->get_elt_property ("style");
index d119ca9a04cf818ae9e70b370e11c56517aafd5a..7890d5cf0057c631b37ed5e8eaaa951be0650064 100644 (file)
@@ -24,9 +24,10 @@ Crescendo::Crescendo (SCM s)
 
 
 
-MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Crescendo)
-Molecule 
-Crescendo::do_brew_molecule () const
+GLUE_SCORE_ELEMENT(Crescendo,brew_molecule);
+
+SCM
+Crescendo::member_brew_molecule () const
 {
   Real absdyn_dim = paper_l ()-> get_var ("crescendo_shorten");
   Real extra_left =  get_broken_left_end_align ();
@@ -38,9 +39,7 @@ Crescendo::do_brew_molecule () const
     {
       Crescendo * me = (Crescendo*)this;
       me->suicide ();
-      Molecule m;
-      
-      return m;
+      return SCM_EOL;
     }
   
   Direction gd = to_dir (dir);
@@ -133,7 +132,7 @@ Crescendo::do_brew_molecule () const
   m.add_at_edge (X_AXIS, RIGHT, span, pad);
   m.translate_axis (extra_left, X_AXIS);
 
-  return m;
+  return m.create_scheme ();
 }
 
 
index c77175e0ad968b9a22c52e9c9a9f3fcdf3f66d4f..9dc8c8b75b97067de064041ef749d43c07caa2d3 100644 (file)
@@ -18,8 +18,9 @@ Dots::Dots (SCM s)
 {
 }
 
-void
-Dots::after_line_breaking ()
+GLUE_SCORE_ELEMENT(Dots,after_line_breaking);
+SCM
+Dots::member_after_line_breaking ()
 {
   SCM d= get_elt_property ("dot-count");
   if (gh_number_p (d) && gh_scm2int (d))
@@ -32,12 +33,15 @@ Dots::after_line_breaking ()
       if (!(p % 2))
        si.set_position (p  + directional_element (this).get ());
     }
+
+    return SCM_UNDEFINED;
+
 }
 
-MAKE_SCHEME_SCORE_ELEMENT_NON_DEFAULT_CALLBACKS(Dots);
+MAKE_SCHEME_SCORE_ELEMENT_CALLBACK(Dots,brew_molecule);
 
 SCM  
-Dots::scheme_molecule (SCM d)
+Dots::brew_molecule (SCM d)
 {
   Score_element *sc = unsmob_element (d);
   Molecule mol (sc->lookup_l ()->blank (Box (Interval (0,0),
index 165c6c6b11b67220af834004f50ed99608c7e1d9..624f682be20234a3c1085a7c60e04e85ae908856 100644 (file)
 #include "spanner.hh"
 #include "item.hh"
 
-MAKE_SCHEME_SCORE_ELEMENT_NON_DEFAULT_CALLBACKS(Hyphen_spanner)
+MAKE_SCHEME_SCORE_ELEMENT_CALLBACK(Hyphen_spanner,brew_molecule)
 
 SCM 
-Hyphen_spanner::scheme_molecule (SCM smob)
+Hyphen_spanner::brew_molecule (SCM smob)
 {
   Spanner * sp  =dynamic_cast<Spanner*> (unsmob_element (smob));
   Molecule  mol;
index 8d408c04b9313e6aac495d77c82ad15f93ff7cf4..92c03f20d87315213a08479af22c0ae6ddb230d5 100644 (file)
@@ -18,11 +18,12 @@ public:
 
   Molecule compound_barline (String, Real height) const;
   Molecule simple_barline (Real wid, Real height) const;      
-  static SCM scheme_molecule (SCM);
+  static SCM brew_molecule (SCM);
   
 
-protected:
-  virtual void before_line_breaking ();
+public:
+  SCM member_before_line_breaking ();
+  static SCM before_line_breaking (SCM);
 
   virtual Real get_bar_size () const;
 };
index 9021a08ab05374486082dde59ea481e77e797bd9..d14801e370a24fc9c0fdcc6266761e40c74ea014 100644 (file)
@@ -26,7 +26,7 @@
 class Beam : public Spanner
 {
 public:
-  static SCM scheme_molecule (SCM);
+  static SCM brew_molecule (SCM);
   
 
   int stem_count () const;
@@ -45,11 +45,13 @@ public:
 
   int get_multiplicity () const;
 
-protected:
+public:
  
-  virtual void before_line_breaking ();
-  virtual void after_line_breaking ();
-  Molecule do_brew_molecule () const;
+  SCM member_before_line_breaking ();
+  static SCM before_line_breaking (SCM);
+  SCM member_after_line_breaking ();
+  static SCM after_line_breaking (SCM);
+  SCM member_brew_molecule () const;
 
   Molecule stem_beams (Stem *here, Stem *next, Stem *prev) const;
 private:
index 6ecf02e263908594fe8dc83e4c9bf914994b9bcf..dd495b1db866198b6b1ebb6d31033dce867b3b84 100644 (file)
 class Breathing_sign : public Item
 {
 public:
-  static SCM scheme_molecule (SCM);
+  static SCM brew_molecule (SCM);
   
   VIRTUAL_COPY_CONS(Score_element);
   Breathing_sign (SCM s);
-protected:
-  virtual void after_line_breaking ();
-  Molecule do_brew_molecule () const;
+public:
+  SCM member_after_line_breaking ();
+  static SCM after_line_breaking (SCM);
+  SCM member_brew_molecule () const;
 };
 
 #endif // BREATHING_SIGN_HH
index d89e81c2e3e543745ae9dd0c72c517b07efe3892..fae9d217b0a8c67cb07e7b37b7b3779e3ca56f14 100644 (file)
 class Chord_name : public Item
 {
 public:
-   static SCM scheme_molecule (SCM);
+  static SCM brew_molecule (SCM);
   
-VIRTUAL_COPY_CONS (Score_element);
+  VIRTUAL_COPY_CONS (Score_element);
   Molecule ly_word2molecule (SCM scm, Real* x) const;
   Molecule ly_text2molecule (SCM scm) const;
   Chord_name(SCM s);
-protected:
-  Molecule do_brew_molecule () const;
+public:
+  SCM member_brew_molecule () const;
 
 };
 
index a9d45763207e63a8879ba50cce90a27bed7122d7..e45ef61ffdb6b3914e92339e2c8910aeeef93d71 100644 (file)
  */
 class Crescendo : public Spanner {
 public:
-   static SCM scheme_molecule (SCM);
+   static SCM brew_molecule (SCM);
   
-Crescendo(SCM);
-protected:
+  Crescendo(SCM);
+
   VIRTUAL_COPY_CONS(Score_element);
-  Molecule do_brew_molecule() const;
+  SCM member_brew_molecule() const;
     
 private:
   Molecule get_symbol() const;
index ace3555c6c4195efc227638f145f30a50512fda7..f816cc2a247d49f649c950623f9ddb39a30cdabf 100644 (file)
   */
 class Dots :  public Item
 {
-protected:
-  Molecule do_brew_molecule () const;
-  virtual void after_line_breaking ();
 public:
-   static SCM scheme_molecule (SCM);
-  
+  SCM member_brew_molecule () const;
+  SCM member_after_line_breaking ();
+  static SCM after_line_breaking (SCM);
+  static SCM brew_molecule (SCM);
 
   Dots (SCM);
 };
index 0fe3b35b66276d242ba285b816aa985cbede090b..5d7e4c4af93115f68463e4d58fc4e3d6862a1b7e 100644 (file)
@@ -33,7 +33,7 @@ public:
   Spanner*elt_l_;
   Lyric_extender (Spanner*);
   void set_textitem (Direction, Item*);
-  static SCM scheme_molecule (SCM);
+  static SCM brew_molecule (SCM);
 };
 
 #endif // EXTENDER_SPANNER_HH
index 46ad565f5044ef075a3e8623470e1f0e835f1fde..77a9e104188d80a4a0fe205d451429205e527693 100644 (file)
@@ -74,14 +74,13 @@ Key_item::calculate_position(SCM pair) const
   }
 }
 
-MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Key_item)
-
 /*
   TODO
   - space the `natural' signs wider
  */
-Molecule 
-Key_item::do_brew_molecule () const
+GLUE_SCORE_ELEMENT(Key_item,brew_molecule);
+SCM
+Key_item::member_brew_molecule () const
 {
   Molecule mol;
 
@@ -134,12 +133,9 @@ Key_item::do_brew_molecule () const
               mol.add_at_edge (X_AXIS, LEFT, m,0);     
             }
         }
-
-
     }
 
-  return mol;
+  return mol.create_scheme();
 }
 
 
index 4b77e00fd3e3fa82bf6778d8f52e01692dde5839..0c1ec92137f530c59e871a16897203a891785fc0 100644 (file)
@@ -14,7 +14,6 @@
 #include "note-head.hh"
 #include "misc.hh"
 
-
 void
 Local_key_item::add_pitch (Musical_pitch p, bool cautionary, bool natural)
 {
@@ -30,12 +29,13 @@ Local_key_item::add_pitch (Musical_pitch p, bool cautionary, bool natural)
   accidental_arr_.push (t);
 }
 
+GLUE_SCORE_ELEMENT(Local_key_item,before_line_breaking);
 
-
-void
-Local_key_item::before_line_breaking ()
+SCM
+Local_key_item::member_before_line_breaking ()
 {
   accidental_arr_.sort (Local_key_cautionary_tuple::compare);
+  return SCM_UNDEFINED;
 }
 
 Molecule
@@ -61,9 +61,10 @@ Local_key_item::accidental (int j, bool cautionary, bool natural) const
 /*
   UGH. clean me up
  */
-MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Local_key_item)
-Molecule 
-Local_key_item::do_brew_molecule () const
+
+GLUE_SCORE_ELEMENT(Local_key_item,brew_molecule);
+SCM
+Local_key_item::member_brew_molecule () const
 {
   Molecule mol;
   Staff_symbol_referencer_interface si (this);
@@ -134,7 +135,7 @@ Local_key_item::do_brew_molecule () const
       } while ( flip (&d)!= LEFT);
     }
 
-  return mol;
+  return mol.create_scheme();
 }
 
 Local_key_item::Local_key_item (SCM s)
index e20d7d1ea956c69d745591d48af29e0ff5c4d368..89f3eddf05ddf9891d88b4e4ee019a61a5c1fca9 100644 (file)
@@ -16,9 +16,9 @@
 #include "extender-spanner.hh"
 
 
-MAKE_SCHEME_SCORE_ELEMENT_NON_DEFAULT_CALLBACKS(Lyric_extender)
+MAKE_SCHEME_SCORE_ELEMENT_CALLBACK(Lyric_extender,brew_molecule)
 SCM 
-Lyric_extender::scheme_molecule (SCM smob) 
+Lyric_extender::brew_molecule (SCM smob) 
 {
   Spanner *sp = dynamic_cast<Spanner*> (unsmob_element (smob));
   
index eb12c9f9b21bc89b03ab0c1112f02c9c46fb8a65..bf8a009f4552bc2af8852edbc6b1fb06d26312db 100644 (file)
@@ -31,9 +31,11 @@ Multi_measure_rest::Multi_measure_rest (SCM s)
    [TODO]                                      17
  * variable-sized multi-measure rest symbol: |====| ??
 */
-MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Multi_measure_rest)
-Molecule 
-Multi_measure_rest::do_brew_molecule () const
+
+GLUE_SCORE_ELEMENT(Multi_measure_rest,brew_molecule);
+
+SCM
+Multi_measure_rest::member_brew_molecule () const
 {
   Real staff_space
     = staff_symbol_referencer (this).staff_space ();
@@ -131,7 +133,7 @@ Multi_measure_rest::do_brew_molecule () const
       mol.add_molecule (s);
     }
   mol.translate_axis (x_off, X_AXIS);
-  return mol;
+  return mol.create_scheme();
 }
 
 /*
@@ -152,14 +154,16 @@ Multi_measure_rest::do_add_processing ()
   // set columns to SCM_EOL?
 }
   
-void
-Multi_measure_rest::after_line_breaking ()
+GLUE_SCORE_ELEMENT(Multi_measure_rest,after_line_breaking);
+SCM
+Multi_measure_rest::member_after_line_breaking ()
 {
   if (!gh_pair_p (get_elt_pointer ("columns")))
     {
       suicide ();
     }
-     
+
+  return SCM_UNDEFINED;
 }
 
 
index 4f8934ab376d463608241169ba969e9adaee7650..4452ce905a9e5fad0e42da131457154410f86bb3 100644 (file)
@@ -52,8 +52,9 @@ Note_head::ledger_line (Interval xwid) const
 }
 
 
-void
-Note_head::before_line_breaking ()
+GLUE_SCORE_ELEMENT(Note_head,before_line_breaking);
+SCM
+Note_head::member_before_line_breaking ()
 {
   // 8 ball looks the same as 4 ball:
   
@@ -67,14 +68,16 @@ Note_head::before_line_breaking ()
       
       si.set_position(int (me.position_f ()));
     }
+
+  return SCM_UNDEFINED;
 }
 
 
 
-MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Note_head);
+GLUE_SCORE_ELEMENT(Note_head,brew_molecule);
 
-Molecule 
-Note_head::do_brew_molecule() const 
+SCM
+Note_head::member_brew_molecule () const 
 {
   Staff_symbol_referencer_interface si (this);
   
@@ -117,7 +120,7 @@ Note_head::do_brew_molecule() const
          out.add_molecule (s);
        }
     }
-  return out;
+  return out.create_scheme();
 }
 
 
index 24bc4d084773f248b91bed8d829db87145badd26..9d9385f567e878fcc70980d604e9cda897886f09 100644 (file)
@@ -15,8 +15,9 @@
 #include "staff-symbol-referencer.hh"
 
 // -> offset callback
-void
-Rest::after_line_breaking ()
+GLUE_SCORE_ELEMENT(Rest,after_line_breaking);
+SCM
+Rest::member_after_line_breaking ()
 {
   if (balltype_i () == 0)
     {
@@ -33,13 +34,15 @@ Rest::after_line_breaking ()
       staff_symbol_referencer (d)
        .set_position ((balltype_i () == 7) ? 4 : 3);
     }
+
+  return SCM_UNDEFINED;
 }
 
 
-MAKE_SCHEME_SCORE_ELEMENT_NON_DEFAULT_CALLBACKS(Rest)
+MAKE_SCHEME_SCORE_ELEMENT_CALLBACK(Rest,brew_molecule)
 
 SCM 
-Rest::scheme_molecule (SCM smob) 
+Rest::brew_molecule (SCM smob) 
 {
   Score_element* sc = unsmob_element (smob);
   
index a0a13eb5afa1532809d992cea194c95c4d35125b..0761c5e51ec93857e7906091c4f9623fa011181d 100644 (file)
@@ -199,8 +199,7 @@ Score_element::add_processing()
 }
 
 void
-Score_element::calculate_dependencies (int final, int busy,
-                                      Score_element_method_pointer funcptr)
+Score_element::calculate_dependencies (int final, int busy, SCM funcname)
 {
   assert (status_i_ >=0);
 
@@ -218,11 +217,17 @@ Score_element::calculate_dependencies (int final, int busy,
   for (SCM d=  get_elt_pointer ("dependencies"); gh_pair_p (d); d = gh_cdr (d))
     {
       unsmob_element (gh_car (d))
-       ->calculate_dependencies (final, busy, funcptr);
+       ->calculate_dependencies (final, busy, funcname);
     }
 
-  (this->*funcptr)();
+  // ughugh.
+  String s = ly_symbol2string (funcname);
+  SCM proc = get_elt_property (s.ch_C());
+  if (gh_procedure_p (proc))
+    gh_call1 (proc, this->self_scm_);
+  
   status_i_= final;
+
 }
 
 Molecule
@@ -246,17 +251,6 @@ Score_element::do_break_processing()
 {
 }
 
-void
-Score_element::after_line_breaking ()
-{
-}
-
-
-void
-Score_element::before_line_breaking ()
-{
-}
-
 void
 Score_element::do_space_processing ()
 {
@@ -268,13 +262,13 @@ Score_element::do_add_processing()
 }
 
 
-MAKE_SCHEME_SCORE_ELEMENT_NON_DEFAULT_CALLBACKS(Score_element)
+MAKE_SCHEME_SCORE_ELEMENT_CALLBACK(Score_element,brew_molecule)
 
 /*
   ugh.
  */  
 SCM
-Score_element::scheme_molecule (SCM smob) 
+Score_element::brew_molecule (SCM smob) 
 {
   Score_element * sc = unsmob_element (smob);
   SCM glyph = sc->get_elt_property ("glyph");
index 6c51f6ac5e33ee339d7241847dec25fddc2402f1..326667e7b44cc99a6d380d756d3bc11bc1922e8b 100644 (file)
@@ -42,34 +42,42 @@ Script::get_molecule(Direction d) const
 }
 
 
-void
-Script::before_line_breaking ()
+GLUE_SCORE_ELEMENT(Script,before_line_breaking);
+SCM
+Script::member_before_line_breaking ()
 {
   /*
     center my self on the note head.
    */
   Score_element * e = parent_l(X_AXIS);
   translate_axis (e->extent (X_AXIS).center (), X_AXIS);
+
+  return SCM_UNDEFINED;
 }
 
-void
-Script::after_line_breaking ()
+GLUE_SCORE_ELEMENT(Script,after_line_breaking);
+SCM
+Script::member_after_line_breaking ()
 {
   Side_position_interface i (this);
   Direction d =  i.get_direction ();
   i.set_direction (d);
+
+  return SCM_UNDEFINED;
 }
 
-MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Script)
-Molecule 
-Script::do_brew_molecule () const
+
+GLUE_SCORE_ELEMENT(Script,brew_molecule);
+
+SCM
+Script::member_brew_molecule () const
 {
   Direction dir = DOWN;
   SCM d = get_elt_property ("direction");
   if (isdir_b (d))
     dir = to_dir (d);
   
-  return get_molecule (dir);
+  return get_molecule (dir).create_scheme();
 }
 
 
index 118bae506c2f3998a1457942e1906a752a89fe0c..fd59628e5703066ceb55b88b747b067e9c95ad86 100644 (file)
@@ -341,11 +341,14 @@ Slur::encompass_offset (Note_column const* col) const
   return o;
 }
 
-void
-Slur::after_line_breaking ()
+GLUE_SCORE_ELEMENT(Slur,after_line_breaking);
+
+SCM
+Slur::member_after_line_breaking ()
 {
   set_extremities ();
   set_control_points ();
+  return SCM_UNDEFINED;
 } 
 
 /*
@@ -602,14 +605,12 @@ Slur::get_rods () const
 }
 
 
-
-MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Slur);
-
 /*
   Ugh should have dash-length + dash-period
  */
-Molecule
-Slur::do_brew_molecule () const
+GLUE_SCORE_ELEMENT(Slur,brew_molecule);
+SCM
+Slur::member_brew_molecule () const
 {
   Real thick = paper_l ()->get_var ("slur_thickness");
   Bezier one = get_curve ();
@@ -621,7 +622,7 @@ Slur::do_brew_molecule () const
   else
     a = lookup_l ()->slur (one, directional_element (this).get () * thick, thick);
 
-  return a;
+  return a.create_scheme();
 }
 
 void
index b791b707fd91feb4310321e66b4202e93f6a183c..ae2167d98861ea3fc07ea8196aa61ed2d5d229f3 100644 (file)
 
 
 
-MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Staff_symbol)
-Molecule 
-Staff_symbol::do_brew_molecule () const
+
+GLUE_SCORE_ELEMENT(Staff_symbol,brew_molecule);
+
+SCM
+Staff_symbol::member_brew_molecule () const
 {
   Score_element * common
     = get_bound (LEFT)->common_refpoint (get_bound (RIGHT), X_AXIS);
@@ -43,7 +45,7 @@ Staff_symbol::do_brew_molecule () const
       m.add_molecule (a);
     }
 
-  return m;
+  return m.create_scheme();
 }
 
 int
index ee39f337ad9d4200f86ecc67a1d558abcc461fde..a209a04a633e9d0e44ada2c213e802c58139faf1 100644 (file)
@@ -48,9 +48,10 @@ Stem_tremolo::dim_callback (Score_element * se, Axis )
 }
 
 
-MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Stem_tremolo)
-Molecule 
-Stem_tremolo::do_brew_molecule () const
+
+GLUE_SCORE_ELEMENT(Stem_tremolo,brew_molecule);
+SCM
+Stem_tremolo::member_brew_molecule () const
 {
   Stem * stem = stem_l ();
   Beam * beam = stem->beam_l ();
@@ -128,7 +129,7 @@ Stem_tremolo::do_brew_molecule () const
                             whole_note_correction, dy));
     }
   
-  return mol;
+  return mol.create_scheme();
 }
 
 
index 1ca3d9b3ebcb4acac4b707b117d4424e8ac89ffa..e1b53608c82bf03420f1756dc4bc643e4319a36c 100644 (file)
@@ -377,8 +377,9 @@ Stem::position_noteheads ()
     }
 }
 
-void
-Stem::before_line_breaking ()
+GLUE_SCORE_ELEMENT(Stem,before_line_breaking);
+SCM
+Stem::member_before_line_breaking ()
 {
   stem_end_position ();        // ugh. Trigger direction calc.
   position_noteheads ();
@@ -390,6 +391,7 @@ Stem::before_line_breaking ()
     }
   
   set_spacing_hints ();
+  return SCM_UNDEFINED;
 }
 
 
@@ -455,9 +457,11 @@ Stem::dim_callback (Score_element const *se, Axis )
 
 const Real ANGLE = 20* (2.0*M_PI/360.0); // ugh! Should be settable.
 
-MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Stem)
-Molecule 
-Stem::do_brew_molecule () const
+
+GLUE_SCORE_ELEMENT(Stem,brew_molecule);
+
+SCM
+Stem::member_brew_molecule () const
 {
   Molecule mol;
 
@@ -490,7 +494,7 @@ Stem::do_brew_molecule () const
       mol.add_molecule (fl);
     }
 
-  return mol;
+  return mol.create_scheme();
 }
 
 Real
index 1906eb29ac6199257786b91cee2978439553e652..77a3727ecfc6cb7ece257d2740a259ae0049c6f2 100644 (file)
 
   Properties:
 
-  glyph -- text string (TODO:   make one large glyph of the Ped symbol, removes need for do_brew_molecule ())
+  glyph -- text string (TODO:   make one large glyph of the Ped symbol, removes need for member_brew_molecule ())
 
 */
 
 struct Sustain_pedal
 {
 public:
-   static SCM scheme_molecule (SCM);
+   static SCM brew_molecule (SCM);
 };
 
 
-MAKE_SCHEME_SCORE_ELEMENT_NON_DEFAULT_CALLBACKS(Sustain_pedal);
+MAKE_SCHEME_SCORE_ELEMENT_CALLBACK(Sustain_pedal,brew_molecule);
 
 SCM
-Sustain_pedal::scheme_molecule (SCM smob) 
+Sustain_pedal::brew_molecule (SCM smob) 
 {
   Score_element * e = unsmob_element (smob);
   
index 884f44e3139efe855669d64086a1d98607cc00fc..5be06b334ee7315995f45859eade2c84ffcaa918 100644 (file)
@@ -55,8 +55,9 @@ System_start_delimiter::simple_bar (Real h) const
   return lookup_l ()->filledbox (Box (Interval(0,w), Interval(-h/2, h/2)));
 }
 
-void
-System_start_delimiter::after_line_breaking ()
+GLUE_SCORE_ELEMENT(System_start_delimiter,after_line_breaking);
+SCM
+System_start_delimiter::member_after_line_breaking ()
 {
   SCM   gl = get_elt_property ("glyph");
   
@@ -64,12 +65,13 @@ System_start_delimiter::after_line_breaking ()
     {
       suicide ();
     }
+  return SCM_UNDEFINED;
 }
 
-MAKE_SCHEME_SCORE_ELEMENT_NON_DEFAULT_CALLBACKS(System_start_delimiter);
+MAKE_SCHEME_SCORE_ELEMENT_CALLBACK(System_start_delimiter,brew_molecule);
 
 SCM
-System_start_delimiter::scheme_molecule (SCM smob)
+System_start_delimiter::brew_molecule (SCM smob)
 {
   Score_element * sc = unsmob_element (smob);
 
index ae3ea80b402c916e98cd0454450627f08533a833..777706f0bff1e0f9ae84995471be70aa3cd8d699 100644 (file)
 
 struct Text_item
 {
-  static SCM scheme_molecule (SCM);
+  static SCM brew_molecule (SCM);
 };
 
 
-MAKE_SCHEME_SCORE_ELEMENT_NON_DEFAULT_CALLBACKS(Text_item)
+MAKE_SCHEME_SCORE_ELEMENT_CALLBACK(Text_item,brew_molecule)
 
 SCM 
-Text_item::scheme_molecule (SCM sm) 
+Text_item::brew_molecule (SCM sm) 
 {
   Score_element * s = unsmob_element (sm);
   
index 90debb307901e5d70d1c30b79aa4c230155b5b9e..ed3d2be69b4e4cc189473831caa193496502680c 100644 (file)
@@ -92,14 +92,15 @@ Tie::do_add_processing()
   index_set_cell (get_elt_pointer ("heads"), RIGHT, new_head_drul[RIGHT]->self_scm_ );
 }
 
-void
-Tie::after_line_breaking ()
+GLUE_SCORE_ELEMENT(Tie,after_line_breaking);
+SCM
+Tie::member_after_line_breaking ()
 {
   if (!head (LEFT) && !head (RIGHT))
     {
       programming_error ("Tie without heads.");
       suicide ();
-      return;
+      return SCM_UNDEFINED;
     }
 
   if (!directional_element (this).get ())
@@ -169,6 +170,8 @@ Tie::after_line_breaking ()
     }
   
   dy_f_drul_[LEFT] = dy_f_drul_[RIGHT] = y_f;
+
+  return SCM_UNDEFINED;
 }
 
 
@@ -187,12 +190,10 @@ Tie::get_rods () const
   return a;
 }
 
+GLUE_SCORE_ELEMENT(Tie,brew_molecule);
 
-
-
-MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Tie)
-Molecule 
-Tie::do_brew_molecule () const
+SCM
+Tie::member_brew_molecule () const
 {
   Real thick = paper_l ()->get_var ("tie_thickness");
   Bezier one = get_curve ();
@@ -204,7 +205,7 @@ Tie::do_brew_molecule () const
   else
     a = lookup_l ()->slur (one, directional_element (this).get () * thick, thick);
   
-  return a; 
+  return a.create_scheme()
 }
 
 
index bbefb9dcfaf3e1f6dd7ad7a3b7017648e76e2e0d..50c45abd4c4dc0e812ee73779bd0de4a49bfbd6a 100644 (file)
@@ -20,9 +20,10 @@ Time_signature::Time_signature (SCM s)
 }
 
 // ugh.!
-MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Time_signature)
-Molecule 
-Time_signature::do_brew_molecule () const
+
+GLUE_SCORE_ELEMENT(Time_signature,brew_molecule);
+SCM
+Time_signature::member_brew_molecule () const
 {
   SCM st = get_elt_property ("style");
 
@@ -41,15 +42,15 @@ Time_signature::do_brew_molecule () const
       String style (ly_scm2string (st));
       if (style[0]=='1')
        {
-         return time_signature (n, 0);
+         return time_signature (n, 0).create_scheme();
        }
       else
        {
-         return special_time_signature (style, n, d);
+         return special_time_signature (style, n, d).create_scheme();
        }
     }
   else
-    return     time_signature (n,d);
+    return time_signature (n,d).create_scheme();
 }
 
 Molecule
index eeabe86e5b1f24f797a1645b6c36831bb8eb4cdc..5779209b150b1400c125ce706238c58829a9ae48 100644 (file)
@@ -35,9 +35,10 @@ Tuplet_spanner::Tuplet_spanner (SCM s)
 /*
   TODO. 
  */
-MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Tuplet_spanner)
-Molecule 
-Tuplet_spanner::do_brew_molecule () const
+
+GLUE_SCORE_ELEMENT(Tuplet_spanner,brew_molecule);
+SCM
+Tuplet_spanner::member_brew_molecule () const
 {
   Molecule  mol;
 
@@ -111,7 +112,7 @@ Tuplet_spanner::do_brew_molecule () const
          mol.add_molecule (Molecule (b, at));
        }
     }
-  return mol;
+  return mol.create_scheme();
 }
   
 void
@@ -201,8 +202,9 @@ Tuplet_spanner::calc_dy (Real * dy) const
     - column_arr[0]->extent (Y_AXIS) [d];
 }
 
-void
-Tuplet_spanner::after_line_breaking ()
+GLUE_SCORE_ELEMENT(Tuplet_spanner,after_line_breaking);
+SCM
+Tuplet_spanner::member_after_line_breaking ()
 {
   Link_array<Note_column> column_arr=
     Pointer_group_interface__extract_elements (this, (Note_column*)0, "columns");
@@ -210,6 +212,7 @@ Tuplet_spanner::after_line_breaking ()
   if (!column_arr.size ())
     {
       suicide ();
+      return SCM_UNDEFINED;
     }
 
   Direction d = directional_element (this).get ();
@@ -237,6 +240,7 @@ Tuplet_spanner::after_line_breaking ()
          && get_bound (RIGHT)->column_l () == beam_l->get_bound (RIGHT)->column_l ())
        set_elt_property ("parallel-beam", SCM_BOOL_T);
     }
+  return SCM_UNDEFINED;
 }
 
 
index 4f4880a716233f43d406632cba35c8ef5df45cf9..cb9400bbca44716b491eb1d7d45ca4b9f91b18a1 100644 (file)
@@ -41,9 +41,10 @@ Volta_spanner::Volta_spanner (SCM s)
   
   
 */
-MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Volta_spanner)
-Molecule 
-Volta_spanner::do_brew_molecule () const
+
+GLUE_SCORE_ELEMENT(Volta_spanner,brew_molecule);
+SCM
+Volta_spanner::member_brew_molecule () const
 {
   Molecule  mol;
 
@@ -51,7 +52,7 @@ Volta_spanner::do_brew_molecule () const
     = Pointer_group_interface__extract_elements (this, (Bar*)0, "bars");
 
   if (!bar_arr.size ())
-    return mol;
+    return mol.create_scheme();
 
   bool no_vertical_start = false;
   bool no_vertical_end = to_boolean (get_elt_property ("last-volta"));
@@ -94,13 +95,12 @@ Volta_spanner::do_brew_molecule () const
 
   mol.add_at_edge (X_AXIS, LEFT, num, - num.extent (X_AXIS).length ()
                   - staff_space);
-  return mol;
+  return mol.create_scheme();
 }
   
 void
 Volta_spanner::do_add_processing ()
 {
-
   Link_array<Bar> bar_arr
     = Pointer_group_interface__extract_elements (this, (Bar*)0, "bars");
 
@@ -111,10 +111,12 @@ Volta_spanner::do_add_processing ()
     }
 }
 
-void
-Volta_spanner::after_line_breaking ()
+GLUE_SCORE_ELEMENT(Volta_spanner,after_line_breaking);
+SCM
+Volta_spanner::member_after_line_breaking ()
 {
   Side_position_interface (this).add_staff_support ();
+  return SCM_UNDEFINED;
 }
   
 void