]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.3.55
authorfred <fred>
Tue, 26 Mar 2002 23:22:19 +0000 (23:22 +0000)
committerfred <fred>
Tue, 26 Mar 2002 23:22:19 +0000 (23:22 +0000)
lily/clef-item.cc
lily/include/key-def.hh
lily/include/key.hh
lily/include/music-output-def.hh
lily/key-engraver.cc
lily/parser.yy
ly/engraver.ly
ly/params.ly

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 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 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 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 e4b76f68d8145b5669ffb743e3fbf2f592e42825..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,14 +38,19 @@ Key_engraver::create_key (bool def)
 {
   if (!item_p_) 
     {
-      item_p_ = new Key_item;
+      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);
+
       Staff_symbol_referencer_interface st (item_p_);
       st.set_interface ();
-
       
-      item_p_->set_elt_property ("break-align-symbol", ly_symbol2scm ("Key_item")); 
-      item_p_->set_elt_property ("multi-octave",
-                                gh_bool2scm (key_.multi_octave_b_));
+      if (key_.multi_octave_b_)
+       item_p_->set_elt_property ("multi-octave", gh_bool2scm (key_.multi_octave_b_));
       
       announce_element (Score_element_info (item_p_,keyreq_l_));
       
@@ -68,8 +78,8 @@ Key_engraver::create_key (bool def)
 
 
   if (!def)
-      item_p_->set_elt_property ("visibility-lambda",
-                                scm_eval (ly_symbol2scm  ("all-visible")));
+    item_p_->set_elt_property ("visibility-lambda",
+                              scm_eval (ly_symbol2scm  ("all-visible")));
 
 }      
 
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 f52fb942b471dbf018b85fae66fce74dbfa34592..7db035d55aa74dcbe766b62a82406aa0b1c62ba5 100644 (file)
@@ -145,6 +145,7 @@ VoiceContext = \translator {
        textScriptPadding = #3.0
        \consists "Text_engraver";
 
+
        startSustain = #"Ped."
        stopSustain = #"*"
        stopStartSustain = #"*Ped."
@@ -378,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";       
@@ -390,7 +486,6 @@ ScoreContext = \translator {
 
 
        markVisibilityFunction = #end-of-line-invisible
-       barNumberVisibilityFunction = #begin-of-line-visible
 };
 
 \translator { \ScoreContext }
index cd799fdb76e1ee53f3298c02a31df2e23ea57e86..15e9bbbb1e347c44db4128dce42c717021f8c627 100644 (file)
@@ -1,7 +1,6 @@
 % params.ly
 % generic paper parameters
 
-#'staff-height = \staffheight;
 
 paperfile = \papersize + ".ly";
 % paperfile = "a4.ly";
@@ -18,7 +17,6 @@ interline = \staffspace;
 % urg, need grace_ versions of these too?
 beam_thickness = 0.52 * (\staffspace - \stafflinethickness);
 
-#'beam-thickness = \beam_thickness;  %% UGR
 
 
 interbeam = (2.0 * \staffspace + \stafflinethickness - \beam_thickness) / 2.0;
@@ -70,19 +68,10 @@ arithmetic_multiplier = 0.9 * \quartwidth ;
 arithmetic_basicspace = 2.0;
 
 
-
-
-#'Stem_tremolo::beam-width = 1.5 * \quartwidth ; 
-
-#'Left_edge_item::visibility-lambda = #begin-of-line-visible
-
 % 
 % UGH; junk these!
 %
 
-#'Key_item::visibility-lambda = #begin-of-line-visible
-#'Breathing_sign::visibility-lambda = #begin-of-line-invisible
-
 % catch suspect beam slopes, set slope to zero if
 % outer stem is lengthened more than
 beam_lengthened = 0.2 * \staffspace;
@@ -277,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_symbol::staff-space = \staffspace ;
-#'Staff_symbol::line-count = #5