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 ) {
248 , bUpdateTrackIndicator(true)
268 selectedRegion.WriteXMLAttributes(xmlFile,
"sel0",
"sel1");
269 xmlFile.WriteAttr(
wxT(
"vpos"), vpos);
270 xmlFile.WriteAttr(
wxT(
"h"), hpos, 10);
271 xmlFile.WriteAttr(
wxT(
"zoom"), zoom, 10);
289 {
"vpos", [](
auto &viewInfo,
auto value){
290 viewInfo.
vpos = value.Get(viewInfo.vpos);
294 {
"h", [](
auto &viewInfo,
auto value){
295 viewInfo.hpos = value.Get(viewInfo.hpos);
297 {
"zoom", [](
auto &viewInfo,
auto value){
298 viewInfo.zoom = value.Get(viewInfo.zoom);
329 return std::make_shared<SelectedRegionRestorer>(
project);
Toolkit-neutral facade for basic user interface services.
XXO("&Cut/Copy/Paste Toolbar")
audacity::BasicSettings * gPrefs
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...
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)
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 setF0(double f, bool maySwap=true)
bool setF1(double f, bool maySwap=true)
bool setFrequencies(double f0, double f1)
bool setT0(double t, bool maySwap=true)
bool setT1(double t, bool maySwap=true)
Holds a msgid for the translation catalog; may also bind format arguments.
Base class for extra information attached to undo/redo states.
int vpos
Pixel distance from top of tracks to top of visible scrolled area.
ViewInfo(double start, double pixelsPerSecond)
bool bUpdateTrackIndicator
void WriteXMLAttributes(XMLWriter &xmlFile) const
NotifyingSelectedRegion selectedRegion
static int UpdateScrollPrefsID()
static ViewInfo & Get(AudacityProject &project)
void UpdatePrefs() override
void UpdateSelectedPrefs(int id) override
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()
virtual bool Read(const wxString &key, bool *value) const =0
void CallAfter(Action action)
Schedule an action to be done later, and in the main thread.
Services * Get()
Fetch the global instance, or nullptr if none is yet installed.
void swap(std::unique_ptr< Alg_seq > &a, std::unique_ptr< Alg_seq > &b)
UndoRedoExtensionRegistry::Entry sEntry
const char * end(const char *str) noexcept
Typically statically constructed.
Construct once at static initialization time to hook project file IO.
ProjectFileIORegistry::AttributeReaderEntries entries2
ProjectFileIORegistry::AttributeReaderEntries entries
Typically statically constructed.
SelectedRegion mSelectedRegion
void RestoreUndoRedoState(AudacityProject &project) override
Modify the project when undoing or redoing to some state in history.
SelectedRegionRestorer(AudacityProject &project)