Remove widget module re-exports in iced_native

This commit is contained in:
Héctor Ramón Jiménez 2021-10-31 15:35:12 +07:00
parent e5e477aa69
commit 0aafcde0ef
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
81 changed files with 166 additions and 154 deletions

View file

@ -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`].

View file

@ -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;

View file

@ -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>>;

View file

@ -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>>;

View file

@ -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>>;

View file

@ -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>>;

View file

@ -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

View file

@ -1,2 +1,2 @@
//! Zoom and pan on an image.
pub use iced_native::image::Viewer;
pub use iced_native::widget::image::Viewer;

View file

@ -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>>;

View file

@ -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>>;

View file

@ -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::*;

View file

@ -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>>;

View file

@ -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>>;

View file

@ -1,3 +1,3 @@
//! Display a horizontal or vertical rule for dividing content.
pub use iced_native::rule::*;
pub use iced_native::widget::rule::*;

View file

@ -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>>;

View file

@ -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};

View file

@ -1 +1 @@
pub use iced_native::Space;
pub use iced_native::widget::Space;

View file

@ -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

View file

@ -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>>;

View file

@ -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>>;

View file

@ -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>>;

View file

@ -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;