diff options
author | 2020-05-28 01:37:59 +0200 | |
---|---|---|
committer | 2020-05-28 01:40:30 +0200 | |
commit | 2ca7e3c4b0cb293adebf9a9bf9a26191069d495d (patch) | |
tree | 653a1f24422079231ff5a9f0d868c7d117ca92ed /wgpu | |
parent | 45511a442f707e93fe6e568d2100756b63af7362 (diff) | |
download | iced-2ca7e3c4b0cb293adebf9a9bf9a26191069d495d.tar.gz iced-2ca7e3c4b0cb293adebf9a9bf9a26191069d495d.tar.bz2 iced-2ca7e3c4b0cb293adebf9a9bf9a26191069d495d.zip |
Write documentation for `iced_graphics`
Diffstat (limited to 'wgpu')
-rw-r--r-- | wgpu/src/backend.rs | 3 | ||||
-rw-r--r-- | wgpu/src/lib.rs | 10 | ||||
-rw-r--r-- | wgpu/src/widget.rs | 10 | ||||
-rw-r--r-- | wgpu/src/widget/text.rs | 7 |
4 files changed, 15 insertions, 15 deletions
diff --git a/wgpu/src/backend.rs b/wgpu/src/backend.rs index 04eb0b28..88529ddd 100644 --- a/wgpu/src/backend.rs +++ b/wgpu/src/backend.rs @@ -12,9 +12,10 @@ use iced_native::{Font, HorizontalAlignment, Size, VerticalAlignment}; #[cfg(any(feature = "image", feature = "svg"))] use crate::image; -/// A [`wgpu`] renderer. +/// A [`wgpu`] graphics backend for [`iced`]. /// /// [`wgpu`]: https://github.com/gfx-rs/wgpu-rs +/// [`iced`]: https://github.com/hecrj/iced #[derive(Debug)] pub struct Backend { quad_pipeline: quad::Pipeline, diff --git a/wgpu/src/lib.rs b/wgpu/src/lib.rs index b0eee0a0..0c351eea 100644 --- a/wgpu/src/lib.rs +++ b/wgpu/src/lib.rs @@ -20,7 +20,7 @@ //! [`wgpu`]: https://github.com/gfx-rs/wgpu-rs //! [WebGPU API]: https://gpuweb.github.io/gpuweb/ //! [`wgpu_glyph`]: https://github.com/hecrj/wgpu_glyph -//#![deny(missing_docs)] +#![deny(missing_docs)] #![deny(missing_debug_implementations)] #![deny(unused_results)] #![forbid(unsafe_code)] @@ -47,7 +47,11 @@ pub use widget::*; pub(crate) use iced_graphics::Transformation; -pub type Renderer = iced_graphics::Renderer<Backend>; - #[cfg(any(feature = "image", feature = "svg"))] mod image; + +/// A [`wgpu`] graphics renderer for [`iced`]. +/// +/// [`wgpu`]: https://github.com/gfx-rs/wgpu-rs +/// [`iced`]: https://github.com/hecrj/iced +pub type Renderer = iced_graphics::Renderer<Backend>; diff --git a/wgpu/src/widget.rs b/wgpu/src/widget.rs index ac741118..d17b7a5d 100644 --- a/wgpu/src/widget.rs +++ b/wgpu/src/widget.rs @@ -19,8 +19,6 @@ pub mod scrollable; pub mod slider; pub mod text_input; -mod text; - #[doc(no_inline)] pub use button::Button; #[doc(no_inline)] @@ -40,8 +38,6 @@ pub use slider::Slider; #[doc(no_inline)] pub use text_input::TextInput; -pub use text::Text; - #[cfg(feature = "canvas")] #[cfg_attr(docsrs, doc(cfg(feature = "canvas")))] pub mod canvas; @@ -52,5 +48,11 @@ pub use canvas::Canvas; pub use iced_native::Space; +/// A container that distributes its contents vertically. pub type Column<'a, Message> = iced_native::Column<'a, Message, Renderer>; + +/// A container that distributes its contents horizontally. pub type Row<'a, Message> = iced_native::Row<'a, Message, Renderer>; + +/// A paragraph of text. +pub type Text = iced_native::Text<Renderer>; diff --git a/wgpu/src/widget/text.rs b/wgpu/src/widget/text.rs deleted file mode 100644 index 1053ea97..00000000 --- a/wgpu/src/widget/text.rs +++ /dev/null @@ -1,7 +0,0 @@ -//! Write some text for your users to read. -use crate::Renderer; - -/// A paragraph of text. -/// -/// This is an alias of an `iced_native` text with an `iced_wgpu::Renderer`. -pub type Text = iced_native::Text<Renderer>; |