pub struct FancyHorSlider { /* private fields */ }
Implementations§
Source§impl FancyHorSlider
impl FancyHorSlider
Sourcepub fn with_label(self, title: &str) -> Self
pub fn with_label(self, title: &str) -> Self
Initialize with a label
Examples found in repository?
examples/sliders.rs (line 14)
4fn main() {
5 let a = app::App::default();
6 app::set_background_color(0, 0, 0);
7 app::set_foreground_color(255, 255, 255);
8 app::set_background2_color(128, 128, 128);
9 let mut w = window::Window::default().with_size(400, 300);
10 let col = group::Flex::default()
11 .column()
12 .with_size(200, 200)
13 .center_of_parent();
14 let _hslider = FancyHorSlider::default().with_label("Hor");
15 let _vslider = FancyVertSlider::default().with_label("Vert");
16 col.end();
17 w.end();
18 w.show();
19 a.run().unwrap();
20}
Sourcepub fn with_align(self, align: Align) -> Self
pub fn with_align(self, align: Align) -> Self
Initialize with alignment
Sourcepub fn with_type<T: WidgetType>(self, typ: T) -> Self
pub fn with_type<T: WidgetType>(self, typ: T) -> Self
Initialize with type
Sourcepub fn below_of<W: WidgetExt>(self, wid: &W, padding: i32) -> Self
pub fn below_of<W: WidgetExt>(self, wid: &W, padding: i32) -> Self
Initialize at bottom of another widget
Sourcepub fn above_of<W: WidgetExt>(self, wid: &W, padding: i32) -> Self
pub fn above_of<W: WidgetExt>(self, wid: &W, padding: i32) -> Self
Initialize above of another widget
Sourcepub fn right_of<W: WidgetExt>(self, wid: &W, padding: i32) -> Self
pub fn right_of<W: WidgetExt>(self, wid: &W, padding: i32) -> Self
Initialize right of another widget
Sourcepub fn left_of<W: WidgetExt>(self, wid: &W, padding: i32) -> Self
pub fn left_of<W: WidgetExt>(self, wid: &W, padding: i32) -> Self
Initialize left of another widget
Sourcepub fn center_x<W: WidgetExt>(self, w: &W) -> Self
pub fn center_x<W: WidgetExt>(self, w: &W) -> Self
Initialize center of another widget on the x axis
Sourcepub fn center_y<W: WidgetExt>(self, w: &W) -> Self
pub fn center_y<W: WidgetExt>(self, w: &W) -> Self
Initialize center of another widget on the y axis
Sourcepub fn center_of_parent(self) -> Self
pub fn center_of_parent(self) -> Self
Initialize center of parent
Sourcepub fn size_of_parent(self) -> Self
pub fn size_of_parent(self) -> Self
Initialize to the size of the parent
Methods from Deref<Target = Pack>§
Sourcepub fn set_spacing(&mut self, spacing: i32)
pub fn set_spacing(&mut self, spacing: i32)
Set the spacing of the pack
Sourcepub fn auto_layout(&mut self)
pub fn auto_layout(&mut self)
Layout the children of the pack automatically. Must be called on existing children
Trait Implementations§
Source§impl Clone for FancyHorSlider
impl Clone for FancyHorSlider
Source§fn clone(&self) -> FancyHorSlider
fn clone(&self) -> FancyHorSlider
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for FancyHorSlider
impl Debug for FancyHorSlider
Source§impl Default for FancyHorSlider
impl Default for FancyHorSlider
Source§impl Deref for FancyHorSlider
impl Deref for FancyHorSlider
Auto Trait Implementations§
impl Freeze for FancyHorSlider
impl RefUnwindSafe for FancyHorSlider
impl Send for FancyHorSlider
impl Sync for FancyHorSlider
impl Unpin for FancyHorSlider
impl UnwindSafe for FancyHorSlider
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