Audacity 3.2.0
Variables
ProjectSnap.cpp File Reference
#include "ProjectSnap.h"
#include "Project.h"
#include "XMLWriter.h"
#include "XMLAttributeValueView.h"
#include "ProjectRate.h"
#include "ProjectTimeSignature.h"
Include dependency graph for ProjectSnap.cpp:

Go to the source code of this file.

Variables

static const AudacityProject::AttachedObjects::RegisteredFactory sKey
 
static ProjectFileIORegistry::AttributeWriterEntry entry
 
static ProjectFileIORegistry::AttributeReaderEntries entries
 

Variable Documentation

◆ entries

Initial value:
{
{
{ "snapto",
[](auto& snapSettings, auto value)
{
snapSettings.SetSnapMode(
value.ToWString() == wxT("on") ? SnapMode::SNAP_NEAREST :
} },
}
}
wxT("CloseDown"))
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:90
Project snapping settings.
Definition: ProjectSnap.h:29
void SetSnapMode(SnapMode mode)
Definition: ProjectSnap.cpp:41
static ProjectSnap & Get(AudacityProject &project)
Definition: ProjectSnap.cpp:27

Definition at line 105 of file ProjectSnap.cpp.

◆ entry

Initial value:
{
[](const AudacityProject& project, XMLWriter& xmlFile)
{
auto& snapSettings = ProjectSnap::Get(project);
xmlFile.WriteAttr(
wxT("snapto"), snapSettings.GetSnapMode() != SnapMode::SNAP_OFF ?
wxT("on") :
wxT("off"));
}
}
const auto project
Base class for XMLFileWriter and XMLStringWriter that provides the general functionality for creating...
Definition: XMLWriter.h:25

Definition at line 93 of file ProjectSnap.cpp.

◆ sKey

Initial value:
{
{
auto result = std::make_shared<ProjectSnap>(project);
return result;
}
}

Audacity: A Digital Audio Editor

ProjectSnap.cpp

Dmitry Vedenko

Definition at line 19 of file ProjectSnap.cpp.

Referenced by ProjectSnap::Get().