From ddacd53084c50a3ee95375585c4525acd2d52c96 Mon Sep 17 00:00:00 2001 From: Jonathan Johnson Date: Sat, 11 May 2024 18:11:24 -0700 Subject: [PATCH] More guide stubbing --- guide/src/SUMMARY.md | 11 ++++++++--- guide/src/widgets/controls/disclose.md | 6 ++++++ guide/src/widgets/controls/image.md | 6 ++++++ guide/src/widgets/controls/input.md | 14 ++++++++++++++ guide/src/widgets/controls/label.md | 6 ++++++ guide/src/widgets/controls/progress.md | 20 ++++++++++++++++++++ guide/src/widgets/controls/scroll.md | 6 ++++++ guide/src/widgets/controls/slider.md | 16 ++++++++++++++++ guide/src/widgets/controls/switcher.md | 8 ++++++++ 9 files changed, 90 insertions(+), 3 deletions(-) create mode 100644 guide/src/widgets/controls/disclose.md create mode 100644 guide/src/widgets/controls/image.md create mode 100644 guide/src/widgets/controls/input.md create mode 100644 guide/src/widgets/controls/label.md create mode 100644 guide/src/widgets/controls/progress.md create mode 100644 guide/src/widgets/controls/scroll.md create mode 100644 guide/src/widgets/controls/slider.md create mode 100644 guide/src/widgets/controls/switcher.md diff --git a/guide/src/SUMMARY.md b/guide/src/SUMMARY.md index a0028e7..8bb5988 100644 --- a/guide/src/SUMMARY.md +++ b/guide/src/SUMMARY.md @@ -30,10 +30,15 @@ - [Canvas](./widgets/controls/canvas.md) - [Color Pickers](./widgets/controls/color-pickers.md) - [Delimiter](./widgets/controls/delimiter.md) + - [Disclose](./widgets/controls/disclose.md) + - [Image](./widgets/controls/image.md) + - [Input](./widgets/controls/input.md) + - [Label](./widgets/controls/label.md) + - [ProgressBar](./widgets/controls/progress.md) + - [Scroll](./widgets/controls/scroll.md) + - [Slider](./widgets/controls/slider.md) - [Space](./widgets/controls/space.md) - - [Switcher]() - - [Image]() - - [TileMap]() + - [Switcher](./widgets/controls/switcher.md) - [Utility Widgets](./widgets/utility.md) - [Custom]() - [Data]() diff --git a/guide/src/widgets/controls/disclose.md b/guide/src/widgets/controls/disclose.md new file mode 100644 index 0000000..d6677ef --- /dev/null +++ b/guide/src/widgets/controls/disclose.md @@ -0,0 +1,6 @@ +# Disclose + +The [`Disclose`][Disclose] widget hides and shows another widget with a +triangular disclosure indicator and an optional label. + +[Disclose]: <{{ docs }}/widgets/disclose/struct.Disclose.html> diff --git a/guide/src/widgets/controls/image.md b/guide/src/widgets/controls/image.md new file mode 100644 index 0000000..439ad4a --- /dev/null +++ b/guide/src/widgets/controls/image.md @@ -0,0 +1,6 @@ +# Image + +The [`Image`][image] widget displays an image/texture with configurable scaling +options. + +[image]: <{{ docs }}/widgets/image/struct.Image.html> diff --git a/guide/src/widgets/controls/input.md b/guide/src/widgets/controls/input.md new file mode 100644 index 0000000..5353503 --- /dev/null +++ b/guide/src/widgets/controls/input.md @@ -0,0 +1,14 @@ +# Input + +The [`Input`][Input] widget is a basic text entry widget. It supports +generic-driven storage for some intuitive behaviors: + +- When using a `String`, a default text entry widget is used. +- When using a [`MaskedString`][MaskedString], the text entry will be masked and + the contained value will be zeroed before the storage is freed. + +When an `Input` is masked, the system input manager is notified that it is a +password entry field. + +[Input]: <{{ docs }}/widgets/input/struct.Input.html> +[MaskedString]: <{{ docs }}/widgets/input/struct.MaskedString.html> diff --git a/guide/src/widgets/controls/label.md b/guide/src/widgets/controls/label.md new file mode 100644 index 0000000..a31641e --- /dev/null +++ b/guide/src/widgets/controls/label.md @@ -0,0 +1,6 @@ +# Label + +The [`Label`][Label] widget is a read-only text widget. It is intended for +displaying information to the user in a non-interactive manner. + +[Label]: <{{ docs }}/widgets/label/struct.Label.html> diff --git a/guide/src/widgets/controls/progress.md b/guide/src/widgets/controls/progress.md new file mode 100644 index 0000000..5d60738 --- /dev/null +++ b/guide/src/widgets/controls/progress.md @@ -0,0 +1,20 @@ +# ProgressBar + +The [`ProgressBar`][ProgressBar] widget draws an indicator to represent +progress. A progress bar can be indeterminant, empty, partially complete, or +fully complete. + +The [`Progressable`][Progressable] trait allows many types to be used within progress bars by +implementing one of several helper traits: + +- [`ProgressValue`][ProgressValue]: This trait can be implemented for full control over how + progress is reported. +- Types that ipmlement [`Ranged`][Ranged] and [`PercentBetween`][PercentBetween] + have [`ProgressValue`][ProgressValue] implemented automatically. This includes + all numeric types in Rust.. + +[ProgressBar]: <{{ docs }}/widgets/progress/struct.ProgressBar.html> +[Progressable]: <{{ docs }}/widgets/progress/trait.Progressable.html> +[ProgressValue]: <{{ docs }}/widgets/progress/trait.ProgressValue.html> +[PercentBetween]: <{{ docs }}/animation/trait.PercentBetween.html> +[Ranged]: diff --git a/guide/src/widgets/controls/scroll.md b/guide/src/widgets/controls/scroll.md new file mode 100644 index 0000000..de4174b --- /dev/null +++ b/guide/src/widgets/controls/scroll.md @@ -0,0 +1,6 @@ +# Scroll + +The [`Scroll`][Scroll] widget presents the widge tit contains in a virtual +surface that can be scrolled horizontally and/or vertically. + +[Scroll]: <{{ docs }}/widgets/scroll/struct.Scroll.html> diff --git a/guide/src/widgets/controls/slider.md b/guide/src/widgets/controls/slider.md new file mode 100644 index 0000000..021e399 --- /dev/null +++ b/guide/src/widgets/controls/slider.md @@ -0,0 +1,16 @@ +# Slider + +The [`Slider`][Slider] widget allows selecting one or two values between a +minimum and a maximum. This is implemented using the trait +[`SliderValue`][SliderValue], which is automatically implemented for types that +implement [`Ranged`][Ranged] and [`PercentBetween`][PercentBetween]. This +includes all numeric types in Rust. + +The `Slider` widget can set either a single value or a tuple of 2 elements. When +a two element tuple is used, the slider highlights the area between the two +selected values. + +[Slider]: <{{ docs }}/widgets/slider/struct.Slider.html> +[SliderValue]: <{{ docs }}/widgets/slider/trait.SliderValue.html> +[PercentBetween]: <{{ docs }}/animation/trait.PercentBetween.html> +[Ranged]: diff --git a/guide/src/widgets/controls/switcher.md b/guide/src/widgets/controls/switcher.md new file mode 100644 index 0000000..690b4b9 --- /dev/null +++ b/guide/src/widgets/controls/switcher.md @@ -0,0 +1,8 @@ +# Switcher + +The [`Switcher`][Switcher] widget allows switching between different widgets at +runtime. It can be used with a read-only `WidgetInstance` dynamic or a +convenience function that allows switching based on a mapping function that +produces the new widget to display. + +[Switcher]: <{{ docs }}/widgets/struct.Switcher.html>