1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
// SPDX-License-Identifier: MPL-2.0
// SPDX-FileCopyrightText: 2026 FernTech
//! Trait + types + registry for Teksilo's widget previewer
//! infrastructure.
//!
//! This crate is **framework-side, UI-free**: it defines the
//! `WidgetCatalog` trait, the `KnobSpec` / `KnobValues` types, and the
//! `inventory`-backed registry. The 3-pane previewer GUI lives in the
//! sibling [`teksilo-preview-ui`](../teksilo_preview_ui/index.html) crate;
//! per-application binaries (`teksilo-widgets-previewer`, etc.) link the
//! two together along with their own widget set.
//!
//! # Authoring a catalog impl
//!
//! ```ignore
//! use teksilo_preview::{
//! register_widget_catalog, KnobSpec, KnobValues, PreviewVariant,
//! KnobOverrides, WidgetCatalog,
//! };
//! use teksilo_core::widget::Widget;
//! use my_widgets::Button;
//!
//! impl WidgetCatalog for Button {
//! fn id() -> &'static str { "button" }
//! fn group() -> &'static str { "Controls" }
//! fn display_name() -> &'static str { "Button" }
//! fn knobs() -> KnobSpec {
//! KnobSpec::new()
//! .text("label", "Label", "Click me")
//! .bool_("disabled", "Disabled", false)
//! }
//! fn variants() -> Vec<PreviewVariant> {
//! vec![
//! PreviewVariant::defaults("default"),
//! PreviewVariant::knobs("disabled",
//! KnobOverrides::new().bool_("disabled", true)),
//! ]
//! }
//! fn build(_variant: &str, knobs: &KnobValues) -> Box<dyn Widget> {
//! let label = knobs.text("label").get();
//! Box::new(Button::new(label).enabled(!knobs.bool_("disabled").get()))
//! }
//! }
//! register_widget_catalog!(Button);
//! ```
pub use builder_property_groups;
pub use ;
pub use ;
pub use ;
pub use ;
pub use SourceLoc;
pub use WidgetId;
pub use ;
// Internal re-exports used by the `register_widget_catalog!` macro.
// Hidden from the public API; exposed only because the macro must
// reference these symbols through the crate path.
pub use inventory as __inventory;