Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
edit_intent.hpp File Reference

Pointer-neutral editing intents and their lowering to ordinary transactions. More...

#include <pulp/timeline/command.hpp>
#include <pulp/timeline/document_session.hpp>
#include <pulp/timeline_editor/sequencer_ui_host.hpp>
#include <optional>
#include <span>
#include <utility>

Go to the source code of this file.

Classes

struct  pulp::timeline_editor::EditIntent
 One editing step expressed without reference to the device that produced it. More...
struct  pulp::timeline_editor::NoteEditIntent
 One validated note editing step, independent of pointer or view geometry. More...
class  pulp::timeline_editor::ValidatedNoteEditIntent
 A note intent that passed validate_note_edit_intent and may cross a host seam. More...
struct  pulp::timeline_editor::EditIntentIdentity
 Identities a lowered transaction needs and an intent deliberately does not carry. More...
struct  pulp::timeline_editor::EditGestureSubmitOutcome
 Result of submitting one issued gesture transaction through its allocator. More...
struct  pulp::timeline_editor::EditGestureSubmitError
 A refusal before submission, or an inconsistent successful session result. More...
class  pulp::timeline_editor::EditGestureIdentityIssue
 One opaque, single-owner identity issue awaiting a submission outcome. More...
class  pulp::timeline_editor::EditGestureIdentityAllocator
 Allocates one undo group and submits a construction-safe stream of gesture identities. More...

Namespaces

namespace  pulp
namespace  pulp::timeline_editor
 ScriptedUiHost is a SequencerUiHost whose playhead is written by the caller instead of an engine, and which keeps what a view emitted so a test can read it back.
namespace  pulp::timeline_editor::detail

Typedefs

using pulp::timeline_editor::NoteEditIntentHost = SequencerUiHostT<ValidatedNoteEditIntent>
 Host binding used by a piano-roll front-end before command lowering.
using pulp::timeline_editor::EditIntentHost = SequencerUiHostT<EditIntent>
 The host an editor submits its intents to.

Enumerations

enum class  pulp::timeline_editor::EditIntentKind : std::uint8_t { pulp::timeline_editor::EditIntentKind::Draw , pulp::timeline_editor::EditIntentKind::Erase , pulp::timeline_editor::EditIntentKind::Move , pulp::timeline_editor::EditIntentKind::Resize }
 What an editing gesture does to the document. More...
enum class  pulp::timeline_editor::NoteEditIntentKind : std::uint8_t {
  pulp::timeline_editor::NoteEditIntentKind::Insert , pulp::timeline_editor::NoteEditIntentKind::Erase , pulp::timeline_editor::NoteEditIntentKind::Move , pulp::timeline_editor::NoteEditIntentKind::Resize ,
  pulp::timeline_editor::NoteEditIntentKind::SetVelocity
}
 What a piano-roll gesture does to one note. More...
enum class  pulp::timeline_editor::EditGestureIdentityState : std::uint8_t { pulp::timeline_editor::EditGestureIdentityState::AwaitingBegin , pulp::timeline_editor::EditGestureIdentityState::Open , pulp::timeline_editor::EditGestureIdentityState::Closed , pulp::timeline_editor::EditGestureIdentityState::Exhausted }
 Confirmed lifecycle state of one continuous edit gesture. More...
enum class  pulp::timeline_editor::EditGestureIdentityError : std::uint8_t {
  pulp::timeline_editor::EditGestureIdentityError::InvalidWriter , pulp::timeline_editor::EditGestureIdentityError::WriterMismatch , pulp::timeline_editor::EditGestureIdentityError::InvalidPhase , pulp::timeline_editor::EditGestureIdentityError::GestureClosed ,
  pulp::timeline_editor::EditGestureIdentityError::IdentityExhausted , pulp::timeline_editor::EditGestureIdentityError::IdentityPending , pulp::timeline_editor::EditGestureIdentityError::ForeignOrStaleIssue , pulp::timeline_editor::EditGestureIdentityError::IntentLoweringFailed ,
  pulp::timeline_editor::EditGestureIdentityError::SubmissionResultMismatch
}
 Why an edit-gesture identity operation was refused. More...
enum class  pulp::timeline_editor::NoteLoweringError : std::uint8_t {
  pulp::timeline_editor::NoteLoweringError::ContinuousGestureUnsupported , pulp::timeline_editor::NoteLoweringError::DuplicateNoteIdentity , pulp::timeline_editor::NoteLoweringError::NoteNotInClip , pulp::timeline_editor::NoteLoweringError::ExpectedNoteMismatch ,
  pulp::timeline_editor::NoteLoweringError::InvalidIdentity
}
 Why a note intent could not be lowered to a transaction. More...

Functions

std::optional< timeline::ModelError > pulp::timeline_editor::validate_note_edit_intent (const NoteEditIntent &intent) noexcept
 Returns the first structural or note-domain error, or nullopt when valid.
runtime::Result< timeline::Transaction, NoteLoweringError > pulp::timeline_editor::lower_note_edit_intent (const ValidatedNoteEditIntent &intent, std::span< const timeline::NoteEvent > current_notes, const EditIntentIdentity &identity)
 Lowers one note intent to the granular transaction that performs it.
runtime::Result< timeline::Transaction, timeline::ModelError > pulp::timeline_editor::lower_edit_intent (const EditIntent &intent, const EditIntentIdentity &identity)
 Lowers one intent to the ordinary transaction that performs it.

Detailed Description

Pointer-neutral editing intents and their lowering to ordinary transactions.