pub enum Control {
Show 16 variants
Slider(SliderData),
Scroll {
sprites: Vec<Option<SpriteRef>>,
vertical: bool,
value: f32,
page: f32,
inset: i32,
thumb_color: u32,
drag: Option<(f32, i32)>,
},
Progress {
sprites: Vec<Option<SpriteRef>>,
background_color: u32,
value: f32,
content: Option<NodeId>,
},
Edit(EditData),
Graph {
size: [i32; 2],
sprite: Option<SpriteRef>,
tick: i32,
y_range: f32,
x_divisions: i32,
y_divisions: i32,
series: Vec<(u32, Vec<i32>)>,
},
Table {
cells: Vec<(usize, usize, NodeId)>,
columns: Vec<i32>,
rows: Vec<i32>,
spacing: i32,
},
Layout(Vec<LayoutChild>),
Tabs {
decoration: [Option<NodeId>; 3],
tabs: Vec<(NodeId, NodeId)>,
selected: usize,
gap: i32,
header_height: i32,
},
Clip {
content: Option<NodeId>,
size: [i32; 2],
offset: [i32; 2],
},
Container {
content: Option<NodeId>,
bars: [Option<NodeId>; 2],
size: [i32; 2],
spacing: i32,
offset: [i32; 2],
view: [i32; 4],
wheel: i32,
fine: f32,
},
Check {
button: NodeId,
mark: Option<NodeId>,
checked: bool,
},
Combo {
button: NodeId,
list: NodeId,
open: bool,
},
Spinner {
parts: [Option<NodeId>; 3],
value: i32,
step: i32,
},
Page {
children: Vec<NodeId>,
selected: usize,
},
Radio {
children: Vec<NodeId>,
selected: usize,
},
Document(Document),
}Expand description
A control and its state.
Variants§
Slider(SliderData)
A slider.
Scroll
A scroll bar.
Fields
Progress
A progress bar.
Fields
Edit(EditData)
An edit box.
Graph
GraphElement: a frame, y_divisions + 1 lines across (with ticks of tick px to
the left) and x_divisions + 1 down (ticks below), then each graph’s points from the
left edge to the right, y_range at the top.
Fields
Table
A table of cells in rows and columns.
Fields
Layout(Vec<LayoutChild>)
Children placed by anchors relative to the element.
Tabs
Tabs: a header for each tab, and the page of the selected one.
Fields
Clip
A window onto its content, cut at its edges.
Fields
Container
A scrolling area: its content and its scroll bars.
Fields
Check
A check box.
Fields
The box.
Combo
A combo box: a button that opens a list.
Fields
The button that shows the choice.
Spinner
A number with up and down arrows.
Fields
Page
Pages, of which one is shown.
Radio
Radio buttons, of which one is selected.
Document(Document)
A document with markup: the help pages and the tutorials.