pub enum ViewKind {
Show 15 variants
Surface,
Box,
Row,
Column,
Stack,
ScrollV {
on_scroll: Option<ScrollCallback>,
set_viewport_height: Option<Rc<dyn Fn(f32)>>,
get_scroll_offset: Option<Rc<dyn Fn() -> f32>>,
},
Text {
text: String,
color: Color,
font_size: f32,
},
Button {
text: String,
on_click: Option<Callback>,
},
TextField {
state_key: ViewId,
hint: String,
on_change: Option<Rc<dyn Fn(String)>>,
},
Checkbox {
checked: bool,
label: String,
on_change: Option<Rc<dyn Fn(bool)>>,
},
RadioButton {
selected: bool,
label: String,
on_select: Option<Callback>,
},
Switch {
checked: bool,
label: String,
on_change: Option<Rc<dyn Fn(bool)>>,
},
Slider {
value: f32,
min: f32,
max: f32,
step: Option<f32>,
label: String,
on_change: Option<CallbackF32>,
},
RangeSlider {
start: f32,
end: f32,
min: f32,
max: f32,
step: Option<f32>,
label: String,
on_change: Option<CallbackRange>,
},
ProgressBar {
value: f32,
min: f32,
max: f32,
label: String,
circular: bool,
},
}Variants§
Surface
Box
Row
Column
Stack
ScrollV
Fields
§
on_scroll: Option<ScrollCallback>Text
Button
TextField
Checkbox
RadioButton
Switch
Slider
RangeSlider
Fields
§
on_change: Option<CallbackRange>ProgressBar
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ViewKind
impl !RefUnwindSafe for ViewKind
impl !Send for ViewKind
impl !Sync for ViewKind
impl Unpin for ViewKind
impl !UnwindSafe for ViewKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more