]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/bar-line.cc (compound_barline): add bartype : (dotted).
authorhanwen <hanwen>
Sun, 11 Jan 2004 22:55:59 +0000 (22:55 +0000)
committerhanwen <hanwen>
Sun, 11 Jan 2004 22:55:59 +0000 (22:55 +0000)
* lily/translator-def.cc: rename Translator_def to Context_def.

ChangeLog
input/test/bar-lines.ly
lily/bar-line.cc
lily/parser.yy
lily/translator-def.cc
lily/translator-group.cc
scm/output-lib.scm

index 201ef96752c3299ae4225757cfe9106266bdd7ba..1830369a7dc1870f31d4e232e886eaeb521946c5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2004-01-11  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
+       * lily/bar-line.cc (compound_barline): add bartype :  (dotted).
+
        * lily/translator-def.cc: rename Translator_def to Context_def.
 
        * Documentation/user/internals.itely (Lexical details): clarify
index 602b9e632427a23e0fa94c817bc0ab866f3fcfef..e5b26f27a279e361e2e8258604bd1ffdb8d179a3 100644 (file)
@@ -16,7 +16,7 @@ c4
 \bar ".|" c
 \bar ".|." c
 \bar "|"  c
+\bar ":" c
 } 
 \paper{raggedright = ##t}
 }
-
index e9dd56728bf3ad2309d5875cdf577dc6e96a2063..d729f83429b7a6f44b6c20243fcc778870bb6e43 100644 (file)
@@ -62,14 +62,13 @@ Bar_line::compound_barline (Grob*me, String str, Real h)
   
   Molecule thin = simple_barline (me, hair, h);
   Molecule thick = simple_barline (me, fatline, h);
-  Molecule colon;
   Molecule dot = Font_interface::get_default_font (me)->find_by_name ("dots-dot");
   Real dist = ( Staff_symbol_referencer::line_count (me) & 1 ? 1 :
                (staff_space<2 ? 2 : .5) ) * staff_space;
-  dot.translate_axis(dist/2,Y_AXIS);
-  colon.add_molecule(dot);
-  dot.translate_axis(-dist,Y_AXIS);
+  Molecule colon (dot);
+  colon.translate_axis(dist,Y_AXIS);
   colon.add_molecule(dot);
+  colon.translate_axis(-dist/2,Y_AXIS);
 
   Molecule m;
   
@@ -124,7 +123,19 @@ Bar_line::compound_barline (Grob*me, String str, Real h)
       m.add_at_edge (X_AXIS, RIGHT, thin, 0, 0);
       m.add_at_edge (X_AXIS, RIGHT, thin, thinkern, 0);
     }
-
+  else if (str == ":")
+    {
+      int c = (Staff_symbol_referencer::line_count (me));
+      
+      for (int i = 0 ; i < c - 1; i++)
+       {
+         Real y = (- (c-1.0) / 2 + 0.5  +   i * staff_space);
+         Molecule d (dot);
+
+         d. translate_axis (y,Y_AXIS);
+         m.add_molecule (d);
+       }
+    }
   return m;
 }
 
index aee249d7567cd4a186a4f8e45bc350b36c326c9a..4bcf3b7d5d2c27c5039f0aca999a79c961c46ad1 100644 (file)
@@ -589,7 +589,7 @@ translator_spec_block:
 
 translator_spec_body:
        /**/ {
-               $$ = Translator_def::make_scm ();
+               $$ = Context_def::make_scm ();
                unsmob_context_def ($$)->set_spot (THIS->here_input ());
        }
        | TRANSLATOR_IDENTIFIER {
@@ -597,7 +597,7 @@ translator_spec_body:
                unsmob_context_def ($$)->set_spot (THIS->here_input ());
        }
        | translator_spec_body GROBDESCRIPTIONS embedded_scm {
-               Translator_def*td = unsmob_context_def($$);
+               Context_def*td = unsmob_context_def($$);
 
                for (SCM p = $3; gh_pair_p (p); p = ly_cdr (p)) {
                        SCM tag = gh_caar (p);
index d1b53ef096289922606e606b9a477aab81a86238..d83364751fc48dbf29a1b705adab2f3a9438daca 100644 (file)
@@ -262,7 +262,7 @@ Context_def::instantiate (Music_output_def* md, SCM ops)
   tg->definition_ = self_scm ();
 
   SCM trans_names = get_translator_names (ops); 
-  tg->simple_trans_list_ = names_to_translators (trans_names);
+  tg->simple_trans_list_ = names_to_translators (trans_names, tg);
 
   return tg;
 }
index 118bb76488ff1089c572a0f5e0920f883745967e..a8dbae57cd428699ff76c1a3e550c408d79f0a60 100644 (file)
@@ -533,8 +533,15 @@ SCM
 Translator_group::get_simple_trans_list ()
 {
   return simple_trans_list_;
+
+}
+
+
   
 #if 0
+SCM
+Translator_group::get_simple_trans_list ()
+{
   if (simple_trans_list_ != SCM_BOOL_F)
     return simple_trans_list_;
   
@@ -558,5 +565,5 @@ Translator_group::get_simple_trans_list ()
   
   static_each (simple_trans_list_, &Translator::initialize);
   return simple_trans_list_;
-#endif
 }
+#endif
index 8d28d5090d92abba3aa08d9850d3bc617413d3c2..00d632a070e597d87ec9559498f2eebaf78d24a3 100644 (file)
@@ -236,6 +236,7 @@ centered, X==1 is at the right, X == -1 is at the left."
                          ("||" . ("||" . ()))
                          (".|." . (".|." . ()))
                          ("" . ("" . ""))
+                         (":" . (":" . ""))
                          ("empty" . (() . ()))
                          ("brace" . (() . "brace"))
                          ("bracket" . (() . "bracket"))