TracktionEngine
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
engine::ClipCopy Class Reference

Holds a copy of an existing clip's state, along with whether that clip was in the launcher. More...

#include <tracktion_ClipOwner.h>

Public Member Functions

ClipCopy withNewItemID (Edit &) const
 Returns a copy with a new EditItemID, for when the clip it was taken from is staying in the Edit.
 
const juce::ValueTree & getState () const
 Returns the state that will be inserted.
 
bool wasInLauncher () const
 Returns true if the clip this was taken from was in a ClipSlot.
 

Static Public Member Functions

static ClipCopy fromClip (const Clip &)
 Takes a copy of a live clip's state.
 
static ClipCopy fromClipboardState (juce::ValueTree stateToUse, bool sourceWasInLauncher)
 Describes a clip state that came from the clipboard.
 

Detailed Description

Holds a copy of an existing clip's state, along with whether that clip was in the launcher.

Inserting one of these copies the clip as it is: none of the defaults for a newly created clip are applied, so the copy keeps the settings the user gave the original. A clip that comes from outside the launcher is still prepared for the launcher when it's inserted in to a ClipSlot.

There's deliberately no way to build one of these from an arbitrary state - it can only describe a clip that already exists.

Member Function Documentation

◆ fromClip()

static ClipCopy engine::ClipCopy::fromClip ( const Clip &  )
static

Takes a copy of a live clip's state.

The caller is responsible for giving the copy new EditItemIDs if the original is going to stay in the Edit.

◆ fromClipboardState()

static ClipCopy engine::ClipCopy::fromClipboardState ( juce::ValueTree  stateToUse,
bool  sourceWasInLauncher 
)
static

Describes a clip state that came from the clipboard.

Parameters
stateToUseThe clip state, with its IDs already remapped
sourceWasInLauncherWhether the clip it was copied from was in a ClipSlot

◆ withNewItemID()

ClipCopy engine::ClipCopy::withNewItemID ( Edit &  ) const

Returns a copy with a new EditItemID, for when the clip it was taken from is staying in the Edit.

◆ getState()

const juce::ValueTree & engine::ClipCopy::getState ( ) const

Returns the state that will be inserted.

◆ wasInLauncher()

bool engine::ClipCopy::wasInLauncher ( ) const

Returns true if the clip this was taken from was in a ClipSlot.


The documentation for this class was generated from the following file: