18 return std::make_shared< ProjectHistory >(
project );
43 undoManager.ClearStates();
45 undoManager.PushState(
XO(
"Created new project"), {});
47 undoManager.StateSaved();
54 return undoManager.UndoAvailable();
61 return undoManager.RedoAvailable();
80 undoManager.PushState(
desc, shortDesc, flags);
89 SetStateTo( undoManager.GetCurrentState(),
false );
100 undoManager.ModifyState();
117 pExtension->RestoreUndoRedoState(
project);
125 undoManager.SetStateTo(n,
static AudacityProject::AttachedObjects::RegisteredFactory sProjectHistoryKey
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...
static result_type Call(Arguments &&...arguments)
Null check of the installed function is done for you.
bool UndoAvailable() const
~ProjectHistory() override
void SetStateTo(unsigned int n, bool doAutosave=true)
void PushState(const TranslatableString &desc, const TranslatableString &shortDesc)
void PopState(const UndoState &state, bool doAutosave=true)
bool RedoAvailable() const
void ModifyState(bool bWantsAutoSave)
static ProjectHistory & Get(AudacityProject &project)
AudacityProject & mProject
Holds a msgid for the translation catalog; may also bind format arguments.
static UndoManager & Get(AudacityProject &project)
const TranslatableString desc
Holds one item with description and time range for the UndoManager.