MCPcopy Create free account
hub / github.com/audulus/rui / main

Function main

examples/toggle.rs:3–18  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1use rui::*;
2
3fn main() {
4 state(
5 || false,
6 |s, _| {
7 vstack((
8 text("Toggle Example").font_size(40),
9 toggle(s), // Default toggle
10 Toggle::new().width(50.0).edge(3.0).show(s),
11 Toggle::new().width(50.0).height(30.0).edge(3.0).show(s),
12 Toggle::new().width(30.0).height(10.0).edge(3.0).show(s),
13 ))
14 .padding(Auto)
15 },
16 )
17 .run()
18}

Callers

nothing calls this directly

Calls 11

stateFunction · 0.85
vstackFunction · 0.85
textFunction · 0.85
toggleFunction · 0.85
runMethod · 0.80
paddingMethod · 0.80
font_sizeMethod · 0.80
edgeMethod · 0.80
widthMethod · 0.80
heightMethod · 0.80
showMethod · 0.45

Tested by

no test coverage detected