]> git.donarmstrong.com Git - lilypond.git/commitdiff
release: 1.3.55 release/1.3.55
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 26 May 2000 16:30:08 +0000 (18:30 +0200)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 26 May 2000 16:30:08 +0000 (18:30 +0200)
===========

* Experimental property collapse for most score-elements.  (notable
exceptions: Scripts, pedals). Change all Score_element constructors to
take a basic-property list. The suffix of a property list may be
shared by several score-elements, for instance all default G-clefs in
a score share the following settings

   (breakable . #t)
   (break-align-symbol . Clef_item)
   (visibility-lambda . ,begin-of-line-visible)

This should reduce memory usage further.

* Magically fixed the disappearing Lyrics problem.

* Removed used_b_ field from Score_element.

* Massive search-replace patch: store pointers and properties
separately, in preparation of property collapse.

1.3

155 files changed:
CHANGES
VERSION
buildscripts/set-lily.sh
input/trip.ly
lily/align-note-column-engraver.cc
lily/auto-beam-engraver.cc
lily/axis-group-engraver.cc
lily/axis-group-interface.cc
lily/bar-engraver.cc
lily/bar-number-engraver.cc
lily/bar.cc
lily/beam-engraver.cc
lily/beam.cc
lily/break-align-engraver.cc
lily/break-align-item.cc
lily/breathing-sign-engraver.cc
lily/breathing-sign.cc
lily/chord-name-engraver.cc
lily/chord-name.cc
lily/chord-tremolo-engraver.cc
lily/clef-engraver.cc
lily/clef-item.cc
lily/collision-engraver.cc
lily/collision.cc
lily/crescendo.cc
lily/dot-column-engraver.cc
lily/dot-column.cc
lily/dots.cc
lily/dynamic-engraver.cc
lily/extender-engraver.cc
lily/extender-spanner.cc
lily/grace-align-item.cc
lily/hara-kiri-engraver.cc
lily/hara-kiri-vertical-group-spanner.cc
lily/hyphen-engraver.cc
lily/hyphen-spanner.cc
lily/include/bar.hh
lily/include/beam.hh
lily/include/break-align-item.hh
lily/include/breathing-sign.hh
lily/include/chord-name.hh
lily/include/clef-item.hh
lily/include/collision.hh
lily/include/crescendo.hh
lily/include/dot-column.hh
lily/include/dots.hh
lily/include/extender-spanner.hh
lily/include/grace-align-item.hh
lily/include/hara-kiri-vertical-group-spanner.hh
lily/include/hyphen-spanner.hh
lily/include/item.hh
lily/include/key-def.hh
lily/include/key-item.hh
lily/include/key.hh
lily/include/local-key-item.hh
lily/include/multi-measure-rest.hh
lily/include/music-output-def.hh
lily/include/note-column.hh
lily/include/note-head.hh
lily/include/rest-collision.hh
lily/include/rest.hh
lily/include/rhythmic-head.hh
lily/include/score-element.hh
lily/include/script-column.hh
lily/include/script.hh
lily/include/separating-group-spanner.hh
lily/include/single-malt-grouping-item.hh
lily/include/slur.hh
lily/include/spacing-spanner.hh
lily/include/span-bar.hh
lily/include/spanner.hh
lily/include/staff-bar.hh
lily/include/staff-symbol.hh
lily/include/stem-tremolo.hh
lily/include/stem.hh
lily/include/sustain-pedal.hh
lily/include/system-start-delimiter.hh
lily/include/text-item.hh
lily/include/tie-column.hh
lily/include/tie.hh
lily/include/time-signature.hh
lily/include/tuplet-spanner.hh
lily/include/volta-spanner.hh
lily/instrument-name-engraver.cc
lily/item.cc
lily/key-engraver.cc
lily/key-item.cc
lily/line-group-group-engraver.cc
lily/line-number-engraver.cc
lily/line-of-score.cc
lily/local-key-engraver.cc
lily/local-key-item.cc
lily/lyric-engraver.cc
lily/mark-engraver.cc
lily/multi-measure-rest-engraver.cc
lily/multi-measure-rest.cc
lily/music-output-def.cc
lily/note-column.cc
lily/note-head.cc
lily/note-heads-engraver.cc
lily/note-name-engraver.cc
lily/paper-column.cc
lily/paper-def.cc
lily/parser.yy
lily/piano-pedal-engraver.cc
lily/pointer-group-interface.cc
lily/repeat-engraver.cc
lily/rest-collision-engraver.cc
lily/rest-collision.cc
lily/rest-engraver.cc
lily/rest.cc
lily/rhythmic-column-engraver.cc
lily/rhythmic-head.cc
lily/score-element.cc
lily/score-engraver.cc
lily/script-column-engraver.cc
lily/script-column.cc
lily/script-engraver.cc
lily/script.cc
lily/separating-group-spanner.cc
lily/separating-line-group-engraver.cc
lily/single-malt-grouping-item.cc
lily/slur-engraver.cc
lily/slur.cc
lily/spacing-engraver.cc
lily/spacing-spanner.cc
lily/span-bar-engraver.cc
lily/span-bar.cc
lily/spanner.cc
lily/staff-bar.cc
lily/staff-symbol-engraver.cc
lily/staff-symbol-referencer.cc
lily/staff-symbol.cc
lily/stem-engraver.cc
lily/stem-tremolo.cc
lily/stem.cc
lily/sustain-pedal.cc
lily/system-start-delimiter-engraver.cc
lily/system-start-delimiter.cc
lily/text-engraver.cc
lily/text-item.cc
lily/tie-column.cc
lily/tie-engraver.cc
lily/tie.cc
lily/time-signature-engraver.cc
lily/time-signature.cc
lily/tuplet-engraver.cc
lily/tuplet-spanner.cc
lily/vertical-align-engraver.cc
lily/volta-spanner.cc
ly/engraver.ly
ly/params.ly
make/out/lilypond.lsm
make/out/lilypond.spec
scripts/linux-time.py [deleted file]

diff --git a/CHANGES b/CHANGES
index 8eff3a8cedecc0ac6ef6404b44d3f66b3ef07dd8..6495aaa3aae0c230951b4b0b0b90355d99635aca 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,38 +1,34 @@
---- ../lilypond-1.3.54.hwn1/CHANGES    Thu May 25 19:52:28 2000
-++ b/CHANGES   Fri May 26 01:15:04 2000
-@@ -1,5 +1,4 @@
--1.3.1.3.54.hwn1
--===========
-* Experimental property collapse for clef and staff-symbol.
- * Massive search replace patch: store pointers and properties
- separately, in preparation of property collapse.--- ../lilypond-1.3.54/CHANGES        Thu May 25 00:20:46 2000
-++ b/CHANGES   Thu May 25 23:22:02 2000
-@@ -1,3 +1,11 @@
-1.3.54.jcn1
+1.3.54.hwn2
 ===========
 
-* Fixed compile bug.
+* Experimental property collapse for most score-elements.  (notable
+exceptions: Scripts, pedals). Change all Score_element constructors to
+take a basic-property list. The suffix of a property list may be
+shared by several score-elements, for instance all default G-clefs in
+a score share the following settings
+  
+          (breakable . #t)
+          (break-align-symbol . Clef_item)
+          (visibility-lambda . ,begin-of-line-visible) 
+
+This should reduce memory usage further. 
 
-* Added scripts/linux-time.py: simple utility to monitor memory (and later
-  maybe other) resource usage from Linux's proc fs.
+* Magically fixed the disappearing Lyrics problem.
 
- 1.3.53.uu1
- ==========
- 1.3.1.3.54.hwn1
-===========
+* Removed used_b_ field from Score_element.  
 
-* Massive search replace patch: store pointers and properties
+* Massive search-replace patch: store pointers and properties
 separately, in preparation of property collapse.
 
-1.3.53.uu1
-==========
+
+1.3.54
+======
 
 * Bugfix: don't crash on tuplet spanners that don't contain any notes.
 
-* Small cleanup of Dimension_cache: removed a few redundant
-fields. Slightly lower memory usage. Dimension_cache is now a `dumb'
-struct again.
+* Cleanup of Dimension_cache: removed a few redundant
+fields. Slightly lower memory usage (32 bytes per
+score-element). Dimension_cache is now a `dumb' struct again.
 
 * Add array index to priority field of text scripts to ensure that
 order is unique, and sensible.
diff --git a/VERSION b/VERSION
index 620725e0e783bc99eb71486a5c435c2943aba2dc..4f9a3e72629fd9b41ae66332bf06bfb4b58c5f5a 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,8 +1,8 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=3
-PATCH_LEVEL=54
-MY_PATCH_LEVEL=hwn2
+PATCH_LEVEL=55
+MY_PATCH_LEVEL=
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index 383a116988078f2d3428406f74e43adc104831d8..df01378c4567b5e61d2e43ceb28c940078c197a2 100755 (executable)
@@ -57,7 +57,6 @@ showln -sf $LILYPOND_SOURCEDIR/midi2ly/out/midi2ly $prefix/bin/midi2ly
 showln -sf $LILYPOND_SOURCEDIR/scripts/out/ly2dvi $prefix/bin/ly2dvi
 showln -sf $LILYPOND_SOURCEDIR/scripts/out/mudela-book $prefix/bin/mudela-book
 showln -sf $LILYPOND_SOURCEDIR/buildscripts/out/genheader $prefix/bin/genheader
-showln -sf $LILYPOND_SOURCEDIR/scripts/out/linux-time $prefix/bin/linux-time
 showln -sf $LILYPOND_SOURCEDIR/scripts/out/as2text $prefix/bin/as2text
 
 
index 1e4cbcb2b4abc2fbe41560b9c6330f8891165a68..5cccdb146de3cf4ed14fdac81d477b2f9c44a90e 100644 (file)
@@ -26,7 +26,7 @@ praeludiumRight =  \notes {
   % 13 -- how to type -- where to split -- this more neatly?
   \context Staff <
     \context Voice = I \relative c'' { \stemup r4 dis4 e4. e8 ~ |
-      \shifton e4 [d8 fis8] \shiftoff gis4 ~ [gis8 fis16 e ] |
+      \shifton e4-.-^^\f [d8 fis8] \shiftoff gis4 ~ [gis8 fis16 e ] |
       fis4 ~ [fis8 e16 dis] e4 r8 e8 }
     \context Voice = III \relative c'' { \stemup \shifton r4 bis cis \shiftoff cis |
       a' ~ [a16 gis a b] \shifton dis,4 cis ~ |
@@ -203,7 +203,7 @@ fugaIIPedal = \notes \relative c {
      b!-\lheel ais-\rtoe gis-\ltoe ~ ] |
       gis8  r4.
     )
-      c2 
+      c2^^^-^\f 
  \time 3/4;
 
   \fugaIIPedal }
index 9bdd9a82408edb8794aa84078910f7556b73ed18..c034b0df9cd2411f1c97ab1d98fafe1d3bcdff2b 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;
+  align_item_p_ = new Grace_align_item (SCM_EOL);
   Side_position_interface (align_item_p_).set_axis (X_AXIS);
   Side_position_interface (align_item_p_).set_direction (LEFT);
   
index 26ef80cf7eb688767ae9b753e53d9a360f17027b..5a8661ae9cb9d2fa1e87c7674e9ee9f7e18e28c5 100644 (file)
@@ -205,7 +205,7 @@ Auto_beam_engraver::begin_beam ()
 Beam*
 Auto_beam_engraver::create_beam_p ()
 {
-  Beam* beam_p = new Beam;
+  Beam* beam_p = new Beam (get_property ("basicBeamProperties"));
 
   for (int i = 0; i < stem_l_arr_p_->size (); i++)
     {
index 4639b176a9de01c534c2460af82599cdb2b76e10..2038f51e8a393908068f2b13457a873ad85c88aa 100644 (file)
@@ -31,7 +31,7 @@ Axis_group_engraver::do_creation_processing ()
 Spanner*
 Axis_group_engraver::get_spanner_p () const
 {
-  return new Spanner;
+  return new Spanner (SCM_EOL);
 }
 
 void
index a08865c19cd9207144b9ba53854acab1115da6ee..fc9e5fe128304501e39ad60fa2ac8608dd1b6380 100644 (file)
@@ -25,11 +25,6 @@ Axis_group_interface (Score_element*s)
 void
 Axis_group_interface::add_element (Score_element *e)
 {
-
-  // ugh. used_b_ should be junked.
-  elt_l_->used_b_ = true;
-  e->used_b_ = true;
-
   for (SCM ax = elt_l_->get_elt_property ("axes"); ax != SCM_EOL ; ax = gh_cdr (ax))
     {
       Axis a = (Axis) gh_scm2int (gh_car (ax));
@@ -87,7 +82,7 @@ Axis_group_interface::set_interface ()
     {
       elt_l_->set_elt_pointer ("elements", SCM_EOL);
       elt_l_->set_elt_property ("transparent", SCM_BOOL_T); //  junk this?
-      elt_l_->set_elt_property ("axes" , SCM_EOL);
+
       Group_interface (elt_l_, "interfaces").add_thing (ly_symbol2scm ("Axis_group"));
     }
 }
@@ -95,14 +90,21 @@ Axis_group_interface::set_interface ()
 void
 Axis_group_interface::set_axes (Axis a1, Axis a2)
 {
-  // set_interface () ? 
-
-  SCM ax = gh_cons (gh_int2scm (a1), SCM_EOL);
-  if (a1 != a2)
-    ax= gh_cons (gh_int2scm (a2), ax);
+  // set_interface () ?
+  SCM sa1= gh_int2scm (a1);
+  SCM sa2 = gh_int2scm (a2);
 
+  SCM prop = elt_l_->get_elt_property ("axes");
   
-  elt_l_->set_elt_property ("axes", ax);
+  if (prop == SCM_UNDEFINED
+      || scm_memq (sa1, prop) == SCM_BOOL_F
+      || scm_memq (sa2, prop) == SCM_BOOL_F)
+    {
+      SCM ax = gh_cons (sa1, SCM_EOL);
+      if (a1 != a2)
+       ax= gh_cons (sa2, ax);
+      elt_l_->set_elt_property ("axes", ax);
+    }
 
   if (a1 != X_AXIS && a2 != X_AXIS)
     elt_l_->set_extent_callback (0, X_AXIS);
index a70b89db352289ecb2c0d6b22417b4ead155e1b6..075cd5612931060c8b237870a0aff52b9cdc6b2e 100644 (file)
@@ -28,8 +28,8 @@ Bar_engraver::create_bar ()
 {
   if (!bar_p_)
     {
-      bar_p_ = new Staff_bar;
-      bar_p_->property_alist_ = get_property ("basicBarlineProperties");
+      bar_p_ = new Staff_bar (get_property ("basicBarlineProperties"));
+
       
       // urg: "" != empty...
       /*
index 926bc0b50a6013192305c28fb3675f5d658e2b69..f2961ee47f8a77c43b8193df71ad7ad8bb9823de 100644 (file)
@@ -21,7 +21,7 @@ class Bar_number_engraver : public Engraver
 {
 protected:
   Text_item* text_p_;
-  Protected_scm visibility_lambda_;
+
   Protected_scm staffs_;
 
 protected:
@@ -65,11 +65,6 @@ Bar_number_engraver::Bar_number_engraver ()
 void
 Bar_number_engraver::do_creation_processing ()
 {
-  String t = "barNumberVisibilityFunction";
-  SCM proc = get_property (t);
-
-  if (gh_procedure_p (proc))
-    visibility_lambda_ = proc;
 }
 
 
@@ -110,9 +105,9 @@ Bar_number_engraver::create_items ()
 {
   if (text_p_)
     return;
-  
-  text_p_ = new Text_item;
-  text_p_->set_elt_property ("breakable", SCM_BOOL_T); // ugh
+
+  SCM b = get_property ("basicBarNumberProperties");
+  text_p_ = new Text_item (b);
   Side_position_interface staffside(text_p_);
   staffside.set_axis (Y_AXIS);
 
@@ -135,9 +130,6 @@ Bar_number_engraver::create_items ()
                            gh_double2scm(paper_l ()->get_var ("interline")));
     }
 
-  if (gh_procedure_p (visibility_lambda_))
-      text_p_->set_elt_property ("visibility-lambda",
-                                visibility_lambda_);
 
   announce_element (Score_element_info (text_p_, 0));
 }
index 3b5cf5fea0851cac3feb858b66b0f26972ad3431..ec2b812b3e8066eeebc3561cbd7c21c074e87869 100644 (file)
@@ -18,7 +18,8 @@
 #include "debug.hh"
 #include "all-font-metrics.hh"
 
-Bar::Bar ()
+Bar::Bar (SCM s)
+  : Item (s)
 {
 }
 
@@ -123,6 +124,7 @@ void
 Bar::before_line_breaking ()
 {
   SCM g = get_elt_property ("glyph");
+  SCM orig = g;
   Direction bsd = break_status_dir ();
   if (gh_string_p (g))
     {
@@ -145,7 +147,7 @@ Bar::before_line_breaking ()
       set_elt_property ("transparent", SCM_BOOL_T);
       set_extent_callback (0, X_AXIS);      
     }
-  else
+  else if (! gh_equal_p  (g, orig))
     set_elt_property ("glyph", g);
 }
   
index 075af92ed92171efc7aceb0e7b60d3e435e65276..739b5579443fb96199910f40e843b69029436f35 100644 (file)
@@ -87,7 +87,7 @@ Beam_engraver::do_process_music ()
        }
 
       prev_start_req_ = reqs_drul_[START];
-      beam_p_ = new Beam;
+      beam_p_ = new Beam (get_property ("basicBeamProperties"));
 
       SCM smp = get_property ("measurePosition");
       Moment mp =  (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0);
index d7461746cc877561f4be4a776068581ac8617398..108f543bc6a022b2f488b5aaacebf8a5f4a62eb3 100644 (file)
@@ -32,7 +32,8 @@
 #include "staff-symbol-referencer.hh"
 #include "cross-staff.hh"
 
-Beam::Beam ()
+Beam::Beam (SCM s)
+  : Spanner (s)
 {
   Pointer_group_interface g (this, "stems");
   g.set_interface ();
@@ -422,6 +423,8 @@ Real
 Beam::calc_stem_y_f (Stem* s, Real y, Real dy) const
 {
   Real thick = gh_scm2double (get_elt_property ("beam-thickness"));
+  thick *= paper_l ()->get_var ("staffspace");
+  
   int beam_multiplicity = get_multiplicity ();
   int stem_multiplicity = (s->flag_i () - 2) >? 0;
 
@@ -603,12 +606,13 @@ Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const
       programming_error ("Beams are not left-to-right");
 
   Real staffline_f = paper_l ()->get_var ("stafflinethickness");
-  int   multiplicity = get_multiplicity ();
+  int multiplicity = get_multiplicity ();
 
 
   Real interbeam_f = paper_l ()->interbeam_f (multiplicity);
   Real thick = gh_scm2double (get_elt_property ("beam-thickness"));
-
+  thick *= paper_l ()->get_var ("staffspace");
+    
   Real bdy = interbeam_f;
   Real stemdx = staffline_f;
 
index 6a3293c73e98ce4366096514dadab05c45f6bb4a..f2b59eb272f1085bbe324247d7eaac3f2cd903b4 100644 (file)
@@ -84,25 +84,22 @@ Break_align_engraver::acknowledge_element (Score_element_info inf)
       if (item_l->empty_b (X_AXIS) || item_l->parent_l (X_AXIS))
        return;
 
-      SCM bp=item_l->remove_elt_property ("breakable");
+      SCM bp=item_l->get_elt_property ("breakable");
       bool breakable = (to_boolean (bp));
       if (!breakable)
        return ;
 
-      SCM align_name = item_l->remove_elt_property ("break-align-symbol");
+      SCM align_name = item_l->get_elt_property ("break-align-symbol");
       if (!gh_symbol_p (align_name))
        return ;
 
       if (!align_l_)
        {
-         align_l_ = new Break_align_item;
-         align_l_->set_elt_property ("breakable", SCM_BOOL_T);
+         align_l_ = new Break_align_item (get_property ("basicBreakAlignProperties"));
          announce_element (Score_element_info (align_l_,0));
 
-
-         Item * edge = new Item;
          SCM edge_sym = ly_symbol2scm ("Left_edge_item");
-         edge->set_elt_property ("break-align-symbol", edge_sym);
+         Item * edge = new Item (get_property ("leftEdgeBasicProperties"));
 
          /*
            If the element is empty, it will be ignored in the break
@@ -129,7 +126,7 @@ Break_align_engraver::acknowledge_element (Score_element_info inf)
        }
       else
        {
-         group = new Item;
+         group = new Item (SCM_EOL);
 
          Axis_group_interface (group).set_interface ();
          Axis_group_interface (group).set_axes (X_AXIS,X_AXIS);
index ca3925cf4a4ebfa1c07d9b8912dfb31899c5b151..c29a970cc5657e21d79116612a4de601ef5b2c08 100644 (file)
@@ -157,7 +157,8 @@ Break_align_item::before_line_breaking ()
                                 
 }
 
-Break_align_item::Break_align_item ()
+Break_align_item::Break_align_item (SCM s)
+  : Item (s)
 {
   set_elt_property ("stacking-dir" , gh_int2scm (RIGHT));
 
index 2508bb83902d5a4be99846f7459f6246a515b589..f72e5b2b9716a68f6d2c6e92c31296bea76a7011 100644 (file)
@@ -46,9 +46,8 @@ Breathing_sign_engraver::do_process_music()
 {
   if(breathing_sign_req_l_)
     {
-      breathing_sign_p_ = new Breathing_sign;
-      breathing_sign_p_->set_elt_property ("break-align-symbol",
-                                          ly_symbol2scm ("Breathing_sign"));
+      SCM b = get_property ("basicBreathingSignProperties");
+      breathing_sign_p_ = new Breathing_sign (b);
       Staff_symbol_referencer_interface st (breathing_sign_p_);
       st.set_interface ();
 
index 64e588f727149c9c427d58f1040349fedd001ea7..d1473eb2143d1da87358fc6b32cfb850f8c741c7 100644 (file)
@@ -21,9 +21,9 @@
 #include "direction.hh"
 
 
-Breathing_sign::Breathing_sign ()
+Breathing_sign::Breathing_sign (SCM  s)
+  : Item (s)
 {
-  set_elt_property ("breakable", SCM_BOOL_T);
 }
 
 Molecule 
index 32419e420c42693e55b80804f263cb42d6369222..b074cd8b753c7885aa7ba11188abafa5c07f6594 100644 (file)
@@ -73,7 +73,7 @@ Chord_name_engraver::do_process_music ()
   if (gh_boolean_p (chord_inversion))
     find_inversion_b = gh_scm2bool (chord_inversion);
 
-  chord_name_p_ = new Chord_name;
+  chord_name_p_ = new Chord_name (SCM_EOL);
   Chord chord = to_chord (pitch_arr_, tonic_req_, inversion_req_, bass_req_,
                          find_inversion_b);
 
index 0e8e1d094295bda6e27cc120283ccb73013aa861..e8500f9c6c8bc4fb8cb5aaab230a35de92c5635e 100644 (file)
@@ -162,3 +162,8 @@ Chord_name::do_brew_molecule () const
 
   return ly_text2molecule (text);
 }
+
+Chord_name::Chord_name (SCM s)
+  : Item (s)
+{
+}
index 291133c50e60aecb86bc4b87da793b646b1cc59d..4148b2bb6262982e3c5ae7af5105a4320c065235 100644 (file)
@@ -90,7 +90,7 @@ Chord_tremolo_engraver::do_process_music ()
 {
   if (repeat_ && !beam_p_)
     {
-      beam_p_ = new Beam;
+      beam_p_ = new Beam (SCM_EOL);
       beam_p_->set_elt_property ("chord-tremolo", SCM_BOOL_T);
 
 
index aa7291d7c7f608ab76faa7d9358f474e49a00787..cfc26a629cd78c7a8726a1c35fbe448edc9a6aa8 100644 (file)
@@ -184,8 +184,7 @@ Clef_engraver::create_clef()
 {
   if (!clef_p_)
     {
-      Clef_item *c= new Clef_item;
-      c-> property_alist_ = current_settings_;
+      Clef_item *c= new Clef_item ( current_settings_);
       announce_element (Score_element_info (c, clef_req_l_));
 
       Staff_symbol_referencer_interface si(c);
@@ -198,16 +197,12 @@ Clef_engraver::create_clef()
   si.set_position (clef_position_i_);
   if (octave_dir_)
     {
-      Text_item * g = new Text_item;
+      Text_item * g = new Text_item (get_property ("basicOctavateEightProperties"));
       Side_position_interface spi (g);
       spi.set_axis (Y_AXIS);
       spi.add_support (clef_p_);
-      g->set_elt_property ("text", ly_str02scm ( "8"));
-      g->set_elt_property ("style", gh_str02scm ("italic"));
       g->set_parent (clef_p_, Y_AXIS);
       g->set_parent (clef_p_, X_AXIS);
-         
-      g->set_elt_property ("self-alignment-X", gh_int2scm (0));
       g->add_offset_callback (Side_position_interface::aligned_on_self, X_AXIS);
       g->add_offset_callback (Side_position_interface::centered_on_parent, X_AXIS);
       g->set_elt_property ("direction", gh_int2scm (octave_dir_));
index 21d97d80754d74e0a6d733e219f447ce4ce94e16..ce7c057be4238778ba2e8f4c7aa0303125fbe727 100644 (file)
 #include "molecule.hh"
 #include "text-item.hh"
 
+Clef_item::Clef_item (SCM s)
+  : Item (s)
+{}
+
 void
 Clef_item::before_line_breaking ()
 {
@@ -21,10 +25,17 @@ Clef_item::before_line_breaking ()
     style = ly_scm2string (style_sym);
 
   SCM glyph = get_elt_property ("glyph");
+  
+  /*
+    FIXME: should use symbol.
+   */
   if (gh_string_p (glyph))
     {
       String s = ly_scm2string (glyph);
-       
+
+      /*
+       FIXME: should use fontsize property to set clef changes.
+       */
       if (break_status_dir() != RIGHT && style != "fullSizeChanges")
        {
          s += "_change";
index c31121dae4a70a6501bb30256508de34db4ac7ec..db736c8bb4bcd30db307306c8d211049a4dcc64c 100644 (file)
@@ -35,7 +35,7 @@ Collision_engraver::process_acknowledged ()
     return ;
   if (!col_p_) 
     {
-      col_p_ = new Collision;
+      col_p_ = new Collision (get_property ("basicCollisionProperties"));
       announce_element (Score_element_info (col_p_,0));
     }
   for (int i=0; i< note_column_l_arr_.size (); i++)
index b500fc889653dfe4807d3ff2fc8a58f848e72feb..52498e533a5d0195230756152dfeceb3d81b3a3b 100644 (file)
@@ -13,7 +13,8 @@
 #include "axis-group-interface.hh"
 
 
-Collision::Collision()
+Collision::Collision(SCM s )
+  : Item (s)
 {
   Axis_group_interface (this).set_interface ();
   Axis_group_interface (this).set_axes (X_AXIS, Y_AXIS);
index 236fbfb53c1f8db0514477757cee862c55f2669b..fd390e0826cbea3ebcfcb1dd9f82e00bbdd7db14 100644 (file)
@@ -15,7 +15,8 @@
 #include "paper-column.hh"
 
 
-Crescendo::Crescendo ()
+Crescendo::Crescendo (SCM s)
+  : Spanner (s)
 {
   set_elt_property ("dynamic-drul", gh_cons (SCM_BOOL_F, SCM_BOOL_F));
 }
index 5c2cfd49c4186f297fa87bde365cdf6c67fb347e..fdcc919bfd8813355ce90c7db5b3264a2402875f 100644 (file)
@@ -40,7 +40,7 @@ Dot_column_engraver::acknowledge_element (Score_element_info info)
 
   if (!dotcol_p_)
     {
-      dotcol_p_ = new Dot_column;
+      dotcol_p_ = new Dot_column( SCM_EOL);
       Side_position_interface (dotcol_p_).set_axis (X_AXIS);
       Side_position_interface (dotcol_p_).set_direction (RIGHT);      
       announce_element (Score_element_info (dotcol_p_, 0));
index 322a18865302c820584922e6c2ac6e68a9659c02..75b86cf65785a6b166e27ee89eb23204599ad78d 100644 (file)
@@ -48,7 +48,8 @@ Dot_column::compare (Dots * const &d1, Dots * const &d2)
 }
 
 
-Dot_column::Dot_column ()
+Dot_column::Dot_column (SCM s)
+  : Item (s)
 {
   Pointer_group_interface gi (this, "dots");
   gi.set_interface ();
index 2487268c2b532971e5c54ed037296d13d3e7f754..a658d838e72d986e9fab7ff073c8a0afa1262772 100644 (file)
@@ -13,7 +13,8 @@
 #include "staff-symbol-referencer.hh"
 #include "directional-element-interface.hh"
 
-Dots::Dots ()
+Dots::Dots (SCM s)
+  : Item (s)
 {
   set_elt_property ("dot-count", gh_int2scm (0));
 }
index af10c5037dce23e679051b7f6b7307a789fbb4eb..15592c6c786f74876b095574b6a1b74d17882bc1 100644 (file)
 class Dynamic_line_spanner : public Spanner
 {
 public:
-  Dynamic_line_spanner ();
+  Dynamic_line_spanner (SCM);
   VIRTUAL_COPY_CONS(Score_element);
   void add_column (Note_column*);
   void add_element (Score_element*);
 };
 
-Dynamic_line_spanner::Dynamic_line_spanner ()
+Dynamic_line_spanner::Dynamic_line_spanner (SCM s)
+  : Spanner (s)
 {
   set_elt_property ("transparent", SCM_BOOL_T);
   Side_position_interface (this).set_axis (Y_AXIS);
@@ -172,7 +173,7 @@ Dynamic_engraver::do_process_music ()
       && !line_spanner_
       && pending_element_arr_.size ())
     {
-      line_spanner_ = new Dynamic_line_spanner;
+      line_spanner_ = new Dynamic_line_spanner (get_property ("basicDynamicLineSpannerProperties"));
       for (int i = 0; i < pending_column_arr_.size (); i++)
        line_spanner_->add_column (pending_column_arr_[i]);
       pending_column_arr_.clear ();
@@ -262,16 +263,12 @@ Dynamic_engraver::do_process_music ()
     {
       String loud = text_req_l_->text_str_;
 
-      text_p_ = new Text_item;
-      text_p_->set_elt_property ("text",
-                                         ly_str02scm (loud.ch_C ()));
-      text_p_->set_elt_property ("style", gh_str02scm ("dynamic"));
-      text_p_->set_elt_property ("script-priority",
-                                         gh_int2scm (100));
+      text_p_ = new Text_item (get_property ("basicDynamicTextProperties"));
+      text_p_->set_elt_property ("text", ly_str02scm (loud.ch_C ()));
       if (Direction d=text_req_l_->get_direction ())
        directional_element (text_p_).set (d);
       pending_element_arr_.push (text_p_);
-      text_p_->set_elt_property ("self-alignment-Y", gh_int2scm (0));
+
       text_p_->add_offset_callback (Side_position_interface::aligned_on_self,
                                    Y_AXIS);
       announce_element (Score_element_info (text_p_, text_req_l_));
@@ -307,7 +304,7 @@ Dynamic_engraver::do_process_music ()
       else
        {
          span_start_req_l_ = span_req_l_drul_[START];
-         cresc_p_  = new Crescendo;
+         cresc_p_  = new Crescendo (SCM_EOL);
          cresc_p_->set_elt_property
            ("grow-direction",
             gh_int2scm ((span_req_l_drul_[START]->span_type_str_ == "crescendo")
index aba5025d69d2f069c9303c35e4426d5f907f6cab..9e869dc9c27318bd78aa675f84b3d91937d79ad6 100644 (file)
@@ -75,7 +75,7 @@ Extender_engraver::do_process_music ()
          return;
        }
       
-      extender_spanner_p_ = new Extender_spanner;
+      extender_spanner_p_ = new Extender_spanner (SCM_EOL);
       extender_spanner_p_->set_textitem  (LEFT, last_lyric_l_);
       announce_element (Score_element_info (extender_spanner_p_, req_l_));
     }
index 4c1dedbcd6d6d541eb482b5e7af4d57c28400825..8a987bad27c7526798ef78642d5a8dde4214a36e 100644 (file)
@@ -20,8 +20,9 @@
 #include "paper-def.hh"
 #include "extender-spanner.hh"
 
-Extender_spanner::Extender_spanner ()
-  : Spanner ()
+Extender_spanner::Extender_spanner (SCM s)
+  : Spanner (s)
+
 {
   dx_f_drul_[LEFT] = dx_f_drul_[RIGHT] = 0.0;
   set_extent_callback (Score_element::point_dimension_callback, Y_AXIS);
index 73ef013c07ff941277beb69c888f305ad2d33817..654f44139edaa4c3ed7c5235c88f11cd18775faa 100644 (file)
@@ -13,7 +13,8 @@
 #include "paper-column.hh"
 #include "paper-def.hh"
 
-Grace_align_item::Grace_align_item ()
+Grace_align_item::Grace_align_item (SCM s)
+  : Item (s)
 {
   set_elt_property ("stacking-dir", gh_int2scm (RIGHT));
   Align_interface (this).set_interface();
index 1d2e281c2125c30d914bbe8f4e08abc6eeea8acf..29211b6234afa56d09faaf3e04de38299eb24b21 100644 (file)
@@ -13,7 +13,7 @@
 Spanner*
 Hara_kiri_engraver::get_spanner_p () const
 {
-  return new Hara_kiri_group_spanner;
+  return new Hara_kiri_group_spanner (SCM_EOL);
 }
 
 void
index 76c95fcb8b935857e853fcad97e9f27d953fc4ba..d028ed5ef9cb7891e96d842192548cb7d6d442f5 100644 (file)
@@ -13,7 +13,8 @@
 #include "debug.hh"
 #include "item.hh"
 
-Hara_kiri_group_spanner::Hara_kiri_group_spanner()
+Hara_kiri_group_spanner::Hara_kiri_group_spanner(SCM s)
+  : Spanner (s)
 {
   set_elt_pointer ("items-worth-living", SCM_EOL);
 }
index 72eb2268fe7974bba01c2b0860a81d3780b797bf..071526f89a829444e42d126d874d421c68c4d829 100644 (file)
@@ -73,7 +73,7 @@ Hyphen_engraver::do_process_music ()
          return;
        }
       
-      hyphen_spanner_p_ = new Hyphen_spanner;
+      hyphen_spanner_p_ = new Hyphen_spanner (SCM_EOL);
       hyphen_spanner_p_->set_textitem  (LEFT, last_lyric_l_);
       announce_element (Score_element_info (hyphen_spanner_p_, req_l_));
     }
index acc40be05a9eab67910ce5da29622f1d5896cf9b..d0b58fc3bd81eba817dbe3c1d480115561990cf0 100644 (file)
@@ -22,8 +22,8 @@
 #include "hyphen-spanner.hh"
 #include "dimension-cache.hh"
 
-Hyphen_spanner::Hyphen_spanner ()
-  : Spanner ()
+Hyphen_spanner::Hyphen_spanner (SCM s)
+  : Spanner (s)
 {
   dx_f_drul_[LEFT] = dx_f_drul_[RIGHT] = 0.0;
 
index aa429c89bb0523cba6bd8dc82bbb6823f4750f55..f770c3aac29ff38d034a40861c462d405d7ad891 100644 (file)
@@ -14,7 +14,7 @@
 class Bar:public Item {
 public:
   VIRTUAL_COPY_CONS(Score_element);
-  Bar();
+  Bar(SCM);
 
   Molecule compound_barline (String, Real height) const;
   Molecule simple_barline (Real wid, Real height) const;      
index 768d07aaa75c311e71c229467b122fe6a115f417..27a19a1769e030c1a16b3a44bc2342eb9b940be9 100644 (file)
@@ -34,7 +34,7 @@ public:
   Stem* first_visible_stem () const;
   Stem* last_visible_stem () const;
 
-  Beam ();
+  Beam (SCM);
   void add_stem (Stem*);
   void set_grouping (Rhythmic_grouping def, Rhythmic_grouping current);
   void set_beaming (Beaming_info_list *);
index 49057bde8d0ebf8dbe53f574abfa6d66274902af..6ba3cc1b7a8a4c90c10e63b24efb05039c7477f2 100644 (file)
@@ -29,7 +29,7 @@ class Break_align_item : public Item
 protected:
   virtual void before_line_breaking ();
 public:
-  Break_align_item ();
+  Break_align_item (SCM s);
   VIRTUAL_COPY_CONS(Score_element);
 };
 #endif // BREAK_ALIGN_ITEM_HH
index e0cda68c19b0f3e0b8bbaa1ca73a0bcece090818..fb212868b535e97e41409fd66458eab56441465b 100644 (file)
@@ -21,7 +21,7 @@ class Breathing_sign : public Item
 {
 public:
   VIRTUAL_COPY_CONS(Score_element);
-  Breathing_sign ();
+  Breathing_sign (SCM s);
 protected:
   virtual void after_line_breaking ();
   virtual Molecule do_brew_molecule () const;
index 3bdf747a0b96407f3bec863c73c2297bd8f2813c..2f77bb4b1d9ccc9ac6479b6b5e367a3f5160c6cd 100644 (file)
@@ -25,9 +25,10 @@ public:
   VIRTUAL_COPY_CONS (Score_element);
   Molecule ly_word2molecule (SCM scm) const;
   Molecule ly_text2molecule (SCM scm) const;
-
+  Chord_name(SCM s);
 protected:
   virtual Molecule do_brew_molecule () const;
+
 };
 
 #endif // CHORD_NAME_HH
index 111e41639375e75d6623d2a106b1c5f52e62f152..75aad9b0d83ea5036d3721ec25a87fdb80b8d8ce 100644 (file)
@@ -29,6 +29,7 @@ protected:
   virtual void before_line_breaking ();
 public:
   VIRTUAL_COPY_CONS(Score_element);
+  Clef_item (SCM);
 };
 
 #endif // CLEFITEM_HH
index 4cb7b615ec8d8cec906e466999c0f6260881055c..4cb199385686502cff424b420d957762860d50f8 100644 (file)
@@ -45,6 +45,6 @@ protected:
 public:
     
   void add_column (Note_column*ncol_l);
-  Collision();
+  Collision(SCM);
 };
 #endif // COLLISION_HH
index 115b98b9fd720c288ed40029ee44b607d09f83b5..b5a46c84336a4eddbbe5f65dbe56aabc2af820d5 100644 (file)
@@ -18,7 +18,7 @@
  */
 class Crescendo : public Spanner {
 public:
-  Crescendo();
+  Crescendo(SCM);
 protected:
   VIRTUAL_COPY_CONS(Score_element);
   virtual Molecule do_brew_molecule() const;
index 4c3a211557d197a175ac8f91959104308a99c1bc..9fd7150b82bc2abfcf9775f7a907b85791d029ab 100644 (file)
@@ -23,7 +23,7 @@ class Dot_column : public Item
 public:
   VIRTUAL_COPY_CONS (Score_element);
   void add_head (Rhythmic_head*);
-  Dot_column ();
+  Dot_column (SCM);
 
 protected:
   virtual void after_line_breaking ();
index 2446e1f906671f172116089da19f02c460aeda04..e1bf806390d2d00d481630777b1678d28185f04f 100644 (file)
@@ -30,7 +30,7 @@ protected:
   virtual void after_line_breaking ();
 public:
   
-  Dots ();
+  Dots (SCM);
 };
 
 #endif // DOTS_HH
index 261e758f4d9de022ba95aa6bd48ebaa572fcfb25..862318e7eadb92016e4ecbb41e3b8245b716e678 100644 (file)
@@ -30,7 +30,7 @@
 class Extender_spanner : public Spanner
 {
 public:
-  Extender_spanner ();
+  Extender_spanner (SCM);
   void set_textitem (Direction, Item*);
 
 protected:
index ed16719bcab9773fd7f91e899ea1f70ce574ac69..b4f9e94e99de3adebeff72287b445dbd30618061 100644 (file)
@@ -17,7 +17,7 @@ class Grace_align_item : public Item
 {
 public:
   VIRTUAL_COPY_CONS (Score_element);
-  Grace_align_item ();
+  Grace_align_item (SCM);
 protected:
   virtual void do_add_processing ();
   virtual void before_line_breaking ();
index 389223cf34f67a4a86dc6ec66063e63d82c14a10..1adc9480bf23d9a391d13e47419868d3b603ea24 100644 (file)
@@ -27,7 +27,7 @@
 class Hara_kiri_group_spanner : public Spanner
 {
 public:
-  Hara_kiri_group_spanner ();
+  Hara_kiri_group_spanner (SCM);
   virtual void after_line_breaking ();
   void add_interesting_item (Item* n);
 protected:
index ec60dee675302c50d6e7a9e879d73b23a126ebb2..24c1ab7299341db65e37a79142f07179858204fb 100644 (file)
@@ -21,7 +21,7 @@
 class Hyphen_spanner : public Spanner
 {
 public:
-Hyphen_spanner ();
+  Hyphen_spanner (SCM);
   void set_textitem (Direction, Item*);
 
 protected:
index 7d327628ed8dfe2ac76519333e91706e16fc858e..c036dd2e524cd19bb8eacd4c472bb961f6c419a7 100644 (file)
@@ -40,7 +40,7 @@ class Item : public Score_element
 
 public:
   VIRTUAL_COPY_CONS(Score_element);
-  Item();
+  Item (SCM);
   Item (Item const &);
 
   bool breakable_b () const;
index 2b9fdccff205d216baff6f2e39a082cc0016f710..160e7c43cbc2297d5994b60fae3ef63a88e6b32c 100644 (file)
@@ -17,6 +17,8 @@
   Universal key definition (Should rename class Key to 'Accidentals'?)
 
   FIXME: merge key.hh and key-def.hh classes.
+
+  FIXME: use Scheme data structs for this.
  */
 class Key_def
 {
index c003a3094d6fd4603093f5b211b39a00f2dcd117..b8430c427215794739abb7edb30569aeb29e9153 100644 (file)
@@ -28,7 +28,7 @@ class Key_item :public  Item
 
 public:
   VIRTUAL_COPY_CONS(Score_element);
-  Key_item ();
+  Key_item (SCM);
   void add (int pitch, int acc);
   void add_old (int pitch, int acc);
 
index 5c24db2f08e4b22113e76a87a45add99760026d1..5e096997f3a7456a20a4c2096583ddb40a14e669 100644 (file)
 #include "array.hh"
 #include "lily-proto.hh"
 
+/*
+  JUNKME JUNKME JUNKME
+ */
+
 /// administration of current key in one octave.
 class Octave_key {
 
index 39ad2ccac252d838ddb5afb5f26653af67cebde6..db072f0dfe115eb0f6434453a5830eaa67c6692f 100644 (file)
@@ -40,11 +40,13 @@ class Local_key_item : public Item
 
   Molecule accidental (int,bool,bool) const;
 public:
-
+  Local_key_item (SCM );
   void add_pitch (Musical_pitch, bool cautionary, bool natural);
 protected:
   virtual void before_line_breaking ();
   virtual Molecule do_brew_molecule() const;
+
+
 };
 #endif // LOCALKEYITEM_HH
 
index 8dfbba2f5f7b2c4cd3c92f01785dc46dc96ea95c..0258c9a7ee12e409e4ac1d52d217976c0d2e622a 100644 (file)
@@ -16,7 +16,7 @@
 class Multi_measure_rest : public Spanner
 {
 public:
-  Multi_measure_rest ();
+  Multi_measure_rest (SCM);
 
   void add_column (Item*);
   Molecule compound_rest (int)const;
index c19f9ce6feadd12b57a1f305cfcedb0d397db8b6..4b4c0f3d1cabcc417afd0c6b7365469a6bbf86e5 100644 (file)
@@ -26,7 +26,6 @@ public:
   Scope *scope_p_;
   
   Array<String> filename_str_arr_;
-  Scheme_hash_table default_properties_;
   
   Music_output_def (Music_output_def const&);
   Music_output_def ();
index 9ad0295ad70ae9bd1e9bb7b33b92f6597f5a2510..88c2c3601627add17fb4d1e24c5384407a9bddac 100644 (file)
@@ -35,7 +35,7 @@ public:
   void translate_rests(int dy);
   Note_head * first_head ()const;
   Interval rest_dim ()const ;
-  Note_column ();
+  Note_column (SCM);
   void set_stem (Stem*);
   void set_dotcol (Dot_column*);
   void add_head (Rhythmic_head*);
index 3354ecfb2495a2cc6b58775154f01dcfcca61388..85442c0b004ba7f984b12ed4a29e1684cc3e9e42 100644 (file)
@@ -25,8 +25,8 @@ public:
   static int compare (Note_head * const &a, Note_head *const &b) ;
 
   Molecule ledger_line (Interval) const;
+  Note_head (SCM);
 protected:
-  
   virtual void before_line_breaking ();
   virtual Molecule do_brew_molecule() const;
 };
index eac7a48a0ffe938e3636c073aa0e456812f1ddb4..d6f26fa718f32bc5ec803a784246b7512d7558bc 100644 (file)
@@ -18,7 +18,7 @@ public:
   void add_column (Note_column*);
   Interval rest_dim () const;
     
-  Rest_collision();
+  Rest_collision(SCM);
 protected:
   virtual void before_line_breaking ();
 };
index dcd6b81628d2999e4fec1c232e10f5bfddb33866..cb62ce38833653216825e53cf00b248e9a31378f 100644 (file)
@@ -24,5 +24,7 @@ class  Rest : public Rhythmic_head
 protected:
   virtual void after_line_breaking ();
   virtual Molecule do_brew_molecule () const;
+public:
+  Rest (SCM s);
 };
 #endif // REST_HH
index 5d3ca3d56c839f7a41e843f5f8f46895c8e1e78b..b9fc4415b60c01a7051a956c80e1630650ab5d3c 100644 (file)
@@ -36,6 +36,7 @@ public:
   int dot_count () const;
 protected:
   virtual void after_line_breaking ();
+  Rhythmic_head (SCM s);
 };
 
 #endif // RHYTHMIC_HEAD_HH
index 1c0d7e4ef3e5e4216cb26bb5d37dc5905978c9e9..16a0d8b39adedb1bb6332e5d64c3b1fc7a3d271e 100644 (file)
@@ -17,6 +17,8 @@
 typedef Interval (*Extent_callback)(Score_element const *,Axis);
 typedef Real (*Offset_callback)(Score_element const *,Axis);
 
+#define READONLY_PROPS         // FIXME.
+
 
 /**
     for administration of what was done already
@@ -69,6 +71,9 @@ class Score_element  {
 public:                                // ugh.
   SCM property_alist_;
   SCM pointer_alist_;
+#ifndef READONLY_PROPS
+  SCM basic_property_list_;
+#endif
 public:
   Score_element *original_l_;
 
@@ -79,13 +84,6 @@ public:
     0 means ORPHAN,
    */
   char status_i_;
-  /**
-     Set this if anyone points to me, or if I point to anyone.
-
-     JUNKME.
-   */
-  bool used_b_;
-  
   char const * name () const;
 
   /*
@@ -95,7 +93,7 @@ public:
    */
   Paper_score *pscore_l_;
 
-  Score_element ();
+  Score_element (SCM basic_props);
   Score_element (Score_element const&);
 
   /*
index 0ba7cb1281a9f7ae5e4c0226fb5a97b574b7cbe0..d79e25f3f8071bfb2391d76e4855e09400307283 100644 (file)
@@ -15,7 +15,7 @@
 class Script_column : public Item
 {
 public:
-  Script_column();
+  Script_column(SCM);
   void add_staff_sided (Item*);
 protected:
   virtual void before_line_breaking ();
index 05149c7b93104214ea90386e7e69c2c339487bd7..4d8441584d809ec609625cacabcd5d692bb23506 100644 (file)
@@ -22,6 +22,7 @@ class Script : public Item
 {
   Molecule get_molecule (Direction d) const;
 public:
+  Script (SCM);
   
 protected:
   virtual void before_line_breaking ();
index 6deb0fba8ea835912414b572092999c11ab78abd..bfbe26506224c4fd7ecbb9da67a14010ebf029f3 100644 (file)
@@ -16,7 +16,7 @@ class Separating_group_spanner : public Spanner
 {
 public:
   void add_spacing_unit (Single_malt_grouping_item*);
-  Separating_group_spanner();
+  Separating_group_spanner(SCM);
 protected:
   VIRTUAL_COPY_CONS(Score_element);
   virtual Array<Rod> get_rods () const;
index 17280a2b82cb1169e19e07a1ae6d6547cb0792c5..082a37b517317f5867ae1b873937a391b2b9c50d 100644 (file)
@@ -31,7 +31,7 @@ class Single_malt_grouping_item : public Item
 {
   VIRTUAL_COPY_CONS(Score_element);
 public:
-  Single_malt_grouping_item ();
+  Single_malt_grouping_item (SCM);
   Interval my_width () const;
   void add_item (Item*);
 };
index cb202f1e93032f41214176105842a1f9da8af21d..3ab1dff6bd31f4a39c1fdd73128d0aa6a7153913 100644 (file)
@@ -16,7 +16,7 @@
 class Slur : public Spanner
 {
 public:
-  Slur ();
+  Slur (SCM);
   VIRTUAL_COPY_CONS(Score_element);
 
   void add_column (Note_column*);
index 46a7d6f025cdb6e76ff19fbf639b804c258c50cb..c6e4bdd7cdf628e757c06b62c6885558e33a4cf1 100644 (file)
@@ -15,7 +15,7 @@
 class Spacing_spanner : public Spanner
 {
 public:
-  Spacing_spanner ();
+  Spacing_spanner (SCM);
 
   VIRTUAL_COPY_CONS(Score_element);
   Array<Spring> do_measure (Link_array<Paper_column>) const;
index ff5c6b0700182606f5b92aeea5112523294f9ad2..17886676cdf2fb56bf0b5f55779fb2b8ee060f65 100644 (file)
@@ -25,7 +25,7 @@ class Span_bar : public Bar
 {
   Interval get_spanned_interval () const;
 public:
-  Span_bar();
+  Span_bar (SCM);
     
   VIRTUAL_COPY_CONS(Score_element);
   void add_bar (Score_element*);
index 2a50a826b2d986719502650e0ae2382c30888d7c..b3e894804de62e362478470bcc11de7f4930d5ae 100644 (file)
@@ -40,7 +40,7 @@ public:
   void set_bound (Direction d, Item*);
   Item *get_bound (Direction d) const;
   
-  Spanner ();
+  Spanner (SCM);
   Spanner (Spanner const &);
   bool broken_b () const;
   void do_break ();
index c8f5049293571403f032ed0331938a6a91352873..0932ef78a1337d1f8072857e13d04100a5a4480b 100644 (file)
@@ -22,6 +22,7 @@ class Staff_bar : public Bar
 public:
   VIRTUAL_COPY_CONS(Score_element);
   virtual Real get_bar_size () const;
+  Staff_bar (SCM);
 };
 
 #endif /* STAFF_BAR_HH */
index 88821052fe5cdc84afc14cff39b1b54876e09a37..676886c7ec0c81066a2984851d04c359c5032751 100644 (file)
@@ -21,8 +21,11 @@ public:
   Real staff_space () const;
   int steps_i() const;
   int line_count () const;
+  Staff_symbol (SCM s);
+  
 protected:
   VIRTUAL_COPY_CONS(Score_element);
   virtual Molecule do_brew_molecule() const;
+
 };
 #endif // STAFFSYM_HH
index 59ac84f3e1d3d6d1f4573efe6a9fd7381edde8d3..11c1c93af87f5011791f4baeb454de4e225d2a37 100644 (file)
@@ -20,7 +20,7 @@ protected:
 
   static Interval dim_callback (Score_element*, Axis);
 public:
-  Stem_tremolo ();
+  Stem_tremolo (SCM);
   void set_stem (Stem *);
 };
 
index d843a9846c85ffe51a19402ffed076d8a13d3bd1..8ae9771fca07820c7abc424c4edb80d8bfd43cc8 100644 (file)
@@ -57,7 +57,7 @@ public:
   Drul_array<Note_head*> extremal_heads () const;
 
   Score_element * support_head () const;
-  Stem ();
+  Stem (SCM);
 
   /// ensure that this Stem also encompasses the Notehead #n#
   void add_head (Rhythmic_head*n);
index b2ae20e9849d33e8b43161445ec70ed6092f3abf..9f17f20361a0f8c330688760108e035350e8e96d 100644 (file)
@@ -32,7 +32,7 @@ class Sustain_pedal : public Item
 {
 public:
   VIRTUAL_COPY_CONS (Score_element);
-
+  Sustain_pedal (SCM);
 protected:
   virtual Molecule do_brew_molecule () const;
   virtual void after_line_breaking ();
index d594c7ff876668de2f5f950e0340ce27b43d1fdd..d84acd97d0d0b5ae53a917e42fe4b73043e6575c 100644 (file)
@@ -18,7 +18,7 @@
 class System_start_delimiter : public Spanner
 {
 public:
-  System_start_delimiter ();
+  System_start_delimiter (SCM);
   VIRTUAL_COPY_CONS (Score_element);
 protected:
   virtual void after_line_breaking();
index f6aaa02928310b469ca24ae66b4e9712d0678b06..818a5a3139e77fd337b8532ca6a57979e4c982d7 100644 (file)
@@ -19,6 +19,7 @@ class Text_item : public Item
 {
 public:
   VIRTUAL_COPY_CONS (Score_element);
+  Text_item (SCM s);
 protected:
   virtual Molecule do_brew_molecule () const;
 };
index cdbe522201becfc5d0cb66c7bcb3a1dcffdba3f9..6dfe54d82b30e85c8f2af2d528d99da3027882de 100644 (file)
@@ -18,11 +18,10 @@ class Tie_column : public Spanner
 public:
   VIRTUAL_COPY_CONS (Score_element);
   void add_tie (Tie*);
-  Tie_column ();
+  Tie_column (SCM s);
 protected:
   virtual void after_line_breaking ();
   void set_directions ();
-  
 };
 
 #endif /* TIE_COLUMN_HH */
index 4240193247a4b2017158ebe33547c0bc4bf2ad9b..7de2697cfaf26d80b410c6e440588ffaa5ff2b56 100644 (file)
@@ -19,7 +19,7 @@
 class Tie : public Spanner
 {
 public:
-  Tie ();
+  Tie (SCM);
   void set_head (Direction, Item*head_l);
   VIRTUAL_COPY_CONS(Score_element);
 
index 3bdc1208e19a0eb318e5759268d98ab75d0dd0b0..6744bff15e525b15df5aea7ae0483cf207ee77ff 100644 (file)
@@ -26,7 +26,7 @@ class Time_signature: public Item
 protected:
   virtual Molecule do_brew_molecule() const;
 public:
-  Time_signature (;
+  Time_signature (SCM);
 
   /*
     TODO: make this SCM!
index b851d1f626c5787e9e6d9844561f347eb64e3a2c..51789988b6d7da57cc79c609460b000caec08bc9 100644 (file)
@@ -20,7 +20,7 @@
 class Tuplet_spanner : public Spanner
 {
 public:
-  Tuplet_spanner ();
+  Tuplet_spanner (SCM);
  
   void add_column (Note_column*);
   void add_beam (Beam*);
index e76d6e0537b8288188dd7fe12745ff9c4db2f012..a1f9b0ebfef62eab5422deb2ebf81c0dd6c9ca65 100644 (file)
@@ -16,7 +16,7 @@
 class Volta_spanner : public Spanner
 {
 public:
-  Volta_spanner ();
+  Volta_spanner (SCM);
  
   void add_column (Note_column*);
   void add_bar (Bar*);
index 584d0d9cd77aa13662fee2e9d98934f56299f328..1a9bd7da1f2a1cfe5053af60c01c9f41b7cd946e 100644 (file)
@@ -55,17 +55,12 @@ Instrument_name_engraver::create_text (SCM txt)
 {
   if(!text_)
     {
-      text_ = new Text_item;
+      text_ = new Text_item (get_property ("basicInstrumentNameProperties"));
       text_->set_elt_property ("text", txt);
-      text_->set_elt_property ("breakable", SCM_BOOL_T);
 
       /*
        TODO: use more lispish names for break-align-symbols
        */
-      text_->set_elt_property ("break-align-symbol", ly_symbol2scm ("Instrument_name"));
-      text_->set_elt_property ("visibility-lambda",
-                              scm_eval (ly_symbol2scm ("begin-of-line-visible")));
-
       if (delim_)
        text_->set_parent (delim_, Y_AXIS);
 
index 61c0a28f8e99fa11777ce726b30cc89e68f203b4..ea8fde5d84395babf682f9f4f2e8aa31f45494d7 100644 (file)
@@ -15,7 +15,9 @@
 #include "lily-guile.hh"
 #include "line-of-score.hh"
 
-Item::Item ()
+Item::Item (SCM s)
+  : Score_element (s)
+
 {
   broken_to_drul_[LEFT] = broken_to_drul_[RIGHT]=0;
 }
index 85419c2a1901bd7aa2217fae55f1bcbcbd60e389..250fb169eaeaecce877cfc764ffb14f290b5bfa8 100644 (file)
@@ -5,7 +5,7 @@
 
   (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   */
-// clean me up 
+
 #include "key-engraver.hh"
 #include "key-item.hh"
 #include "command-request.hh"
 #include "timing-translator.hh"
 #include "staff-symbol-referencer.hh"
 
+/*
+  this is a large mess. Please clean this to use Basic properties and
+  Scheme data structs.
+ */
+
 Key_engraver::Key_engraver ()
 {
   item_p_ = 0;
@@ -33,11 +38,11 @@ Key_engraver::create_key (bool def)
 {
   if (!item_p_) 
     {
-      item_p_ = new Key_item;
-      item_p_->property_alist_ = get_property ("basicKeyProperties");
-
+      item_p_ = new Key_item ( get_property ("basicKeyProperties"));
       
       item_p_->set_elt_property ("c0-position", gh_int2scm (0));
+
+      // todo: put this in basic props.
       item_p_->set_elt_property ("old-accidentals", SCM_EOL);
       item_p_->set_elt_property ("new-accidentals", SCM_EOL);
 
index 2740a77a041440b88caa9da63d3893be274d9c84..c9b74955b7cf6901fb61ae0b470ccd49413e1a01 100644 (file)
@@ -18,9 +18,9 @@
 const int FLAT_TOP_PITCH=2; /* fes,ges,as and bes typeset in lower octave */
 const int SHARP_TOP_PITCH=4; /*  ais and bis typeset in lower octave */
 
-Key_item::Key_item ()
+Key_item::Key_item (SCM s)
+  : Item (s)
 {
-  set_elt_property ("breakable", SCM_BOOL_T);
   set_elt_property ("c0-position", gh_int2scm (0));
 }
 
index e08fae228911dc26434485cdc137ae0bfa4591cc..aa4b6e8c20c21a98bebe3efd754791d674af498d 100644 (file)
@@ -52,7 +52,7 @@ Line_group_engraver_group::do_creation_processing()
 void
 Line_group_engraver_group::create_line_spanner ()
 {
-  staffline_p_ = new Spanner ;
+  staffline_p_ = new Spanner (SCM_EOL);
   Axis_group_interface (staffline_p_).set_interface ();
   Axis_group_interface (staffline_p_).set_axes (Y_AXIS,Y_AXIS);
 }
index fc9f6393674990a03f940744b49ffa3f8fb2031d..afde3217cdd75e665b64ed64c6bc8cd2b46b352d 100644 (file)
@@ -36,7 +36,7 @@ Line_number_engraver::process_acknowledged ()
 {
   if (!text_item_p_ && interesting_.size ())
     {
-      text_item_p_ = new Text_item;
+      text_item_p_ = new Text_item (SCM_EOL);
       Side_position_interface si (text_item_p_);
       si.set_axis (Y_AXIS);
       text_item_p_->set_parent (interesting_[0].elem_l_, Y_AXIS);
index 2f340aaf4f9098d6bf20f48e15f75066b45b3732..2ca094bab979f352e4112d875523e229f0112438 100644 (file)
@@ -21,6 +21,7 @@
 #include "all-font-metrics.hh"
 
 Line_of_score::Line_of_score()
+  : Spanner (SCM_EOL)
 {
   set_elt_pointer ("columns", SCM_EOL);
   set_elt_pointer ("all-elements", SCM_EOL);
index f917dc7e8ae0dacd3bcef95575e1a7f6adcc8679..8a5678fe1b9cae4b971881092b096d4b8bbbbd22 100644 (file)
@@ -124,7 +124,7 @@ Local_key_engraver::process_acknowledged ()
            {
              if (!key_item_p_) 
                {
-                 key_item_p_ = new Local_key_item;
+                 key_item_p_ = new Local_key_item (SCM_EOL);
                  Side_position_interface (key_item_p_).set_axis (X_AXIS);
                  Side_position_interface (key_item_p_).set_direction (LEFT);
                  staff_symbol_referencer(key_item_p_).set_interface ();
index 9166bb2fd0a93a17c54985eb7b21defdac191db9..e730ad4ea08321f1f3365dc36ab35ea9b606b47c 100644 (file)
@@ -136,3 +136,8 @@ Local_key_item::do_brew_molecule() const
   return mol;
 }
 
+Local_key_item::Local_key_item (SCM s)
+  : Item (s)
+{
+  
+}
index 61e12a1c5101c8a75746e4328cfa999ca7d989a0..fce604816314f532ffc1c1f5857ab3ebf802dbff 100644 (file)
@@ -40,11 +40,11 @@ Lyric_engraver::do_process_music()
 {
   if (req_l_)
     {
-      text_p_=  new Text_item;
+      text_p_=  new Text_item (get_property ("basicLyricTextProperties"));
       
       text_p_->set_elt_property ("text",
                                 ly_str02scm   ((req_l_->text_str_ + " ").ch_C ()));
-      text_p_->set_elt_property ("non-rhythmic", SCM_BOOL_T);
+
       announce_element (Score_element_info (text_p_, req_l_));
     }
 }
index 7f79b1d2103ab0ef9ccab32710c84dc1f8c15081..88c15506066ca484f75b25f796f9596626d3a73c 100644 (file)
@@ -34,7 +34,6 @@ public:
   Mark_engraver ();
 protected:
   Text_item* text_p_;
-  Protected_scm visibility_lambda_;
   Protected_scm staffs_;
   
 protected:
@@ -63,15 +62,9 @@ Mark_engraver::Mark_engraver ()
 void
 Mark_engraver::do_creation_processing ()
 {
-  String t = "markVisibilityFunction";
-  SCM proc = get_property (t);
-
-  if (gh_procedure_p (proc))
-    visibility_lambda_ = proc;
 }
 
 
-
 void
 Mark_engraver::acknowledge_element (Score_element_info inf)
 {
@@ -107,13 +100,17 @@ Mark_engraver::create_items (Request *rq)
 {
   if (text_p_)
     return;
-  
-  text_p_ = new Text_item;
-  text_p_->set_elt_property ("breakable", SCM_BOOL_T); // ugh
+
+  SCM s = get_property ("basicMarkProperties");
+  text_p_ = new Text_item (s);
+
   Group_interface (text_p_, "interfaces").add_thing (ly_symbol2scm ("Mark"));
   Side_position_interface staffside(text_p_);
   staffside.set_axis (Y_AXIS);
 
+  /*
+    -> Generic props.
+   */
   SCM prop = get_property ("markDirection");
   if (!isdir_b (prop))
     {
@@ -133,9 +130,6 @@ Mark_engraver::create_items (Request *rq)
                            gh_double2scm(paper_l ()->get_var ("interline")));
     }
 
-  if (gh_procedure_p (visibility_lambda_))
-      text_p_->set_elt_property ("visibility-lambda",
-                                visibility_lambda_);
   
   announce_element (Score_element_info (text_p_, rq));
 }
index fa7573888c8e6eebe07623ef226b9ca1ae2c9cd3..5941e43ec82e5f479284ee7f6d5ca1fdb3120f70 100644 (file)
@@ -109,7 +109,7 @@ Multi_measure_rest_engraver::do_process_music ()
 
   if (busy_span_req_l_ && !mmrest_p_)
     {
-      mmrest_p_ = new Multi_measure_rest;
+      mmrest_p_ = new Multi_measure_rest (SCM_EOL);
       Staff_symbol_referencer_interface si (mmrest_p_);
       si.set_interface ();
 
index ff02759d3c51061f89a50b3595c2f18d93d688a1..cd770d0d0418095cb021582e0c45d5c43dcc675b 100644 (file)
@@ -20,7 +20,8 @@
 #include "stem.hh"
 #include "staff-symbol-referencer.hh"
 
-Multi_measure_rest::Multi_measure_rest ()
+Multi_measure_rest::Multi_measure_rest (SCM s)
+  : Spanner (s)
 {
   set_elt_pointer ("columns", SCM_EOL);
 }
index a673d9fcb9f2d47104b0c9cc842e480250921bd5..0805e3c2426d782af210e2cd932ca285ff485788 100644 (file)
@@ -39,7 +39,7 @@ Music_output_def::Music_output_def (Music_output_def const &s)
 {
   scope_p_ = new Scope (*s.scope_p_);
   translator_p_dict_p_ = new Scope (*s.translator_p_dict_p_);
-  default_properties_ = s.default_properties_;
+  //  default_properties_ = s.default_properties_;
   
   for (Scope_iter i (*translator_p_dict_p_);  i.ok (); i++)
     {
index 7b8426077d88d3fab0271b80bbaefe351573ee40..7c1dd5ae9cf481c0079d358102a42535ab487eec 100644 (file)
@@ -38,7 +38,8 @@ Note_column::shift_compare (Note_column *const &p1, Note_column*const&p2)
   return h1 - h2;
 }
 
-Note_column::Note_column()
+Note_column::Note_column( SCM s)
+  : Item (s)
 {
   set_elt_pointer ("rests", SCM_EOL);
   set_elt_pointer ("note-heads", SCM_EOL);  
index 027f736c54405a5fb2359b1da6cac0fdd2858f54..d5fa47e7ff3bda9dcd057dbde2319d9221ee72bb 100644 (file)
@@ -119,3 +119,9 @@ Note_head::do_brew_molecule() const
   return out;
 }
 
+
+Note_head::Note_head (SCM s)
+  : Rhythmic_head (s)
+{
+  
+}
index 780b6425007d9ab047777b46a80ef058ce58a957..3090a6d111d33f7df1e8d8256acf417e36e321b7 100644 (file)
@@ -60,7 +60,7 @@ Note_heads_engraver::do_process_music()
   
   for (int i=0; i < note_req_l_arr_.size (); i++)
     {
-      Note_head *note_p  = new Note_head;
+      Note_head *note_p  = new Note_head (SCM_EOL);
       
       Staff_symbol_referencer_interface si (note_p);
       si.set_interface ();
@@ -73,7 +73,7 @@ Note_heads_engraver::do_process_music()
 
       if (note_req_l->duration_.dots_i_)
        {
-         Dots * d = new Dots;
+         Dots * d = new Dots (SCM_EOL);
 
          Staff_symbol_referencer_interface sd (d);
          sd.set_interface ();
index 80e7651b6e2bb46e873bced56c3039df9e4d1bca..1f03a0ea1a3eeb9788f057d6d6f2716647a6dbf4 100644 (file)
@@ -46,7 +46,7 @@ Note_name_engraver::do_process_music ()
     }
   if (s.length_i())
     {
-      Text_item * t = new Text_item;
+      Text_item * t = new Text_item (SCM_EOL);
       t->set_elt_property ("text", ly_str02scm ( s.ch_C()));
       announce_element (Score_element_info (t, req_l_arr_[0]));
       texts_.push (t);
index a399a6aceae73c304a056d5a1d330895b4a057e9..f7db1474a2f5ac1bf1795b6c3def51dba66f4836 100644 (file)
@@ -95,6 +95,7 @@ Paper_column::column_l () const
 }
 
 Paper_column::Paper_column (Moment w)
+  : Item (SCM_EOL)
 {
   SCM when = (new Moment (w))->smobify_self ();
   scm_unprotect_object (when);
index 9234da4d1c89b793c002e1932b9f34d50a487b54..08adf11220692ddf50464357e0f0f74244354ffb 100644 (file)
@@ -78,36 +78,17 @@ Paper_def::get_realvar (SCM s) const
   return *p;
 }
 
-
+/*
+  FIXME. This is broken until we have a generic way of
+  putting lists inside the \paper block.
+ */
 Interval
 Paper_def::line_dimensions_int (int n) const
 {
-  SCM s = default_properties_.get (ly_symbol2scm ("margin-shape"));
-  if (!gh_pair_p (s))
-    {
-      Real lw =  get_var ("linewidth");
-      Real ind = n? 0.0:get_var ("indent");
+  Real lw =  get_var ("linewidth");
+  Real ind = n? 0.0:get_var ("indent");
 
-      return Interval (ind, lw);
-    }
-
-  SCM last = SCM_EOL;
-  while (gh_pair_p (s) && n --)
-    {
-      last = s;
-      s = gh_cdr (s);
-    }
-
-  if (s == SCM_EOL)
-    {
-      s = last;
-    }
-
-  SCM pair = gh_car (s);
-  
-  return Interval (gh_scm2double (gh_car (pair)),
-                  gh_scm2double (gh_cdr (pair)));
+  return Interval (ind, lw);
 }
 
 void
index 3c0320699b22582313824df0bbc84026f61fe1d8..e6c4fe3c191a097738f36fad245cb45adf67cc7c 100644 (file)
@@ -547,18 +547,6 @@ paper_def_body:
        }
        | paper_def_body assignment semicolon {
                
-       }
-       | paper_def_body SCM_T '=' SCM_T {
-               if (!gh_symbol_p ($2))
-                       THIS->parser_error ("expect a symbol as lvalue");
-               else
-                       $$->default_properties_.set ($2, $4);
-       }
-       | paper_def_body SCM_T '=' real semicolon {
-               if (!gh_symbol_p ($2))
-                       THIS->parser_error ("expect a symbol as lvalue");
-               else
-                       $$->default_properties_.set ($2, gh_double2scm ($4));
        }
        | paper_def_body translator_spec_block {
                $$->assign_translator ($2);
index 216670ca3052192c5c2f5456f2d3411473fd0a0e..e51fff1c6eacfec6da71b43f38e32e4790e2c82a 100644 (file)
@@ -185,12 +185,12 @@ Piano_pedal_engraver::do_process_music ()
        {
          if (p->name_ == String ("Sustain"))
            {
-             p->item_p_ = new Sustain_pedal;
+             p->item_p_ = new Sustain_pedal (SCM_EOL);
              p->item_p_->set_elt_property ("text", s);
            }
          else
            {
-             p->item_p_ = new Text_item;
+             p->item_p_ = new Text_item (SCM_EOL);
              p->item_p_->set_elt_property ("text", s);
              // guh
              p->item_p_->set_elt_property ("style", ly_str02scm ("italic"));
@@ -199,6 +199,7 @@ Piano_pedal_engraver::do_process_music ()
          Side_position_interface si (p->item_p_);
          si.set_axis (Y_AXIS);
 
+         // todo: init with basic props.
          p->item_p_->set_elt_property ("no-spacing-rods"  , SCM_BOOL_T);
          p->item_p_->set_elt_property ("self-alignment-X", gh_int2scm (0));
          p->item_p_->add_offset_callback (Side_position_interface::aligned_on_self, X_AXIS);
index dd40723e39767a5dc443c1233378e95bc19f9c1b..f20aea2b052603de40382da8a7d6611105c4268c 100644 (file)
@@ -33,9 +33,6 @@ Pointer_group_interface::has_interface_b ()
 void
 Pointer_group_interface::add_element (Score_element*p) 
 {
-  p->used_b_ =  true;
-  elt_l_->used_b_ = true;
-
   elt_l_->set_elt_pointer (name_.ch_C(),
                           gh_cons (p->self_scm_,
                                    elt_l_->get_elt_pointer (name_.ch_C())));
index 67fa3e661e358670068c7ccb2a7bb7504b1d4f89..8c838c3474595393bdabdd03a7a056855d9c6b36 100644 (file)
@@ -180,7 +180,7 @@ Repeat_engraver::do_process_music ()
          else
            {
              assert (!volta_span_p_);
-             volta_span_p_ = new Volta_spanner;
+             volta_span_p_ = new Volta_spanner (SCM_EOL);
              announce_element (Score_element_info (volta_span_p_,0));
              volta_span_p_->set_elt_property ("text",
                                               ly_str02scm (t.ch_C()));
index c735a0320512bf5081034329491dd3aa40f043ad..606dfe30d6e81bf136e0c716e66783b1cb3221c8 100644 (file)
@@ -27,7 +27,7 @@ Rest_collision_engraver::process_acknowledged ()
   if (rest_collision_p_ || note_column_l_arr_.size () < 2)
     return;
 
-  rest_collision_p_ = new Rest_collision;
+  rest_collision_p_ = new Rest_collision (get_property ("basicRestCollisionProperties"));
   
   announce_element (Score_element_info (rest_collision_p_, 0));
   for (int i=0; i< note_column_l_arr_.size (); i++)
index d713630dbedd1ebc6416507e01d0dee15c202478..34d39fbe3b49cac69308ea5efd4b7d5bd2c5ad9b 100644 (file)
@@ -188,11 +188,11 @@ Rest_collision::before_line_breaking ()
 }
 
 
-Rest_collision::Rest_collision()
+Rest_collision::Rest_collision(SCM s)
+  : Item (s)
 {
   set_elt_pointer ("rests", SCM_EOL);
   set_elt_pointer ("notes", SCM_EOL);
-  set_elt_property ("transparent", SCM_BOOL_T);
   set_extent_callback (0, X_AXIS);
   set_extent_callback (0, Y_AXIS);
 }
index fce8f71bbd4dde7bdb0bd8fa9c02aea88b0f408e..37b3e6ee1f9402cc795fb666f339a94d3a0d5b72 100644 (file)
@@ -46,7 +46,7 @@ Rest_engraver::do_process_music ()
 {
   if (rest_req_l_ && !rest_p_) 
     {
-      rest_p_ = new Rest;
+      rest_p_ = new Rest (SCM_EOL);
       Staff_symbol_referencer_interface si (rest_p_);
       si.set_interface ();
       
@@ -55,7 +55,7 @@ Rest_engraver::do_process_music ()
       
       if (rest_req_l_->duration_.dots_i_)
        {
-         dot_p_ = new Dots;
+         dot_p_ = new Dots (SCM_EOL);
 
          Staff_symbol_referencer_interface si (dot_p_);
          si.set_interface ();
index 89c2d1a9e0ad51c65007809668fffb08652bab00..b01d47896d9d1ae4779c6365c57ba9ba59878167 100644 (file)
@@ -62,3 +62,8 @@ Rest::do_brew_molecule () const
 
 
 
+Rest::Rest (SCM s)
+  : Rhythmic_head (s)
+{
+}
+
index a8bf90263afaf208c7c8dd7de66c495643ea7e0c..ad0c6acbdd92790e7d79b34d8f06684b022d03ca 100644 (file)
@@ -30,7 +30,7 @@ Rhythmic_column_engraver::process_acknowledged ()
     {
       if (!ncol_p_)
        {
-         ncol_p_ = new Note_column;
+         ncol_p_ = new Note_column (SCM_EOL);
          announce_element (Score_element_info (ncol_p_, 0));
        }
 
index 83aa03820b44503c375f0ea2a4e6584583874722..1b735cd5eed77d679ee4976ba0cb7d4e948e17ee 100644 (file)
@@ -67,3 +67,7 @@ Rhythmic_head::add_dots (Dots *dot_l)
 }
 
 
+Rhythmic_head::Rhythmic_head (SCM s)
+  : Item (s)
+{
+}
index ec4221cad069f6ec8f56fac669c55624a12de7e8..ea3ac9cbac2957a8bc493a66570fadd88610d143 100644 (file)
@@ -37,20 +37,22 @@ remove dynamic_cast<Spanner,Item> and put this code into respective
   subclass.
 */
 
-Score_element::Score_element()
+
+
+Score_element::Score_element(SCM basicprops)
 {
-  // junkme.
-  used_b_ = false;
   set_extent_callback (molecule_extent, X_AXIS);
   set_extent_callback (molecule_extent, Y_AXIS);    
 
-  used_b_ = false;
   pscore_l_=0;
   lookup_l_ =0;
   status_i_ = 0;
   self_scm_ = SCM_EOL;
   original_l_ = 0;
-  property_alist_ = SCM_EOL;
+#ifndef READONLY_PROPS
+  basic_property_list_ = basicprops;
+#endif READONLY_PROPS
+  property_alist_ = basicprops;
   pointer_alist_ = SCM_EOL;
   
   smobify_self ();
@@ -63,9 +65,19 @@ Score_element::Score_element (Score_element const&s)
    : dim_cache_ (s.dim_cache_)
 {
   self_scm_ = SCM_EOL;
-  used_b_ = true;
   original_l_ =(Score_element*) &s;
-  property_alist_ = s.property_alist_; 
+  property_alist_ = s.property_alist_;
+#ifndef READONLY_PROPS
+  basic_property_list_ = s.basic_property_list_;
+  /*
+    TODO: should copy the private part of the list.
+   */
+  SCM y ;
+  for (SCM *sp = &s.property_alist_;  *sp != basic_property_list_; sp = &SCM_CDR(*sp))
+    {
+      *sp = gh_cons (      
+    }
+#endif
   pointer_alist_ = SCM_EOL;
   
   status_i_ = s.status_i_;
@@ -79,6 +91,16 @@ Score_element::~Score_element()
 {
 }
 
+
+SCM
+Score_element::get_elt_pointer (const char *nm) const
+{
+  SCM sym =  ly_symbol2scm (nm);
+  SCM s = scm_assq(sym, pointer_alist_);
+
+  return (s == SCM_BOOL_F) ? SCM_UNDEFINED : gh_cdr (s); 
+}
+
 // should also have one that takes SCM arg. 
 SCM
 Score_element::get_elt_property (String nm) const
@@ -89,53 +111,49 @@ Score_element::get_elt_property (String nm) const
   if (s != SCM_BOOL_F)
     return gh_cdr (s); 
 
-  /*
-    JUNKME
-   */
-  if (pscore_l_)
-    {
-      SCM sym2 = ly_symbol2scm ((name () + ("::" + nm)).ch_C());
-      SCM val;
-      
-      // should probably check for Type::sym as well.
-      Paper_def * p= pscore_l_->paper_l_;
-      if (p->default_properties_.try_retrieve (sym2, &val))
-       return val;
-      else if (p->default_properties_.try_retrieve (sym, &val))
-       return val;
-    }
-  
   return SCM_UNDEFINED;
 }
 
-SCM
-Score_element::get_elt_pointer (const char *nm) const
-{
-  SCM sym =  ly_symbol2scm (nm);
-  SCM s = scm_assq(sym, pointer_alist_);
-
-  return (s == SCM_BOOL_F) ? SCM_UNDEFINED :  gh_cdr (s); 
-}
-
+/*
+  Remove the value associated with KEY, and return it. The result is
+  that a next call will yield SCM_UNDEFINED (and not the underlying
+  `basic' property.
+*/
 SCM
 Score_element::remove_elt_property (const char* key)
 {
-  SCM s = get_elt_property (key); 
-  SCM sym = ly_symbol2scm (key);
-  
-  property_alist_ = gh_cons (gh_cons (sym, SCM_UNDEFINED), property_alist_);
-
-  return s;
+  SCM val = get_elt_property (key);
+  if (val != SCM_UNDEFINED)
+    set_elt_property (key, SCM_UNDEFINED);
+  return val;
 }
 
 void
-Score_element::set_elt_property (String k, SCM v)
+Score_element::set_elt_property (String k, SCM val)
 {
-  SCM s = ly_symbol2scm (k.ch_C ());
-  // non destructive
-  property_alist_ = gh_cons (gh_cons (s, v),property_alist_);
+  SCM sym = ly_symbol2scm (k.ch_C ());
+#ifndef READONLY_PROPS
+  /*
+    destructive if found in my part of the list.
+   */
+  for (SCM s = property_alist_; s != basic_property_list_; s =gh_cdr (s))
+    {
+      if (gh_caar (s)== sym)
+       {
+         gh_set_cdr_x (gh_car (s), val);
+         return;
+       }
+    }
+/*
+    not found in private list. Override in private list.
+   */
+  
+#endif
+  
+  property_alist_ = gh_cons (gh_cons (sym, val), property_alist_);
 }
 
+
 void
 Score_element::set_elt_pointer (const char* k, SCM v)
 {
@@ -462,12 +480,6 @@ Score_element::handle_prebroken_dependencies()
 }
 
 
-bool
-Score_element::linked_b() const
-{
-  return used_b_;
-}
-
 Score_element*
 Score_element::find_broken_piece (Line_of_score*) const
 {
index 21b7350a83b10935903544d1a575846f541c1a04..b84406fa151f2a95b761210f9924d4d9ccd984d2 100644 (file)
@@ -144,7 +144,7 @@ Score_engraver::typeset_all()
        {
          if (!elem_p->parent_l (X_AXIS))
            {
-             bool br = to_boolean (elem_p->remove_elt_property ("breakable"));
+             bool br = to_boolean (elem_p->get_elt_property ("breakable"));
              Axis_group_interface gi ((br) ? command_column_l_ : musical_column_l_) ;
              gi.add_element(elem_p);
            }
@@ -182,7 +182,7 @@ Score_engraver::set_columns (Paper_column *new_command_l,
       if (*current[i])
        {
          if ((*current[i])->used_b())
-         //      if ((*current[i])->linked_b())          
+
            {
              scoreline_l_->add_column ((*current[i]));
            }
index 131bf4bb637401addc37da0f11ee7b273c67c6bb..9fbf4f567d61c8d34da0f808f11e413ed28e16d6 100644 (file)
@@ -73,7 +73,7 @@ Script_column_engraver::process_acknowledged ()
 {
   if (!scol_p_ && script_l_arr_.size () > 1)
     {
-      scol_p_ = new Script_column;
+      scol_p_ = new Script_column (SCM_EOL);
       announce_element (Score_element_info (scol_p_, 0));
     }
 
index ad776158a28e5c65fb760e8d8b5a8ae7eb8177cd..c4123815d435e7080fe78dbb32fb2d043920886e 100644 (file)
@@ -25,9 +25,10 @@ Script_column::add_staff_sided (Item *i)
   add_dependency (i);
 }
 
-Script_column::Script_column ()
+Script_column::Script_column (SCM s)
+  : Item (s)
 {
-  set_elt_property ("scripts", SCM_EOL);  
+  set_elt_pointer ("scripts", SCM_EOL);  
 }
 
 static int
index 3ea13a879a8180d362581563f72870c464eb8c28..7136ba6841659969a4b35b69de1446793777f4de 100644 (file)
@@ -70,7 +70,8 @@ Script_engraver::do_process_music()
                        l->articulation_str_.ch_C ()));
          continue;
        }
-      Script *p =new Script;
+      // todo -> use result of articulation-to-scriptdef directly as basic prop list.
+      Script *p =new Script (SCM_EOL);
       Side_position_interface stafy (p);
       
       
index 3e78d6acd8a4d2ecd2fff26dfd522d3c61d22db7..20c799cd9649ea7e5ecd0a07339be390c0107bf9 100644 (file)
 #include "paper-def.hh"
 #include "dimension-cache.hh"
 
+Script ::Script (SCM s)
+  : Item (s)
+{
+}
 
 Molecule
 Script::get_molecule(Direction d) const
index ea15f96c0928da0235b48075632b106802b44b69..9ce1156d171bccdf9b29d9287e68eed29592a568 100644 (file)
@@ -106,7 +106,8 @@ Separating_group_spanner::add_spacing_unit (Single_malt_grouping_item*i)
 }
 
 
-Separating_group_spanner::Separating_group_spanner ()
+Separating_group_spanner::Separating_group_spanner (SCM s)
+  : Spanner (s)  
 {
   set_elt_pointer ("elements", SCM_EOL);
 }
index 7d99122fd5c4f1ceb2f61f43c678b33bf5a6fca6..4abc0d3aafa1cfa28e6aa28f97a36efb5ae0c0f7 100644 (file)
@@ -23,7 +23,7 @@ Separating_line_group_engraver::Separating_line_group_engraver ()
 void
 Separating_line_group_engraver::do_creation_processing ()
 {
-  sep_span_p_ = new Separating_group_spanner;
+  sep_span_p_ = new Separating_group_spanner (SCM_EOL);
   announce_element (Score_element_info (sep_span_p_, 0));
   sep_span_p_->set_bound (LEFT, get_staff_info ().command_pcol_l ());
 }
@@ -48,7 +48,10 @@ Separating_line_group_engraver::acknowledge_element (Score_element_info i)
 
       if (!p_ref_)
        {
-         p_ref_ = new Single_malt_grouping_item;
+         p_ref_
+           = new Single_malt_grouping_item
+           (get_property ("basicSingleMaltGroupingItemProperties"));
+         
          if (ib)
            p_ref_->set_elt_property ("breakable", SCM_BOOL_T);
          announce_element (Score_element_info (p_ref_, 0));
index e12f7ed0c1857fcbcca1385eb0e10660337a90cf..84d10f7230e5e4cce8ebbc558652f3af7a5f2490 100644 (file)
@@ -12,9 +12,9 @@
 #include "debug.hh"
 #include "group-interface.hh"
 
-Single_malt_grouping_item ::Single_malt_grouping_item()
+Single_malt_grouping_item ::Single_malt_grouping_item(SCM s)
+  : Item (s)
 {
-  set_elt_property ("transparent", SCM_BOOL_T);
   set_elt_pointer ("elements", SCM_EOL);
 
   // this is weird! , but needed!
index 5d7114482de3f78055cd4f829d59ac8b08276ac9..89edf59ca959950c3668ea54b9432c1bbfa107ae 100644 (file)
@@ -106,7 +106,7 @@ Slur_engraver::do_process_music()
        {
          // push a new slur onto stack.
          //(use temp. array to wait for all slur STOPs)
-         Slur * s_p =new Slur;
+         Slur * s_p =new Slur (SCM_EOL);
          
          requests_arr_.push (slur_req_l);
          start_slur_l_arr_.push (s_p);
index 8439b6a35c0a70296a79e44a7f50ae710b45dfb2..f15b9a3bb8ef6144fcee18bc1217df81087fcd3a 100644 (file)
@@ -215,7 +215,8 @@ Slur_bezier_bow::fit_factor () const
   Slur
 */
 
-Slur::Slur ()
+Slur::Slur (SCM s)
+  : Spanner (s)
 {
   // URG
   dy_f_drul_[LEFT] = dy_f_drul_[RIGHT] = 0.0;
index 83b3ab1337ab343124bdc2b1c46f839b06d0c745..5e05094bdb132104b7e0da51841b7037519b947a 100644 (file)
@@ -34,7 +34,7 @@ Spacing_engraver::Spacing_engraver()
 void
 Spacing_engraver::do_creation_processing ()
 {
-  spacing_p_  =new Spacing_spanner;
+  spacing_p_  =new Spacing_spanner (SCM_EOL);
   spacing_p_->set_bound (LEFT, get_staff_info ().command_pcol_l ());  
   announce_element (Score_element_info (spacing_p_, 0));
 }
index 4b413ec6a8cc61d06498e992ef88e0ff93e1dad3..d9de35e5f34e7edf87deb5009901cd4de2437109 100644 (file)
@@ -16,7 +16,8 @@
 #include "line-of-score.hh"
 #include "misc.hh"
 
-Spacing_spanner::Spacing_spanner ()
+Spacing_spanner::Spacing_spanner (SCM s)
+  : Spanner (s)
 {
   set_extent_callback (0, X_AXIS);
   set_extent_callback (0, Y_AXIS);  
index 5a3e29b9685a12cdfbdd0131539a7055f44cb1cf..f2659b09230e6ad55c1202e5e994e141c27c44f5 100644 (file)
@@ -31,7 +31,7 @@ public:
 protected:
   virtual void acknowledge_element (Score_element_info);
   virtual void do_pre_move_processing();
-  virtual Span_bar* get_span_bar_p() const;
+  virtual Span_bar* get_span_bar_p(SCM) const;
 };
 
 
@@ -41,9 +41,9 @@ Span_bar_engraver::Span_bar_engraver()
 }
 
 Span_bar*
-Span_bar_engraver::get_span_bar_p() const
+Span_bar_engraver::get_span_bar_p(SCM s) const
 {
-  Span_bar * sp= new Span_bar;
+  Span_bar * sp= new Span_bar (s);
   return sp;
 }
 
@@ -59,8 +59,7 @@ Span_bar_engraver::acknowledge_element (Score_element_info i)
 
       if (bar_l_arr_.size() >= 2 && !spanbar_p_) 
        {
-         spanbar_p_ = get_span_bar_p();
-         spanbar_p_-> property_alist_ = bar_l_arr_[0]->property_alist_;
+         spanbar_p_ = get_span_bar_p( bar_l_arr_[0]->property_alist_);
          spanbar_p_->set_parent (bar_l_arr_[0], Y_AXIS);
          spanbar_p_->set_parent (bar_l_arr_[0], X_AXIS);
 
index f33f70fdcedb3bb092a7f7c4e6471eb1bdcd2e42..741d7c00f0d450484d5267eaeab1890e1e7ae1e8 100644 (file)
@@ -58,7 +58,7 @@ Span_bar::after_line_breaking ()
 void
 Span_bar::evaluate_empty ()
 { 
-  if (!gh_pair_p (get_elt_property ("elements")))
+  if (!gh_pair_p (get_elt_pointer ("elements")))
     {
       set_elt_property ("transparent", SCM_BOOL_T);
       set_extent_callback (0, X_AXIS);
@@ -74,6 +74,7 @@ Span_bar::evaluate_empty ()
     }
   else {
     String type_str = ly_scm2string (gl);
+    String orig = type_str;
     if (type_str == "|:") 
       {
        type_str= ".|";
@@ -86,8 +87,8 @@ Span_bar::evaluate_empty ()
       {
        type_str= ".|.";
       }
-
-    set_elt_property ("glyph", ly_str02scm (type_str.ch_C()));
+    if (orig != type_str)
+      set_elt_property ("glyph", ly_str02scm (type_str.ch_C()));
   }
 }
 
@@ -110,7 +111,8 @@ Span_bar::get_bar_size () const
   return iv.length ();
 }
 
-Span_bar::Span_bar ()
+Span_bar::Span_bar (SCM s)
+  : Bar (s)
 {
   Pointer_group_interface(this).set_interface ();
   set_extent_callback (width_callback, X_AXIS);
index c384224889c36aa47e621ca2d3c2db55ef11c84e..01ae90892ce657273cf1a7b27f4932a6ec114c78 100644 (file)
@@ -159,10 +159,6 @@ void
 Spanner::set_bound(Direction d, Item*i)
 {
   spanned_drul_[d] =i;
-  if (i)
-    {
-      i->used_b_ = true;
-    }
 
   /**
      We check for Line_of_score to prevent the column -> line_of_score
@@ -179,7 +175,8 @@ Spanner::set_bound(Direction d, Item*i)
 }
 
 
-Spanner::Spanner ()
+Spanner::Spanner (SCM s)
+  : Score_element (s)
 {
   spanned_drul_[LEFT]=0;
   spanned_drul_[RIGHT]=0;
index c1aba6ca96f8effbb13c929ce192dc440be28fee..c74c0bcfb7b8ec1a2778c05d80c4cf59cc6a2d07 100644 (file)
@@ -23,3 +23,9 @@ Staff_bar::get_bar_size () const
     }
 }
 
+
+Staff_bar::Staff_bar (SCM s)
+  : Bar (s)
+{
+
+}
index f749d7d007cc099987c738be3e2a7e31534781be..e5bc48cd622a82126bd16bcbd6be411fdcb2fe08 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  staff-sym-reg.cc -- implement Staff_symbol_engraver
+  staff-symbol-engraver.cc -- implement Staff_symbol_engraver
 
   source file of the GNU LilyPond music typesetter
 
@@ -46,12 +46,9 @@ Staff_symbol_engraver::Staff_symbol_engraver()
 void
 Staff_symbol_engraver::do_creation_processing()
 {
-  span_p_ = new Staff_symbol;
+  span_p_ = new Staff_symbol (get_property ("staffSymbolBasicProperties"));
   span_p_->set_bound(LEFT,get_staff_info().command_pcol_l ());
 
-
-  // ugh, should do generic 
-  span_p_->property_alist_ = get_property ("staffSymbolBasicProperties");
   announce_element (Score_element_info (span_p_, 0));
 }
 
index 0540f9f0aeeb4de21c5e7da1912e36772b15e0fc..9c52f04256b10584cdfd21d980ad4607b8804303 100644 (file)
@@ -91,6 +91,8 @@ Staff_symbol_referencer_interface::position_f () const
 Real
 Staff_symbol_referencer_interface::callback (Score_element const* sc,Axis )
 {
+  Score_element* me = (Score_element*)sc; // UGH.
+  
   SCM pos = sc->get_elt_property ("staff-position");
   Real off =0.0;
   if (gh_number_p (pos))
@@ -98,8 +100,8 @@ Staff_symbol_referencer_interface::callback (Score_element const* sc,Axis )
       Real space = staff_symbol_referencer (sc).staff_space ();
       off = gh_scm2double (pos) * space/2.0;
     }
-  Score_element* urg = (Score_element*)sc;
-  urg->set_elt_property ("staff-position", gh_double2scm (0.0));
+
+  me->set_elt_property ("staff-position", gh_double2scm (0.0));
 
   return off;
 }
index d4b83618c3595675aa9f1d06396a8ee7d0831eb0..50399d33b5eeb7bd272e1fa6d3c60d6423e824b2 100644 (file)
@@ -63,3 +63,8 @@ Staff_symbol::staff_space ()const
   return gh_scm2double (get_elt_property ("staff-space")) *
     paper_l ()->get_var ("staffspace");
 }
+
+Staff_symbol::Staff_symbol( SCM s)
+  : Spanner (s)
+{
+}
index 2af08ac71b72beedd2b713e277761903f75c3c3b..d4d92a7a4f4e4d759fe379820a1003ade62611c2 100644 (file)
@@ -76,7 +76,7 @@ Stem_engraver::acknowledge_element(Score_element_info i)
       int duration_log = r->duration_.durlog_i_;      
       if (!stem_p_) 
        {
-         stem_p_ = new Stem;
+         stem_p_ = new Stem (SCM_EOL);
          Staff_symbol_referencer_interface st(stem_p_);
          st.set_interface ();
          
@@ -101,7 +101,7 @@ Stem_engraver::acknowledge_element(Score_element_info i)
 
              if (requested_type)
                {
-                 tremolo_p_ = new Stem_tremolo;
+                 tremolo_p_ = new Stem_tremolo (get_property ("basicStemTremoloProperties"));
                  announce_element (Score_element_info (tremolo_p_, tremolo_req_l_));
                  /*
                    The number of tremolo flags is the number of flags of
index 4cb96a2e83803033f072bad3310b8df5b2d265a9..4a23d14c3595c413112ae56317a2c49efb857726 100644 (file)
@@ -23,7 +23,8 @@
     lengthen stem if necessary
  */
 
-Stem_tremolo::Stem_tremolo ()
+Stem_tremolo::Stem_tremolo (SCM s)
+  : Item (s)
 {
   set_elt_pointer ("stem", SCM_EOL);
 }
@@ -38,7 +39,7 @@ Stem_tremolo::stem_l ()const
 }
 
 Interval
-Stem_tremolo::dim_callback (Score_element * se, Axis a)
+Stem_tremolo::dim_callback (Score_element * se, Axis )
 {
   Stem_tremolo * s = dynamic_cast<Stem_tremolo*> (se);
   Real space = Staff_symbol_referencer_interface (s->stem_l ())
@@ -68,8 +69,12 @@ Stem_tremolo::do_brew_molecule () const
     // urg
     dydx = 0.25;
 
+  Real ss = Staff_symbol_referencer_interface (stem).staff_space ();
   Real thick = gh_scm2double (get_elt_property ("beam-thickness"));
   Real width = gh_scm2double (get_elt_property ("beam-width"));
+  width *= ss;
+  thick *= ss;
+  
   Molecule a (lookup_l ()->beam (dydx, width, thick));
   a.translate (Offset (-width/2, width / 2 * dydx));
   
@@ -92,15 +97,12 @@ Stem_tremolo::do_brew_molecule () const
     }
   if (tremolo_flags)
     mol.translate_axis (-mol.extent (Y_AXIS).center (), Y_AXIS);
-
-  Real half_space = Staff_symbol_referencer_interface (stem).staff_space ()
-    / 2;
   if (beam)
     {
       // ugh, rather calc from Stem_tremolo_req
       int beams_i = stem->beam_count(RIGHT) >? stem->beam_count (LEFT);
       mol.translate (Offset(stem->relative_coordinate (0, X_AXIS) - relative_coordinate (0, X_AXIS),
-                           stem->stem_end_position () * half_space - 
+                           stem->stem_end_position () * ss / 2 - 
                            directional_element (beam).get () * beams_i * interbeam_f));
     }
   else
@@ -108,7 +110,7 @@ Stem_tremolo::do_brew_molecule () const
       /*
        Beams should intersect one beamthickness below stem end
       */
-      Real dy = stem->stem_end_position () * half_space;
+      Real dy = stem->stem_end_position () * ss / 2;
       dy -= mol.extent (Y_AXIS).length () / 2 *  stem->get_direction ();
 
       /*
index a6ae80f1e9f92548564714623646cebd771ad112..583d777c5c9a16137821ffff5057620628d7a6d0 100644 (file)
@@ -214,7 +214,8 @@ Stem::add_head (Rhythmic_head *n)
   gi.add_element (n);
 }
 
-Stem::Stem ()
+Stem::Stem (SCM s)
+  : Item (s)
 {
   set_elt_pointer ("heads", SCM_EOL);
   set_elt_pointer ("rests", SCM_EOL);
index a6388d658ec4d6a0030fd4c4ae1edbe0c19cfbb7..f94867bbf41d070e0d4b525e9f485d80a6b5c316 100644 (file)
@@ -60,3 +60,7 @@ Sustain_pedal::do_brew_molecule () const
 }
 
 
+
+Sustain_pedal ::Sustain_pedal(SCM s )
+  : Item (s)
+{}
index d84e707b2cce8f1f2efbee381ed1a01ce649f3db..4841e19a48c914951e11e4e90daacbb1101b1231 100644 (file)
@@ -64,7 +64,7 @@ System_start_delimiter_engraver::System_start_delimiter_engraver()
 void
 System_start_delimiter_engraver::do_creation_processing()
 {
-  delim_ = new System_start_delimiter;
+  delim_ = new System_start_delimiter (get_property ("basicSystemStartDelimiterProperties"));
   delim_->set_bound (LEFT, get_staff_info ().command_pcol_l ());
 
   /*
@@ -87,8 +87,6 @@ System_start_delimiter_engraver::do_removal_processing ()
   SCM collapse = get_property ("bracketCollapseHeight");
   if (gh_number_p (collapse))
     delim_->set_elt_property ("collapse-height", collapse);
-  else
-    delim_->set_elt_property ("collapse-height", gh_double2scm (1));
       
   delim_->set_bound (RIGHT, get_staff_info ().command_pcol_l ());
   typeset_element (delim_);
index 763b3a57738bee97c75cff3c3d1897b02d6df259..aeb2bfd9c18b547c79648b87566738848cd143aa 100644 (file)
@@ -38,7 +38,8 @@ System_start_delimiter::staff_bracket (Real height) const
   return mol;
 }
 
-System_start_delimiter::System_start_delimiter ()
+System_start_delimiter::System_start_delimiter (SCM s)
+  : Spanner (s)
 {
   set_extent_callback (0, Y_AXIS);
   Pointer_group_interface (this).set_interface();
index 7c1e15c829e5de555c6cd414139cdf3870407e5b..a3d72332f9f13b6ce1b623d8f9f6099d877cd14b 100644 (file)
@@ -78,7 +78,7 @@ Text_engraver::do_process_music ()
     {
       Text_script_req * r = reqs_[i];
 
-      Text_item *text = new Text_item;
+      Text_item *text = new Text_item (SCM_EOL);
       Side_position_interface stafy (text);
 
       SCM axisprop = get_property ("scriptHorizontal");
index 9eb30473566fe2bf33bb221055c4a691f58429a2..9e3be5ce81ac7d5bd9150d20eabc4e9e558c8e30 100644 (file)
 #include "lookup.hh"
 #include "staff-symbol-referencer.hh"
 
+Text_item::Text_item (SCM s)
+  : Item (s)
+{
+  
+}
+
 Molecule 
 Text_item::do_brew_molecule () const
 {
index 01935d3526e71c6d61c882d6629564cb3da69f3c..146e94d3a107f66c795b2a48b5525684614e6ce3 100644 (file)
@@ -13,7 +13,8 @@
 #include "directional-element-interface.hh"
 #include "note-head.hh"
 
-Tie_column::Tie_column ()
+Tie_column::Tie_column (SCM s)
+  : Spanner (s)
 {
   set_elt_pointer ("ties", SCM_EOL);
   set_extent_callback (0, X_AXIS);
index 273d66843ea6aba0a14dbd5483300402a3d86f2a..b507048eed0e0b39e5b8cdb954887b730521f123 100644 (file)
@@ -173,7 +173,7 @@ Tie_engraver::process_acknowledged ()
          
          SCM pair = gh_list_ref (head_list, gh_int2scm (i/2));
          
-         Tie * p = new Tie;
+         Tie * p = new Tie (SCM_EOL);
          p->set_head (LEFT, dynamic_cast<Item*> (unsmob_element (gh_car (pair))));
          p->set_head (RIGHT, dynamic_cast<Item*> (unsmob_element (gh_cdr (pair))));
          
@@ -182,7 +182,7 @@ Tie_engraver::process_acknowledged ()
        }
       else for (SCM s = head_list; gh_pair_p (s); s = gh_cdr (s))
        {
-         Tie * p = new Tie;
+         Tie * p = new Tie (SCM_EOL);
          p->set_head (LEFT, dynamic_cast<Item*> (unsmob_element (gh_caar (s))));
          p->set_head (RIGHT, dynamic_cast<Item*> (unsmob_element (gh_cdar (s))));
          
@@ -196,7 +196,7 @@ Tie_engraver::process_acknowledged ()
        }
       else if (tie_p_arr_.size () > 1 && !tie_column_p_)
        {
-         tie_column_p_ = new Tie_column;
+         tie_column_p_ = new Tie_column (SCM_EOL);
          for (int i = tie_p_arr_.size (); i--; )
            tie_column_p_->add_tie (tie_p_arr_ [i]);
          announce_element (Score_element_info (tie_column_p_, 0));
index baba2c7061a3f85909da74d99b389a37c9a7a307..daf09ecdab02b3edc1f04437dcf145fc96c30a92 100644 (file)
@@ -30,7 +30,8 @@ Tie::set_head (Direction d, Item * head_l)
   add_dependency (head_l);
 }
 
-Tie::Tie()
+Tie::Tie(SCM s)
+  : Spanner (s)
 {
   set_elt_pointer ("heads", gh_cons (SCM_EOL, SCM_EOL));
   dy_f_drul_[LEFT] = dy_f_drul_[RIGHT] = 0.0;
index 3c42d78d96b770d98a13a67a7787881f35cf4d27..77f1e75e943d6abe7854924f32e809cb31cb7001 100644 (file)
@@ -35,8 +35,8 @@ Time_signature_engraver::do_process_music()
   Time_signature_change_req *req = timing_grav_l->time_signature_req_l();
   if (req)
     {
-      time_signature_p_ = new Time_signature;
-      time_signature_p_->property_alist_ = get_property ("basicTimeSignatureProperties");
+      time_signature_p_ = new Time_signature (get_property ("basicTimeSignatureProperties"));
+
       time_signature_p_->set_elt_property ("fraction",
                                           gh_cons (gh_int2scm (req->beats_i_),
                                                    gh_int2scm (req->one_beat_i_))); 
index 6a24d2bc69175bfa6450e7bea6bcd041544d5dfb..15d419a94f5a8eb104e133c2ac1f66c5cbf3b8be 100644 (file)
@@ -13,7 +13,8 @@
 #include "paper-def.hh"
 #include "lookup.hh"
 
-Time_signature::Time_signature ()
+Time_signature::Time_signature (SCM s)
+  :  Item (s)
 {
 
 }
index 1dccd22122cff426a2287cdaa7ef5893d88b7420..04918610d339c1f3651c1d53a7752e0d1086404c 100644 (file)
@@ -73,7 +73,7 @@ Tuplet_engraver::do_process_music ()
       if (i < started_span_p_arr_.size () && started_span_p_arr_[i])
        continue;
 
-      Tuplet_spanner* glep = new Tuplet_spanner;
+      Tuplet_spanner* glep = new Tuplet_spanner (SCM_EOL);
       if (i >= started_span_p_arr_.size ())
        started_span_p_arr_.push (glep);
       else
index 7b9a4531eb06f4f4750cd481e943196eb26cb075..70ad67dd4efa425d7af531451c3b696aed687a3b 100644 (file)
@@ -22,7 +22,8 @@
 #include "directional-element-interface.hh"
 
 
-Tuplet_spanner::Tuplet_spanner ()
+Tuplet_spanner::Tuplet_spanner (SCM s)
+  : Spanner (s)
 {
   set_elt_pointer ("beams", SCM_EOL);
   set_elt_pointer ("columns", SCM_EOL);
index 9718a8a53b51b7d4d3e825c90ad2310e7905e0e8..0a9c31929462fc8a5f3c3f92ad8e206e989a1c84 100644 (file)
@@ -37,7 +37,7 @@ Vertical_align_engraver::Vertical_align_engraver()
 void
 Vertical_align_engraver::do_creation_processing()
 {
-  valign_p_ =new Spanner; //Axis_align_spanner
+  valign_p_ =new Spanner (SCM_EOL); // todo -> basic props
   Align_interface (valign_p_).set_interface ();
   Align_interface (valign_p_).set_axis (Y_AXIS);
   valign_p_->set_elt_property ("stacking-dir",
index 357a9072d4c96dc40ccaa6e7ea5b4292538ba783..0ad6860ade0ee05dabe787e277f65e3c103e4277 100644 (file)
@@ -22,7 +22,8 @@
 #include "side-position-interface.hh"
 #include "directional-element-interface.hh"
 
-Volta_spanner::Volta_spanner ()
+Volta_spanner::Volta_spanner (SCM s)
+  : Spanner (s)
 {
   set_elt_pointer ("bars", SCM_EOL);
   Side_position_interface (this).set_axis (Y_AXIS);
index c60ee1a5104525f7cbfbf417e214b1aa81398948..7db035d55aa74dcbe766b62a82406aa0b1c62ba5 100644 (file)
@@ -23,31 +23,6 @@ StaffContext=\translator {
 
        \consists "Repeat_engraver";
 
-       staffSymbolBasicProperties = #'(
-        (staff-space . 1.0 )
-        (line-count . 5 )
-        )
-        basicTimeSignatureProperties = #`(
-         (break-align-symbol . Time_signature)
-         (visibility-lambda . ,all-visible)
-         (breakable . #t)
-        )
-        basicBarlineProperties = #`(
-          (break-align-symbol . Staff_bar)
-          (visibility-lambda . `begin-of-line-invisible)
-          (breakable . #t)
-          )
-
-        basicKeyProperties = #`(
-         (break-align-symbol . Key_item)
-         (visibility-lambda . ,begin-of-line-visible)
-         (breakable . #t)
-         )      
-        basicClefItemProperties = #`(
-          (breakable . #t)
-          (break-align-symbol . Clef_item)
-          (visibility-lambda . ,begin-of-line-visible) 
-        )
 
        %  name, glyph id, c0 position
        supportedClefTypes = #'(
@@ -170,6 +145,7 @@ VoiceContext = \translator {
        textScriptPadding = #3.0
        \consists "Text_engraver";
 
+
        startSustain = #"Ped."
        stopSustain = #"*"
        stopStartSustain = #"*Ped."
@@ -403,6 +379,101 @@ ScoreContext = \translator {
        defaultBarType = #"|"
        systemStartDelimiterGlyph = #'bar-line
 
+       %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+       % default settings, mainly for breakable items
+       %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+       basicBarNumberProperties = #`(
+         (breakable . #t)
+         (visibility-lambda . ,begin-of-line-visible)
+       )
+       basicMarkProperties = #'(
+         (breakable . #t)
+         (visibility-lambda . end-of-line-invisible)
+       )
+       leftEdgeBasicProperties = #'(
+         (break-align-symbol . Left_edge_item)
+         (breakable . #t)
+       )
+
+       staffSymbolBasicProperties = #'(
+        (staff-space . 1.0 )
+        (line-count . 5 )
+        )
+        basicTimeSignatureProperties = #`(
+         (break-align-symbol . Time_signature)
+         (visibility-lambda . ,all-visible)
+         (breakable . #t)
+        )
+        basicBarlineProperties = #`(
+          (break-align-symbol . Staff_bar)
+          (visibility-lambda . ,begin-of-line-invisible)
+          (breakable . #t)
+          )
+       basicSystemStartDelimiterProperties = #'(
+         (collapse-height . 1.0)
+       )
+        basicKeyProperties = #`(
+         (break-align-symbol . Key_item)
+         (visibility-lambda . ,begin-of-line-visible)
+         (breakable . #t)
+         )      
+        basicClefItemProperties = #`(
+          (breakable . #t)
+          (break-align-symbol . Clef_item)
+          (visibility-lambda . ,begin-of-line-visible) 
+        )
+
+       basicBeamProperties = #`(
+               (beam-thickness . 0.42) ; interline!
+       )
+       basicStemTremoloProperties = #'(
+               (beam-width . 4.0) ; interline!
+       )
+
+       basicBreathingSignProperties = #'(
+               (break-align-symbol . Breathing_sign)
+               (breakable . #t )
+               (visibility-lambda . ,begin-of-line-invisible)
+       )
+       basicOctavateEightProperties  = #'(
+               (self-alignment-X . 0)
+               (text . "8")
+               (style . "italic")
+       )
+       basicDynamicLineSpannerProperties = #`(
+               (transparent . #t)
+       )
+       basicDynamicTextProperties       = # `(
+               (style . "dynamic")
+               (script-priority . 100)
+               (self-alignment-Y . 0)
+       )
+       basicLyricTextProperties = #`(
+               (non-rhythmic . #t)
+       )
+       basicRestCollisionProperties = #`(
+               (transparent .  #t)
+       )
+       basicCollisionProperties = #`(
+               (transparent .  #t)
+               (axes 0 1)
+       )
+       basicSingleMaltGroupingItemProperties = #'(
+               (transparent . #t)
+       )
+       basicBreakAlignProperties = #'(
+               (breakable . #t)
+       )
+       basicInstrumentNameProperties = #`(
+               (breakable . #t)
+               (break-align-symbol . Instrument_name)
+               (visibility-lambda . ,begin-of-line-visible)
+       )
+       basicLocalKeyProperties = #`(
+         (left-padding . 0.2)
+         (right-padding . 0.4)
+       )
+
        \accepts "Staff";
        \accepts "StaffGroup";
        \accepts "RhythmicStaff";       
@@ -415,7 +486,6 @@ ScoreContext = \translator {
 
 
        markVisibilityFunction = #end-of-line-invisible
-       barNumberVisibilityFunction = #begin-of-line-visible
 };
 
 \translator { \ScoreContext }
index b31166dcd7e5c26fb8b6f007bbe4de415ad34c1b..15e9bbbb1e347c44db4128dce42c717021f8c627 100644 (file)
@@ -266,13 +266,6 @@ Wordwrap =0.0;
 \include "engraver.ly";
 
 
-#'margin-shape = #'()
-#'Local_key_item::left-padding = #'0.2
-#'Local_key_item::right-padding = #'0.4
 
-#'staff-height = \staffheight;
-#'beam-thickness = \beam_thickness;  %% UGR
-#'Stem_tremolo::beam-width = 1.5 * \quartwidth ; 
 
-#'Breathing_sign::visibility-lambda = #begin-of-line-invisible
-#'Left_edge_item::visibility-lambda = #begin-of-line-visible
+
index 067d6f4816e86eb0f121ba175a4ab09abf68fdaa..0a7749c512bcf03abd101a3fd0b4642979a24586 100644 (file)
@@ -1,15 +1,15 @@
 Begin3
 Title: LilyPond
-Version: 1.3.54
-Entered-date: 25MAY00
+Version: 1.3.55
+Entered-date: 26MAY00
 Description: 
 Keywords: music notation typesetting midi fonts engraving
 Author: hanwen@cs.uu.nl (Han-Wen Nienhuys)
        janneke@gnu.org (Jan Nieuwenhuizen)
 Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
 Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert
-       1000k lilypond-1.3.54.tar.gz 
+       1000k lilypond-1.3.55.tar.gz 
 Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
-       1000k lilypond-1.3.54.tar.gz 
+       1000k lilypond-1.3.55.tar.gz 
 Copying-policy: GPL
 End
index d33d426034fb9932d4d23641922d62624be70f76..cfc1d1320ed8062979f056895a26933da615e2b2 100644 (file)
@@ -1,9 +1,9 @@
 Name: lilypond
-Version: 1.3.54
+Version: 1.3.55
 Release: 1
 Copyright: GPL
 Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.54.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.55.tar.gz
 Summary: A program for printing sheet music.
 URL: http://www.cs.uu.nl/~hanwen/lilypond
 # Icon: lilypond-icon.gif
diff --git a/scripts/linux-time.py b/scripts/linux-time.py
deleted file mode 100644 (file)
index b41abc4..0000000
+++ /dev/null
@@ -1,151 +0,0 @@
-#!@PYTHON@
-# linux-time.py -- Print resourse usage of a command executing on GNU/Linux
-#
-# awaiting PC's linux-mm patch for getrusage
-#
-# source file of the GNU LilyPond music typesetter
-# 
-# (c) 2000 Jan Nieuwenhuizen <janneke@gnu.org>
-# 
-
-name = 'linux-time'
-version = '@TOPLEVEL_VERSION@'
-if version == '@' + 'TOPLEVEL_VERSION' + '@':
-       version = '(unknown version)'           # uGUHGUHGHGUGH
-  
-import string
-import getopt
-import sys
-import os
-import time
-import posix
-import signal
-
-def identify():
-       sys.stderr.write ("%s from LilyPond %s\n" % (name, version))
-
-def help ():
-       print (r"""
-Usage: %s [OPTION]... COMMAND
-
-Print resourse usage of a command executing on GNU/Linux.
-
-Options:
-  -h, --help          this help
-  -v, --version       version information
-""" % name)
-
-def print_version ():
-       print (r"""%s (GNU LilyPond) %s""" % (name, version))
-
-(options, files) = getopt.getopt (sys.argv[1:], 'vh', ['help','version'])
-
-for opt in options:
-       o = opt[0]
-       a = opt[1]
-       if o== '--help' or o == '-h':
-               help ()
-               sys.exit (0)
-       if o == '--version' or o == '-v':
-               print_version ()
-               sys.exit (0)
-       else:
-               print o
-               raise getopt.error
-
-# identify ()
-
-if len (files) < 1:
-       help ()
-       sys.exit (2)
-
-#command = files[0]
-#sys.system ("/usr/bin/time %s" % command)
-pid = 0
-status = 0
-t = 0
-avg_size = 0
-max_size = 0
-avg_rss = 0
-max_rss = 0
-INTERVAL = 0.1
-
-# why doesn't it work when put in a function?
-#def time ():
-#      global status, t;
-#      #child_pid = os.fork ()
-#      child_pid = forkit ()
-#      if child_pid:
-#              #Parent
-#              while 1:
-#                      try:
-#                              # AARg, wait takes only 1 argument,
-#                              # but this still compiled
-#                              #(pid, status) = os.wait (child_pid, os.WNOHANG)
-#                              (pid, status) = os.waitpid (child_pid, os.WNOHANG)
-#                              if not pid:
-#                                      time.sleep (INTERVAL)
-#                                      t = t + 1
-#                                      print ("s: %d" % t)
-#                      except:
-#                              break
-#      else:
-#              # Child
-#              status = os.system ("/usr/bin/time %s" % string.join (files, " "))
-#              sys.exit (status)
-
-
-if 0:
-       # cute, but this doesn't work: we get resources of /usr/bin/time
-       command = "/usr/bin/time"
-       args = files
-else:
-       # we should do 'time' ourselves:
-       # man 5 proc
-       command = files[0]
-       args = files[1:]
-
-
-child_pid = os.fork ()
-if child_pid:
-       #Parent
-       statm = "/proc/%d/statm" % child_pid
-       while 1:
-               try:
-                       # AARg, wait takes only 1 argument,
-                       # but this still compiled
-                       #(pid, status) = os.wait (child_pid, os.WNOHANG)
-                       (pid, status) = os.waitpid (child_pid, os.WNOHANG)
-               except:
-                       break
-               if pid:
-                       break
-
-               time.sleep (INTERVAL)
-               f = open (statm, "r")
-               stats = f.readline ()
-               f.close ()
-               (size, rss, drie, vier, vijf, zes, zeven) = string.split (stats, " ")
-               t = t + 1
-               size = string.atoi (size)
-               max_size = max (size, max_size)
-               avg_size = avg_size + size
-               rss = string.atoi (rss)
-               max_rss = max (rss, max_rss)
-               avg_rss = avg_rss + rss
-else:
-       # Child
-       #status = os.system ("/usr/bin/time %s" % string.join (files, " "))
-       #sys.exit (status)
-       os.execvp (command, (command,) + tuple (args))
-
-
-ms = max_size * 4.0/1024
-mr = max_size * 4.0/1024
-avg_size = avg_size / t
-avg_rss = avg_rss / t
-as = avg_size * 4.0/1024
-ar = avg_rss * 4.0/1024
-print ("MAXSIZE: %6.3fM(%d), MAXRSS: %6.3fM(%d)" % (ms, max_size, mr, max_rss))
-print ("AVGSIZE: %6.3fM(%d), AVGRSS: %6.3fM(%d)" % (as, avg_size, ar, avg_rss))
-sys.exit (status)