11namespace tracktion {
inline namespace engine
45 enum class SetNameMode
82 bool hasBeenDeleted()
const;
84 static const char* waveItemType()
noexcept {
return "wave"; }
85 static const char* editItemType()
noexcept {
return "edit"; }
86 static const char* midiItemType()
noexcept {
return "midi"; }
87 static const char* videoItemType()
noexcept {
return "video"; }
91 bool isWave()
const noexcept {
return getType() == waveItemType(); }
92 bool isMidi()
const noexcept {
return getType() == midiItemType(); }
93 bool isEdit()
const noexcept {
return getType() == editItemType(); }
94 bool isVideo()
const noexcept {
return getType() == videoItemType(); }
97 void setName (
const juce::String& name, SetNameMode mode);
99 Category getCategory()
const;
100 void setCategory (Category cat);
116 bool convertEditFile();
118 double getLength()
const;
119 void setLength (
double length);
139 relativeIfWithinProject
142 void setSourceFile (
const juce::File&, FileMode mode = FileMode::relativeIfWithinProject);
144 bool isAbsolutePath()
const;
145 void convertToRelativePath();
146 void convertToAbsolutePath();
165 bool deleteSourceFile();
192 void timerCallback()
override;
193 void handleAsyncUpdate()
override;
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 changeProjectId(int oldID, int newID)
used when moving to another project.
bool copySectionToNewFile(const juce::File &destFile, juce::File &actualFileCreated, double startTime, double length)
the actual file created may differ, e.g.
void renameSourceFile()
lets the user rename the file.
juce::File getEditPreviewFile() const
Returns the file that should be used as a preview for this Edit.
void verifyLength()
Updates the stored length value in this object.
juce::File getEditThumbnailFile() const
Returns the file that should be used as a visual preview for this Edit.
juce::String getProjectName() const
name of the project it's inside.
void selectionStatusChanged(bool isNowSelected) override
Can be overridden to tell this object that it has just been selected or deselected.
juce::StringArray getSearchTokens() const
Returns a list of search strings for this object, by chopping up the name and description into words.
juce::Array< TimePosition > getMarkedPoints() const
optional set of interesting time markers, for wave files
Ptr createCopy()
Creates a copy of this object and returns the copy.
void copyAllPropertiesFrom(const ProjectItem &other)
copies the full description, categories, properties, etc.
juce::String getSelectableDescription() override
Subclasses must return a description of what they are.
Engine & engine
The Engine instance this belongs to.
Base class for things that can be selected, and whose properties can appear in the properties panel.