[−][src]Module iced_native::renderer
Write your own renderer.
You will need to implement the Renderer
trait first. It simply contains
an Output
associated type.
There is no common trait to draw all the widgets. Instead, every Widget
constrains its generic Renderer
type as necessary.
This approach is flexible and composable. For instance, the
Text
widget only needs a text::Renderer
while a Checkbox
widget
needs both a text::Renderer
and a checkbox::Renderer
, reusing logic.
In the end, a renderer satisfying all the constraints is
needed to build a UserInterface
.
Structs
Null | A renderer that does nothing. |
Traits
Renderer | A component that can take the state of a user interface and produce an output for its users. |