diff view/View.h @ 1354:40b9a495a0e0

Use zoom constraints more consistently, including the new RelativelyFine one
author Chris Cannam
date Wed, 10 Oct 2018 14:33:10 +0100
parents 13d9b422f7fe
children 93eaff6f206d
line wrap: on
line diff
--- a/view/View.h	Wed Oct 10 08:44:27 2018 +0100
+++ b/view/View.h	Wed Oct 10 14:33:10 2018 +0100
@@ -457,10 +457,16 @@
     bool areLayersScrollable() const;
     LayerList getScrollableBackLayers(bool testChanged, bool &changed) const;
     LayerList getNonScrollableFrontLayers(bool testChanged, bool &changed) const;
+
     ZoomLevel getZoomConstraintLevel(ZoomLevel level,
                                      ZoomConstraint::RoundingDirection dir =
                                      ZoomConstraint::RoundNearest) const;
 
+    // These three are slow, intended for indexing GUI thumbwheel stuff
+    int countZoomLevels() const;
+    int getZoomLevelIndex(ZoomLevel level) const;
+    ZoomLevel getZoomLevelByIndex(int ix) const;
+    
     // True if the top layer(s) use colours for meaningful things.  If
     // this is the case, selections will be shown using unfilled boxes
     // rather than with a translucent fill.