comparison layer/Layer.h @ 517:1c6439ef99d6

* "ffwd-similar" * stop when ffwding to end
author Chris Cannam
date Tue, 03 Mar 2009 21:48:03 +0000
parents 73a58a4dfebd
children a72ab757b73b
comparison
equal deleted inserted replaced
516:e4e0ae491a48 517:1c6439ef99d6
164 * same feature that would be used in an editing operation through 164 * same feature that would be used in an editing operation through
165 * calls to editStart etc. 165 * calls to editStart etc.
166 * 166 *
167 * Return true if a suitable feature was found and frame adjusted 167 * Return true if a suitable feature was found and frame adjusted
168 * accordingly. Return false if no suitable feature was available 168 * accordingly. Return false if no suitable feature was available
169 * (and leave frame unmodified). Also return the resolution of 169 * (and leave frame unmodified). If returning true, also return
170 * the model in this layer in sample frames. 170 * the resolution of the model in this layer in sample frames.
171 */ 171 */
172 virtual bool snapToFeatureFrame(View * /* v */, 172 virtual bool snapToFeatureFrame(View * /* v */,
173 int & /* frame */, 173 int & /* frame */,
174 size_t &resolution, 174 size_t &resolution,
175 SnapType /* snap */) const { 175 SnapType /* snap */) const {
176 resolution = 1;
177 return false;
178 }
179
180 /**
181 * Adjust the given frame to snap to the next feature that has
182 * "effectively" the same value as the feature prior to the given
183 * frame, if possible.
184 *
185 * The snap type must be SnapLeft (snap to the time of the next
186 * feature prior to the one preceding the given frame that has a
187 * similar value to it) or SnapRight (snap to the time of the next
188 * feature following the given frame that has a similar value to
189 * the feature preceding it). Other values are not permitted.
190 *
191 * Return true if a suitable feature was found and frame adjusted
192 * accordingly. Return false if no suitable feature was available
193 * (and leave frame unmodified). If returning true, also return
194 * the resolution of the model in this layer in sample frames.
195 */
196 virtual bool snapToSimilarFeature(View * /* v */,
197 int & /* source frame */,
198 size_t &resolution,
199 SnapType /* snap */) const {
176 resolution = 1; 200 resolution = 1;
177 return false; 201 return false;
178 } 202 }
179 203
180 // Draw, erase, and edit modes: 204 // Draw, erase, and edit modes: