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
//! Procedural macros for `uzor-framework`.
//!
//! Exports `view!` — JSX-mimicking DSL that lowers to `widgets::lm::*`
//! builder calls against a [`uzor_framework::widgets::ContentCx`] (a
//! `PanelCx` or `OverlayCx`). Pure compile-time rewriting; no second
//! manager.
//!
//! The macro expects one implicit identifier in scope:
//! - `cx: &mut impl uzor_framework::widgets::ContentCx`
//!
//! And one prop-supplied rect on a root flex node (`<row rect={r}>` /
//! `<col rect={r}>`), from which children rects are derived via
//! `uzor_framework::flex::flex_solve`.
extern crate proc_macro;
use TokenStream;
/// JSX-style view tree. Lowers to imperative
/// `uzor_framework::widgets::lm::*` calls.
///
/// ```ignore
/// view! {
/// <col rect={body} gap=8>
/// <button text="Save" on_click={|| self.save()} />
/// <checkbox bind={&mut self.dark} label="Dark" />
/// </col>
/// }
/// ```
///
/// Overlay tags (`modal`, `popup`, `dropdown`, `context_menu`) are deferred
/// past M1 — they still needed layout façade handles after F8.