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. | |
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.
|
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.
|
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.
|
noexcept |
Top edge of the row at an authored track index.
| float pulp::timeline_view::ArrangerLayout::lane_left_px = 0.0f |
Clip lanes begin here; [0, lane_left_px) is the track-header column.
| timebase::TickPosition pulp::timeline_view::ArrangerLayout::origin_tick {} |
Document tick drawn at the left edge of the clip lanes.
| 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.
| float pulp::timeline_view::ArrangerLayout::ruler_height_px = 24.0f |
Height reserved above the track rows for the musical ruler.
| float pulp::timeline_view::ArrangerLayout::track_height_px = 64.0f |
Row pitch, and the height of a clip rectangle within its row.