summaryrefslogtreecommitdiffstats
path: root/native/src/widget/row.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2019-11-22 19:36:57 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2019-11-22 19:36:57 +0100
commita7dba612f03e58d7bd9527499d893987986b347c (patch)
treeb8c3d8f997b714aa368bd6eaecf14065f7645c77 /native/src/widget/row.rs
parentba56a561b254c9a5f3d23cb54d23dc311759ab4c (diff)
downloadiced-a7dba612f03e58d7bd9527499d893987986b347c.tar.gz
iced-a7dba612f03e58d7bd9527499d893987986b347c.tar.bz2
iced-a7dba612f03e58d7bd9527499d893987986b347c.zip
Write docs for `iced` and `iced_native`
Diffstat (limited to 'native/src/widget/row.rs')
-rw-r--r--native/src/widget/row.rs17
1 files changed, 17 insertions, 0 deletions
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<Message>(
&mut self,
children: &[Element<'_, Message, Self>],