From a7dba612f03e58d7bd9527499d893987986b347c Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Fri, 22 Nov 2019 19:36:57 +0100 Subject: Write docs for `iced` and `iced_native` --- native/src/widget/row.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'native/src/widget/row.rs') diff --git a/native/src/widget/row.rs b/native/src/widget/row.rs index 33222b8a..34c7ca7c 100644 --- a/native/src/widget/row.rs +++ b/native/src/widget/row.rs @@ -1,3 +1,4 @@ +//! Distribute content horizontally. use std::hash::Hash; use crate::{ @@ -192,7 +193,23 @@ where } } +/// The renderer of a [`Row`]. +/// +/// Your [renderer] will need to implement this trait before being +/// able to use a [`Row`] in your user interface. +/// +/// [`Row`]: struct.Row.html +/// [renderer]: ../../renderer/index.html pub trait Renderer: crate::Renderer + Sized { + /// Draws a [`Row`]. + /// + /// It receives: + /// - the children of the [`Row`] + /// - the [`Layout`] of the [`Row`] and its children + /// - the cursor position + /// + /// [`Row`]: struct.Row.html + /// [`Layout`]: ../layout/struct.Layout.html fn draw( &mut self, children: &[Element<'_, Message, Self>], -- cgit