Audacity 3.2.0
ProjectSelectionManager.h
Go to the documentation of this file.
1/**********************************************************************
2
3Audacity: A Digital Audio Editor
4
5ProjectSelectionManager.cpp
6
7Paul Licameli split from ProjectManager.cpp
8
9**********************************************************************/
10
11#ifndef __AUDACITY_PROJECT_SELECTION_MANAGER__
12#define __AUDACITY_PROJECT_SELECTION_MANAGER__
13
14#include "ClientData.h" // to inherit
15#include "toolbars/SelectionBarListener.h" // to inherit
16#include "toolbars/SpectralSelectionBarListener.h" // to inherit
18
19class AudacityProject;
20
21class AUDACITY_DLL_API ProjectSelectionManager final
22 : public ClientData::Base
25 , public TimeToolBarListener
26{
27public:
29 static const ProjectSelectionManager &Get( const AudacityProject &project );
30
31 explicit ProjectSelectionManager( AudacityProject &project );
34 const ProjectSelectionManager & ) PROHIBITED;
36
37 // SelectionBarListener callback methods
38 double AS_GetRate() override;
39 void AS_SetRate(double rate) override;
40 int AS_GetSnapTo() override;
41 void AS_SetSnapTo(int snap) override;
46 void AS_ModifySelection(double &start, double &end, bool done) override;
47
48 // SpectralSelectionBarListener callback methods
49 double SSBL_GetRate() const override;
52 const NumericFormatSymbol & formatName) override;
55 const NumericFormatSymbol & formatName) override;
57 double &bottom, double &top, bool done) override;
58
59private:
60 bool SnapSelection();
61
63};
64
65#endif
Utility ClientData::Site to register hooks into a host class that attach client data.
int format
Definition: ExportPCM.cpp:53
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:90
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
~ProjectSelectionManager() override
ProjectSelectionManager(const ProjectSelectionManager &) PROHIBITED
ProjectSelectionManager & operator=(const ProjectSelectionManager &) PROHIBITED
A parent class of SelectionBar, used to forward events to do with changes in the SelectionBar.
virtual const NumericFormatSymbol & AS_GetSelectionFormat()=0
virtual void AS_SetRate(double rate)=0
virtual void AS_ModifySelection(double &start, double &end, bool done)=0
virtual void AS_SetSnapTo(int snap)=0
virtual int AS_GetSnapTo()=0
virtual double AS_GetRate()=0
virtual void AS_SetSelectionFormat(const NumericFormatSymbol &format)=0
A class used to forward events to do with changes in the SpectralSelectionBar.
virtual void SSBL_SetFrequencySelectionFormatName(const NumericFormatSymbol &formatName)=0
virtual const NumericFormatSymbol & SSBL_GetBandwidthSelectionFormatName()=0
virtual double SSBL_GetRate() const =0
virtual void SSBL_ModifySpectralSelection(double &bottom, double &top, bool done)=0
virtual void SSBL_SetBandwidthSelectionFormatName(const NumericFormatSymbol &formatName)=0
virtual const NumericFormatSymbol & SSBL_GetFrequencySelectionFormatName()=0
virtual void TT_SetAudioTimeFormat(const NumericFormatSymbol &format)=0
virtual const NumericFormatSymbol & TT_GetAudioTimeFormat()=0
Services * Get()
Fetch the global instance, or nullptr if none is yet installed.
Definition: BasicUI.cpp:194
auto end(const Ptr< Type, BaseDeleter > &p)
Enables range-for.
Definition: PackedArray.h:159
A convenient default parameter for class template Site.
Definition: ClientData.h:28