[][src]Trait iced_native::widget::text_input::Renderer

pub trait Renderer: Renderer + Sized {
    fn default_size(&self) -> u16;
fn draw(
        &mut self,
        bounds: Rectangle,
        text_bounds: Rectangle,
        cursor_position: Point,
        size: u16,
        placeholder: &str,
        value: &Value,
        state: &State
    ) -> Self::Output; }

The renderer of a TextInput.

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

Required methods

fn default_size(&self) -> u16

Returns the default size of the text of the TextInput.

fn draw(
    &mut self,
    bounds: Rectangle,
    text_bounds: Rectangle,
    cursor_position: Point,
    size: u16,
    placeholder: &str,
    value: &Value,
    state: &State
) -> Self::Output

Draws a TextInput.

It receives:

  • its bounds of the TextInput
  • the bounds of the text (i.e. the current value)
  • the cursor position
  • the placeholder to show when the value is empty
  • the current Value
  • the current State
Loading content...

Implementors

impl Renderer for Null[src]

Loading content...