[][src]Trait iced_native::renderer::Renderer

pub trait Renderer: Sized {
    type Output;
    type Defaults: Default;
    fn overlay(
        &mut self,
        base: Self::Output,
        overlay: Self::Output,
        overlay_bounds: Rectangle
    ) -> Self::Output; fn layout<'a, Message>(
        &mut self,
        element: &Element<'a, Message, Self>,
        limits: &Limits
    ) -> Node { ... } }

A component that can take the state of a user interface and produce an output for its users.

Associated Types

type Output

The type of output of the Renderer.

If you are implementing a graphical renderer, your output will most likely be a tree of visual primitives.

type Defaults: Default

The default styling attributes of the Renderer.

This type can be leveraged to implement style inheritance.

Loading content...

Required methods

fn overlay(
    &mut self,
    base: Self::Output,
    overlay: Self::Output,
    overlay_bounds: Rectangle
) -> Self::Output

Overlays the overlay output with the given bounds on top of the base output.

Loading content...

Provided methods

fn layout<'a, Message>(
    &mut self,
    element: &Element<'a, Message, Self>,
    limits: &Limits
) -> Node

Lays out the elements of a user interface.

You should override this if you need to perform any operations before or after layouting. For instance, trimming the measurements cache.

Loading content...

Implementors

impl Renderer for Null[src]

type Output = ()

type Defaults = ()

Loading content...