mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-21 06:01:13 +02:00
New files for ProjectSelectionManager
This commit is contained in:
58
src/ProjectSelectionManager.h
Normal file
58
src/ProjectSelectionManager.h
Normal file
@@ -0,0 +1,58 @@
|
||||
/**********************************************************************
|
||||
|
||||
Audacity: A Digital Audio Editor
|
||||
|
||||
ProjectSelectionManager.cpp
|
||||
|
||||
Paul Licameli split from ProjectManager.cpp
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#ifndef __AUDACITY_PROJECT_SELECTION_MANAGER__
|
||||
#define __AUDACITY_PROJECT_SELECTION_MANAGER__
|
||||
|
||||
#include "ClientData.h" // to inherit
|
||||
#include "toolbars/SelectionBarListener.h" // to inherit
|
||||
#include "toolbars/SpectralSelectionBarListener.h" // to inherit
|
||||
|
||||
class AudacityProject;
|
||||
|
||||
class ProjectSelectionManager final
|
||||
: public ClientData::Base
|
||||
, public SelectionBarListener
|
||||
, public SpectralSelectionBarListener
|
||||
{
|
||||
public:
|
||||
static ProjectSelectionManager &Get( AudacityProject &project );
|
||||
static const ProjectSelectionManager &Get( const AudacityProject &project );
|
||||
|
||||
explicit ProjectSelectionManager( AudacityProject &project );
|
||||
~ProjectSelectionManager() override;
|
||||
|
||||
// SelectionBarListener callback methods
|
||||
double AS_GetRate() override;
|
||||
void AS_SetRate(double rate) override;
|
||||
int AS_GetSnapTo() override;
|
||||
void AS_SetSnapTo(int snap) override;
|
||||
const NumericFormatSymbol & AS_GetSelectionFormat() override;
|
||||
void AS_SetSelectionFormat(const NumericFormatSymbol & format) override;
|
||||
void AS_ModifySelection(double &start, double &end, bool done) override;
|
||||
|
||||
// SpectralSelectionBarListener callback methods
|
||||
double SSBL_GetRate() const override;
|
||||
const NumericFormatSymbol & SSBL_GetFrequencySelectionFormatName() override;
|
||||
void SSBL_SetFrequencySelectionFormatName(
|
||||
const NumericFormatSymbol & formatName) override;
|
||||
const NumericFormatSymbol & SSBL_GetBandwidthSelectionFormatName() override;
|
||||
void SSBL_SetBandwidthSelectionFormatName(
|
||||
const NumericFormatSymbol & formatName) override;
|
||||
void SSBL_ModifySpectralSelection(
|
||||
double &bottom, double &top, bool done) override;
|
||||
|
||||
private:
|
||||
bool SnapSelection();
|
||||
|
||||
AudacityProject &mProject;
|
||||
};
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user