diff options
81 files changed, 166 insertions, 154 deletions
diff --git a/examples/integration_opengl/src/controls.rs b/examples/integration_opengl/src/controls.rs index fa5aa91d..f387b4e5 100644 --- a/examples/integration_opengl/src/controls.rs +++ b/examples/integration_opengl/src/controls.rs @@ -1,9 +1,7 @@ use iced_glow::Renderer; -use iced_glutin::slider; -use iced_glutin::{ - Alignment, Color, Column, Command, Element, Length, Program, Row, Slider, - Text, -}; +use iced_glutin::widget::slider::{self, Slider}; +use iced_glutin::widget::{Column, Row, Text}; +use iced_glutin::{Alignment, Color, Command, Element, Length, Program}; pub struct Controls { background_color: Color, diff --git a/examples/integration_wgpu/src/controls.rs b/examples/integration_wgpu/src/controls.rs index 414eb9ce..4f110bd2 100644 --- a/examples/integration_wgpu/src/controls.rs +++ b/examples/integration_wgpu/src/controls.rs @@ -1,8 +1,7 @@ use iced_wgpu::Renderer; -use iced_winit::{ - slider, Alignment, Color, Column, Command, Element, Length, Program, Row, - Slider, Text, -}; +use iced_winit::widget::slider::{self, Slider}; +use iced_winit::widget::{Column, Row, Text}; +use iced_winit::{Alignment, Color, Command, Element, Length, Program}; pub struct Controls { background_color: Color, diff --git a/glow/src/backend.rs b/glow/src/backend.rs index 5ab7f922..89f8db9b 100644 --- a/glow/src/backend.rs +++ b/glow/src/backend.rs @@ -237,7 +237,10 @@ impl backend::Text for Backend { #[cfg(feature = "image")] impl backend::Image for Backend { - fn dimensions(&self, _handle: &iced_native::image::Handle) -> (u32, u32) { + fn dimensions( + &self, + _handle: &iced_native::widget::image::Handle, + ) -> (u32, u32) { (50, 50) } } @@ -246,7 +249,7 @@ impl backend::Image for Backend { impl backend::Svg for Backend { fn viewport_dimensions( &self, - _handle: &iced_native::svg::Handle, + _handle: &iced_native::widget::svg::Handle, ) -> (u32, u32) { (50, 50) } diff --git a/glow/src/text.rs b/glow/src/text.rs index 3b6f3bf5..6e2172ba 100644 --- a/glow/src/text.rs +++ b/glow/src/text.rs @@ -5,7 +5,7 @@ use iced_graphics::font; use glow_glyph::ab_glyph; use std::{cell::RefCell, collections::HashMap}; -pub use iced_native::text::Hit; +pub use iced_native::widget::text::Hit; #[derive(Debug)] pub struct Pipeline { diff --git a/glow/src/widget.rs b/glow/src/widget.rs index a77511e8..ee2810f9 100644 --- a/glow/src/widget.rs +++ b/glow/src/widget.rs @@ -66,13 +66,14 @@ pub mod qr_code; #[doc(no_inline)] pub use qr_code::QRCode; -pub use iced_native::{Image, Space}; +pub use iced_native::widget::{Image, Space}; /// A container that distributes its contents vertically. -pub type Column<'a, Message> = iced_native::Column<'a, Message, Renderer>; +pub type Column<'a, Message> = + iced_native::widget::Column<'a, Message, Renderer>; /// A container that distributes its contents horizontally. -pub type Row<'a, Message> = iced_native::Row<'a, Message, Renderer>; +pub type Row<'a, Message> = iced_native::widget::Row<'a, Message, Renderer>; /// A paragraph of text. -pub type Text = iced_native::Text<Renderer>; +pub type Text = iced_native::widget::Text<Renderer>; diff --git a/glow/src/widget/button.rs b/glow/src/widget/button.rs index fc729cd5..f11ff25e 100644 --- a/glow/src/widget/button.rs +++ b/glow/src/widget/button.rs @@ -4,9 +4,10 @@ use crate::Renderer; pub use iced_graphics::button::{Style, StyleSheet}; -pub use iced_native::button::State; +pub use iced_native::widget::button::State; /// A widget that produces a message when clicked. /// /// This is an alias of an `iced_native` button with an `iced_wgpu::Renderer`. -pub type Button<'a, Message> = iced_native::Button<'a, Message, Renderer>; +pub type Button<'a, Message> = + iced_native::widget::Button<'a, Message, Renderer>; diff --git a/glow/src/widget/checkbox.rs b/glow/src/widget/checkbox.rs index 9fd003d4..76d572d9 100644 --- a/glow/src/widget/checkbox.rs +++ b/glow/src/widget/checkbox.rs @@ -6,4 +6,5 @@ pub use iced_graphics::checkbox::{Style, StyleSheet}; /// A box that can be checked. /// /// This is an alias of an `iced_native` checkbox with an `iced_wgpu::Renderer`. -pub type Checkbox<'a, Message> = iced_native::Checkbox<'a, Message, Renderer>; +pub type Checkbox<'a, Message> = + iced_native::widget::Checkbox<'a, Message, Renderer>; diff --git a/glow/src/widget/container.rs b/glow/src/widget/container.rs index bc26cef2..c16db50d 100644 --- a/glow/src/widget/container.rs +++ b/glow/src/widget/container.rs @@ -7,4 +7,5 @@ pub use iced_graphics::container::{Style, StyleSheet}; /// /// This is an alias of an `iced_native` container with a default /// `Renderer`. -pub type Container<'a, Message> = iced_native::Container<'a, Message, Renderer>; +pub type Container<'a, Message> = + iced_native::widget::Container<'a, Message, Renderer>; diff --git a/glow/src/widget/pane_grid.rs b/glow/src/widget/pane_grid.rs index fc36862c..3c47acf0 100644 --- a/glow/src/widget/pane_grid.rs +++ b/glow/src/widget/pane_grid.rs @@ -20,12 +20,13 @@ pub use iced_graphics::pane_grid::{ /// [](https://gfycat.com/mixedflatjellyfish) /// /// This is an alias of an `iced_native` pane grid with an `iced_wgpu::Renderer`. -pub type PaneGrid<'a, Message> = iced_native::PaneGrid<'a, Message, Renderer>; +pub type PaneGrid<'a, Message> = + iced_native::widget::PaneGrid<'a, Message, Renderer>; /// The content of a [`Pane`]. pub type Content<'a, Message> = - iced_native::pane_grid::Content<'a, Message, Renderer>; + iced_native::widget::pane_grid::Content<'a, Message, Renderer>; /// The title bar of a [`Pane`]. pub type TitleBar<'a, Message> = - iced_native::pane_grid::TitleBar<'a, Message, Renderer>; + iced_native::widget::pane_grid::TitleBar<'a, Message, Renderer>; diff --git a/glow/src/widget/pick_list.rs b/glow/src/widget/pick_list.rs index fccc68c9..4d93be68 100644 --- a/glow/src/widget/pick_list.rs +++ b/glow/src/widget/pick_list.rs @@ -1,9 +1,9 @@ //! Display a dropdown list of selectable values. -pub use iced_native::pick_list::State; +pub use iced_native::widget::pick_list::State; pub use iced_graphics::overlay::menu::Style as Menu; pub use iced_graphics::pick_list::{Style, StyleSheet}; /// A widget allowing the selection of a single value from a list of options. pub type PickList<'a, T, Message> = - iced_native::PickList<'a, T, Message, crate::Renderer>; + iced_native::widget::PickList<'a, T, Message, crate::Renderer>; diff --git a/glow/src/widget/radio.rs b/glow/src/widget/radio.rs index c200f1a8..9ef1d7a5 100644 --- a/glow/src/widget/radio.rs +++ b/glow/src/widget/radio.rs @@ -7,4 +7,4 @@ pub use iced_graphics::radio::{Style, StyleSheet}; /// /// This is an alias of an `iced_native` radio button with an /// `iced_wgpu::Renderer`. -pub type Radio<'a, Message> = iced_native::Radio<'a, Message, Renderer>; +pub type Radio<'a, Message> = iced_native::widget::Radio<'a, Message, Renderer>; diff --git a/glow/src/widget/scrollable.rs b/glow/src/widget/scrollable.rs index fabb4318..d5635ec5 100644 --- a/glow/src/widget/scrollable.rs +++ b/glow/src/widget/scrollable.rs @@ -2,7 +2,7 @@ use crate::Renderer; pub use iced_graphics::scrollable::{Scrollbar, Scroller, StyleSheet}; -pub use iced_native::scrollable::State; +pub use iced_native::widget::scrollable::State; /// A widget that can vertically display an infinite amount of content /// with a scrollbar. @@ -10,4 +10,4 @@ pub use iced_native::scrollable::State; /// This is an alias of an `iced_native` scrollable with a default /// `Renderer`. pub type Scrollable<'a, Message> = - iced_native::Scrollable<'a, Message, Renderer>; + iced_native::widget::Scrollable<'a, Message, Renderer>; diff --git a/glow/src/widget/slider.rs b/glow/src/widget/slider.rs index 2ece156c..2fb3d5d9 100644 --- a/glow/src/widget/slider.rs +++ b/glow/src/widget/slider.rs @@ -2,4 +2,4 @@ //! //! A [`Slider`] has some local [`State`]. pub use iced_graphics::slider::{Handle, HandleShape, Style, StyleSheet}; -pub use iced_native::slider::{Slider, State}; +pub use iced_native::widget::slider::{Slider, State}; diff --git a/glow/src/widget/text_input.rs b/glow/src/widget/text_input.rs index db18b1cc..5560e3e0 100644 --- a/glow/src/widget/text_input.rs +++ b/glow/src/widget/text_input.rs @@ -4,9 +4,10 @@ use crate::Renderer; pub use iced_graphics::text_input::{Style, StyleSheet}; -pub use iced_native::text_input::State; +pub use iced_native::widget::text_input::State; /// A field that can be filled with text. /// /// This is an alias of an `iced_native` text input with an `iced_wgpu::Renderer`. -pub type TextInput<'a, Message> = iced_native::TextInput<'a, Message, Renderer>; +pub type TextInput<'a, Message> = + iced_native::widget::TextInput<'a, Message, Renderer>; diff --git a/glow/src/widget/toggler.rs b/glow/src/widget/toggler.rs index 1cd8711b..cea48efb 100644 --- a/glow/src/widget/toggler.rs +++ b/glow/src/widget/toggler.rs @@ -6,4 +6,4 @@ pub use iced_graphics::toggler::{Style, StyleSheet}; /// A toggler that can be toggled. /// /// This is an alias of an `iced_native` checkbox with an `iced_wgpu::Renderer`. -pub type Toggler<Message> = iced_native::Toggler<Message, Renderer>; +pub type Toggler<Message> = iced_native::widget::Toggler<Message, Renderer>; diff --git a/glow/src/widget/tooltip.rs b/glow/src/widget/tooltip.rs index 89ab3a15..c6af3903 100644 --- a/glow/src/widget/tooltip.rs +++ b/glow/src/widget/tooltip.rs @@ -1,6 +1,6 @@ //! Display a widget over another. /// A widget allowing the selection of a single value from a list of options. pub type Tooltip<'a, Message> = - iced_native::Tooltip<'a, Message, crate::Renderer>; + iced_native::widget::Tooltip<'a, Message, crate::Renderer>; -pub use iced_native::tooltip::Position; +pub use iced_native::widget::tooltip::Position; diff --git a/graphics/src/backend.rs b/graphics/src/backend.rs index b8ff5d21..4692ced1 100644 --- a/graphics/src/backend.rs +++ b/graphics/src/backend.rs @@ -1,7 +1,7 @@ //! Write a graphics backend. -use iced_native::image; -use iced_native::svg; -use iced_native::text; +use iced_native::widget::image; +use iced_native::widget::svg; +use iced_native::widget::text; use iced_native::{Font, Point, Size}; /// The graphics backend of a [`Renderer`]. diff --git a/graphics/src/primitive.rs b/graphics/src/primitive.rs index b984feaa..16046387 100644 --- a/graphics/src/primitive.rs +++ b/graphics/src/primitive.rs @@ -1,6 +1,6 @@ -use iced_native::{ - image, svg, Background, Color, Font, Rectangle, Size, Vector, -}; +use iced_native::widget::image; +use iced_native::widget::svg; +use iced_native::{Background, Color, Font, Rectangle, Size, Vector}; use crate::alignment; use crate::triangle; diff --git a/graphics/src/widget/button.rs b/graphics/src/widget/button.rs index 3d3e6675..7b40c47b 100644 --- a/graphics/src/widget/button.rs +++ b/graphics/src/widget/button.rs @@ -3,10 +3,10 @@ //! A [`Button`] has some local [`State`]. use crate::Renderer; -pub use iced_native::button::{State, Style, StyleSheet}; +pub use iced_native::widget::button::{State, Style, StyleSheet}; /// A widget that produces a message when clicked. /// /// This is an alias of an `iced_native` button with an `iced_wgpu::Renderer`. pub type Button<'a, Message, Backend> = - iced_native::Button<'a, Message, Renderer<Backend>>; + iced_native::widget::Button<'a, Message, Renderer<Backend>>; diff --git a/graphics/src/widget/checkbox.rs b/graphics/src/widget/checkbox.rs index a458d85c..0d2e93f9 100644 --- a/graphics/src/widget/checkbox.rs +++ b/graphics/src/widget/checkbox.rs @@ -7,4 +7,4 @@ pub use iced_style::checkbox::{Style, StyleSheet}; /// /// This is an alias of an `iced_native` checkbox with an `iced_wgpu::Renderer`. pub type Checkbox<'a, Message, Backend> = - iced_native::Checkbox<'a, Message, Renderer<Backend>>; + iced_native::widget::Checkbox<'a, Message, Renderer<Backend>>; diff --git a/graphics/src/widget/column.rs b/graphics/src/widget/column.rs index 567529e5..561681d5 100644 --- a/graphics/src/widget/column.rs +++ b/graphics/src/widget/column.rs @@ -2,4 +2,4 @@ use crate::Renderer; /// A container that distributes its contents vertically. pub type Column<'a, Message, Backend> = - iced_native::Column<'a, Message, Renderer<Backend>>; + iced_native::widget::Column<'a, Message, Renderer<Backend>>; diff --git a/graphics/src/widget/container.rs b/graphics/src/widget/container.rs index c4c4e5ba..99996f3b 100644 --- a/graphics/src/widget/container.rs +++ b/graphics/src/widget/container.rs @@ -8,4 +8,4 @@ pub use iced_style::container::{Style, StyleSheet}; /// This is an alias of an `iced_native` container with a default /// `Renderer`. pub type Container<'a, Message, Backend> = - iced_native::Container<'a, Message, Renderer<Backend>>; + iced_native::widget::Container<'a, Message, Renderer<Backend>>; diff --git a/graphics/src/widget/image.rs b/graphics/src/widget/image.rs index 242d36d7..0131dd82 100644 --- a/graphics/src/widget/image.rs +++ b/graphics/src/widget/image.rs @@ -4,9 +4,9 @@ pub mod viewer; use crate::backend::{self, Backend}; use crate::{Primitive, Rectangle, Renderer}; -use iced_native::image; +use iced_native::widget::image; -pub use iced_native::image::{Handle, Image, Viewer}; +pub use iced_native::widget::image::{Handle, Image, Viewer}; impl<B> image::Renderer for Renderer<B> where diff --git a/graphics/src/widget/image/viewer.rs b/graphics/src/widget/image/viewer.rs index ea7d8591..9260990a 100644 --- a/graphics/src/widget/image/viewer.rs +++ b/graphics/src/widget/image/viewer.rs @@ -1,2 +1,2 @@ //! Zoom and pan on an image. -pub use iced_native::image::Viewer; +pub use iced_native::widget::image::Viewer; diff --git a/graphics/src/widget/pane_grid.rs b/graphics/src/widget/pane_grid.rs index 4dc42e41..95189920 100644 --- a/graphics/src/widget/pane_grid.rs +++ b/graphics/src/widget/pane_grid.rs @@ -9,7 +9,7 @@ //! [`pane_grid` example]: https://github.com/hecrj/iced/tree/0.3/examples/pane_grid use crate::Renderer; -pub use iced_native::pane_grid::{ +pub use iced_native::widget::pane_grid::{ Axis, Configuration, Content, Direction, DragEvent, Node, Pane, ResizeEvent, Split, State, TitleBar, }; @@ -23,4 +23,4 @@ pub use iced_style::pane_grid::{Line, StyleSheet}; /// /// This is an alias of an `iced_native` pane grid with an `iced_wgpu::Renderer`. pub type PaneGrid<'a, Message, Backend> = - iced_native::PaneGrid<'a, Message, Renderer<Backend>>; + iced_native::widget::PaneGrid<'a, Message, Renderer<Backend>>; diff --git a/graphics/src/widget/pick_list.rs b/graphics/src/widget/pick_list.rs index b5cb0a44..f3ac12b8 100644 --- a/graphics/src/widget/pick_list.rs +++ b/graphics/src/widget/pick_list.rs @@ -1,9 +1,9 @@ //! Display a dropdown list of selectable values. use crate::Renderer; -pub use iced_native::pick_list::State; +pub use iced_native::widget::pick_list::State; pub use iced_style::pick_list::{Style, StyleSheet}; /// A widget allowing the selection of a single value from a list of options. pub type PickList<'a, T, Message, Backend> = - iced_native::PickList<'a, T, Message, Renderer<Backend>>; + iced_native::widget::PickList<'a, T, Message, Renderer<Backend>>; diff --git a/graphics/src/widget/progress_bar.rs b/graphics/src/widget/progress_bar.rs index df4f5ec6..3666ecfd 100644 --- a/graphics/src/widget/progress_bar.rs +++ b/graphics/src/widget/progress_bar.rs @@ -2,4 +2,4 @@ //! //! A [`ProgressBar`] has a range of possible values and a current value, //! as well as a length, height and style. -pub use iced_native::progress_bar::*; +pub use iced_native::widget::progress_bar::*; diff --git a/graphics/src/widget/radio.rs b/graphics/src/widget/radio.rs index 4185bd61..20d72747 100644 --- a/graphics/src/widget/radio.rs +++ b/graphics/src/widget/radio.rs @@ -8,4 +8,4 @@ pub use iced_style::radio::{Style, StyleSheet}; /// This is an alias of an `iced_native` radio button with an /// `iced_wgpu::Renderer`. pub type Radio<'a, Message, Backend> = - iced_native::Radio<'a, Message, Renderer<Backend>>; + iced_native::widget::Radio<'a, Message, Renderer<Backend>>; diff --git a/graphics/src/widget/row.rs b/graphics/src/widget/row.rs index 55960c04..5bee3fd5 100644 --- a/graphics/src/widget/row.rs +++ b/graphics/src/widget/row.rs @@ -2,4 +2,4 @@ use crate::Renderer; /// A container that distributes its contents horizontally. pub type Row<'a, Message, Backend> = - iced_native::Row<'a, Message, Renderer<Backend>>; + iced_native::widget::Row<'a, Message, Renderer<Backend>>; diff --git a/graphics/src/widget/rule.rs b/graphics/src/widget/rule.rs index 57f4a530..b96924fa 100644 --- a/graphics/src/widget/rule.rs +++ b/graphics/src/widget/rule.rs @@ -1,3 +1,3 @@ //! Display a horizontal or vertical rule for dividing content. -pub use iced_native::rule::*; +pub use iced_native::widget::rule::*; diff --git a/graphics/src/widget/scrollable.rs b/graphics/src/widget/scrollable.rs index 61eae587..3fdaf668 100644 --- a/graphics/src/widget/scrollable.rs +++ b/graphics/src/widget/scrollable.rs @@ -1,7 +1,7 @@ //! Navigate an endless amount of content with a scrollbar. use crate::Renderer; -pub use iced_native::scrollable::State; +pub use iced_native::widget::scrollable::State; pub use iced_style::scrollable::{Scrollbar, Scroller, StyleSheet}; /// A widget that can vertically display an infinite amount of content @@ -10,4 +10,4 @@ pub use iced_style::scrollable::{Scrollbar, Scroller, StyleSheet}; /// This is an alias of an `iced_native` scrollable with a default /// `Renderer`. pub type Scrollable<'a, Message, Backend> = - iced_native::Scrollable<'a, Message, Renderer<Backend>>; + iced_native::widget::Scrollable<'a, Message, Renderer<Backend>>; diff --git a/graphics/src/widget/slider.rs b/graphics/src/widget/slider.rs index 766ecbb6..96dc6ec4 100644 --- a/graphics/src/widget/slider.rs +++ b/graphics/src/widget/slider.rs @@ -1,5 +1,5 @@ //! Display an interactive selector of a single value from a range of values. //! //! A [`Slider`] has some local [`State`]. -pub use iced_native::slider::{Slider, State}; +pub use iced_native::widget::slider::{Slider, State}; pub use iced_style::slider::{Handle, HandleShape, Style, StyleSheet}; diff --git a/graphics/src/widget/space.rs b/graphics/src/widget/space.rs index a4d60d4b..77e93dbb 100644 --- a/graphics/src/widget/space.rs +++ b/graphics/src/widget/space.rs @@ -1 +1 @@ -pub use iced_native::Space; +pub use iced_native::widget::Space; diff --git a/graphics/src/widget/svg.rs b/graphics/src/widget/svg.rs index 621f1a85..64a2b461 100644 --- a/graphics/src/widget/svg.rs +++ b/graphics/src/widget/svg.rs @@ -1,9 +1,9 @@ //! Display vector graphics in your application. use crate::backend::{self, Backend}; use crate::{Primitive, Rectangle, Renderer}; -use iced_native::svg; +use iced_native::widget::svg; -pub use iced_native::svg::{Handle, Svg}; +pub use iced_native::widget::svg::{Handle, Svg}; impl<B> svg::Renderer for Renderer<B> where diff --git a/graphics/src/widget/text.rs b/graphics/src/widget/text.rs index ec0349f9..43516fca 100644 --- a/graphics/src/widget/text.rs +++ b/graphics/src/widget/text.rs @@ -4,4 +4,4 @@ use crate::Renderer; /// A paragraph of text. /// /// This is an alias of an `iced_native` text with an `iced_wgpu::Renderer`. -pub type Text<Backend> = iced_native::Text<Renderer<Backend>>; +pub type Text<Backend> = iced_native::widget::Text<Renderer<Backend>>; diff --git a/graphics/src/widget/text_input.rs b/graphics/src/widget/text_input.rs index ebb9138f..87384d7e 100644 --- a/graphics/src/widget/text_input.rs +++ b/graphics/src/widget/text_input.rs @@ -3,11 +3,11 @@ //! A [`TextInput`] has some local [`State`]. use crate::Renderer; -pub use iced_native::text_input::State; +pub use iced_native::widget::text_input::State; pub use iced_style::text_input::{Style, StyleSheet}; /// A field that can be filled with text. /// /// This is an alias of an `iced_native` text input with an `iced_wgpu::Renderer`. pub type TextInput<'a, Message, Backend> = - iced_native::TextInput<'a, Message, Renderer<Backend>>; + iced_native::widget::TextInput<'a, Message, Renderer<Backend>>; diff --git a/graphics/src/widget/toggler.rs b/graphics/src/widget/toggler.rs index 60d8a347..0cabd027 100644 --- a/graphics/src/widget/toggler.rs +++ b/graphics/src/widget/toggler.rs @@ -7,4 +7,4 @@ pub use iced_style::toggler::{Style, StyleSheet}; /// /// This is an alias of an `iced_native` toggler with an `iced_wgpu::Renderer`. pub type Toggler<Message, Backend> = - iced_native::Toggler<Message, Renderer<Backend>>; + iced_native::widget::Toggler<Message, Renderer<Backend>>; diff --git a/graphics/src/widget/tooltip.rs b/graphics/src/widget/tooltip.rs index 867f0437..7dc12ed4 100644 --- a/graphics/src/widget/tooltip.rs +++ b/graphics/src/widget/tooltip.rs @@ -6,6 +6,6 @@ use crate::Renderer; /// This is an alias of an `iced_native` tooltip with a default /// `Renderer`. pub type Tooltip<'a, Message, Backend> = - iced_native::Tooltip<'a, Message, Renderer<Backend>>; + iced_native::widget::Tooltip<'a, Message, Renderer<Backend>>; -pub use iced_native::tooltip::Position; +pub use iced_native::widget::tooltip::Position; diff --git a/native/src/element.rs b/native/src/element.rs index d69b24fc..f4ae88b5 100644 --- a/native/src/element.rs +++ b/native/src/element.rs @@ -80,7 +80,7 @@ where /// /// ``` /// # mod counter { - /// # type Text = iced_native::Text<iced_native::renderer::Null>; + /// # type Text = iced_native::widget::Text<iced_native::renderer::Null>; /// # /// # #[derive(Debug, Clone, Copy)] /// # pub enum Message {} @@ -107,7 +107,8 @@ where /// # pub enum Message { /// # Counter(usize, counter::Message) /// # } - /// use iced_native::{Element, Row}; + /// use iced_native::Element; + /// use iced_native::widget::Row; /// use iced_wgpu::Renderer; /// /// impl ManyCounters { diff --git a/native/src/lib.rs b/native/src/lib.rs index 55265fbf..f11f7d96 100644 --- a/native/src/lib.rs +++ b/native/src/lib.rs @@ -84,4 +84,4 @@ pub use renderer::Renderer; pub use runtime::Runtime; pub use subscription::Subscription; pub use user_interface::{Cache, UserInterface}; -pub use widget::*; +pub use widget::Widget; diff --git a/native/src/overlay/menu.rs b/native/src/overlay/menu.rs index 1ba953f3..646d5133 100644 --- a/native/src/overlay/menu.rs +++ b/native/src/overlay/menu.rs @@ -6,11 +6,12 @@ use crate::mouse; use crate::overlay; use crate::renderer; use crate::renderer::text; -use crate::scrollable; use crate::touch; +use crate::widget::scrollable::{self, Scrollable}; +use crate::widget::Container; use crate::{ - Clipboard, Color, Container, Element, Hasher, Layout, Length, Padding, - Point, Rectangle, Scrollable, Size, Vector, Widget, + Clipboard, Color, Element, Hasher, Layout, Length, Padding, Point, + Rectangle, Size, Vector, Widget, }; pub use iced_style::menu::Style; diff --git a/native/src/renderer/null.rs b/native/src/renderer/null.rs index dbd3a820..e57841f4 100644 --- a/native/src/renderer/null.rs +++ b/native/src/renderer/null.rs @@ -1,5 +1,5 @@ use crate::renderer::{self, Renderer}; -use crate::text; +use crate::widget::text; use crate::{Font, Point, Rectangle, Size, Vector}; /// A renderer that does nothing. diff --git a/native/src/renderer/text.rs b/native/src/renderer/text.rs index fbf116a1..fc1a2c66 100644 --- a/native/src/renderer/text.rs +++ b/native/src/renderer/text.rs @@ -1,7 +1,7 @@ use crate::alignment; use crate::{Color, Point, Rectangle, Renderer, Size}; -pub use crate::text::Hit; +pub use crate::widget::text::Hit; pub trait Text: Renderer { /// The font type used. diff --git a/native/src/user_interface.rs b/native/src/user_interface.rs index ac7fa367..a25fb0c4 100644 --- a/native/src/user_interface.rs +++ b/native/src/user_interface.rs @@ -49,7 +49,7 @@ where /// # pub use iced_native::renderer::Null as Renderer; /// # } /// # - /// # use iced_native::Column; + /// # use iced_native::widget::Column; /// # /// # pub struct Counter; /// # @@ -143,7 +143,7 @@ where /// # pub use iced_native::renderer::Null as Renderer; /// # } /// # - /// # use iced_native::Column; + /// # use iced_native::widget::Column; /// # /// # pub struct Counter; /// # @@ -279,7 +279,7 @@ where /// # pub use iced_native::renderer::Null as Renderer; /// # } /// # - /// # use iced_native::Column; + /// # use iced_native::widget::Column; /// # /// # pub struct Counter; /// # diff --git a/native/src/widget.rs b/native/src/widget.rs index 9999701e..6a2bbfbd 100644 --- a/native/src/widget.rs +++ b/native/src/widget.rs @@ -10,14 +10,6 @@ //! [`Widget`] trait. You can use the API of the built-in widgets as a guide or //! source of inspiration. //! -//! # Re-exports -//! For convenience, the contents of this module are available at the root -//! module. Therefore, you can directly type: -//! -//! ``` -//! use iced_native::{button, Button, Widget}; -//! ``` -//! //! [renderer]: crate::renderer pub mod button; pub mod checkbox; diff --git a/native/src/widget/button.rs b/native/src/widget/button.rs index a654cf12..a577fe84 100644 --- a/native/src/widget/button.rs +++ b/native/src/widget/button.rs @@ -19,10 +19,10 @@ pub use iced_style::button::{Style, StyleSheet}; /// A generic widget that produces a message when pressed. /// /// ``` -/// # use iced_native::{button, Text}; +/// # use iced_native::widget::{button, Text}; /// # /// # type Button<'a, Message> = -/// # iced_native::Button<'a, Message, iced_native::renderer::Null>; +/// # iced_native::widget::Button<'a, Message, iced_native::renderer::Null>; /// # /// #[derive(Clone)] /// enum Message { @@ -38,10 +38,10 @@ pub use iced_style::button::{Style, StyleSheet}; /// be disabled: /// /// ``` -/// # use iced_native::{button, Text}; +/// # use iced_native::widget::{button, Text}; /// # /// # type Button<'a, Message> = -/// # iced_native::Button<'a, Message, iced_native::renderer::Null>; +/// # iced_native::widget::Button<'a, Message, iced_native::renderer::Null>; /// # /// #[derive(Clone)] /// enum Message { diff --git a/native/src/widget/checkbox.rs b/native/src/widget/checkbox.rs index 83bc2aa3..b81a444e 100644 --- a/native/src/widget/checkbox.rs +++ b/native/src/widget/checkbox.rs @@ -6,11 +6,12 @@ use crate::event::{self, Event}; use crate::layout; use crate::mouse; use crate::renderer; -use crate::text; use crate::touch; +use crate::widget::text; +use crate::widget::{Row, Text}; use crate::{ Alignment, Clipboard, Color, Element, Hasher, Layout, Length, Point, - Rectangle, Row, Text, Widget, + Rectangle, Widget, }; pub use iced_style::checkbox::{Style, StyleSheet}; @@ -20,7 +21,7 @@ pub use iced_style::checkbox::{Style, StyleSheet}; /// # Example /// /// ``` -/// # type Checkbox<'a, Message> = iced_native::Checkbox<'a, Message, iced_native::renderer::Null>; +/// # type Checkbox<'a, Message> = iced_native::widget::Checkbox<'a, Message, iced_native::renderer::Null>; /// # /// pub enum Message { /// CheckboxToggled(bool), diff --git a/native/src/widget/image.rs b/native/src/widget/image.rs index b87c0aab..d23d393a 100644 --- a/native/src/widget/image.rs +++ b/native/src/widget/image.rs @@ -17,7 +17,7 @@ use std::{ /// # Example /// /// ``` -/// # use iced_native::Image; +/// # use iced_native::widget::Image; /// # /// let image = Image::new("resources/ferris.png"); /// ``` diff --git a/native/src/widget/image/viewer.rs b/native/src/widget/image/viewer.rs index d9eccfad..d3c794a7 100644 --- a/native/src/widget/image/viewer.rs +++ b/native/src/widget/image/viewer.rs @@ -1,9 +1,9 @@ //! Zoom and pan on an image. use crate::event::{self, Event}; -use crate::image; use crate::layout; use crate::mouse; use crate::renderer; +use crate::widget::image; use crate::{ Clipboard, Element, Hasher, Layout, Length, Point, Rectangle, Size, Vector, Widget, diff --git a/native/src/widget/pane_grid.rs b/native/src/widget/pane_grid.rs index 5f0e73e4..22c18c05 100644 --- a/native/src/widget/pane_grid.rs +++ b/native/src/widget/pane_grid.rs @@ -62,10 +62,10 @@ pub use iced_style::pane_grid::{Line, StyleSheet}; /// ## Example /// /// ``` -/// # use iced_native::{pane_grid, Text}; +/// # use iced_native::widget::{pane_grid, Text}; /// # /// # type PaneGrid<'a, Message> = -/// # iced_native::PaneGrid<'a, Message, iced_native::renderer::Null>; +/// # iced_native::widget::PaneGrid<'a, Message, iced_native::renderer::Null>; /// # /// enum PaneState { /// SomePane, diff --git a/native/src/widget/pane_grid/configuration.rs b/native/src/widget/pane_grid/configuration.rs index 4c43826e..4c52bad4 100644 --- a/native/src/widget/pane_grid/configuration.rs +++ b/native/src/widget/pane_grid/configuration.rs @@ -1,4 +1,4 @@ -use crate::pane_grid::Axis; +use crate::widget::pane_grid::Axis; /// The arrangement of a [`PaneGrid`]. /// diff --git a/native/src/widget/pane_grid/content.rs b/native/src/widget/pane_grid/content.rs index ddc659cc..83d96917 100644 --- a/native/src/widget/pane_grid/content.rs +++ b/native/src/widget/pane_grid/content.rs @@ -1,10 +1,10 @@ -use crate::container; use crate::event::{self, Event}; use crate::layout; use crate::mouse; use crate::overlay; -use crate::pane_grid::TitleBar; use crate::renderer; +use crate::widget::container; +use crate::widget::pane_grid::TitleBar; use crate::{Clipboard, Element, Hasher, Layout, Point, Rectangle, Size}; /// The content of a [`Pane`]. diff --git a/native/src/widget/pane_grid/node.rs b/native/src/widget/pane_grid/node.rs index 84714e00..af6573a0 100644 --- a/native/src/widget/pane_grid/node.rs +++ b/native/src/widget/pane_grid/node.rs @@ -1,7 +1,5 @@ -use crate::{ - pane_grid::{Axis, Pane, Split}, - Rectangle, Size, -}; +use crate::widget::pane_grid::{Axis, Pane, Split}; +use crate::{Rectangle, Size}; use std::collections::BTreeMap; diff --git a/native/src/widget/pane_grid/state.rs b/native/src/widget/pane_grid/state.rs index fb96f89f..bcc724a8 100644 --- a/native/src/widget/pane_grid/state.rs +++ b/native/src/widget/pane_grid/state.rs @@ -1,7 +1,7 @@ -use crate::{ - pane_grid::{Axis, Configuration, Direction, Node, Pane, Split}, - Hasher, Point, Rectangle, Size, +use crate::widget::pane_grid::{ + Axis, Configuration, Direction, Node, Pane, Split, }; +use crate::{Hasher, Point, Rectangle, Size}; use std::collections::{BTreeMap, HashMap}; diff --git a/native/src/widget/pane_grid/title_bar.rs b/native/src/widget/pane_grid/title_bar.rs index 493c74db..2d66ba6c 100644 --- a/native/src/widget/pane_grid/title_bar.rs +++ b/native/src/widget/pane_grid/title_bar.rs @@ -1,9 +1,9 @@ -use crate::container; use crate::event::{self, Event}; use crate::layout; use crate::mouse; use crate::overlay; use crate::renderer; +use crate::widget::container; use crate::{ Clipboard, Element, Hasher, Layout, Padding, Point, Rectangle, Size, }; diff --git a/native/src/widget/progress_bar.rs b/native/src/widget/progress_bar.rs index 9e857226..48bf485e 100644 --- a/native/src/widget/progress_bar.rs +++ b/native/src/widget/progress_bar.rs @@ -13,7 +13,7 @@ pub use iced_style::progress_bar::{Style, StyleSheet}; /// /// # Example /// ``` -/// # use iced_native::ProgressBar; +/// # use iced_native::widget::ProgressBar; /// let value = 50.0; /// /// ProgressBar::new(0.0..=100.0, value); diff --git a/native/src/widget/radio.rs b/native/src/widget/radio.rs index 5601a597..91de8be5 100644 --- a/native/src/widget/radio.rs +++ b/native/src/widget/radio.rs @@ -6,11 +6,12 @@ use crate::event::{self, Event}; use crate::layout; use crate::mouse; use crate::renderer; -use crate::text; use crate::touch; +use crate::widget::text; +use crate::widget::{Row, Text}; use crate::{ Alignment, Background, Clipboard, Color, Element, Hasher, Layout, Length, - Point, Rectangle, Row, Text, Widget, + Point, Rectangle, Widget, }; pub use iced_style::radio::{Style, StyleSheet}; @@ -20,7 +21,7 @@ pub use iced_style::radio::{Style, StyleSheet}; /// # Example /// ``` /// # type Radio<'a, Message> = -/// # iced_native::Radio<'a, Message, iced_native::renderer::Null>; +/// # iced_native::widget::Radio<'a, Message, iced_native::renderer::Null>; /// # /// #[derive(Debug, Clone, Copy, PartialEq, Eq)] /// pub enum Choice { diff --git a/native/src/widget/scrollable.rs b/native/src/widget/scrollable.rs index 4b514818..781fe73e 100644 --- a/native/src/widget/scrollable.rs +++ b/native/src/widget/scrollable.rs @@ -5,9 +5,10 @@ use crate::mouse; use crate::overlay; use crate::renderer; use crate::touch; +use crate::widget::Column; use crate::{ - Alignment, Background, Clipboard, Color, Column, Element, Hasher, Layout, - Length, Padding, Point, Rectangle, Size, Vector, Widget, + Alignment, Background, Clipboard, Color, Element, Hasher, Layout, Length, + Padding, Point, Rectangle, Size, Vector, Widget, }; use std::{f32, hash::Hash, u32}; diff --git a/native/src/widget/slider.rs b/native/src/widget/slider.rs index 60124160..977a5240 100644 --- a/native/src/widget/slider.rs +++ b/native/src/widget/slider.rs @@ -26,7 +26,7 @@ pub use iced_style::slider::{Handle, HandleShape, Style, StyleSheet}; /// /// # Example /// ``` -/// # use iced_native::slider::{self, Slider}; +/// # use iced_native::widget::slider::{self, Slider}; /// # /// #[derive(Clone)] /// pub enum Message { diff --git a/native/src/widget/text.rs b/native/src/widget/text.rs index 2432dbc8..563ab8c4 100644 --- a/native/src/widget/text.rs +++ b/native/src/widget/text.rs @@ -15,7 +15,7 @@ use std::hash::Hash; /// # Example /// /// ``` -/// # type Text = iced_native::Text<iced_native::renderer::Null>; +/// # type Text = iced_native::widget::Text<iced_native::renderer::Null>; /// # /// Text::new("I <3 iced!") /// .color([0.0, 0.0, 1.0]) diff --git a/native/src/widget/text_input.rs b/native/src/widget/text_input.rs index c2950db9..5d67ddfe 100644 --- a/native/src/widget/text_input.rs +++ b/native/src/widget/text_input.rs @@ -31,9 +31,10 @@ pub use iced_style::text_input::{Style, StyleSheet}; /// /// # Example /// ``` -/// # use iced_native::{text_input, renderer::Null}; +/// # use iced_native::renderer::Null; +/// # use iced_native::widget::text_input; /// # -/// # pub type TextInput<'a, Message> = iced_native::TextInput<'a, Message, Null>; +/// # pub type TextInput<'a, Message> = iced_native::widget::TextInput<'a, Message, Null>; /// #[derive(Debug, Clone)] /// enum Message { /// TextInputChanged(String), diff --git a/native/src/widget/text_input/editor.rs b/native/src/widget/text_input/editor.rs index 0b50a382..bac530e1 100644 --- a/native/src/widget/text_input/editor.rs +++ b/native/src/widget/text_input/editor.rs @@ -1,4 +1,4 @@ -use crate::text_input::{Cursor, Value}; +use crate::widget::text_input::{Cursor, Value}; pub struct Editor<'a> { value: &'a mut Value, diff --git a/native/src/widget/toggler.rs b/native/src/widget/toggler.rs index a11d0307..20cfea74 100644 --- a/native/src/widget/toggler.rs +++ b/native/src/widget/toggler.rs @@ -7,9 +7,10 @@ use crate::layout; use crate::mouse; use crate::renderer; use crate::widget::text; +use crate::widget::{Row, Text}; use crate::{ Alignment, Clipboard, Element, Event, Hasher, Layout, Length, Point, - Rectangle, Row, Text, Widget, + Rectangle, Widget, }; pub use iced_style::toggler::{Style, StyleSheet}; @@ -19,7 +20,7 @@ pub use iced_style::toggler::{Style, StyleSheet}; /// # Example /// /// ``` -/// # type Toggler<Message> = iced_native::Toggler<Message, iced_native::renderer::Null>; +/// # type Toggler<Message> = iced_native::widget::Toggler<Message, iced_native::renderer::Null>; /// # /// pub enum Message { /// TogglerToggled(bool), diff --git a/src/widget.rs b/src/widget.rs index db052106..c731cf65 100644 --- a/src/widget.rs +++ b/src/widget.rs @@ -38,14 +38,14 @@ mod platform { #[cfg_attr(docsrs, doc(cfg(feature = "image")))] pub mod image { //! Display images in your user interface. - pub use crate::runtime::image::viewer; - pub use crate::runtime::image::{Handle, Image, Viewer}; + pub use crate::runtime::widget::image::viewer; + pub use crate::runtime::widget::image::{Handle, Image, Viewer}; } #[cfg_attr(docsrs, doc(cfg(feature = "svg")))] pub mod svg { //! Display vector graphics in your user interface. - pub use crate::runtime::svg::{Handle, Svg}; + pub use crate::runtime::widget::svg::{Handle, Svg}; } #[doc(no_inline)] diff --git a/wgpu/src/backend.rs b/wgpu/src/backend.rs index bb84cc8f..7d7a26f4 100644 --- a/wgpu/src/backend.rs +++ b/wgpu/src/backend.rs @@ -302,7 +302,10 @@ impl backend::Text for Backend { #[cfg(feature = "image_rs")] impl backend::Image for Backend { - fn dimensions(&self, handle: &iced_native::image::Handle) -> (u32, u32) { + fn dimensions( + &self, + handle: &iced_native::widget::image::Handle, + ) -> (u32, u32) { self.image_pipeline.dimensions(handle) } } @@ -311,7 +314,7 @@ impl backend::Image for Backend { impl backend::Svg for Backend { fn viewport_dimensions( &self, - handle: &iced_native::svg::Handle, + handle: &iced_native::widget::svg::Handle, ) -> (u32, u32) { self.image_pipeline.viewport_dimensions(handle) } diff --git a/wgpu/src/image.rs b/wgpu/src/image.rs index a59dc04b..ca31791c 100644 --- a/wgpu/src/image.rs +++ b/wgpu/src/image.rs @@ -17,10 +17,10 @@ use std::mem; use bytemuck::{Pod, Zeroable}; #[cfg(feature = "image_rs")] -use iced_native::image; +use iced_native::widget::image; #[cfg(feature = "svg")] -use iced_native::svg; +use iced_native::widget::svg; #[derive(Debug)] pub struct Pipeline { diff --git a/wgpu/src/image/raster.rs b/wgpu/src/image/raster.rs index e13987b4..76459fe5 100644 --- a/wgpu/src/image/raster.rs +++ b/wgpu/src/image/raster.rs @@ -1,5 +1,5 @@ use crate::image::atlas::{self, Atlas}; -use iced_native::image; +use iced_native::widget::image; use std::collections::{HashMap, HashSet}; use bitflags::bitflags; diff --git a/wgpu/src/image/vector.rs b/wgpu/src/image/vector.rs index 4c830913..edf339f5 100644 --- a/wgpu/src/image/vector.rs +++ b/wgpu/src/image/vector.rs @@ -1,6 +1,6 @@ use crate::image::atlas::{self, Atlas}; -use iced_native::svg; +use iced_native::widget::svg; use std::collections::{HashMap, HashSet}; use std::fs; diff --git a/wgpu/src/text.rs b/wgpu/src/text.rs index 336696ee..adc0eb6d 100644 --- a/wgpu/src/text.rs +++ b/wgpu/src/text.rs @@ -5,7 +5,7 @@ use iced_graphics::font; use std::{cell::RefCell, collections::HashMap}; use wgpu_glyph::ab_glyph; -pub use iced_native::text::Hit; +pub use iced_native::widget::text::Hit; #[derive(Debug)] pub struct Pipeline { diff --git a/wgpu/src/widget.rs b/wgpu/src/widget.rs index a575d036..99ae0ac2 100644 --- a/wgpu/src/widget.rs +++ b/wgpu/src/widget.rs @@ -66,13 +66,14 @@ pub mod qr_code; #[doc(no_inline)] pub use qr_code::QRCode; -pub use iced_native::Space; +pub use iced_native::widget::Space; /// A container that distributes its contents vertically. -pub type Column<'a, Message> = iced_native::Column<'a, Message, Renderer>; +pub type Column<'a, Message> = + iced_native::widget::Column<'a, Message, Renderer>; /// A container that distributes its contents horizontally. -pub type Row<'a, Message> = iced_native::Row<'a, Message, Renderer>; +pub type Row<'a, Message> = iced_native::widget::Row<'a, Message, Renderer>; /// A paragraph of text. -pub type Text = iced_native::Text<Renderer>; +pub type Text = iced_native::widget::Text<Renderer>; diff --git a/wgpu/src/widget/button.rs b/wgpu/src/widget/button.rs index fc729cd5..f11ff25e 100644 --- a/wgpu/src/widget/button.rs +++ b/wgpu/src/widget/button.rs @@ -4,9 +4,10 @@ use crate::Renderer; pub use iced_graphics::button::{Style, StyleSheet}; -pub use iced_native::button::State; +pub use iced_native::widget::button::State; /// A widget that produces a message when clicked. /// /// This is an alias of an `iced_native` button with an `iced_wgpu::Renderer`. -pub type Button<'a, Message> = iced_native::Button<'a, Message, Renderer>; +pub type Button<'a, Message> = + iced_native::widget::Button<'a, Message, Renderer>; diff --git a/wgpu/src/widget/checkbox.rs b/wgpu/src/widget/checkbox.rs index 9fd003d4..76d572d9 100644 --- a/wgpu/src/widget/checkbox.rs +++ b/wgpu/src/widget/checkbox.rs @@ -6,4 +6,5 @@ pub use iced_graphics::checkbox::{Style, StyleSheet}; /// A box that can be checked. /// /// This is an alias of an `iced_native` checkbox with an `iced_wgpu::Renderer`. -pub type Checkbox<'a, Message> = iced_native::Checkbox<'a, Message, Renderer>; +pub type Checkbox<'a, Message> = + iced_native::widget::Checkbox<'a, Message, Renderer>; diff --git a/wgpu/src/widget/container.rs b/wgpu/src/widget/container.rs index bc26cef2..c16db50d 100644 --- a/wgpu/src/widget/container.rs +++ b/wgpu/src/widget/container.rs @@ -7,4 +7,5 @@ pub use iced_graphics::container::{Style, StyleSheet}; /// /// This is an alias of an `iced_native` container with a default /// `Renderer`. -pub type Container<'a, Message> = iced_native::Container<'a, Message, Renderer>; +pub type Container<'a, Message> = + iced_native::widget::Container<'a, Message, Renderer>; diff --git a/wgpu/src/widget/pane_grid.rs b/wgpu/src/widget/pane_grid.rs index fc36862c..3c47acf0 100644 --- a/wgpu/src/widget/pane_grid.rs +++ b/wgpu/src/widget/pane_grid.rs @@ -20,12 +20,13 @@ pub use iced_graphics::pane_grid::{ /// [](https://gfycat.com/mixedflatjellyfish) /// /// This is an alias of an `iced_native` pane grid with an `iced_wgpu::Renderer`. -pub type PaneGrid<'a, Message> = iced_native::PaneGrid<'a, Message, Renderer>; +pub type PaneGrid<'a, Message> = + iced_native::widget::PaneGrid<'a, Message, Renderer>; /// The content of a [`Pane`]. pub type Content<'a, Message> = - iced_native::pane_grid::Content<'a, Message, Renderer>; + iced_native::widget::pane_grid::Content<'a, Message, Renderer>; /// The title bar of a [`Pane`]. pub type TitleBar<'a, Message> = - iced_native::pane_grid::TitleBar<'a, Message, Renderer>; + iced_native::widget::pane_grid::TitleBar<'a, Message, Renderer>; diff --git a/wgpu/src/widget/pick_list.rs b/wgpu/src/widget/pick_list.rs index fccc68c9..4d93be68 100644 --- a/wgpu/src/widget/pick_list.rs +++ b/wgpu/src/widget/pick_list.rs @@ -1,9 +1,9 @@ //! Display a dropdown list of selectable values. -pub use iced_native::pick_list::State; +pub use iced_native::widget::pick_list::State; pub use iced_graphics::overlay::menu::Style as Menu; pub use iced_graphics::pick_list::{Style, StyleSheet}; /// A widget allowing the selection of a single value from a list of options. pub type PickList<'a, T, Message> = - iced_native::PickList<'a, T, Message, crate::Renderer>; + iced_native::widget::PickList<'a, T, Message, crate::Renderer>; diff --git a/wgpu/src/widget/radio.rs b/wgpu/src/widget/radio.rs index c200f1a8..9ef1d7a5 100644 --- a/wgpu/src/widget/radio.rs +++ b/wgpu/src/widget/radio.rs @@ -7,4 +7,4 @@ pub use iced_graphics::radio::{Style, StyleSheet}; /// /// This is an alias of an `iced_native` radio button with an /// `iced_wgpu::Renderer`. -pub type Radio<'a, Message> = iced_native::Radio<'a, Message, Renderer>; +pub type Radio<'a, Message> = iced_native::widget::Radio<'a, Message, Renderer>; diff --git a/wgpu/src/widget/scrollable.rs b/wgpu/src/widget/scrollable.rs index fabb4318..d5635ec5 100644 --- a/wgpu/src/widget/scrollable.rs +++ b/wgpu/src/widget/scrollable.rs @@ -2,7 +2,7 @@ use crate::Renderer; pub use iced_graphics::scrollable::{Scrollbar, Scroller, StyleSheet}; -pub use iced_native::scrollable::State; +pub use iced_native::widget::scrollable::State; /// A widget that can vertically display an infinite amount of content /// with a scrollbar. @@ -10,4 +10,4 @@ pub use iced_native::scrollable::State; /// This is an alias of an `iced_native` scrollable with a default /// `Renderer`. pub type Scrollable<'a, Message> = - iced_native::Scrollable<'a, Message, Renderer>; + iced_native::widget::Scrollable<'a, Message, Renderer>; diff --git a/wgpu/src/widget/slider.rs b/wgpu/src/widget/slider.rs index 2ece156c..2fb3d5d9 100644 --- a/wgpu/src/widget/slider.rs +++ b/wgpu/src/widget/slider.rs @@ -2,4 +2,4 @@ //! //! A [`Slider`] has some local [`State`]. pub use iced_graphics::slider::{Handle, HandleShape, Style, StyleSheet}; -pub use iced_native::slider::{Slider, State}; +pub use iced_native::widget::slider::{Slider, State}; diff --git a/wgpu/src/widget/text_input.rs b/wgpu/src/widget/text_input.rs index db18b1cc..5560e3e0 100644 --- a/wgpu/src/widget/text_input.rs +++ b/wgpu/src/widget/text_input.rs @@ -4,9 +4,10 @@ use crate::Renderer; pub use iced_graphics::text_input::{Style, StyleSheet}; -pub use iced_native::text_input::State; +pub use iced_native::widget::text_input::State; /// A field that can be filled with text. /// /// This is an alias of an `iced_native` text input with an `iced_wgpu::Renderer`. -pub type TextInput<'a, Message> = iced_native::TextInput<'a, Message, Renderer>; +pub type TextInput<'a, Message> = + iced_native::widget::TextInput<'a, Message, Renderer>; diff --git a/wgpu/src/widget/toggler.rs b/wgpu/src/widget/toggler.rs index dfcf759b..7c3cc430 100644 --- a/wgpu/src/widget/toggler.rs +++ b/wgpu/src/widget/toggler.rs @@ -6,4 +6,4 @@ pub use iced_graphics::toggler::{Style, StyleSheet}; /// A toggler that can be toggled /// /// This is an alias of an `iced_native` toggler with an `iced_wgpu::Renderer`. -pub type Toggler<Message> = iced_native::Toggler<Message, Renderer>; +pub type Toggler<Message> = iced_native::widget::Toggler<Message, Renderer>; diff --git a/wgpu/src/widget/tooltip.rs b/wgpu/src/widget/tooltip.rs index 89ab3a15..c6af3903 100644 --- a/wgpu/src/widget/tooltip.rs +++ b/wgpu/src/widget/tooltip.rs @@ -1,6 +1,6 @@ //! Display a widget over another. /// A widget allowing the selection of a single value from a list of options. pub type Tooltip<'a, Message> = - iced_native::Tooltip<'a, Message, crate::Renderer>; + iced_native::widget::Tooltip<'a, Message, crate::Renderer>; -pub use iced_native::tooltip::Position; +pub use iced_native::widget::tooltip::Position; |