[][src]Trait iced::widget::checkbox::Renderer

pub trait Renderer {
    fn draw(
        &mut self,
        cursor_position: Point,
        bounds: Rectangle,
        label_bounds: Rectangle,
        is_checked: bool
    ) -> MouseCursor; }

The renderer of a Checkbox.

Your renderer will need to implement this trait before being able to use a Checkbox in your user interface.

Required methods

fn draw(
    &mut self,
    cursor_position: Point,
    bounds: Rectangle,
    label_bounds: Rectangle,
    is_checked: bool
) -> MouseCursor

Draws a Checkbox.

It receives:

  • the current cursor position
  • the bounds of the Checkbox
  • the bounds of the label of the Checkbox
  • whether the Checkbox is checked or not
Loading content...

Implementors

Loading content...