diff options
Diffstat (limited to 'libs/ardour/ardour/midi_model.h')
-rw-r--r-- | libs/ardour/ardour/midi_model.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/libs/ardour/ardour/midi_model.h b/libs/ardour/ardour/midi_model.h index 78a8e3189d..90375754e9 100644 --- a/libs/ardour/ardour/midi_model.h +++ b/libs/ardour/ardour/midi_model.h @@ -254,11 +254,33 @@ public: PatchChangePtr unmarshal_patch_change (XMLNode *); }; + /** Start a new NoteDiff command. + * + * This has no side-effects on the model or Session, the returned command + * can be held on to for as long as the caller wishes, or discarded without + * formality, until apply_command is called and ownership is taken. + */ MidiModel::NoteDiffCommand* new_note_diff_command (const std::string& name = "midi edit"); + /** Start a new SysExDiff command */ MidiModel::SysExDiffCommand* new_sysex_diff_command (const std::string& name = "midi edit"); + + /** Start a new PatchChangeDiff command */ MidiModel::PatchChangeDiffCommand* new_patch_change_diff_command (const std::string& name = "midi edit"); + + /** Apply a command. + * + * Ownership of cmd is taken, it must not be deleted by the caller. + * The command will constitute one item on the undo stack. + */ void apply_command (Session& session, Command* cmd); + void apply_command (Session* session, Command* cmd) { if (session) { apply_command (*session, cmd); } } + + /** Apply a command as part of a larger reversible transaction + * + * Ownership of cmd is taken, it must not be deleted by the caller. + * The command will constitute one item on the undo stack. + */ void apply_command_as_subcommand (Session& session, Command* cmd); bool sync_to_source (const Glib::Threads::Mutex::Lock& source_lock); |