Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(6)

Delta Between Two Patch Sets: lily/fretboard-engraver.cc

Issue 573670043: Refactor get/set_property to take the item as first argument
Left Patch Set: Created 4 years, 11 months ago
Right Patch Set: Manual completion of patch set Created 4 years, 11 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « lily/forbid-break-engraver.cc ('k') | lily/glissando-engraver.cc » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
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) 2006--2020 Han-Wen Nienhuys 4 Copyright (C) 2006--2020 Han-Wen Nienhuys
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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 return; 95 return;
96 96
97 SCM tab_strings = articulation_list (note_events_, 97 SCM tab_strings = articulation_list (note_events_,
98 tabstring_events_, 98 tabstring_events_,
99 "string-number-event"); 99 "string-number-event");
100 SCM fingers = articulation_list (note_events_, 100 SCM fingers = articulation_list (note_events_,
101 fingering_events_, 101 fingering_events_,
102 "fingering-event"); 102 "fingering-event");
103 fret_board_ = make_item ("FretBoard", note_events_[0]->self_scm ()); 103 fret_board_ = make_item ("FretBoard", note_events_[0]->self_scm ());
104 SCM fret_notes = ly_cxx_vector_to_list (note_events_); 104 SCM fret_notes = ly_cxx_vector_to_list (note_events_);
105 SCM proc = get_property ("noteToFretFunction"); 105 SCM proc = get_property (this, "noteToFretFunction");
106 if (ly_is_procedure (proc)) 106 if (ly_is_procedure (proc))
107 scm_call_4 (proc, 107 scm_call_4 (proc,
108 context ()->self_scm (), 108 context ()->self_scm (),
109 fret_notes, 109 fret_notes,
110 scm_list_2 (tab_strings, fingers), 110 scm_list_2 (tab_strings, fingers),
111 fret_board_->self_scm ()); 111 fret_board_->self_scm ());
112 SCM changes = get_property ("chordChanges"); 112 SCM changes = get_property (this, "chordChanges");
113 SCM placements = fret_board_->get_property ("dot-placement-list"); 113 SCM placements = get_property (fret_board_, "dot-placement-list");
114 if (to_boolean (changes) 114 if (to_boolean (changes)
115 && ly_is_equal (last_placements_, placements)) 115 && ly_is_equal (last_placements_, placements))
116 fret_board_->set_property ("begin-of-line-visible", SCM_BOOL_T); 116 set_property (fret_board_, "begin-of-line-visible", SCM_BOOL_T);
117 117
118 last_placements_ = placements; 118 last_placements_ = placements;
119 } 119 }
120 120
121 void 121 void
122 Fretboard_engraver::stop_translation_timestep () 122 Fretboard_engraver::stop_translation_timestep ()
123 { 123 {
124 fret_board_ = 0; 124 fret_board_ = 0;
125 note_events_.clear (); 125 note_events_.clear ();
126 tabstring_events_.clear (); 126 tabstring_events_.clear ();
(...skipping 24 matching lines...) Expand all
151 "minimumFret " 151 "minimumFret "
152 "noteToFretFunction " 152 "noteToFretFunction "
153 "predefinedDiagramTable " 153 "predefinedDiagramTable "
154 "stringTunings " 154 "stringTunings "
155 "tablatureFormat ", 155 "tablatureFormat ",
156 156
157 /* write */ 157 /* write */
158 "" 158 ""
159 ); 159 );
160 160
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b