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

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -20,12 +20,13 @@ pub use iced_graphics::pane_grid::{
/// [![Pane grid - Iced](https://thumbs.gfycat.com/MixedFlatJellyfish-small.gif)](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>;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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