Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
sampler_starter.hpp
Go to the documentation of this file.
1#pragma once
2
3// Sampler starter — a real, runnable sampler UI assembled entirely from the
4// Ink & Signal design-system components. It proves the ingested system is
5// genuinely usable:
6// someone who wants to build a sampler picks components out of pulp::design and
7// gets a themed, reskinnable UI with no bespoke painting.
8//
9// Everything paints through theme tokens, so apply a different theme (or flip
10// light/dark) and the whole panel restyles — the reskin contract end to end.
11
12#include <pulp/view/theme.hpp>
13#include <pulp/view/view.hpp>
14
15#include <memory>
16
17namespace pulp::design {
18
19// Fixed design size of the starter panel. Render it headlessly with
20// render_to_png / render_to_file at this size, or mount it in a window.
21inline constexpr float kSamplerWidth = 720.0f;
22inline constexpr float kSamplerHeight = 440.0f;
23
24// Build the sampler starter panel with `theme` applied to the root (descendants
25// resolve colors up the parent chain). Pass ink_signal_theme(dark) for the
26// flagship look, or any other Theme to preview a reskin.
27std::unique_ptr<pulp::view::View> build_sampler_starter(const pulp::view::Theme& theme);
28
29} // namespace pulp::design
Definition design_adherence.hpp:32
constexpr float kSamplerWidth
Definition sampler_starter.hpp:21
std::unique_ptr< pulp::view::View > build_sampler_starter(const pulp::view::Theme &theme)
constexpr float kSamplerHeight
Definition sampler_starter.hpp:22
Definition theme.hpp:32