summaryrefslogtreecommitdiffstats
path: root/glow/src/widget
diff options
context:
space:
mode:
Diffstat (limited to 'glow/src/widget')
-rw-r--r--glow/src/widget/button.rs12
-rw-r--r--glow/src/widget/canvas.rs6
-rw-r--r--glow/src/widget/checkbox.rs9
-rw-r--r--glow/src/widget/container.rs10
-rw-r--r--glow/src/widget/pane_grid.rs31
-rw-r--r--glow/src/widget/pick_list.rs9
-rw-r--r--glow/src/widget/progress_bar.rs13
-rw-r--r--glow/src/widget/qr_code.rs2
-rw-r--r--glow/src/widget/radio.rs10
-rw-r--r--glow/src/widget/rule.rs10
-rw-r--r--glow/src/widget/scrollable.rs13
-rw-r--r--glow/src/widget/slider.rs13
-rw-r--r--glow/src/widget/text_input.rs12
13 files changed, 150 insertions, 0 deletions
diff --git a/glow/src/widget/button.rs b/glow/src/widget/button.rs
new file mode 100644
index 00000000..fc729cd5
--- /dev/null
+++ b/glow/src/widget/button.rs
@@ -0,0 +1,12 @@
+//! 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::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>;
diff --git a/glow/src/widget/canvas.rs b/glow/src/widget/canvas.rs
new file mode 100644
index 00000000..399dd19c
--- /dev/null
+++ b/glow/src/widget/canvas.rs
@@ -0,0 +1,6 @@
+//! 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/glow/src/widget/checkbox.rs b/glow/src/widget/checkbox.rs
new file mode 100644
index 00000000..d27d77cc
--- /dev/null
+++ b/glow/src/widget/checkbox.rs
@@ -0,0 +1,9 @@
+//! 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<Message> = iced_native::Checkbox<Message, Renderer>;
diff --git a/glow/src/widget/container.rs b/glow/src/widget/container.rs
new file mode 100644
index 00000000..bc26cef2
--- /dev/null
+++ b/glow/src/widget/container.rs
@@ -0,0 +1,10 @@
+//! 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::Container<'a, Message, Renderer>;
diff --git a/glow/src/widget/pane_grid.rs b/glow/src/widget/pane_grid.rs
new file mode 100644
index 00000000..c26dde48
--- /dev/null
+++ b/glow/src/widget/pane_grid.rs
@@ -0,0 +1,31 @@
+//! Let your users split regions of your application and organize layout dynamically.
+//!
+//! [![Pane grid - Iced](https://thumbs.gfycat.com/MixedFlatJellyfish-small.gif)](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/hecrj/iced/tree/0.2/examples/pane_grid
+use crate::Renderer;
+
+pub use iced_native::pane_grid::{
+ Axis, Configuration, Direction, DragEvent, Node, Pane, ResizeEvent, Split,
+ State,
+};
+
+/// A collection of panes distributed using either vertical or horizontal splits
+/// to completely fill the space available.
+///
+/// [![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>;
+
+/// The content of a [`Pane`].
+pub type Content<'a, Message> =
+ iced_native::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>;
diff --git a/glow/src/widget/pick_list.rs b/glow/src/widget/pick_list.rs
new file mode 100644
index 00000000..fccc68c9
--- /dev/null
+++ b/glow/src/widget/pick_list.rs
@@ -0,0 +1,9 @@
+//! Display a dropdown list of selectable values.
+pub use iced_native::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>;
diff --git a/glow/src/widget/progress_bar.rs b/glow/src/widget/progress_bar.rs
new file mode 100644
index 00000000..45a25d00
--- /dev/null
+++ b/glow/src/widget/progress_bar.rs
@@ -0,0 +1,13 @@
+//! 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.
+use crate::Renderer;
+
+pub use iced_graphics::progress_bar::{Style, StyleSheet};
+
+/// A bar that displays progress.
+///
+/// This is an alias of an `iced_native` progress bar with an
+/// `iced_wgpu::Renderer`.
+pub type ProgressBar = iced_native::ProgressBar<Renderer>;
diff --git a/glow/src/widget/qr_code.rs b/glow/src/widget/qr_code.rs
new file mode 100644
index 00000000..7b1c2408
--- /dev/null
+++ b/glow/src/widget/qr_code.rs
@@ -0,0 +1,2 @@
+//! Encode and display information in a QR code.
+pub use iced_graphics::qr_code::*;
diff --git a/glow/src/widget/radio.rs b/glow/src/widget/radio.rs
new file mode 100644
index 00000000..0b843d1f
--- /dev/null
+++ b/glow/src/widget/radio.rs
@@ -0,0 +1,10 @@
+//! 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<Message> = iced_native::Radio<Message, Renderer>;
diff --git a/glow/src/widget/rule.rs b/glow/src/widget/rule.rs
new file mode 100644
index 00000000..faa2be86
--- /dev/null
+++ b/glow/src/widget/rule.rs
@@ -0,0 +1,10 @@
+//! Display a horizontal or vertical rule for dividing content.
+
+use crate::Renderer;
+
+pub use iced_graphics::rule::{FillMode, Style, StyleSheet};
+
+/// Display a horizontal or vertical rule for dividing content.
+///
+/// This is an alias of an `iced_native` rule with an `iced_glow::Renderer`.
+pub type Rule = iced_native::Rule<Renderer>;
diff --git a/glow/src/widget/scrollable.rs b/glow/src/widget/scrollable.rs
new file mode 100644
index 00000000..fabb4318
--- /dev/null
+++ b/glow/src/widget/scrollable.rs
@@ -0,0 +1,13 @@
+//! Navigate an endless amount of content with a scrollbar.
+use crate::Renderer;
+
+pub use iced_graphics::scrollable::{Scrollbar, Scroller, StyleSheet};
+pub use iced_native::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::Scrollable<'a, Message, Renderer>;
diff --git a/glow/src/widget/slider.rs b/glow/src/widget/slider.rs
new file mode 100644
index 00000000..9a269858
--- /dev/null
+++ b/glow/src/widget/slider.rs
@@ -0,0 +1,13 @@
+//! Display an interactive selector of a single value from a range of values.
+//!
+//! A [`Slider`] has some local [`State`].
+use crate::Renderer;
+
+pub use iced_graphics::slider::{Handle, HandleShape, Style, StyleSheet};
+pub use iced_native::slider::State;
+
+/// An horizontal bar and a handle that selects a single value from a range of
+/// values.
+///
+/// This is an alias of an `iced_native` slider with an `iced_wgpu::Renderer`.
+pub type Slider<'a, T, Message> = iced_native::Slider<'a, T, Message, Renderer>;
diff --git a/glow/src/widget/text_input.rs b/glow/src/widget/text_input.rs
new file mode 100644
index 00000000..db18b1cc
--- /dev/null
+++ b/glow/src/widget/text_input.rs
@@ -0,0 +1,12 @@
+//! 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::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>;