diff options
author | 2019-11-21 13:47:20 +0100 | |
---|---|---|
committer | 2019-11-21 13:47:20 +0100 | |
commit | 65eb218d3d7ba52b2869a586a1480eeb3c8f84e4 (patch) | |
tree | 644f27f40f2f4b8ee1abe7743aac426297503eea /src/native.rs | |
parent | d3553adf278e5b616fbd885f321faa83a4d24b56 (diff) | |
download | iced-65eb218d3d7ba52b2869a586a1480eeb3c8f84e4.tar.gz iced-65eb218d3d7ba52b2869a586a1480eeb3c8f84e4.tar.bz2 iced-65eb218d3d7ba52b2869a586a1480eeb3c8f84e4.zip |
Move widgets from `core` to `native` and `web`
Also made fields private and improved `Renderer` traits.
Diffstat (limited to 'src/native.rs')
-rw-r--r-- | src/native.rs | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/src/native.rs b/src/native.rs new file mode 100644 index 00000000..fcb50d43 --- /dev/null +++ b/src/native.rs @@ -0,0 +1,51 @@ +pub use iced_winit::{ + Align, Background, Color, Command, Font, HorizontalAlignment, Length, + VerticalAlignment, +}; + +pub mod widget { + pub mod button { + pub type Button<'a, Message> = + iced_winit::Button<'a, Message, iced_wgpu::Renderer>; + + pub use iced_winit::button::State; + } + + pub mod scrollable { + pub type Scrollable<'a, Message> = + iced_winit::Scrollable<'a, Message, iced_wgpu::Renderer>; + + pub use iced_winit::scrollable::State; + } + + pub mod text_input { + pub use iced_winit::text_input::{State, TextInput}; + } + + pub mod slider { + pub use iced_winit::slider::{Slider, State}; + } + + pub use iced_winit::{Checkbox, Image, Radio, Text}; + + #[doc(no_inline)] + pub use { + button::Button, scrollable::Scrollable, slider::Slider, + text_input::TextInput, + }; + + pub type Column<'a, Message> = + iced_winit::Column<'a, Message, iced_wgpu::Renderer>; + + pub type Row<'a, Message> = + iced_winit::Row<'a, Message, iced_wgpu::Renderer>; + + pub type Container<'a, Message> = + iced_winit::Container<'a, Message, iced_wgpu::Renderer>; +} + +#[doc(no_inline)] +pub use widget::*; + +pub type Element<'a, Message> = + iced_winit::Element<'a, Message, iced_wgpu::Renderer>; |