Chris@1276: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
Chris@1276: 
Chris@1276: /*
Chris@1276:     Sonic Visualiser
Chris@1276:     An audio file viewer and annotation editor.
Chris@1276:     Centre for Digital Music, Queen Mary, University of London.
Chris@1276:     This file copyright 2006-2018 Chris Cannam and QMUL.
Chris@1276:     
Chris@1276:     This program is free software; you can redistribute it and/or
Chris@1276:     modify it under the terms of the GNU General Public License as
Chris@1276:     published by the Free Software Foundation; either version 2 of the
Chris@1276:     License, or (at your option) any later version.  See the file
Chris@1276:     COPYING included with this distribution for more information.
Chris@1276: */
Chris@1276: 
Chris@1276: #ifndef SV_HORIZONTAL_SCALE_PROVIDER_H
Chris@1276: #define SV_HORIZONTAL_SCALE_PROVIDER_H
Chris@1276: 
Chris@1276: class LayerGeometryProvider;
Chris@1276: 
Chris@1276: /**
Chris@1276:  * Interface to be implemented by objects, such as layers or objects
Chris@1276:  * they delegate to, in which the X axis corresponds to frequency. For
Chris@1276:  * example, SpectrumLayer.
Chris@1276:  */
Chris@1276: class HorizontalScaleProvider
Chris@1276: {
Chris@1276: public:
Chris@1276:     virtual double getFrequencyForX(const LayerGeometryProvider *,
Chris@1276:                                     double x)
Chris@1276:         const = 0;
Chris@1276:     
Chris@1276:     virtual double getXForFrequency(const LayerGeometryProvider *,
Chris@1276:                                     double freq)
Chris@1276:         const = 0;
Chris@1276: };
Chris@1276: 
Chris@1276: #endif