pub trait Renderer: Rendererwhere
    Self::Theme: StyleSheet,{
    // Required method
    fn draw(
        &mut self,
        bounds: Rectangle,
        cursor_position: Point,
        normal: Normal,
        dragging_status: bool,
        style_sheet: &dyn StyleSheet<Style = <Self::Theme as StyleSheet>::Style>,
        style: &<Self::Theme as StyleSheet>::Style,
        direction: RampDirection
    );
}
Expand description

The renderer of a Ramp.

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

Required Methods§

source

fn draw( &mut self, bounds: Rectangle, cursor_position: Point, normal: Normal, dragging_status: bool, style_sheet: &dyn StyleSheet<Style = <Self::Theme as StyleSheet>::Style>, style: &<Self::Theme as StyleSheet>::Style, direction: RampDirection )

Draws a Ramp.

It receives:

  • the bounds of the Ramp
  • the current cursor position
  • the current normal of the Ramp
  • whether the ramp is currently being dragged
  • the style of the Ramp
  • the direction of the ramp line of the Ramp

Implementations on Foreign Types§

source§

impl<Theme> Renderer for Renderer<Theme>where Self::Theme: StyleSheet,

source§

fn draw( &mut self, bounds: Rectangle, cursor_position: Point, normal: Normal, is_dragging: bool, style_sheet: &dyn StyleSheet<Style = <Self::Theme as StyleSheet>::Style>, style: &<Self::Theme as StyleSheet>::Style, direction: RampDirection )

Implementors§