11namespace tracktion {
inline namespace engine
37 void handleAsyncUpdate()
override;
42 bool isReadOnly()
const;
43 bool isTemporary()
const {
return temporary; }
45 int getProjectID()
const;
48 const juce::File& getProjectFile()
const noexcept {
return file; }
50 juce::File getDirectoryForMedia (ProjectItem::Category category)
const;
55 void createNewProjectId();
60 void refreshProjectPropertiesFromFile();
62 bool isLibraryProject()
const;
63 bool askAboutTempoDetect (
const juce::File&,
bool& shouldSetAutoTempo)
const;
68 int getNumProjectItems();
87 const ProjectItem::Category cat,
90 bool removeProjectItem (
ProjectItemID,
bool deleteSourceMaterial);
92 void moveProjectItem (
int indexToMoveFrom,
int indexToMoveTo);
110 void mergeArchiveContents (
const juce::File& archiveFile);
112 void mergeOtherProjectIntoThis (
const juce::File& otherProject);
116 void createDefaultFolders();
161 int itemID = 0, fileOffset = 0;
162 ProjectItem::Ptr item;
166 int objectOffset = 0, indexOffset = 0;
167 bool readOnly =
false, hasChanged =
false, temporary =
false;
176 void loadAllProjectItems();
177 bool loadProjectItem (ObjectInfo&);
178 void ensureFolderCreated (ProjectItem::Category);
179 void changed()
override;
182 ProjectItem::Ptr quickAddProjectItem (
const juce::String& relPathName,
186 const ProjectItem::Category cat,
187 ProjectItemID newID);
The Engine is the central class for all tracktion sessions.
An ID representing one of the items in a Project.
Represents a file-based resource that is used in a project.
void lockFile()
Stops anyone writing/moving the project file.
bool isValid() const
true if it's got a proper project ID.
bool save()
only saves if a change has been made since last time
void redirectIDsFromProject(int oldProjId, int newProjId)
Tells all exportables in all edits to change this project ID.
ProjectItem::Ptr createNewItem(const juce::File &fileToReference, const juce::String &type, const juce::String &name, const juce::String &description, const ProjectItem::Category cat, bool atTopOfList)
Returns an existing object if there is one.
juce::String getSelectableDescription() override
Subclasses must return a description of what they are.
void searchFor(juce::Array< ProjectItemID > &results, SearchOperation &)
this will load the keyword table, and do a search
void refreshFolderStructure()
makes sure all media is in the correct sub folder
NagMode
General enum for requests that have a project setting and so can return true without asking the user.
@ nagAutoNo
Should not do task automatically.
@ nagAutoYes
Should do task automatically.
Base class for things that can be selected, and whose properties can appear in the properties panel.