From 7f55b352b4d6289a7165977c3cd3da3adefa31fc Mon Sep 17 00:00:00 2001 From: Jonathan Johnson Date: Sat, 11 May 2024 19:30:36 -0700 Subject: [PATCH] Export Menu + Finish Guide Stubs --- guide/src/SUMMARY.md | 13 ++++++++----- guide/src/widgets/controls/menu.md | 7 +++++++ guide/src/widgets/controls/tilemap.md | 6 ++++++ guide/src/widgets/controls/validated.md | 6 ++++++ guide/src/widgets/utility/custom.md | 6 ++++++ guide/src/widgets/utility/data.md | 7 +++++++ guide/src/widgets/utility/style.md | 5 +++++ guide/src/widgets/utility/themed.md | 5 +++++ guide/src/widgets/utility/themedmode.md | 7 +++++++ src/widgets.rs | 1 + 10 files changed, 58 insertions(+), 5 deletions(-) create mode 100644 guide/src/widgets/controls/menu.md create mode 100644 guide/src/widgets/controls/tilemap.md create mode 100644 guide/src/widgets/controls/validated.md create mode 100644 guide/src/widgets/utility/custom.md create mode 100644 guide/src/widgets/utility/data.md create mode 100644 guide/src/widgets/utility/style.md create mode 100644 guide/src/widgets/utility/themed.md create mode 100644 guide/src/widgets/utility/themedmode.md diff --git a/guide/src/SUMMARY.md b/guide/src/SUMMARY.md index 8bb5988..73c2528 100644 --- a/guide/src/SUMMARY.md +++ b/guide/src/SUMMARY.md @@ -34,14 +34,17 @@ - [Image](./widgets/controls/image.md) - [Input](./widgets/controls/input.md) - [Label](./widgets/controls/label.md) + - [Menu](./widgets/controls/menu.md) - [ProgressBar](./widgets/controls/progress.md) - [Scroll](./widgets/controls/scroll.md) - [Slider](./widgets/controls/slider.md) - [Space](./widgets/controls/space.md) - [Switcher](./widgets/controls/switcher.md) + - [TileMap](./widgets/controls/tilemap.md) + - [Validated](./widgets/controls/validated.md) - [Utility Widgets](./widgets/utility.md) - - [Custom]() - - [Data]() - - [Style]() - - [Themed]() - - [ThemedMode]() + - [Custom](./widgets/utility/custom.md) + - [Data](./widgets/utility/data.md) + - [Style](./widgets/utility/style.md) + - [Themed](./widgets/utility/themed.md) + - [ThemedMode](./widgets/utility/themedmode.md) diff --git a/guide/src/widgets/controls/menu.md b/guide/src/widgets/controls/menu.md new file mode 100644 index 0000000..a6b5ccc --- /dev/null +++ b/guide/src/widgets/controls/menu.md @@ -0,0 +1,7 @@ +# Menu + +The [`Menu`][Menu] widget is a widget designed to work in an overlay layer. It +presents a pop-up menu and invokes a callback with the selected item if the user +selects an item. + +[Menu]: <{{ docs }}/widgets/menu/struct.Menu.html> diff --git a/guide/src/widgets/controls/tilemap.md b/guide/src/widgets/controls/tilemap.md new file mode 100644 index 0000000..da66c9e --- /dev/null +++ b/guide/src/widgets/controls/tilemap.md @@ -0,0 +1,6 @@ +# TileMap + +The [`TileMap`][TileMap] widget provides a layered 2d surface that draws layers +of tiles or objects in a scrollable and zoomable 2d plane. + +[TileMap]: <{{ docs }}/widgets/struct.TileMap.html> diff --git a/guide/src/widgets/controls/validated.md b/guide/src/widgets/controls/validated.md new file mode 100644 index 0000000..91337a1 --- /dev/null +++ b/guide/src/widgets/controls/validated.md @@ -0,0 +1,6 @@ +# Validated + +The [`Validated`][Validated] widget displays validation information around +another widget. This widget can be used to visualize input errors in forms. + +[Validated]: <{{ docs }}/widgets/validated/struct.Validated.html> diff --git a/guide/src/widgets/utility/custom.md b/guide/src/widgets/utility/custom.md new file mode 100644 index 0000000..feb1dc2 --- /dev/null +++ b/guide/src/widgets/utility/custom.md @@ -0,0 +1,6 @@ +# Custom + +The [`Custom`][Custom] widget enables creating a new widget by providing +callbacks instead of creating a new type. + +[Custom]: <{{ docs }}/widgets/struct.Custom.html> diff --git a/guide/src/widgets/utility/data.md b/guide/src/widgets/utility/data.md new file mode 100644 index 0000000..7700657 --- /dev/null +++ b/guide/src/widgets/utility/data.md @@ -0,0 +1,7 @@ +# Data + +The [`Data`][Data] widget is a widget that can contain an arbitrary value. The +widget does not display or occupy any space. This is useful for ensuring a +resource isn't dropped while a user interface is displayed. + +[Data]: <{{ docs }}/widgets/struct.Data.html> diff --git a/guide/src/widgets/utility/style.md b/guide/src/widgets/utility/style.md new file mode 100644 index 0000000..a5694c5 --- /dev/null +++ b/guide/src/widgets/utility/style.md @@ -0,0 +1,5 @@ +# Style + +The [`Style`][Style] widget attaches style information for its contents. + +[Style]: <{{ docs }}/widgets/struct.Style.html> diff --git a/guide/src/widgets/utility/themed.md b/guide/src/widgets/utility/themed.md new file mode 100644 index 0000000..117897f --- /dev/null +++ b/guide/src/widgets/utility/themed.md @@ -0,0 +1,5 @@ +# Themed + +The [`Themed`][Themed] widget overrides the theme for its contents. + +[Themed]: <{{ docs }}/widgets/struct.Themed.html> diff --git a/guide/src/widgets/utility/themedmode.md b/guide/src/widgets/utility/themedmode.md new file mode 100644 index 0000000..d536b1e --- /dev/null +++ b/guide/src/widgets/utility/themedmode.md @@ -0,0 +1,7 @@ +# ThemedMode + +The [`ThemedMode`][ThemedMode] widget allows changing the +[`ThemeMode`][ThemeMode] of the widgets belonging to it. + +[ThemedMode]: <{{ docs }}/widgets/struct.ThemedMode.html> +[ThemeMode]: <{{ docs }}/window/enum.ThemeMode.html> diff --git a/src/widgets.rs b/src/widgets.rs index 4c54082..70fb672 100644 --- a/src/widgets.rs +++ b/src/widgets.rs @@ -51,6 +51,7 @@ pub use self::image::Image; pub use self::input::Input; pub use self::label::Label; pub use self::layers::Layers; +pub use self::menu::Menu; pub use self::mode_switch::ThemedMode; pub use self::progress::ProgressBar; pub use self::radio::Radio;