Struct fltk_extras::button::CheckButton
source · pub struct CheckButton { /* private fields */ }
Implementations§
source§impl CheckButton
impl CheckButton
source§impl CheckButton
impl CheckButton
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/buttons.rs (line 17)
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
fn main() {
let a = app::App::default();
app::set_background_color(0, 0, 0);
app::set_foreground_color(255, 255, 255);
app::set_background2_color(128, 128, 128);
let mut w = window::Window::default().with_size(400, 400);
let col = group::Flex::default()
.with_size(80, 300)
.column()
.center_of_parent();
Toggle::default();
RoundToggle::default();
RoundToggle2::default();
CheckButton::default().with_label("Done?");
HollowRoundToggle::default();
RadioButton::default().with_label("Radio");
HoverButton::default().with_label("Hello");
col.end();
w.end();
w.show();
a.run().unwrap();
}
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 = ToggleButton>§
sourcepub fn is_toggled(&self) -> bool
pub fn is_toggled(&self) -> bool
Check whether a ToggleButton
is toggled
Trait Implementations§
source§impl Clone for CheckButton
impl Clone for CheckButton
source§fn clone(&self) -> CheckButton
fn clone(&self) -> CheckButton
Returns a copy 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 Default for CheckButton
impl Default for CheckButton
source§impl Deref for CheckButton
impl Deref for CheckButton
Auto Trait Implementations§
impl RefUnwindSafe for CheckButton
impl Send for CheckButton
impl Sync for CheckButton
impl Unpin for CheckButton
impl UnwindSafe for CheckButton
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