Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
auto_ui.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <pulp/view/view.hpp>
5#include <cstdint>
6#include <memory>
7#include <string>
8
9namespace pulp::view {
10
11// Automatically generates a UI from a StateStore's parameter definitions
12// Creates knobs for continuous params, toggles for boolean params,
13// with labels and grouping
14class AutoUi {
15public:
17 struct SizeHint {
18 std::uint32_t width;
19 std::uint32_t height;
20 };
21
22 // Build a view tree from the parameters in a StateStore
23 static std::unique_ptr<View> build(state::StateStore& store);
24
35
36 // Sync all auto-generated widget values from the store
37 static void sync(View& root, state::StateStore& store);
38};
39
40} // namespace pulp::view
Centralized parameter storage with lock-free value access.
Definition store.hpp:164
Definition auto_ui.hpp:14
static std::unique_ptr< View > build(state::StateStore &store)
static SizeHint preferred_size(state::StateStore &store)
Compute a design size that fits every parameter tile AutoUi would generate for store — the grid wrapp...
static void sync(View &root, state::StateStore &store)
Definition view.hpp:73
Hover-cursor tracking for platform window hosts.
Definition fwd.hpp:27
Logical-pixel size that fits AutoUi's generated grid without clipping.
Definition auto_ui.hpp:17
std::uint32_t width
Definition auto_ui.hpp:18
std::uint32_t height
Definition auto_ui.hpp:19