25 const char *legacyT0Name,
const char *legacyT1Name)
32 [
fn = std::move(delegate.second)](
auto ®ion,
auto value) {
33 fn( region.mRegion, value );
34 region.Notify( true );
44 if ( mRegion != other ) {
119 result =
mRegion.setF0( f, maySwap );
129 result =
mRegion.setF1( f, maySwap );
237 return project.AttachedObjects::Get<
ViewInfo >(
key );
248 , total(screenDuration)
254 , bUpdateTrackIndicator(true)
255 , bScrollBeyondZero(false)
271#ifdef EXPERIMENTAL_SCROLLING_LIMITS
283 std::max(lowerBoundTime,
285 beforeWidth /
zoom));
291 selectedRegion.WriteXMLAttributes(xmlFile,
"sel0",
"sel1");
292 xmlFile.WriteAttr(wxT(
"vpos"), vpos);
293 xmlFile.WriteAttr(wxT(
"h"), h, 10);
294 xmlFile.WriteAttr(wxT(
"zoom"), zoom, 10);
312 {
"vpos", [](
auto &viewInfo,
auto value){
313 viewInfo.
vpos = value.Get(viewInfo.vpos);
317 {
"h", [](
auto &viewInfo,
auto value){
318 viewInfo.h = value.Get(viewInfo.h);
320 {
"zoom", [](
auto &viewInfo,
auto value){
321 viewInfo.zoom = value.Get(viewInfo.zoom);
Toolkit-neutral facade for basic user interface services.
BoolSetting ScrollingPreference
const TranslatableString LoopToggleText
static ProjectFileIORegistry::AttributeWriterEntry entry
static const AudacityProject::AttachedObjects::RegisteredFactory key
static struct ViewInfo::ProjectFileIORegistration projectFileIORegistration
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
This specialization of Setting for bool adds a Toggle method to negate the saved value.
Client code makes static instance from a factory of attachments; passes it to Get or Find as a retrie...
bool setTimes(double t0, double t1)
bool setT1(double t, bool maySwap=true)
bool setF0(double f, bool maySwap=true)
bool setT0(double t, bool maySwap=true)
void Notify(bool delayed=false)
bool setFrequencies(double f0, double f1)
bool setF1(double f, bool maySwap=true)
static XMLMethodRegistryBase::Mutators< NotifyingSelectedRegion > Mutators(const char *legacyT0Name, const char *legacyT1Name)
Return some information used for deserialization purposes by ViewInfo.
CallbackReturn Publish(const NotifyingSelectedRegionMessage &message)
Send a message to connected callbacks.
void SetStart(double start)
bool IsClear() const
Test whether in invalid state.
bool IsLastActiveRegionClear() const
Test whether last active region is in invalid state.
void SetAllTimes(double start, double end)
static constexpr auto invalidValue
void Clear()
Set to an invalid state.
double GetLastActiveStart() const
double GetLastActiveEnd() const
void SetActive(bool active)
void SetTimes(double start, double end)
virtual void UpdateSelectedPrefs(int id)
Defines a selected portion of a project.
static XMLMethodRegistryBase::Mutators< SelectedRegion > Mutators(const char *legacyT0Name, const char *legacyT1Name)
bool setTimes(double t0, double t1)
bool setT0(double t, bool maySwap=true)
bool setT1(double t, bool maySwap=true)
bool Read(T *pVar) const
overload of Read returning a boolean that is true if the value was previously defined */
Holds a msgid for the translation catalog; may also bind format arguments.
bool bUpdateTrackIndicator
void WriteXMLAttributes(XMLWriter &xmlFile) const
NotifyingSelectedRegion selectedRegion
void SetBeforeScreenWidth(wxInt64 beforeWidth, wxInt64 screenWidth, double lowerBoundTime=0.0)
ViewInfo(double start, double screenDuration, double pixelsPerSecond)
static int UpdateScrollPrefsID()
static ViewInfo & Get(AudacityProject &project)
void UpdatePrefs() override
void UpdateSelectedPrefs(int id) override
bool bAdjustSelectionEdges
std::vector< std::pair< std::string, Mutator< Substructure > > > Mutators
A helper type alias for a list of mutators, associated with tag strings.
Base class for XMLFileWriter and XMLStringWriter that provides the general functionality for creating...
static double GetDefaultZoom()
void UpdatePrefs() override
void CallAfter(Action action)
Schedule an action to be done later, and in the main thread.
auto end(const Ptr< Type, BaseDeleter > &p)
Enables range-for.
void swap(std::unique_ptr< Alg_seq > &a, std::unique_ptr< Alg_seq > &b)
void Notify(AudacityProject &project, ProjectSettings::EventCode code, long previousValue)
Construct once at static initialization time to hook project file IO.
ProjectFileIORegistry::AttributeReaderEntries entries2
ProjectFileIORegistry::AttributeReaderEntries entries
Typically statically constructed.