Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::timeline_view::ArrangerLayout Struct Reference

A resolved tick/pixel mapping, supplied by whoever owns the viewport. More...

#include <arranger_view.hpp>

Public Member Functions

float x_for_tick (timebase::TickPosition tick) const noexcept
 Lane-space x of a document tick.
timebase::TickPosition tick_for_x (float x) const noexcept
 Document tick at a lane-space x.
float y_for_track_index (std::size_t index) const noexcept
 Top edge of the row at an authored track index.

Public Attributes

timebase::TickPosition origin_tick {}
 Document tick drawn at the left edge of the clip lanes.
double px_per_tick = 0.0
 Horizontal scale.
float track_height_px = 64.0f
 Row pitch, and the height of a clip rectangle within its row.
float lane_left_px = 0.0f
 Clip lanes begin here; [0, lane_left_px) is the track-header column.
float ruler_height_px = 24.0f
 Height reserved above the track rows for the musical ruler.

Detailed Description

A resolved tick/pixel mapping, supplied by whoever owns the viewport.

The arranger CONSUMES a projection and never computes one. Zoom policy, scroll clamping, snapping and legibility thresholds all resolve to these scalars before the view sees them — the same shape as the resolved tolerance_px a front-end hands the hit tests instead of a pointer type. Keeping the policy out means the arranger, a piano roll and an automation lane can be driven from one projection rather than each growing its own.

Member Function Documentation

◆ tick_for_x()

timebase::TickPosition pulp::timeline_view::ArrangerLayout::tick_for_x ( float x) const
noexcept

Document tick at a lane-space x.

Inverse of x_for_tick wherever px_per_tick is nonzero; returns origin_tick when it is not.

◆ x_for_tick()

float pulp::timeline_view::ArrangerLayout::x_for_tick ( timebase::TickPosition tick) const
noexcept

Lane-space x of a document tick.

Values left of lane_left_px are returned unclamped so a partially scrolled-out clip keeps a truthful rectangle for the caller to clip against the lane bounds.

◆ y_for_track_index()

float pulp::timeline_view::ArrangerLayout::y_for_track_index ( std::size_t index) const
noexcept

Top edge of the row at an authored track index.

Member Data Documentation

◆ lane_left_px

float pulp::timeline_view::ArrangerLayout::lane_left_px = 0.0f

Clip lanes begin here; [0, lane_left_px) is the track-header column.

◆ origin_tick

timebase::TickPosition pulp::timeline_view::ArrangerLayout::origin_tick {}

Document tick drawn at the left edge of the clip lanes.

◆ px_per_tick

double pulp::timeline_view::ArrangerLayout::px_per_tick = 0.0

Horizontal scale.

Zero collapses the timeline onto a single column, which is degenerate but not invalid: every clip hit-tests at the lane origin and no drag can change a tick.

◆ ruler_height_px

float pulp::timeline_view::ArrangerLayout::ruler_height_px = 24.0f

Height reserved above the track rows for the musical ruler.

◆ track_height_px

float pulp::timeline_view::ArrangerLayout::track_height_px = 64.0f

Row pitch, and the height of a clip rectangle within its row.


The documentation for this struct was generated from the following file:
  • /home/runner/work/pulp/pulp/core/timeline_view/include/pulp/timeline_view/arranger_view.hpp