From 2303111e09d806ef2a652bddc2b73be6dccf6ae2 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sun, 10 Nov 2019 01:55:32 +0100 Subject: Draft new layout API --- native/src/lib.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'native/src/lib.rs') diff --git a/native/src/lib.rs b/native/src/lib.rs index 56399e57..d2388ee2 100644 --- a/native/src/lib.rs +++ b/native/src/lib.rs @@ -199,32 +199,25 @@ #![deny(unsafe_code)] #![deny(rust_2018_idioms)] pub mod input; +pub mod layout; pub mod renderer; pub mod widget; mod element; mod event; mod hasher; -mod layout; mod mouse_cursor; -mod node; -mod style; mod user_interface; pub use iced_core::{ Align, Background, Color, Justify, Length, Point, Rectangle, Vector, }; -#[doc(no_inline)] -pub use stretch::{geometry::Size, number::Number}; - pub use element::Element; pub use event::Event; pub use hasher::Hasher; pub use layout::Layout; pub use mouse_cursor::MouseCursor; -pub use node::Node; pub use renderer::Renderer; -pub use style::Style; pub use user_interface::{Cache, UserInterface}; pub use widget::*; -- cgit From 0240c3981b716c82ecb3364945815335b420a63e Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sun, 10 Nov 2019 06:05:20 +0100 Subject: Draft custom layout engine based on `druid` --- native/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'native/src/lib.rs') diff --git a/native/src/lib.rs b/native/src/lib.rs index d2388ee2..453a3ad5 100644 --- a/native/src/lib.rs +++ b/native/src/lib.rs @@ -207,6 +207,7 @@ mod element; mod event; mod hasher; mod mouse_cursor; +mod size; mod user_interface; pub use iced_core::{ @@ -219,5 +220,6 @@ pub use hasher::Hasher; pub use layout::Layout; pub use mouse_cursor::MouseCursor; pub use renderer::Renderer; +pub use size::Size; pub use user_interface::{Cache, UserInterface}; pub use widget::*; -- cgit From ceb02f4a36769c488c2525db2fb73f092a6c2706 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Mon, 11 Nov 2019 05:26:08 +0100 Subject: Implement `Container` widget Remove `align_self` and `justify_content` methods --- native/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'native/src/lib.rs') diff --git a/native/src/lib.rs b/native/src/lib.rs index 453a3ad5..d9e8f385 100644 --- a/native/src/lib.rs +++ b/native/src/lib.rs @@ -211,7 +211,7 @@ mod size; mod user_interface; pub use iced_core::{ - Align, Background, Color, Justify, Length, Point, Rectangle, Vector, + Align, Background, Color, Length, Point, Rectangle, Vector, }; pub use element::Element; -- cgit From 60774740efee5ff612390f1c3456282d63b5907c Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Mon, 11 Nov 2019 07:11:41 +0100 Subject: Fix doc comments and remove `Align` from `tour` --- native/src/lib.rs | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'native/src/lib.rs') diff --git a/native/src/lib.rs b/native/src/lib.rs index d9e8f385..a091059e 100644 --- a/native/src/lib.rs +++ b/native/src/lib.rs @@ -77,7 +77,7 @@ //! # //! # mod iced_wgpu { //! # use iced_native::{ -//! # button, text, Button, Text, Node, Point, Rectangle, Style, Color, Layout +//! # button, text, layout, Button, Text, Point, Rectangle, Color, Layout, Size //! # }; //! # //! # pub struct Renderer {} @@ -87,11 +87,12 @@ //! # } //! # //! # impl button::Renderer for Renderer { -//! # fn node( +//! # fn layout( //! # &self, -//! # _button: &Button<'_, Message, Self> -//! # ) -> Node { -//! # Node::new(Style::default()) +//! # _button: &Button<'_, Message, Self>, +//! # _limits: &layout::Limits, +//! # ) -> layout::Node { +//! # layout::Node::new(Size::ZERO) //! # } //! # //! # fn draw( @@ -103,8 +104,12 @@ //! # } //! # //! # impl text::Renderer for Renderer { -//! # fn node(&self, _text: &Text) -> Node { -//! # Node::new(Style::default()) +//! # fn layout( +//! # &self, +//! # _text: &Text, +//! # _limits: &layout::Limits, +//! # ) -> layout::Node { +//! # layout::Node::new(Size::ZERO) //! # } //! # //! # fn draw( -- cgit