diff options
author | 2020-02-21 15:12:27 +0100 | |
---|---|---|
committer | 2020-02-21 15:20:05 +0100 | |
commit | b0cf47cc2b736080d25a6fe48d17ef5086d6a39a (patch) | |
tree | 14e343816af52ee12635fcfec9046e9086519523 | |
parent | 9758c121764a6e8e5a45b8a66915127b31e61df7 (diff) | |
download | iced-b0cf47cc2b736080d25a6fe48d17ef5086d6a39a.tar.gz iced-b0cf47cc2b736080d25a6fe48d17ef5086d6a39a.tar.bz2 iced-b0cf47cc2b736080d25a6fe48d17ef5086d6a39a.zip |
Create `README` files for all the examples
-rw-r--r-- | examples/README.md | 4 | ||||
-rw-r--r-- | examples/bezier_tool/README.md | 19 | ||||
-rw-r--r-- | examples/clock/README.md | 16 | ||||
-rw-r--r-- | examples/counter/README.md | 18 | ||||
-rw-r--r-- | examples/custom_widget/README.md | 18 | ||||
-rw-r--r-- | examples/events/README.md | 18 | ||||
-rw-r--r-- | examples/geometry/README.md | 18 | ||||
-rw-r--r-- | examples/integration/README.md | 18 | ||||
-rw-r--r-- | examples/progress_bar/README.md | 18 | ||||
-rw-r--r-- | examples/solar_system/README.md | 18 | ||||
-rw-r--r-- | examples/stopwatch/README.md | 18 | ||||
-rw-r--r-- | examples/svg/README.md | 17 |
12 files changed, 199 insertions, 1 deletions
diff --git a/examples/README.md b/examples/README.md index a9ab546f..04399b93 100644 --- a/examples/README.md +++ b/examples/README.md @@ -69,7 +69,8 @@ cargo run --package styling ## Extras A bunch of simpler examples exist: -- [`bezier_tool`](bezier_tool), a Paint-like tool for drawing Bezier curves using [`lyon`]. +- [`bezier_tool`](bezier_tool), a Paint-like tool for drawing Bézier curves using [`lyon`]. +- [`clock`](clock), an application that uses the `Canvas` widget to draw a clock and its hands to display the current time. - [`counter`](counter), the classic counter example explained in the [`README`](../README.md). - [`custom_widget`](custom_widget), a demonstration of how to build a custom widget that draws a circle. - [`events`](events), a log of native events displayed using a conditional `Subscription`. @@ -77,6 +78,7 @@ A bunch of simpler examples exist: - [`integration`](integration), a demonstration of how to integrate Iced in an existing graphical application. - [`pokedex`](pokedex), an application that displays a random Pokédex entry (sprite included!) by using the [PokéAPI]. - [`progress_bar`](progress_bar), a simple progress bar that can be filled by using a slider. +- [`solar_system`](solar_system), an animated solar system drawn using the `Canvas` widget and showcasing how to compose different transforms. - [`stopwatch`](stopwatch), a watch with start/stop and reset buttons showcasing how to listen to time. - [`svg`](svg), an application that renders the [Ghostscript Tiger] by leveraging the `Svg` widget. diff --git a/examples/bezier_tool/README.md b/examples/bezier_tool/README.md new file mode 100644 index 00000000..933f2120 --- /dev/null +++ b/examples/bezier_tool/README.md @@ -0,0 +1,19 @@ +## Bézier tool + +A Paint-like tool for drawing Bézier curves using [`lyon`]. + +The __[`main`]__ file contains all the code of the example. + +<div align="center"> + <a href="https://gfycat.com/soulfulinfiniteantbear"> + <img src="https://thumbs.gfycat.com/SoulfulInfiniteAntbear-small.gif"> + </a> +</div> + +You can run it with `cargo run`: +``` +cargo run --package bezier_tool +``` + +[`main`]: src/main.rs +[`lyon`]: https://github.com/nical/lyon diff --git a/examples/clock/README.md b/examples/clock/README.md new file mode 100644 index 00000000..17509180 --- /dev/null +++ b/examples/clock/README.md @@ -0,0 +1,16 @@ +## Clock + +An application that uses the `Canvas` widget to draw a clock and its hands to display the current time. + +The __[`main`]__ file contains all the code of the example. + +<div align="center"> + <img src="https://user-images.githubusercontent.com/518289/74716344-a3e6b300-522e-11ea-8aea-3cc0a5100a2e.gif"> +</div> + +You can run it with `cargo run`: +``` +cargo run --package clock +``` + +[`main`]: src/main.rs diff --git a/examples/counter/README.md b/examples/counter/README.md new file mode 100644 index 00000000..4d9fc5b9 --- /dev/null +++ b/examples/counter/README.md @@ -0,0 +1,18 @@ +## Counter + +The classic counter example explained in the [`README`](../../README.md). + +The __[`main`]__ file contains all the code of the example. + +<div align="center"> + <a href="https://gfycat.com/fairdeadcatbird"> + <img src="https://thumbs.gfycat.com/FairDeadCatbird-small.gif"> + </a> +</div> + +You can run it with `cargo run`: +``` +cargo run --package counter +``` + +[`main`]: src/main.rs diff --git a/examples/custom_widget/README.md b/examples/custom_widget/README.md new file mode 100644 index 00000000..3d6cf902 --- /dev/null +++ b/examples/custom_widget/README.md @@ -0,0 +1,18 @@ +## Custom widget + +A demonstration of how to build a custom widget that draws a circle. + +The __[`main`]__ file contains all the code of the example. + +<div align="center"> + <a href="https://gfycat.com/jealouscornyhomalocephale"> + <img src="https://thumbs.gfycat.com/JealousCornyHomalocephale-small.gif"> + </a> +</div> + +You can run it with `cargo run`: +``` +cargo run --package custom_widget +``` + +[`main`]: src/main.rs diff --git a/examples/events/README.md b/examples/events/README.md new file mode 100644 index 00000000..3c9a1cab --- /dev/null +++ b/examples/events/README.md @@ -0,0 +1,18 @@ +## Events + +A log of native events displayed using a conditional `Subscription`. + +The __[`main`]__ file contains all the code of the example. + +<div align="center"> + <a href="https://gfycat.com/infamousicyermine"> + <img src="https://thumbs.gfycat.com/InfamousIcyErmine-small.gif"> + </a> +</div> + +You can run it with `cargo run`: +``` +cargo run --package events +``` + +[`main`]: src/main.rs diff --git a/examples/geometry/README.md b/examples/geometry/README.md new file mode 100644 index 00000000..4d5c81cb --- /dev/null +++ b/examples/geometry/README.md @@ -0,0 +1,18 @@ +## Geometry + +A custom widget showcasing how to draw geometry with the `Mesh2D` primitive in [`iced_wgpu`](../../wgpu). + +The __[`main`]__ file contains all the code of the example. + +<div align="center"> + <a href="https://gfycat.com/activeunfitkangaroo"> + <img src="https://thumbs.gfycat.com/ActiveUnfitKangaroo-small.gif"> + </a> +</div> + +You can run it with `cargo run`: +``` +cargo run --package geometry +``` + +[`main`]: src/main.rs diff --git a/examples/integration/README.md b/examples/integration/README.md new file mode 100644 index 00000000..d5aabc19 --- /dev/null +++ b/examples/integration/README.md @@ -0,0 +1,18 @@ +## Integration + +A demonstration of how to integrate Iced in an existing graphical application. + +The __[`main`]__ file contains all the code of the example. + +<div align="center"> + <a href="https://gfycat.com/nicemediocrekodiakbear"> + <img src="https://thumbs.gfycat.com/NiceMediocreKodiakbear-small.gif"> + </a> +</div> + +You can run it with `cargo run`: +``` +cargo run --package integration +``` + +[`main`]: src/main.rs diff --git a/examples/progress_bar/README.md b/examples/progress_bar/README.md new file mode 100644 index 00000000..1e927b3c --- /dev/null +++ b/examples/progress_bar/README.md @@ -0,0 +1,18 @@ +## Progress bar + +A simple progress bar that can be filled by using a slider. + +The __[`main`]__ file contains all the code of the example. + +<div align="center"> + <a href="https://gfycat.com/importantdevotedhammerheadbird"> + <img src="https://thumbs.gfycat.com/ImportantDevotedHammerheadbird-small.gif"> + </a> +</div> + +You can run it with `cargo run`: +``` +cargo run --package progress_bar +``` + +[`main`]: src/main.rs diff --git a/examples/solar_system/README.md b/examples/solar_system/README.md new file mode 100644 index 00000000..acfbc466 --- /dev/null +++ b/examples/solar_system/README.md @@ -0,0 +1,18 @@ +## Solar system + +An animated solar system drawn using the `Canvas` widget and showcasing how to compose different transforms. + +The __[`main`]__ file contains all the code of the example. + +<div align="center"> + <a href="https://gfycat.com/selfassuredaromaticdunnart"> + <img src="https://thumbs.gfycat.com/SelfassuredAromaticDunnart-small.gif"> + </a> +</div> + +You can run it with `cargo run`: +``` +cargo run --package solar_system +``` + +[`main`]: src/main.rs diff --git a/examples/stopwatch/README.md b/examples/stopwatch/README.md new file mode 100644 index 00000000..4cf4582e --- /dev/null +++ b/examples/stopwatch/README.md @@ -0,0 +1,18 @@ +## Stopwatch + +A watch with start/stop and reset buttons showcasing how to listen to time. + +The __[`main`]__ file contains all the code of the example. + +<div align="center"> + <a href="https://gfycat.com/granularenviousgoitered-rust-gui"> + <img src="https://thumbs.gfycat.com/GranularEnviousGoitered-small.gif"> + </a> +</div> + +You can run it with `cargo run`: +``` +cargo run --package stopwatch +``` + +[`main`]: src/main.rs diff --git a/examples/svg/README.md b/examples/svg/README.md new file mode 100644 index 00000000..9f53c177 --- /dev/null +++ b/examples/svg/README.md @@ -0,0 +1,17 @@ +## SVG + +An application that renders the [Ghostscript Tiger] by leveraging the `Svg` widget. + +The __[`main`]__ file contains all the code of the example. + +<div align="center"> + <img src="resources/tiger.svg"> +</div> + +You can run it with `cargo run`: +``` +cargo run --package svg +``` + +[`main`]: src/main.rs +[Ghostscript Tiger]: https://commons.wikimedia.org/wiki/File:Ghostscript_Tiger.svg |