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

Reusable waveform editor geometry, snapping, hit-testing, and transaction helpers. More...

#include <pulp/view/geometry.hpp>
#include <pulp/view/hit_metrics.hpp>
#include <cstddef>
#include <cstdint>
#include <vector>

Go to the source code of this file.

Classes

struct  pulp::view::WaveformSampleRange
 Sample range in source-frame coordinates. End is exclusive by convention. More...
struct  pulp::view::WaveformViewport
 Immutable-for-paint viewport state and sample/pixel conversion rules. More...
struct  pulp::view::WaveformRenderSpan
 One pixel/column span for waveform min/max reduction or GPU upload planning. More...
struct  pulp::view::WaveformRenderPlan
 Opt-in geometry plan. Callers decide when span allocation is acceptable. More...
struct  pulp::view::WaveformHandle
struct  pulp::view::WaveformHandleModel
 Editor handle state without rendering, input events, or audio ownership. More...
struct  pulp::view::WaveformHitResult
struct  pulp::view::WaveformSnapSettings
struct  pulp::view::WaveformSnapResult
struct  pulp::view::WaveformPlayheadOverlay
struct  pulp::view::WaveformEditorTransactionResult
class  pulp::view::WaveformEditorTransaction
 Semantic edit transaction state. Platform input translation stays in widgets/views. More...
struct  pulp::view::WaveformEditorSurfaceSnapshot
struct  pulp::view::WaveformEditorSurfaceEditResult
class  pulp::view::WaveformEditorSurface
 View-layer editing surface that composes waveform primitives without owning audio or painting. More...

Namespaces

namespace  pulp
namespace  pulp::view
 Hover-cursor tracking for platform window hosts.

Enumerations

enum class  pulp::view::WaveformHandleKind {
  pulp::view::none , pulp::view::selection_start , pulp::view::selection_end , pulp::view::trim_start ,
  pulp::view::trim_end , pulp::view::fade_in , pulp::view::fade_out , pulp::view::loop_start ,
  pulp::view::loop_end , pulp::view::slice_marker , pulp::view::playhead
}
enum class  pulp::view::WaveformSnapSource { pulp::view::none , pulp::view::bounds , pulp::view::candidate , pulp::view::grid }
enum class  pulp::view::WaveformEditorOperationKind {
  pulp::view::none , pulp::view::create_selection , pulp::view::extend_selection , pulp::view::drag_selection_start ,
  pulp::view::drag_selection_end , pulp::view::move_playhead
}

Functions

WaveformRenderPlan pulp::view::build_waveform_render_plan (const WaveformViewport &viewport, int max_spans=0)
WaveformHitResult pulp::view::hit_test_waveform_handles (const WaveformViewport &viewport, const WaveformHandleModel &model, float x, float tolerance_px)
WaveformHitResult pulp::view::hit_test_waveform_handles (const WaveformViewport &viewport, const WaveformHandleModel &model, float x, const HitMetrics &metrics, float pixels_per_point=1.0f)
 Device-aware overload: the same hit test sized for the pointer driving it.
WaveformSnapResult pulp::view::resolve_waveform_snap (int64_t sample, int64_t total_samples, const WaveformSnapSettings &settings)
WaveformPlayheadOverlay pulp::view::build_waveform_playhead_overlay (const WaveformViewport &viewport, int64_t playhead_sample)

Detailed Description

Reusable waveform editor geometry, snapping, hit-testing, and transaction helpers.