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#include "Observer.h"
19
20class AudacityProject;
21
22class AUDACITY_DLL_API ProjectSelectionManager final
23 : public ClientData::Base
26 , public TimeToolBarListener
27{
28public:
30 static const ProjectSelectionManager &Get( const AudacityProject &project );
31
32 explicit ProjectSelectionManager( AudacityProject &project );
35 const ProjectSelectionManager & ) PROHIBITED;
37
38 // SelectionBarListener callback methods
43 void AS_ModifySelection(double &start, double &end, bool done) override;
44
45 // SpectralSelectionBarListener callback methods
46 double SSBL_GetRate() const override;
49 const NumericFormatSymbol & formatName) override;
52 const NumericFormatSymbol & formatName) override;
54 double &bottom, double &top, bool done) override;
55
56private:
57 void SnapSelection();
58
60
64};
65
66#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,...
A move-only handle representing a connection to a Publisher.
Definition: Observer.h:70
~ProjectSelectionManager() override
Observer::Subscription mSnappingChangedSubscription
ProjectSelectionManager(const ProjectSelectionManager &) PROHIBITED
ProjectSelectionManager & operator=(const ProjectSelectionManager &) PROHIBITED
Observer::Subscription mProjectRateChangedSubscription
Observer::Subscription mTimeSignatureChangedSubscription
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_ModifySelection(double &start, double &end, bool done)=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:196
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