Mercurial > hg > svgui
diff 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 |
line wrap: on
line diff
--- a/layer/Layer.h Tue Mar 03 16:46:27 2009 +0000 +++ b/layer/Layer.h Tue Mar 03 21:48:03 2009 +0000 @@ -166,8 +166,8 @@ * * Return true if a suitable feature was found and frame adjusted * accordingly. Return false if no suitable feature was available - * (and leave frame unmodified). Also return the resolution of - * the model in this layer in sample frames. + * (and leave frame unmodified). If returning true, also return + * the resolution of the model in this layer in sample frames. */ virtual bool snapToFeatureFrame(View * /* v */, int & /* frame */, @@ -177,6 +177,30 @@ return false; } + /** + * Adjust the given frame to snap to the next feature that has + * "effectively" the same value as the feature prior to the given + * frame, if possible. + * + * The snap type must be SnapLeft (snap to the time of the next + * feature prior to the one preceding the given frame that has a + * similar value to it) or SnapRight (snap to the time of the next + * feature following the given frame that has a similar value to + * the feature preceding it). Other values are not permitted. + * + * Return true if a suitable feature was found and frame adjusted + * accordingly. Return false if no suitable feature was available + * (and leave frame unmodified). If returning true, also return + * the resolution of the model in this layer in sample frames. + */ + virtual bool snapToSimilarFeature(View * /* v */, + int & /* source frame */, + size_t &resolution, + SnapType /* snap */) const { + resolution = 1; + return false; + } + // Draw, erase, and edit modes: // // Layer needs to get actual mouse events, I guess. Draw mode is