From: hanwen Date: Sun, 11 Jan 2004 22:55:59 +0000 (+0000) Subject: * lily/bar-line.cc (compound_barline): add bartype : (dotted). X-Git-Tag: release/2.1.9~7 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=aa45e24a52e2f047dd7b8e35043596020d453c42;p=lilypond.git * lily/bar-line.cc (compound_barline): add bartype : (dotted). * lily/translator-def.cc: rename Translator_def to Context_def. --- diff --git a/ChangeLog b/ChangeLog index 201ef96752..1830369a7d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2004-01-11 Han-Wen Nienhuys + * 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 diff --git a/input/test/bar-lines.ly b/input/test/bar-lines.ly index 602b9e6324..e5b26f27a2 100644 --- a/input/test/bar-lines.ly +++ b/input/test/bar-lines.ly @@ -16,7 +16,7 @@ c4 \bar ".|" c \bar ".|." c \bar "|" c +\bar ":" c } \paper{raggedright = ##t} } - diff --git a/lily/bar-line.cc b/lily/bar-line.cc index e9dd56728b..d729f83429 100644 --- a/lily/bar-line.cc +++ b/lily/bar-line.cc @@ -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; } diff --git a/lily/parser.yy b/lily/parser.yy index aee249d756..4bcf3b7d5d 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -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); diff --git a/lily/translator-def.cc b/lily/translator-def.cc index d1b53ef096..d83364751f 100644 --- a/lily/translator-def.cc +++ b/lily/translator-def.cc @@ -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; } diff --git a/lily/translator-group.cc b/lily/translator-group.cc index 118bb76488..a8dbae57cd 100644 --- a/lily/translator-group.cc +++ b/lily/translator-group.cc @@ -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 diff --git a/scm/output-lib.scm b/scm/output-lib.scm index 8d28d5090d..00d632a070 100644 --- a/scm/output-lib.scm +++ b/scm/output-lib.scm @@ -236,6 +236,7 @@ centered, X==1 is at the right, X == -1 is at the left." ("||" . ("||" . ())) (".|." . (".|." . ())) ("" . ("" . "")) + (":" . (":" . "")) ("empty" . (() . ())) ("brace" . (() . "brace")) ("bracket" . (() . "bracket"))