pub struct HalfDial { /* private fields */ }
Implementations§
Source§impl HalfDial
impl HalfDial
pub fn new(x: i32, y: i32, w: i32, h: i32, label: &str) -> Self
Sourcepub fn set_value(&mut self, val: i32)
pub fn set_value(&mut self, val: i32)
Examples found in repository?
examples/dials.rs (line 18)
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(100, 200)
13 .center_of_parent();
14 let mut dial = Dial::default();
15 dial.modifiable(false);
16 dial.set_value(75);
17 let mut halfdial = HalfDial::default();
18 halfdial.set_value(23);
19 col.end();
20 w.end();
21 w.show();
22 a.run().unwrap();
23}
Source§impl HalfDial
impl HalfDial
Sourcepub fn with_label(self, title: &str) -> Self
pub fn with_label(self, title: &str) -> Self
Initialize with a label
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 = Flex>§
Sourcepub fn insert<W>(&mut self, widget: &W, idx: i32)where
W: WidgetExt,
pub fn insert<W>(&mut self, widget: &W, idx: i32)where
W: WidgetExt,
Add a widget to the Flex box
Sourcepub fn set_size<W>(&mut self, w: &W, size: i32)where
W: WidgetExt,
👎Deprecated since 1.4.8: please use fixed
instead
pub fn set_size<W>(&mut self, w: &W, size: i32)where
W: WidgetExt,
fixed
insteadSet the size of the widget, same as fixed
(before it was changed in FLTK 1.4)
Sourcepub fn fixed<W>(&mut self, w: &W, size: i32)where
W: WidgetExt,
pub fn fixed<W>(&mut self, w: &W, size: i32)where
W: WidgetExt,
Set the size of the widget, same as set_size
, but more inline with the new FLTK Fl_Flex api
Sourcepub fn set_margin(&mut self, m: i32)
pub fn set_margin(&mut self, m: i32)
Set the margin
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HalfDial
impl RefUnwindSafe for HalfDial
impl Send for HalfDial
impl Sync for HalfDial
impl Unpin for HalfDial
impl UnwindSafe for HalfDial
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