pub struct Checkbox {Show 15 fields
pub pos_x: usize,
pub pos_y: usize,
pub size: usize,
pub checked: bool,
pub anim_speed: f32,
pub box_color: Color,
pub box_color_checked: Color,
pub check_color: Color,
pub border_color: Color,
pub border_size: usize,
pub radius: usize,
pub label: Option<Text>,
pub label_size: f32,
pub label_color: Color,
pub label_gap: usize,
/* private fields */
}Fields§
§pos_x: usize§pos_y: usize§size: usize§checked: bool§anim_speed: f32§box_color: Color§box_color_checked: Color§check_color: Color§border_color: Color§border_size: usize§radius: usize§label: Option<Text>§label_size: f32§label_color: Color§label_gap: usizeImplementations§
Source§impl Checkbox
impl Checkbox
pub fn position(self, x: usize, y: usize) -> Self
pub fn size(self, size: usize) -> Self
pub fn default_checked(self, checked: bool) -> Self
pub fn box_color(self, color: Color) -> Self
pub fn box_color_checked(self, color: Color) -> Self
pub fn check_color(self, color: Color) -> Self
pub fn border_color(self, color: Color) -> Self
pub fn border(self, size: usize) -> Self
pub fn radius(self, radius: usize) -> Self
pub fn label(self, text: &str, font: Font, size: f32) -> Self
pub fn label_color(self, color: Color) -> Self
pub fn label_gap(self, gap: usize) -> Self
pub fn is_checked(&self) -> bool
pub fn set_checked(&mut self, checked: bool)
pub fn just_toggled(&self) -> bool
pub fn draw(&mut self, window: &mut Window)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Checkbox
impl RefUnwindSafe for Checkbox
impl Send for Checkbox
impl Sync for Checkbox
impl Unpin for Checkbox
impl UnsafeUnpin for Checkbox
impl UnwindSafe for Checkbox
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