[][src]Trait coffee::ui::widget::checkbox::Renderer

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

The renderer of a Checkbox.

Your core::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<f32>,
    label_bounds: Rectangle<f32>,
    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

impl Renderer for Renderer[src]

Loading content...