OLD | NEW |
1 /* | 1 /* |
2 This file is part of LilyPond, the GNU music typesetter. | 2 This file is part of LilyPond, the GNU music typesetter. |
3 | 3 |
4 Copyright (C) 2002--2015 Juergen Reuter <reuter@ipd.uka.de>, | 4 Copyright (C) 2002--2015 Juergen Reuter <reuter@ipd.uka.de>, |
5 Pal Benko <benkop@freestart.hu> | 5 Pal Benko <benkop@freestart.hu> |
6 | 6 |
7 LilyPond is free software: you can redistribute it and/or modify | 7 LilyPond is free software: you can redistribute it and/or modify |
8 it under the terms of the GNU General Public License as published by | 8 it under the terms of the GNU General Public License as published by |
9 the Free Software Foundation, either version 3 of the License, or | 9 the Free Software Foundation, either version 3 of the License, or |
10 (at your option) any later version. | 10 (at your option) any later version. |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 * a single note. | 52 * a single note. |
53 */ | 53 */ |
54 | 54 |
55 class Mensural_ligature_engraver : public Coherent_ligature_engraver | 55 class Mensural_ligature_engraver : public Coherent_ligature_engraver |
56 { | 56 { |
57 | 57 |
58 protected: | 58 protected: |
59 virtual Spanner *create_ligature_spanner (); | 59 virtual Spanner *create_ligature_spanner (); |
60 virtual void build_ligature (Spanner *ligature, | 60 virtual void build_ligature (Spanner *ligature, |
61 vector<Grob_info> const &primitives); | 61 vector<Grob_info> const &primitives); |
62 DECLARE_TRANSLATOR_LISTENER (ligature); | |
63 | 62 |
64 public: | 63 public: |
65 TRANSLATOR_DECLARATIONS (Mensural_ligature_engraver); | 64 TRANSLATOR_DECLARATIONS (Mensural_ligature_engraver); |
66 TRANSLATOR_INHERIT (Coherent_ligature_engraver); | 65 TRANSLATOR_INHERIT (Coherent_ligature_engraver); |
67 | 66 |
68 private: | 67 private: |
69 void transform_heads (vector<Grob_info> const &primitives); | 68 void transform_heads (vector<Grob_info> const &primitives); |
70 void propagate_properties (Spanner *ligature, | 69 void propagate_properties (Spanner *ligature, |
71 vector<Grob_info> const &primitives, | 70 vector<Grob_info> const &primitives, |
72 Real &min_length); | 71 Real &min_length); |
73 void fold_up_primitives (vector<Grob_info> const &primitives, | 72 void fold_up_primitives (vector<Grob_info> const &primitives, |
74 Real &min_length); | 73 Real &min_length); |
75 }; | 74 }; |
76 | 75 |
77 void | |
78 Mensural_ligature_engraver::listen_ligature (Stream_event *ev) | |
79 { | |
80 Ligature_engraver::listen_ligature (ev); | |
81 } | |
82 | |
83 Mensural_ligature_engraver::Mensural_ligature_engraver () | 76 Mensural_ligature_engraver::Mensural_ligature_engraver () |
84 { | 77 { |
85 brew_ligature_primitive_proc | 78 brew_ligature_primitive_proc |
86 = Mensural_ligature::brew_ligature_primitive_proc; | 79 = Mensural_ligature::brew_ligature_primitive_proc; |
87 } | 80 } |
88 | 81 |
89 Spanner * | 82 Spanner * |
90 Mensural_ligature_engraver::create_ligature_spanner () | 83 Mensural_ligature_engraver::create_ligature_spanner () |
91 { | 84 { |
92 return make_spanner ("MensuralLigature", SCM_EOL); | 85 return make_spanner ("MensuralLigature", SCM_EOL); |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
492 | 485 |
493 if (robust_scm2double (ligature->get_property ("minimum-length"), 0.0) | 486 if (robust_scm2double (ligature->get_property ("minimum-length"), 0.0) |
494 < min_length) | 487 < min_length) |
495 ligature->set_property ("minimum-length", scm_from_double (min_length)); | 488 ligature->set_property ("minimum-length", scm_from_double (min_length)); |
496 } | 489 } |
497 | 490 |
498 | 491 |
499 void | 492 void |
500 Mensural_ligature_engraver::boot () | 493 Mensural_ligature_engraver::boot () |
501 { | 494 { |
502 ADD_LISTENER (Mensural_ligature_engraver, ligature); | 495 ADD_LISTENER (Ligature_engraver, ligature); |
503 ADD_ACKNOWLEDGER (Mensural_ligature_engraver, rest); | 496 ADD_ACKNOWLEDGER (Mensural_ligature_engraver, rest); |
504 ADD_ACKNOWLEDGER (Mensural_ligature_engraver, ligature_head); | 497 ADD_ACKNOWLEDGER (Mensural_ligature_engraver, ligature_head); |
505 } | 498 } |
506 | 499 |
507 ADD_TRANSLATOR (Mensural_ligature_engraver, | 500 ADD_TRANSLATOR (Mensural_ligature_engraver, |
508 /* doc */ | 501 /* doc */ |
509 "Handle @code{Mensural_ligature_events} by glueing special" | 502 "Handle @code{Mensural_ligature_events} by glueing special" |
510 " ligature heads together.", | 503 " ligature heads together.", |
511 | 504 |
512 /* create */ | 505 /* create */ |
513 "MensuralLigature ", | 506 "MensuralLigature ", |
514 | 507 |
515 /* read */ | 508 /* read */ |
516 "", | 509 "", |
517 | 510 |
518 /* write */ | 511 /* write */ |
519 "" | 512 "" |
520 ); | 513 ); |
OLD | NEW |