Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::timeline_editor::TrackHeaderProjection Class Reference

Maps authored track order to header rows and reorder insertion neighbors. More...

#include <track_header_projection.hpp>

Public Types

using DropTarget = std::optional<timeline::ItemId>
 Empty means append after every remaining track.

Public Member Functions

std::optional< timeline::ItemId > track_at (float y) const noexcept
 Returns the track owning y, or empty outside the half-open row range.
runtime::Result< DropTarget, TrackHeaderProjectionError > before_track_for_drop (float y, timeline::ItemId moving_track) const
 Resolves y to a reorder neighbor after removing moving_track logically.
constexpr float origin_y () const noexcept
 Returns the leading y coordinate of the first row.
constexpr float row_height () const noexcept
 Returns the positive height shared by every row.
float bottom_y () const noexcept
 Returns the exclusive y coordinate following the final row.
std::span< const timeline::ItemId > track_order () const noexcept
 Returns the immutable authored order captured at construction.

Static Public Member Functions

static runtime::Result< TrackHeaderProjection, TrackHeaderProjectionError > create (std::span< const timeline::ItemId > track_order, float origin_y, float row_height)
 Validates and captures the complete authored order and row geometry.

Detailed Description

Maps authored track order to header rows and reorder insertion neighbors.

Row lookup is half-open. Drop lookup compares against row centers and omits the moving track, producing the before_track_id value for MoveTrack.

Member Typedef Documentation

◆ DropTarget

Empty means append after every remaining track.

Member Function Documentation

◆ before_track_for_drop()

runtime::Result< DropTarget, TrackHeaderProjectionError > pulp::timeline_editor::TrackHeaderProjection::before_track_for_drop ( float y,
timeline::ItemId moving_track ) const
inlinenodiscard

Resolves y to a reorder neighbor after removing moving_track logically.

◆ bottom_y()

float pulp::timeline_editor::TrackHeaderProjection::bottom_y ( ) const
inlinenodiscardnoexcept

Returns the exclusive y coordinate following the final row.

◆ create()

runtime::Result< TrackHeaderProjection, TrackHeaderProjectionError > pulp::timeline_editor::TrackHeaderProjection::create ( std::span< const timeline::ItemId > track_order,
float origin_y,
float row_height )
inlinestatic

Validates and captures the complete authored order and row geometry.

◆ origin_y()

float pulp::timeline_editor::TrackHeaderProjection::origin_y ( ) const
inlinenodiscardconstexprnoexcept

Returns the leading y coordinate of the first row.

◆ row_height()

float pulp::timeline_editor::TrackHeaderProjection::row_height ( ) const
inlinenodiscardconstexprnoexcept

Returns the positive height shared by every row.

◆ track_at()

std::optional< timeline::ItemId > pulp::timeline_editor::TrackHeaderProjection::track_at ( float y) const
inlinenodiscardnoexcept

Returns the track owning y, or empty outside the half-open row range.

◆ track_order()

std::span< const timeline::ItemId > pulp::timeline_editor::TrackHeaderProjection::track_order ( ) const
inlinenodiscardnoexcept

Returns the immutable authored order captured at construction.


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