diff options
author | 2022-03-09 14:10:15 +0700 | |
---|---|---|
committer | 2022-03-09 14:10:15 +0700 | |
commit | 12c1a3f829c801022d45f1a294d8fc7fa10606e5 (patch) | |
tree | 05cc7a7981f13063831e7397129ea30a14a6d97a /wgpu/src/widget | |
parent | 7d9ab71790ba0395681490f3af4d3899bb09ab09 (diff) | |
download | iced-12c1a3f829c801022d45f1a294d8fc7fa10606e5.tar.gz iced-12c1a3f829c801022d45f1a294d8fc7fa10606e5.tar.bz2 iced-12c1a3f829c801022d45f1a294d8fc7fa10606e5.zip |
Remove redundant `widget` modules in subcrates
Instead, we can define the type aliases just once in the root crate!
Diffstat (limited to 'wgpu/src/widget')
-rw-r--r-- | wgpu/src/widget/button.rs | 13 | ||||
-rw-r--r-- | wgpu/src/widget/canvas.rs | 6 | ||||
-rw-r--r-- | wgpu/src/widget/checkbox.rs | 10 | ||||
-rw-r--r-- | wgpu/src/widget/container.rs | 11 | ||||
-rw-r--r-- | wgpu/src/widget/pane_grid.rs | 32 | ||||
-rw-r--r-- | wgpu/src/widget/pick_list.rs | 9 | ||||
-rw-r--r-- | wgpu/src/widget/progress_bar.rs | 5 | ||||
-rw-r--r-- | wgpu/src/widget/qr_code.rs | 2 | ||||
-rw-r--r-- | wgpu/src/widget/radio.rs | 10 | ||||
-rw-r--r-- | wgpu/src/widget/rule.rs | 3 | ||||
-rw-r--r-- | wgpu/src/widget/scrollable.rs | 13 | ||||
-rw-r--r-- | wgpu/src/widget/slider.rs | 5 | ||||
-rw-r--r-- | wgpu/src/widget/text_input.rs | 13 | ||||
-rw-r--r-- | wgpu/src/widget/toggler.rs | 10 | ||||
-rw-r--r-- | wgpu/src/widget/tooltip.rs | 6 |
15 files changed, 0 insertions, 148 deletions
diff --git a/wgpu/src/widget/button.rs b/wgpu/src/widget/button.rs deleted file mode 100644 index f11ff25e..00000000 --- a/wgpu/src/widget/button.rs +++ /dev/null @@ -1,13 +0,0 @@ -//! Allow your users to perform actions by pressing a button. -//! -//! A [`Button`] has some local [`State`]. -use crate::Renderer; - -pub use iced_graphics::button::{Style, StyleSheet}; -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::widget::Button<'a, Message, Renderer>; diff --git a/wgpu/src/widget/canvas.rs b/wgpu/src/widget/canvas.rs deleted file mode 100644 index 399dd19c..00000000 --- a/wgpu/src/widget/canvas.rs +++ /dev/null @@ -1,6 +0,0 @@ -//! Draw 2D graphics for your users. -//! -//! A [`Canvas`] widget can be used to draw different kinds of 2D shapes in a -//! [`Frame`]. It can be used for animation, data visualization, game graphics, -//! and more! -pub use iced_graphics::canvas::*; diff --git a/wgpu/src/widget/checkbox.rs b/wgpu/src/widget/checkbox.rs deleted file mode 100644 index 76d572d9..00000000 --- a/wgpu/src/widget/checkbox.rs +++ /dev/null @@ -1,10 +0,0 @@ -//! Show toggle controls using checkboxes. -use crate::Renderer; - -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::widget::Checkbox<'a, Message, Renderer>; diff --git a/wgpu/src/widget/container.rs b/wgpu/src/widget/container.rs deleted file mode 100644 index c16db50d..00000000 --- a/wgpu/src/widget/container.rs +++ /dev/null @@ -1,11 +0,0 @@ -//! Decorate content and apply alignment. -use crate::Renderer; - -pub use iced_graphics::container::{Style, StyleSheet}; - -/// An element decorating some content. -/// -/// This is an alias of an `iced_native` container with a default -/// `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 deleted file mode 100644 index 38bdb672..00000000 --- a/wgpu/src/widget/pane_grid.rs +++ /dev/null @@ -1,32 +0,0 @@ -//! Let your users split regions of your application and organize layout dynamically. -//! -//! [](https://gfycat.com/mixedflatjellyfish) -//! -//! # Example -//! The [`pane_grid` example] showcases how to use a [`PaneGrid`] with resizing, -//! drag and drop, and hotkey support. -//! -//! [`pane_grid` example]: https://github.com/iced-rs/iced/tree/0.3/examples/pane_grid -use crate::Renderer; - -pub use iced_graphics::pane_grid::{ - Axis, Configuration, Direction, DragEvent, Line, Node, Pane, ResizeEvent, - Split, State, StyleSheet, -}; - -/// A collection of panes distributed using either vertical or horizontal splits -/// to completely fill the space available. -/// -/// [](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::widget::PaneGrid<'a, Message, Renderer>; - -/// The content of a [`Pane`]. -pub type Content<'a, Message> = - iced_native::widget::pane_grid::Content<'a, Message, Renderer>; - -/// The title bar of a [`Pane`]. -pub type TitleBar<'a, Message> = - 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 deleted file mode 100644 index 4d93be68..00000000 --- a/wgpu/src/widget/pick_list.rs +++ /dev/null @@ -1,9 +0,0 @@ -//! Display a dropdown list of selectable values. -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::widget::PickList<'a, T, Message, crate::Renderer>; diff --git a/wgpu/src/widget/progress_bar.rs b/wgpu/src/widget/progress_bar.rs deleted file mode 100644 index 88391ccb..00000000 --- a/wgpu/src/widget/progress_bar.rs +++ /dev/null @@ -1,5 +0,0 @@ -//! Allow your users to visually track the progress of a computation. -//! -//! A [`ProgressBar`] has a range of possible values and a current value, -//! as well as a length, height and style. -pub use iced_graphics::progress_bar::*; diff --git a/wgpu/src/widget/qr_code.rs b/wgpu/src/widget/qr_code.rs deleted file mode 100644 index 7b1c2408..00000000 --- a/wgpu/src/widget/qr_code.rs +++ /dev/null @@ -1,2 +0,0 @@ -//! Encode and display information in a QR code. -pub use iced_graphics::qr_code::*; diff --git a/wgpu/src/widget/radio.rs b/wgpu/src/widget/radio.rs deleted file mode 100644 index 9ef1d7a5..00000000 --- a/wgpu/src/widget/radio.rs +++ /dev/null @@ -1,10 +0,0 @@ -//! Create choices using radio buttons. -use crate::Renderer; - -pub use iced_graphics::radio::{Style, StyleSheet}; - -/// A circular button representing a choice. -/// -/// This is an alias of an `iced_native` radio button with an -/// `iced_wgpu::Renderer`. -pub type Radio<'a, Message> = iced_native::widget::Radio<'a, Message, Renderer>; diff --git a/wgpu/src/widget/rule.rs b/wgpu/src/widget/rule.rs deleted file mode 100644 index 40281773..00000000 --- a/wgpu/src/widget/rule.rs +++ /dev/null @@ -1,3 +0,0 @@ -//! Display a horizontal or vertical rule for dividing content. - -pub use iced_graphics::rule::*; diff --git a/wgpu/src/widget/scrollable.rs b/wgpu/src/widget/scrollable.rs deleted file mode 100644 index d5635ec5..00000000 --- a/wgpu/src/widget/scrollable.rs +++ /dev/null @@ -1,13 +0,0 @@ -//! Navigate an endless amount of content with a scrollbar. -use crate::Renderer; - -pub use iced_graphics::scrollable::{Scrollbar, Scroller, StyleSheet}; -pub use iced_native::widget::scrollable::State; - -/// A widget that can vertically display an infinite amount of content -/// with a scrollbar. -/// -/// This is an alias of an `iced_native` scrollable with a default -/// `Renderer`. -pub type Scrollable<'a, Message> = - iced_native::widget::Scrollable<'a, Message, Renderer>; diff --git a/wgpu/src/widget/slider.rs b/wgpu/src/widget/slider.rs deleted file mode 100644 index 2fb3d5d9..00000000 --- a/wgpu/src/widget/slider.rs +++ /dev/null @@ -1,5 +0,0 @@ -//! Display an interactive selector of a single value from a range of values. -//! -//! A [`Slider`] has some local [`State`]. -pub use iced_graphics::slider::{Handle, HandleShape, Style, StyleSheet}; -pub use iced_native::widget::slider::{Slider, State}; diff --git a/wgpu/src/widget/text_input.rs b/wgpu/src/widget/text_input.rs deleted file mode 100644 index 5560e3e0..00000000 --- a/wgpu/src/widget/text_input.rs +++ /dev/null @@ -1,13 +0,0 @@ -//! Display fields that can be filled with text. -//! -//! A [`TextInput`] has some local [`State`]. -use crate::Renderer; - -pub use iced_graphics::text_input::{Style, StyleSheet}; -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::widget::TextInput<'a, Message, Renderer>; diff --git a/wgpu/src/widget/toggler.rs b/wgpu/src/widget/toggler.rs deleted file mode 100644 index 7ef5e22e..00000000 --- a/wgpu/src/widget/toggler.rs +++ /dev/null @@ -1,10 +0,0 @@ -//! Show toggle controls using togglers. -use crate::Renderer; - -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<'a, Message> = - iced_native::widget::Toggler<'a, Message, Renderer>; diff --git a/wgpu/src/widget/tooltip.rs b/wgpu/src/widget/tooltip.rs deleted file mode 100644 index c6af3903..00000000 --- a/wgpu/src/widget/tooltip.rs +++ /dev/null @@ -1,6 +0,0 @@ -//! 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::widget::Tooltip<'a, Message, crate::Renderer>; - -pub use iced_native::widget::tooltip::Position; |