LEFT | RIGHT |
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) 1997--2011 Han-Wen Nienhuys <hanwen@xs4all.nl> | 4 Copyright (C) 1997--2011 Han-Wen Nienhuys <hanwen@xs4all.nl> |
5 | 5 |
6 LilyPond is free software: you can redistribute it and/or modify | 6 LilyPond is free software: you can redistribute it and/or modify |
7 it under the terms of the GNU General Public License as published by | 7 it under the terms of the GNU General Public License as published by |
8 the Free Software Foundation, either version 3 of the License, or | 8 the Free Software Foundation, either version 3 of the License, or |
9 (at your option) any later version. | 9 (at your option) any later version. |
10 | 10 |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 Bar_number_engraver::process_music () | 88 Bar_number_engraver::process_music () |
89 { | 89 { |
90 SCM wb = get_property ("whichBar"); | 90 SCM wb = get_property ("whichBar"); |
91 | 91 |
92 if (scm_is_string (wb)) | 92 if (scm_is_string (wb)) |
93 { | 93 { |
94 Moment mp (robust_scm2moment (get_property ("measurePosition"), Moment (0)
)); | 94 Moment mp (robust_scm2moment (get_property ("measurePosition"), Moment (0)
)); |
95 SCM bn = get_property ("currentBarNumber"); | 95 SCM bn = get_property ("currentBarNumber"); |
96 SCM proc = get_property ("barNumberVisibility"); | 96 SCM proc = get_property ("barNumberVisibility"); |
97 if (scm_is_number (bn) && ly_is_procedure (proc) | 97 if (scm_is_number (bn) && ly_is_procedure (proc) |
98 && to_boolean (scm_call_1 (proc, bn))) | 98 && to_boolean (scm_call_2 (proc, bn, mp.smobbed_copy ()))) |
99 { | 99 { |
100 create_items (); | 100 create_items (); |
101 SCM alternative_style = get_property ("alternativeNumberingStyle"); | 101 SCM alternative_style = get_property ("alternativeNumberingStyle"); |
102 string text_tag = ""; | 102 string text_tag = ""; |
103 if (alternative_style == ly_symbol2scm ("numbers-with-letters")) | 103 if (alternative_style == ly_symbol2scm ("numbers-with-letters")) |
104 { | 104 { |
105 if (alternative_event_) | 105 if (alternative_event_) |
106 { | 106 { |
107 Direction alternative_dir = robust_scm2dir (alternative_event_
->get_property ("alternative-dir"), RIGHT); | 107 Direction alternative_dir = robust_scm2dir (alternative_event_
->get_property ("alternative-dir"), RIGHT); |
108 switch (alternative_dir) | 108 switch (alternative_dir) |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 "currentBarNumber " | 192 "currentBarNumber " |
193 "whichBar " | 193 "whichBar " |
194 "stavesFound " | 194 "stavesFound " |
195 "barNumberFormatter " | 195 "barNumberFormatter " |
196 "barNumberVisibility " | 196 "barNumberVisibility " |
197 "alternativeNumberingStyle ", | 197 "alternativeNumberingStyle ", |
198 | 198 |
199 /* write */ | 199 /* write */ |
200 "currentBarNumber " | 200 "currentBarNumber " |
201 ); | 201 ); |
LEFT | RIGHT |