pub enum ViewKind {
Show 19 variants
Surface,
Box,
Row,
Column,
Stack,
ScrollV {
on_scroll: Option<ScrollCallback>,
set_viewport_height: Option<Rc<dyn Fn(f32)>>,
set_content_height: Option<Rc<dyn Fn(f32)>>,
get_scroll_offset: Option<Rc<dyn Fn() -> f32>>,
set_scroll_offset: Option<Rc<dyn Fn(f32)>>,
},
ScrollXY {
on_scroll: Option<ScrollCallback>,
set_viewport_width: Option<Rc<dyn Fn(f32)>>,
set_viewport_height: Option<Rc<dyn Fn(f32)>>,
set_content_width: Option<Rc<dyn Fn(f32)>>,
set_content_height: Option<Rc<dyn Fn(f32)>>,
get_scroll_offset_xy: Option<Rc<dyn Fn() -> (f32, f32)>>,
set_scroll_offset_xy: Option<Rc<dyn Fn(f32, f32)>>,
},
Text {
text: String,
color: Color,
font_size: f32,
soft_wrap: bool,
max_lines: Option<usize>,
overflow: TextOverflow,
},
Button {
on_click: Option<Callback>,
},
TextField {
state_key: ViewId,
hint: String,
on_change: Option<Rc<dyn Fn(String)>>,
on_submit: Option<Rc<dyn Fn(String)>>,
},
Checkbox {
checked: bool,
on_change: Option<Rc<dyn Fn(bool)>>,
},
RadioButton {
selected: bool,
on_select: Option<Callback>,
},
Switch {
checked: bool,
on_change: Option<Rc<dyn Fn(bool)>>,
},
Slider {
value: f32,
min: f32,
max: f32,
step: Option<f32>,
on_change: Option<CallbackF32>,
},
RangeSlider {
start: f32,
end: f32,
min: f32,
max: f32,
step: Option<f32>,
on_change: Option<CallbackRange>,
},
ProgressBar {
value: f32,
min: f32,
max: f32,
circular: bool,
},
Image {
handle: ImageHandle,
tint: Color,
fit: ImageFit,
},
Ellipse {
rect: Rect,
color: Color,
},
EllipseBorder {
rect: Rect,
color: Color,
width: f32,
},
}Variants§
Surface
Box
Row
Column
Stack
ScrollV
Fields
§
on_scroll: Option<ScrollCallback>ScrollXY
Fields
§
on_scroll: Option<ScrollCallback>Text
Fields
§
overflow: TextOverflowButton
TextField
Fields
Checkbox
RadioButton
Switch
Slider
RangeSlider
ProgressBar
Image
Ellipse
EllipseBorder
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