Showing preview only (3,175K chars total). Download the full file or copy to clipboard to get everything.
Repository: iced-rs/iced
Branch: master
Commit: 12a0126568ba
Files: 542
Total size: 2.9 MB
Directory structure:
gitextract_lpzyxa4s/
├── .cargo/
│ └── config.toml
├── .github/
│ ├── FUNDING.yml
│ ├── ISSUE_TEMPLATE/
│ │ ├── BUG-REPORT.yml
│ │ └── config.yml
│ ├── PULL_REQUEST_TEMPLATE.md
│ └── workflows/
│ ├── audit.yml
│ ├── build.yml
│ ├── check.yml
│ ├── document.yml
│ ├── format.yml
│ ├── lint.yml
│ └── test.yml
├── .gitignore
├── CHANGELOG.md
├── CONTRIBUTING.md
├── Cargo.toml
├── Cross.toml
├── DEPENDENCIES.md
├── LICENSE
├── README.md
├── ROADMAP.md
├── beacon/
│ ├── Cargo.toml
│ └── src/
│ ├── client.rs
│ ├── error.rs
│ ├── lib.rs
│ ├── span.rs
│ └── stream.rs
├── benches/
│ ├── ipsum.txt
│ └── wgpu.rs
├── clippy.toml
├── core/
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ ├── alignment.rs
│ ├── angle.rs
│ ├── animation.rs
│ ├── background.rs
│ ├── border.rs
│ ├── clipboard.rs
│ ├── color.rs
│ ├── content_fit.rs
│ ├── element.rs
│ ├── event.rs
│ ├── font.rs
│ ├── gradient.rs
│ ├── image.rs
│ ├── input_method.rs
│ ├── keyboard/
│ │ ├── event.rs
│ │ ├── key.rs
│ │ ├── location.rs
│ │ └── modifiers.rs
│ ├── keyboard.rs
│ ├── layout/
│ │ ├── DRUID_LICENSE
│ │ ├── flex.rs
│ │ ├── limits.rs
│ │ └── node.rs
│ ├── layout.rs
│ ├── length.rs
│ ├── lib.rs
│ ├── mouse/
│ │ ├── button.rs
│ │ ├── click.rs
│ │ ├── cursor.rs
│ │ ├── event.rs
│ │ └── interaction.rs
│ ├── mouse.rs
│ ├── overlay/
│ │ ├── element.rs
│ │ ├── group.rs
│ │ └── nested.rs
│ ├── overlay.rs
│ ├── padding.rs
│ ├── pixels.rs
│ ├── point.rs
│ ├── rectangle.rs
│ ├── renderer/
│ │ └── null.rs
│ ├── renderer.rs
│ ├── rotation.rs
│ ├── settings.rs
│ ├── shadow.rs
│ ├── shell.rs
│ ├── size.rs
│ ├── svg.rs
│ ├── text/
│ │ ├── editor.rs
│ │ ├── highlighter.rs
│ │ └── paragraph.rs
│ ├── text.rs
│ ├── theme/
│ │ └── palette.rs
│ ├── theme.rs
│ ├── time.rs
│ ├── touch.rs
│ ├── transformation.rs
│ ├── vector.rs
│ ├── widget/
│ │ ├── id.rs
│ │ ├── operation/
│ │ │ ├── focusable.rs
│ │ │ ├── scrollable.rs
│ │ │ └── text_input.rs
│ │ ├── operation.rs
│ │ ├── text.rs
│ │ └── tree.rs
│ ├── widget.rs
│ ├── window/
│ │ ├── direction.rs
│ │ ├── event.rs
│ │ ├── icon.rs
│ │ ├── id.rs
│ │ ├── level.rs
│ │ ├── mode.rs
│ │ ├── position.rs
│ │ ├── redraw_request.rs
│ │ ├── screenshot.rs
│ │ ├── settings/
│ │ │ ├── linux.rs
│ │ │ ├── macos.rs
│ │ │ ├── other.rs
│ │ │ ├── wasm.rs
│ │ │ └── windows.rs
│ │ ├── settings.rs
│ │ └── user_attention.rs
│ └── window.rs
├── debug/
│ ├── Cargo.toml
│ └── src/
│ └── lib.rs
├── devtools/
│ ├── Cargo.toml
│ └── src/
│ ├── comet.rs
│ ├── lib.rs
│ └── time_machine.rs
├── docs/
│ ├── redirect.html
│ └── release_summary.py
├── examples/
│ ├── README.md
│ ├── arc/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── bezier_tool/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── changelog/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ ├── changelog.rs
│ │ ├── icon.rs
│ │ └── main.rs
│ ├── checkbox/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── clock/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── color_palette/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── combo_box/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── counter/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── index.html
│ │ └── src/
│ │ └── main.rs
│ ├── custom_quad/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── custom_shader/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ ├── main.rs
│ │ ├── scene/
│ │ │ ├── camera.rs
│ │ │ ├── pipeline/
│ │ │ │ ├── buffer.rs
│ │ │ │ ├── cube.rs
│ │ │ │ ├── uniforms.rs
│ │ │ │ └── vertex.rs
│ │ │ └── pipeline.rs
│ │ ├── scene.rs
│ │ └── shaders/
│ │ ├── cubes.wgsl
│ │ └── depth.wgsl
│ ├── custom_widget/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── delineate/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── download_progress/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── index.html
│ │ └── src/
│ │ ├── download.rs
│ │ └── main.rs
│ ├── editor/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── events/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── exit/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── ferris/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── gallery/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ ├── civitai.rs
│ │ └── main.rs
│ ├── game_of_life/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ ├── main.rs
│ │ └── preset.rs
│ ├── geometry/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── gradient/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── integration/
│ │ ├── .gitignore
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ ├── controls.rs
│ │ ├── main.rs
│ │ ├── scene.rs
│ │ └── shader/
│ │ ├── frag.wgsl
│ │ └── vert.wgsl
│ ├── layout/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── lazy/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── loading_spinners/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ ├── circular.rs
│ │ ├── easing.rs
│ │ ├── linear.rs
│ │ └── main.rs
│ ├── loupe/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── markdown/
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ ├── fonts/
│ │ │ └── markdown-icons.toml
│ │ ├── overview.md
│ │ └── src/
│ │ ├── icon.rs
│ │ └── main.rs
│ ├── modal/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── multi_window/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── multitouch/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── pane_grid/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── pick_list/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── pokedex/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── progress_bar/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── qr_code/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── sandpiles/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── screenshot/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── scrollable/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── sierpinski_triangle/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── slider/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── solar_system/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── stopwatch/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── styling/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── snapshots/
│ │ │ ├── catppuccin_frappé-tiny-skia.sha256
│ │ │ ├── catppuccin_latte-tiny-skia.sha256
│ │ │ ├── catppuccin_macchiato-tiny-skia.sha256
│ │ │ ├── catppuccin_mocha-tiny-skia.sha256
│ │ │ ├── dark-tiny-skia.sha256
│ │ │ ├── dracula-tiny-skia.sha256
│ │ │ ├── ferra-tiny-skia.sha256
│ │ │ ├── gruvbox_dark-tiny-skia.sha256
│ │ │ ├── gruvbox_light-tiny-skia.sha256
│ │ │ ├── kanagawa_dragon-tiny-skia.sha256
│ │ │ ├── kanagawa_lotus-tiny-skia.sha256
│ │ │ ├── kanagawa_wave-tiny-skia.sha256
│ │ │ ├── light-tiny-skia.sha256
│ │ │ ├── moonfly-tiny-skia.sha256
│ │ │ ├── nightfly-tiny-skia.sha256
│ │ │ ├── nord-tiny-skia.sha256
│ │ │ ├── oxocarbon-tiny-skia.sha256
│ │ │ ├── solarized_dark-tiny-skia.sha256
│ │ │ ├── solarized_light-tiny-skia.sha256
│ │ │ ├── tokyo_night-tiny-skia.sha256
│ │ │ ├── tokyo_night_light-tiny-skia.sha256
│ │ │ └── tokyo_night_storm-tiny-skia.sha256
│ │ └── src/
│ │ └── main.rs
│ ├── svg/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── system_information/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── table/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── text/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── the_matrix/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── toast/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── todos/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── iced-todos.desktop
│ │ ├── index.html
│ │ ├── snapshots/
│ │ │ └── creates_a_new_task-tiny-skia.sha256
│ │ ├── src/
│ │ │ └── main.rs
│ │ └── tests/
│ │ └── carl_sagan.ice
│ ├── tooltip/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── tour/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── index.html
│ │ └── src/
│ │ └── main.rs
│ ├── url_handler/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── vectorial_text/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ └── websocket/
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ ├── echo/
│ │ └── server.rs
│ ├── echo.rs
│ └── main.rs
├── futures/
│ ├── Cargo.toml
│ └── src/
│ ├── backend/
│ │ ├── default.rs
│ │ ├── native/
│ │ │ ├── smol.rs
│ │ │ ├── thread_pool.rs
│ │ │ └── tokio.rs
│ │ ├── native.rs
│ │ ├── null.rs
│ │ ├── wasm/
│ │ │ └── wasm_bindgen.rs
│ │ └── wasm.rs
│ ├── backend.rs
│ ├── event.rs
│ ├── executor.rs
│ ├── keyboard.rs
│ ├── lib.rs
│ ├── maybe.rs
│ ├── runtime.rs
│ ├── stream.rs
│ ├── subscription/
│ │ └── tracker.rs
│ └── subscription.rs
├── graphics/
│ ├── Cargo.toml
│ └── src/
│ ├── antialiasing.rs
│ ├── cache.rs
│ ├── color.rs
│ ├── compositor.rs
│ ├── damage.rs
│ ├── error.rs
│ ├── geometry/
│ │ ├── cache.rs
│ │ ├── fill.rs
│ │ ├── frame.rs
│ │ ├── path/
│ │ │ ├── arc.rs
│ │ │ └── builder.rs
│ │ ├── path.rs
│ │ ├── stroke.rs
│ │ ├── style.rs
│ │ └── text.rs
│ ├── geometry.rs
│ ├── gradient.rs
│ ├── image/
│ │ └── storage.rs
│ ├── image.rs
│ ├── layer.rs
│ ├── lib.rs
│ ├── mesh.rs
│ ├── shell.rs
│ ├── text/
│ │ ├── cache.rs
│ │ ├── editor.rs
│ │ └── paragraph.rs
│ ├── text.rs
│ └── viewport.rs
├── highlighter/
│ ├── Cargo.toml
│ └── src/
│ └── lib.rs
├── program/
│ ├── Cargo.toml
│ └── src/
│ ├── lib.rs
│ ├── message.rs
│ └── preset.rs
├── renderer/
│ ├── Cargo.toml
│ └── src/
│ ├── fallback.rs
│ └── lib.rs
├── runtime/
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ ├── clipboard.rs
│ ├── font.rs
│ ├── image.rs
│ ├── keyboard.rs
│ ├── lib.rs
│ ├── system.rs
│ ├── task.rs
│ ├── user_interface.rs
│ ├── widget/
│ │ ├── operation.rs
│ │ └── selector.rs
│ ├── widget.rs
│ └── window.rs
├── selector/
│ ├── Cargo.toml
│ └── src/
│ ├── find.rs
│ ├── lib.rs
│ └── target.rs
├── src/
│ ├── advanced.rs
│ ├── application/
│ │ └── timed.rs
│ ├── application.rs
│ ├── daemon.rs
│ ├── error.rs
│ ├── lib.rs
│ ├── time.rs
│ ├── touch.rs
│ ├── window/
│ │ └── icon.rs
│ └── window.rs
├── test/
│ ├── Cargo.toml
│ └── src/
│ ├── emulator.rs
│ ├── error.rs
│ ├── ice.rs
│ ├── instruction.rs
│ ├── lib.rs
│ └── simulator.rs
├── tester/
│ ├── Cargo.toml
│ ├── fonts/
│ │ └── iced_tester-icons.toml
│ └── src/
│ ├── icon.rs
│ ├── lib.rs
│ └── recorder.rs
├── tiny_skia/
│ ├── Cargo.toml
│ └── src/
│ ├── engine.rs
│ ├── geometry.rs
│ ├── layer.rs
│ ├── lib.rs
│ ├── primitive.rs
│ ├── raster.rs
│ ├── text.rs
│ ├── vector.rs
│ ├── window/
│ │ └── compositor.rs
│ └── window.rs
├── wgpu/
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ ├── buffer.rs
│ ├── color.rs
│ ├── engine.rs
│ ├── geometry.rs
│ ├── image/
│ │ ├── atlas/
│ │ │ ├── allocation.rs
│ │ │ ├── allocator.rs
│ │ │ ├── entry.rs
│ │ │ └── layer.rs
│ │ ├── atlas.rs
│ │ ├── cache.rs
│ │ ├── mod.rs
│ │ ├── null.rs
│ │ ├── raster.rs
│ │ └── vector.rs
│ ├── layer.rs
│ ├── lib.rs
│ ├── primitive.rs
│ ├── quad/
│ │ ├── gradient.rs
│ │ └── solid.rs
│ ├── quad.rs
│ ├── shader/
│ │ ├── blit.wgsl
│ │ ├── color/
│ │ │ └── linear_rgb.wgsl
│ │ ├── color.wgsl
│ │ ├── image.wgsl
│ │ ├── quad/
│ │ │ ├── gradient.wgsl
│ │ │ └── solid.wgsl
│ │ ├── quad.wgsl
│ │ ├── triangle/
│ │ │ ├── gradient.wgsl
│ │ │ └── solid.wgsl
│ │ ├── triangle.wgsl
│ │ └── vertex.wgsl
│ ├── text.rs
│ ├── triangle/
│ │ └── msaa.rs
│ ├── triangle.rs
│ ├── window/
│ │ └── compositor.rs
│ └── window.rs
├── widget/
│ ├── Cargo.toml
│ └── src/
│ ├── action.rs
│ ├── button.rs
│ ├── canvas/
│ │ └── program.rs
│ ├── canvas.rs
│ ├── checkbox.rs
│ ├── column.rs
│ ├── combo_box.rs
│ ├── container.rs
│ ├── float.rs
│ ├── grid.rs
│ ├── helpers.rs
│ ├── image/
│ │ └── viewer.rs
│ ├── image.rs
│ ├── keyed/
│ │ └── column.rs
│ ├── keyed.rs
│ ├── lazy/
│ │ ├── cache.rs
│ │ ├── component.rs
│ │ └── helpers.rs
│ ├── lazy.rs
│ ├── lib.rs
│ ├── markdown.rs
│ ├── mouse_area.rs
│ ├── overlay/
│ │ └── menu.rs
│ ├── overlay.rs
│ ├── pane_grid/
│ │ ├── axis.rs
│ │ ├── configuration.rs
│ │ ├── content.rs
│ │ ├── controls.rs
│ │ ├── direction.rs
│ │ ├── draggable.rs
│ │ ├── node.rs
│ │ ├── pane.rs
│ │ ├── split.rs
│ │ ├── state.rs
│ │ └── title_bar.rs
│ ├── pane_grid.rs
│ ├── pick_list.rs
│ ├── pin.rs
│ ├── progress_bar.rs
│ ├── qr_code.rs
│ ├── radio.rs
│ ├── responsive.rs
│ ├── row.rs
│ ├── rule.rs
│ ├── scrollable.rs
│ ├── sensor.rs
│ ├── shader/
│ │ └── program.rs
│ ├── shader.rs
│ ├── slider.rs
│ ├── space.rs
│ ├── stack.rs
│ ├── svg.rs
│ ├── table.rs
│ ├── text/
│ │ └── rich.rs
│ ├── text.rs
│ ├── text_editor.rs
│ ├── text_input/
│ │ ├── cursor.rs
│ │ ├── editor.rs
│ │ └── value.rs
│ ├── text_input.rs
│ ├── themer.rs
│ ├── toggler.rs
│ ├── tooltip.rs
│ └── vertical_slider.rs
└── winit/
├── Cargo.toml
├── README.md
└── src/
├── clipboard.rs
├── conversion.rs
├── error.rs
├── lib.rs
├── proxy.rs
├── window/
│ └── state.rs
└── window.rs
================================================
FILE CONTENTS
================================================
================================================
FILE: .cargo/config.toml
================================================
[alias]
lint = "clippy --workspace --benches --all-features --no-deps -- -D warnings"
lint-fix = "clippy --fix --allow-dirty --workspace --benches --all-features --no-deps -- -D warnings"
================================================
FILE: .github/FUNDING.yml
================================================
github: hecrj
ko_fi: hecrj_
================================================
FILE: .github/ISSUE_TEMPLATE/BUG-REPORT.yml
================================================
name: I have a problem with the library
description: File a bug report.
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: checkboxes
attributes:
label: Is your issue REALLY a bug?
description: |
This issue tracker is for __BUG REPORTS ONLY__.
It's obvious, right? This is a bug report form, after all! Still, some crazy users seem to forcefully fill out this form just to ask questions and request features.
The core team does not appreciate that. Don't do it.
If you want to ask a question or request a feature, please [go back here](https://github.com/iced-rs/iced/issues/new/choose) and read carefully.
options:
- label: My issue is indeed a bug!
required: true
- label: I am not crazy! I will not fill out this form just to ask a question or request a feature. Pinky promise.
required: true
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: |
Please, search [the existing issues] and see if an issue already exists for the bug you encountered.
[the existing issues]: https://github.com/iced-rs/iced/issues
options:
- label: I have searched the existing issues.
required: true
- type: checkboxes
attributes:
label: Is this issue related to iced?
description: |
If your application is crashing during startup or you are observing graphical glitches, there is a chance it may be caused by incompatible hardware or outdated graphics drivers.
Before filing an issue...
- If you are using `wgpu`, you need an environment that supports Vulkan, Metal, or DirectX 12. Please, make sure you can run [the `wgpu` examples].
If you have any issues running any of the examples, make sure your graphics drivers are up-to-date. If the issues persist, please report them to the authors of the libraries directly!
[the `wgpu` examples]: https://github.com/gfx-rs/wgpu/tree/trunk/examples
[the `glow` examples]: https://github.com/grovesNL/glow/tree/main/examples
options:
- label: My hardware is compatible and my graphics drivers are up-to-date.
required: true
- type: textarea
attributes:
label: What happened?
id: what-happened
description: |
What problem are you having? Please, also provide the steps to reproduce it.
If the issue happens with a particular program, please share an [SSCCE].
[SSCCE]: http://sscce.org/
validations:
required: true
- type: textarea
attributes:
label: What is the expected behavior?
id: what-expected
description: What were you expecting to happen?
validations:
required: true
- type: dropdown
id: version
attributes:
label: Version
description: |
We only offer support for the latest release on crates.io and the `master` branch on this repository. Which version are you using? Please make sure you are using the latest patch available (e.g. run `cargo update`).
If you are using an older release, please upgrade to the latest one before filing an issue.
options:
- crates.io release
- master
validations:
required: true
- type: dropdown
id: os
attributes:
label: Operating System
description: Which operating system are you using?
options:
- Windows
- macOS
- Linux
validations:
required: true
- type: textarea
id: logs
attributes:
label: Do you have any log output?
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: shell
================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
blank_issues_enabled: false
contact_links:
- name: I have a question
url: https://iced.zulipchat.com/#narrow/channel/213445-questions
about: Ask and learn from others in the Zulip forum.
- name: I want to request a feature or start a discussion
url: https://iced.zulipchat.com/#narrow/channel/213316-discussions
about: Share your idea and gather feedback in the Zulip forum.
- name: I want to chat with other users of the library
url: https://discord.com/invite/3xZJ65GAhd
about: Join the Discord server and get involved with the community!
================================================
FILE: .github/PULL_REQUEST_TEMPLATE.md
================================================
The core team is busy and does not have time to mentor nor babysit new contributors. If a member of the core team thinks that reviewing and understanding your work will take more time and effort than writing it from scratch by themselves, your contribution will be dismissed. It is your responsibility to communicate and figure out how to reduce the likelihood of this!
Read the contributing guidelines for more details: https://github.com/iced-rs/iced/blob/master/CONTRIBUTING.md
================================================
FILE: .github/workflows/audit.yml
================================================
name: Audit
on:
push: {}
pull_request: {}
schedule:
- cron: '0 0 * * *'
jobs:
vulnerabilities:
runs-on: ubuntu-latest
steps:
- uses: hecrj/setup-rust-action@v2
- name: Install cargo-audit
run: cargo install cargo-audit
- uses: actions/checkout@master
- name: Resolve dependencies
run: cargo update
- name: Audit vulnerabilities
run: cargo audit
# artifacts:
# runs-on: ubuntu-latest
# steps:
# - uses: hecrj/setup-rust-action@v2
# - name: Install cargo-outdated
# run: cargo install cargo-outdated
# - uses: actions/checkout@master
# - name: Delete `web-sys` dependency from `integration` example
# run: sed -i '$d' examples/integration/Cargo.toml
# - name: Find outdated dependencies
# run: cargo outdated --workspace --exit-code 1 --ignore raw-window-handle
================================================
FILE: .github/workflows/build.yml
================================================
name: Build
on:
push:
branches:
- master
jobs:
todos_linux:
runs-on: ubuntu-latest
steps:
- uses: hecrj/setup-rust-action@v2
- name: Install cargo-deb
run: cargo install cargo-deb
- uses: actions/checkout@master
- name: Install dependencies
run: |
export DEBIAN_FRONTED=noninteractive
sudo apt-get -qq update
sudo apt-get install -y libxkbcommon-dev
- name: Build todos binary
run: cargo build --verbose --profile release-opt --package todos
- name: Archive todos binary
uses: actions/upload-artifact@v4
with:
name: todos-x86_64-unknown-linux-gnu
path: target/release-opt/todos
- name: Pack todos .deb package
run: cargo deb --no-build --profile release-opt --package todos
- name: Rename todos .deb package
run: mv target/debian/*.deb target/debian/iced_todos-x86_64-debian-linux-gnu.deb
- name: Archive todos .deb package
uses: actions/upload-artifact@v4
with:
name: todos-x86_64-debian-linux-gnu
path: target/debian/iced_todos-x86_64-debian-linux-gnu.deb
todos_windows:
runs-on: windows-latest
steps:
- uses: hecrj/setup-rust-action@v2
- uses: actions/checkout@master
- name: Enable static CRT linkage
run: |
echo '[target.x86_64-pc-windows-msvc]' >> .cargo/config
echo 'rustflags = ["-Ctarget-feature=+crt-static"]' >> .cargo/config
- name: Run the application without starting the shell
run: |
sed -i '1 i\#![windows_subsystem = \"windows\"]' examples/todos/src/main.rs
- name: Build todos binary
run: cargo build --verbose --profile release-opt --package todos
- name: Archive todos binary
uses: actions/upload-artifact@v4
with:
name: todos-x86_64-pc-windows-msvc
path: target/release-opt/todos.exe
todos_macos:
runs-on: macOS-latest
steps:
- uses: hecrj/setup-rust-action@v2
- uses: actions/checkout@master
- name: Build todos binary
env:
MACOSX_DEPLOYMENT_TARGET: 10.14
run: cargo build --verbose --profile release-opt --package todos
- name: Open binary via double-click
run: chmod +x target/release-opt/todos
- name: Archive todos binary
uses: actions/upload-artifact@v4
with:
name: todos-x86_64-apple-darwin
path: target/release-opt/todos
todos_raspberry:
runs-on: ubuntu-latest
steps:
- uses: hecrj/setup-rust-action@v2
- uses: actions/checkout@master
- name: Install cross
run: cargo install cross
- name: Build todos binary for Raspberry Pi 3/4 (64 bits)
run: cross build --verbose --profile release-opt --package todos --target aarch64-unknown-linux-gnu
- name: Archive todos binary
uses: actions/upload-artifact@v4
with:
name: todos-aarch64-unknown-linux-gnu
path: target/aarch64-unknown-linux-gnu/release-opt/todos
- name: Build todos binary for Raspberry Pi 2/3/4 (32 bits)
run: cross build --verbose --profile release-opt --package todos --target armv7-unknown-linux-gnueabihf
- name: Archive todos binary
uses: actions/upload-artifact@v4
with:
name: todos-armv7-unknown-linux-gnueabihf
path: target/armv7-unknown-linux-gnueabihf/release-opt/todos
================================================
FILE: .github/workflows/check.yml
================================================
name: Check
on: [push, pull_request]
jobs:
wasm:
runs-on: ubuntu-latest
env:
RUSTFLAGS: --cfg=web_sys_unstable_apis
steps:
- uses: hecrj/setup-rust-action@v2
with:
rust-version: stable
targets: wasm32-unknown-unknown
- uses: actions/checkout@master
- name: Run checks
run: cargo check --package iced --target wasm32-unknown-unknown
- name: Check compilation of `tour` example
run: cargo build --package tour --target wasm32-unknown-unknown
- name: Check compilation of `todos` example
run: cargo build --package todos --target wasm32-unknown-unknown
widget:
runs-on: ubuntu-latest
steps:
- uses: hecrj/setup-rust-action@v2
- uses: actions/checkout@master
- name: Check standalone `iced_widget` crate
run: cargo check --package iced_widget --features image,svg,canvas
================================================
FILE: .github/workflows/document.yml
================================================
name: Document
on: [push, pull_request]
jobs:
all:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: hecrj/setup-rust-action@v2
with:
rust-version: nightly-2026-02-20
- uses: actions/checkout@v2
- name: Generate documentation
run: |
RUSTDOCFLAGS="--cfg docsrs" \
cargo doc --no-deps --all-features \
-p futures-core \
-p iced_beacon \
-p iced_core \
-p iced_debug \
-p iced_devtools \
-p iced_futures \
-p iced_graphics \
-p iced_highlighter \
-p iced_renderer \
-p iced_runtime \
-p iced_tiny_skia \
-p iced_wgpu \
-p iced_widget \
-p iced_winit \
-p iced_test \
-p iced
- name: Write CNAME file
run: echo 'docs.iced.rs' > ./target/doc/CNAME
- name: Copy redirect file as index.html
run: cp docs/redirect.html target/doc/index.html
- name: Publish documentation
if: github.ref == 'refs/heads/master'
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.DOCS_DEPLOY_KEY }}
external_repository: iced-rs/docs
publish_dir: ./target/doc
================================================
FILE: .github/workflows/format.yml
================================================
name: Format
on: [push, pull_request]
jobs:
all:
runs-on: ubuntu-latest
steps:
- uses: hecrj/setup-rust-action@v2
with:
components: rustfmt
- uses: actions/checkout@master
- name: Check format
run: cargo fmt --all -- --check --verbose
================================================
FILE: .github/workflows/lint.yml
================================================
name: Lint
on: [push, pull_request]
jobs:
all:
runs-on: ubuntu-latest
steps:
- uses: hecrj/setup-rust-action@v2
with:
components: clippy
- uses: actions/checkout@master
- name: Install dependencies
run: |
export DEBIAN_FRONTED=noninteractive
sudo apt-get -qq update
sudo apt-get install -y libxkbcommon-dev libgtk-3-dev
- name: Check lints
run: cargo lint
================================================
FILE: .github/workflows/test.yml
================================================
name: Test
on: [push, pull_request]
jobs:
all:
runs-on: ${{ matrix.os }}
env:
RUSTFLAGS: --deny warnings
ICED_TEST_BACKEND: tiny-skia
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
rust: [stable, beta, "1.92"]
steps:
- uses: hecrj/setup-rust-action@v2
with:
rust-version: ${{ matrix.rust }}
- uses: actions/checkout@master
- name: Install dependencies
if: matrix.os == 'ubuntu-latest'
run: |
export DEBIAN_FRONTED=noninteractive
sudo apt-get -qq update
sudo apt-get install -y libxkbcommon-dev libgtk-3-dev
- name: Run tests
run: |
cargo test --verbose --workspace
cargo test --verbose --workspace -- --ignored
cargo test --verbose --workspace --all-features
================================================
FILE: .gitignore
================================================
target/
pkg/
**/*.rs.bk
dist/
traces/
================================================
FILE: CHANGELOG.md
================================================
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
## [0.14.0] - 2025-12-07
### Added
- Reactive rendering. [#2662](https://github.com/iced-rs/iced/pull/2662)
- Time travel debugging. [#2910](https://github.com/iced-rs/iced/pull/2910)
- `Animation` API for application code. [#2757](https://github.com/iced-rs/iced/pull/2757)
- Headless mode testing. [#2698](https://github.com/iced-rs/iced/pull/2698)
- First-class end-to-end testing. [#3059](https://github.com/iced-rs/iced/pull/3059)
- Input method support. [#2777](https://github.com/iced-rs/iced/pull/2777)
- Hot reloading. [#3000](https://github.com/iced-rs/iced/pull/3000)
- Concurrent image decoding and uploading (and more cool stuff). [#3092](https://github.com/iced-rs/iced/pull/3092)
- `comet` debugger and `devtools` foundations. [#2879](https://github.com/iced-rs/iced/pull/2879)
- Presentation metrics for `comet`. [#2881](https://github.com/iced-rs/iced/pull/2881)
- Custom performance metrics for `comet`. [#2891](https://github.com/iced-rs/iced/pull/2891)
- Smart scrollbars. [#2922](https://github.com/iced-rs/iced/pull/2922)
- System theme reactions. [#3051](https://github.com/iced-rs/iced/pull/3051)
- `table` widget. [#3018](https://github.com/iced-rs/iced/pull/3018)
- `grid` widget. [#2885](https://github.com/iced-rs/iced/pull/2885)
- `sensor` widget. [#2751](https://github.com/iced-rs/iced/pull/2751)
- `float` widget and other cool stuff. [#2916](https://github.com/iced-rs/iced/pull/2916)
- `pin` widget. [#2673](https://github.com/iced-rs/iced/pull/2673)
- `wrap` method for `column` widget. [#2884](https://github.com/iced-rs/iced/pull/2884)
- `auto_scroll` support for `scrollable` widget. [#2973](https://github.com/iced-rs/iced/pull/2973)
- `delay` support for `tooltip` widget. [#2960](https://github.com/iced-rs/iced/pull/2960)
- `Auto` strategy to `text::Shaping`. [#3048](https://github.com/iced-rs/iced/pull/3048)
- Incremental `markdown` parsing. [#2776](https://github.com/iced-rs/iced/pull/2776)
- Customizable markdown rendering and image support. [#2786](https://github.com/iced-rs/iced/pull/2786)
- Quote support for `markdown` widget. [#3005](https://github.com/iced-rs/iced/pull/3005)
- Tasklist support for `markdown` widget. [#3022](https://github.com/iced-rs/iced/pull/3022)
- `crisp` feature for default quad snapping. [#2969](https://github.com/iced-rs/iced/pull/2969)
- Basic layer merging for `graphics::layer::Stack`. [#3033](https://github.com/iced-rs/iced/pull/3033)
- Headless mode for `iced_wgpu` and concurrency foundations. [#2857](https://github.com/iced-rs/iced/pull/2857)
- Primitive culling in `column` and `row` widgets. [#2611](https://github.com/iced-rs/iced/pull/2611)
- Lazy `Compositor` initialization in `winit` shell. [#2722](https://github.com/iced-rs/iced/pull/2722)
- Support for `Justified` text alignment. [#2836](https://github.com/iced-rs/iced/pull/2836)
- Support for double click event to `mouse_area`. [#2602](https://github.com/iced-rs/iced/pull/2602)
- `Default` implementation for `iced_wgpu::geometry::Cache`. [#2619](https://github.com/iced-rs/iced/pull/2619)
- `physical_key` field to `KeyReleased` event. [#2608](https://github.com/iced-rs/iced/pull/2608)
- `total_size` method for `qr_code` widget. [#2606](https://github.com/iced-rs/iced/pull/2606)
- `PartialEq` implementations for widget styles. [#2637](https://github.com/iced-rs/iced/pull/2637)
- `Send` marker to `iced_wgpu::Renderer` by using `Arc` in caches. [#2692](https://github.com/iced-rs/iced/pull/2692)
- Disabled `Status` for `scrollbar` widget. [#2585](https://github.com/iced-rs/iced/pull/2585)
- `warning` color to `theme::Palette`. [#2607](https://github.com/iced-rs/iced/pull/2607)
- `maximized` and `fullscreen` fields to `window::Settings`. [#2627](https://github.com/iced-rs/iced/pull/2627)
- `window` tasks for controlling sizes and resize increments. [#2633](https://github.com/iced-rs/iced/pull/2633)
- `window` task for drag resizing. [#2642](https://github.com/iced-rs/iced/pull/2642)
- Helper functions for alignment to `widget` module. [#2746](https://github.com/iced-rs/iced/pull/2746)
- `time::repeat` subscription. [#2747](https://github.com/iced-rs/iced/pull/2747)
- Vertical support for `progress_bar`. [#2748](https://github.com/iced-rs/iced/pull/2748)
- `scale` support for `image` widget. [#2755](https://github.com/iced-rs/iced/pull/2755)
- `LineEnding` support for `text_editor`. [#2759](https://github.com/iced-rs/iced/pull/2759)
- `Mul<Transformation>` implementation for `mouse::Cursor` and `mouse::Click`. [#2758](https://github.com/iced-rs/iced/pull/2758)
- `animation` module support for Wasm target. [#2764](https://github.com/iced-rs/iced/pull/2764)
- Flake for a dev shell in `DEPENDENCIES`. [#2769](https://github.com/iced-rs/iced/pull/2769)
- `unfocus` widget operation. [#2804](https://github.com/iced-rs/iced/pull/2804)
- `sipper` support and some QoL. [#2805](https://github.com/iced-rs/iced/pull/2805)
- Variable text size for preedit IME window. [#2790](https://github.com/iced-rs/iced/pull/2790)
- `is_focused` widget operation. [#2812](https://github.com/iced-rs/iced/pull/2812)
- Notification of `window` pre-presentation to windowing system. [#2849](https://github.com/iced-rs/iced/pull/2849)
- Customizable vertical `spacing` for wrapped rows. [#2852](https://github.com/iced-rs/iced/pull/2852)
- Indent and unindent actions for `text_editor`. [#2901](https://github.com/iced-rs/iced/pull/2901)
- Floating Images. [#2903](https://github.com/iced-rs/iced/pull/2903)
- `min_size` method to `PaneGrid`. [#2911](https://github.com/iced-rs/iced/pull/2911)
- Generic key for `sensor` widget. [#2944](https://github.com/iced-rs/iced/pull/2944)
- `Debug` implementation for `Task`. [#2955](https://github.com/iced-rs/iced/pull/2955)
- `draw_with_bounds` method to `canvas::Cache`. [#3035](https://github.com/iced-rs/iced/pull/3035)
- Synchronous `Task` Execution and `RedrawRequested` Consistency. [#3084](https://github.com/iced-rs/iced/pull/3084)
- `id` method to `text_editor`. [#2653](https://github.com/iced-rs/iced/pull/2653)
- `horizontal` and `vertical` methods to `Padding`. [#2655](https://github.com/iced-rs/iced/pull/2655)
- `is_focused` selector and `find` / `find_all` operations. [#2664](https://github.com/iced-rs/iced/pull/2664)
- `push` and `into_options` methods to `combo_box::State`. [#2684](https://github.com/iced-rs/iced/pull/2684)
- `Hidden` variant to `mouse::Interaction`. [#2685](https://github.com/iced-rs/iced/pull/2685)
- `menu_height` method to `pick_list` and `combo_box` widgets. [#2699](https://github.com/iced-rs/iced/pull/2699)
- `text_color` to `toggler::Style`. [#2707](https://github.com/iced-rs/iced/pull/2707)
- `text_shaping` method to `combo_box` widget. [#2714](https://github.com/iced-rs/iced/pull/2714)
- `transparent` field for `window::Settings`. [#2728](https://github.com/iced-rs/iced/pull/2728)
- `closeable` and `minimizable` fields to `window::Settings`. [#2735](https://github.com/iced-rs/iced/pull/2735)
- `window::monitor_size` task. [#2754](https://github.com/iced-rs/iced/pull/2754)
- Division operation for `Size` and `Vector`. [#2767](https://github.com/iced-rs/iced/pull/2767)
- `hidden` method to `scrollable` widget. [#2775](https://github.com/iced-rs/iced/pull/2775)
- Support for macOS-specific key shortcuts with `Control` modifier. [#2801](https://github.com/iced-rs/iced/pull/2801)
- Additional variants to `mouse::Interaction`. [#2815](https://github.com/iced-rs/iced/pull/2815)
- `vsync` field to `window::Settings`. [#2837](https://github.com/iced-rs/iced/pull/2837)
- `wgpu-bare` feature flag to disable default `wgpu` features. [#2828](https://github.com/iced-rs/iced/pull/2828)
- `ratio` method for `Size`. [#2861](https://github.com/iced-rs/iced/pull/2861)
- Support for `⌘ + Backspace` and `⌘ + Delete` macOS shortcuts. [#2862](https://github.com/iced-rs/iced/pull/2862)
- Expandable selection-by-word after double click in text editors. [#2865](https://github.com/iced-rs/iced/pull/2865)
- `x11` and `wayland` feature flags. [#2869](https://github.com/iced-rs/iced/pull/2869)
- `label` method for `checkbox` widget. [#2873](https://github.com/iced-rs/iced/pull/2873)
- `shader::Pipeline` trait for easier `wgpu` resource management. [#2876](https://github.com/iced-rs/iced/pull/2876)
- `select_range` widget operation. [#2890](https://github.com/iced-rs/iced/pull/2890)
- `grid!` macro helper. [#2904](https://github.com/iced-rs/iced/pull/2904)
- `warning` style for `container` widget. [#2912](https://github.com/iced-rs/iced/pull/2912)
- Current toggle state to `toggler::Status::Disabled`. [#2908](https://github.com/iced-rs/iced/pull/2908)
- Cursor size awareness for input methods. [#2918](https://github.com/iced-rs/iced/pull/2918)
- `allow_automatic_tabbing` task to `runtime::window`. [#2933](https://github.com/iced-rs/iced/pull/2933)
- `FromStr` and `Display` implementations for `Color`. [#2937](https://github.com/iced-rs/iced/pull/2937)
- `text::Renderer` trait in `iced_graphics` with `fill_raw` method. [#2958](https://github.com/iced-rs/iced/pull/2958)
- `font_maybe` helper for `text` widget. [#2988](https://github.com/iced-rs/iced/pull/2988)
- `filter_map` method to `Subscription`. [#2981](https://github.com/iced-rs/iced/pull/2981)
- `repeat` field to `keyboard::Event::KeyPressed`. [#2991](https://github.com/iced-rs/iced/pull/2991)
- Additional settings to control the fonts used for `markdown` rendering. [#2999](https://github.com/iced-rs/iced/pull/2999)
- `Rescaled` variant to `window::Event`. [#3001](https://github.com/iced-rs/iced/pull/3001)
- Environment variable to define `beacon` server listen address. [#3003](https://github.com/iced-rs/iced/pull/3003)
- `push_under` method to `stack` widget. [#3010](https://github.com/iced-rs/iced/pull/3010)
- `NONE` constant to `keyboard::Modifiers`. [#3037](https://github.com/iced-rs/iced/pull/3037)
- `shadow` field to `overlay::menu::Style`. [#3049](https://github.com/iced-rs/iced/pull/3049)
- `draw_mesh_cache` method in `mesh::Renderer` trait. [#3070](https://github.com/iced-rs/iced/pull/3070)
- Efficient `is_empty` method for `text_editor::Content`. [#3117](https://github.com/iced-rs/iced/pull/3117)
- `*Assign` implementations for `Point` and `Vector`. [#3131](https://github.com/iced-rs/iced/pull/3131)
- Support `Background` instead of `Color` styling for `scrollable`. [#3127](https://github.com/iced-rs/iced/pull/3127)
- `CornerPreference` window setting for Windows. [#3128](https://github.com/iced-rs/iced/pull/3128)
- `move_to` method for `Editor` API. [#3125](https://github.com/iced-rs/iced/pull/3125)
- `Background` and `padding_ratio` support for `toggler` styling. [#3129](https://github.com/iced-rs/iced/pull/3129)
- More syntaxes for `iced_highlighter`. [#2822](https://github.com/iced-rs/iced/pull/2822)
- Implement `Sub<Vector>` for `Cursor`. [#3137](https://github.com/iced-rs/iced/pull/3137)
### Changed
- Replace `Rc` with `Arc` for `markdown` caching. [#2599](https://github.com/iced-rs/iced/pull/2599)
- Improved `button::Catalog` and `Style` documentation. [#2590](https://github.com/iced-rs/iced/pull/2590)
- Improved `clock` example to display ticks and numbers. [#2644](https://github.com/iced-rs/iced/pull/2644)
- Derived `PartialEq` and `Eq` for `mouse::click::Kind`. [#2741](https://github.com/iced-rs/iced/pull/2741)
- Marked `Color::from_rgb8` and `Color::from_rgba8` as const. [#2749](https://github.com/iced-rs/iced/pull/2749)
- Replaced unmaintained `directories-next` crate with `directories`. [#2761](https://github.com/iced-rs/iced/pull/2761)
- Changed `Widget::update` to take `Event` by reference. [#2781](https://github.com/iced-rs/iced/pull/2781)
- Improved `gallery` example with blurhash previews. [#2796](https://github.com/iced-rs/iced/pull/2796)
- Replaced `wasm-timer` with `wasmtimer`. [#2780](https://github.com/iced-rs/iced/pull/2780)
- Tweaked `Palette` Generation. [#2811](https://github.com/iced-rs/iced/pull/2811)
- Relaxed `Task::perform` bound from `Fn` to `FnOnce`. [#2827](https://github.com/iced-rs/iced/pull/2827)
- Improved `quad` shader to use a single SDF in `iced_wgpu`. [#2967](https://github.com/iced-rs/iced/pull/2967)
- Leveraged `Limits::min` directly in `scrollable::layout`. [#3004](https://github.com/iced-rs/iced/pull/3004)
- Overhauled `theme::Palette` generation by leveraging `Oklch`. [#3028](https://github.com/iced-rs/iced/pull/3028)
- Mutable `Widget` Methods. [#3038](https://github.com/iced-rs/iced/pull/3038)
- Prioritized `Shrink` over `Fill` in `layout` logic. [#3045](https://github.com/iced-rs/iced/pull/3045)
- Replaced `format!` with `concat!` for string literals. [#2695](https://github.com/iced-rs/iced/pull/2695)
- Replaced `window::run_with_handle` with a more powerful `window::run`. [#2718](https://github.com/iced-rs/iced/pull/2718)
- Made color helpers in `palette` module public. [#2771](https://github.com/iced-rs/iced/pull/2771)
- Changed default `PowerPreference` to `HighPerformance` in `iced_wgpu`. [#2813](https://github.com/iced-rs/iced/pull/2813)
- Made `button::DEFAULT_PADDING` public. [#2858](https://github.com/iced-rs/iced/pull/2858)
- Replaced `Url` parsing in `markdown` widget with `String` URIs. [#2992](https://github.com/iced-rs/iced/pull/2992)
- Improved alignment docs of `container`. [#2871](https://github.com/iced-rs/iced/pull/2871)
- Made `input_method` module public. [#2897](https://github.com/iced-rs/iced/pull/2897)
- `iced` logo to built-in icons font. [#2902](https://github.com/iced-rs/iced/pull/2902)
- Made `Layout::children` return an `ExactSizeIterator`. [#2915](https://github.com/iced-rs/iced/pull/2915)
- Enabled `fancy-regex` instead of `onig` for `syntect`. [#2932](https://github.com/iced-rs/iced/pull/2932)
- Added `warning` status to `toast` example. [#2936](https://github.com/iced-rs/iced/pull/2936)
- Improved `scroll_to` and `snap_to` to allow operating on a single axis. [#2994](https://github.com/iced-rs/iced/pull/2994)
- Disabled `png-format` feature from `iced_tiny_skia`. [#3043](https://github.com/iced-rs/iced/pull/3043)
- Unified `keyboard` subscriptions into a single `listen` subscription. [#3135](https://github.com/iced-rs/iced/pull/3135)
- Updated to Rust 2024. [#2809](https://github.com/iced-rs/iced/pull/2809)
- Updated `wgpu` to `22.0`. [#2510](https://github.com/iced-rs/iced/pull/2510)
- Updated `wgpu` to `23.0`. [#2663](https://github.com/iced-rs/iced/pull/2663)
- Updated `wgpu` to `24.0`. [#2832](https://github.com/iced-rs/iced/pull/2832)
- Updated `wgpu` to `26.0`. [#3019](https://github.com/iced-rs/iced/pull/3019)
- Updated `wgpu` to `27.0`. [#3097](https://github.com/iced-rs/iced/pull/3097)
- Updated `image` to `0.25`. [#2716](https://github.com/iced-rs/iced/pull/2716)
- Updated `cosmic-text` to `0.13`. [#2834](https://github.com/iced-rs/iced/pull/2834)
- Updated `cosmic-text` to `0.14`. [#2880](https://github.com/iced-rs/iced/pull/2880)
- Updated `cosmic-text` to `0.15`. [#3098](https://github.com/iced-rs/iced/pull/3098)
- Updated `resvg` to `0.45`. [#2846](https://github.com/iced-rs/iced/pull/2846)
- Updated `wasmtimer` to `0.4.2`. [#3012](https://github.com/iced-rs/iced/pull/3012)
- Updated `dark-light` to `2.0`. [#2724](https://github.com/iced-rs/iced/pull/2724)
- Updated `openssl` to `0.10.70`. [#2783](https://github.com/iced-rs/iced/pull/2783)
- Updated our `winit` fork with `0.30.8` fixes. [#2737](https://github.com/iced-rs/iced/pull/2737)
### Fixed
- Slow `wgpu` documentation. [#2593](https://github.com/iced-rs/iced/pull/2593)
- Documentation for `open_events`. [#2594](https://github.com/iced-rs/iced/pull/2594)
- Layout for wrapped `row` with `spacing`. [#2596](https://github.com/iced-rs/iced/pull/2596)
- Flex layout of `Fill` elements in a `Shrink` cross axis. [#2598](https://github.com/iced-rs/iced/pull/2598)
- Incorrect triangle mesh counting in `wgpu`. [#2601](https://github.com/iced-rs/iced/pull/2601)
- Dropped images and meshes when pasting `Frame`. [#2605](https://github.com/iced-rs/iced/pull/2605)
- `loading_spinners` example skipping part of the animation cycle. [#2617](https://github.com/iced-rs/iced/pull/2617)
- Window `File*` events not marked as unsupported for Wayland. [#2615](https://github.com/iced-rs/iced/pull/2615)
- Coupling of `markdown::view` iterator lifetime with resulting `Element`. [#2623](https://github.com/iced-rs/iced/pull/2623)
- Delete key not working in `text_editor` widget. [#2632](https://github.com/iced-rs/iced/pull/2632)
- Consecutive clicks triggering independently of distance. [#2639](https://github.com/iced-rs/iced/pull/2639)
- `pane_grid` losing continuity when adding or removing panes. [#2628](https://github.com/iced-rs/iced/pull/2628)
- Synthetic keyboard events not being discarded. [#2649](https://github.com/iced-rs/iced/pull/2649)
- `sort_by` without total ordering in `tiny-skia` damage tracking. [#2651](https://github.com/iced-rs/iced/pull/2651)
- Outdated docs of `Scrollable::with_direction` and `direction`. [#2668](https://github.com/iced-rs/iced/pull/2668)
- `button` calling its `on_press` handler unnecessarily. [#2683](https://github.com/iced-rs/iced/pull/2683)
- `system_information` example getting stuck at boot. [#2681](https://github.com/iced-rs/iced/pull/2681)
- `tooltip` widget not redrawing when hovered. [#2675](https://github.com/iced-rs/iced/pull/2675)
- `pane_grid::DragEvent::Canceled` not emitted within deadband. [#2691](https://github.com/iced-rs/iced/pull/2691)
- Inconsistent positions in window-related operations. [#2688](https://github.com/iced-rs/iced/pull/2688)
- `text::Wrapping` not being applied to `Paragraph`. [#2723](https://github.com/iced-rs/iced/pull/2723)
- Broken nested `markdown` lists without empty line. [#2641](https://github.com/iced-rs/iced/pull/2641)
- Unnecessary cast in `the_matrix` example. [#2731](https://github.com/iced-rs/iced/pull/2731)
- Incorrect layer counting in `iced_wgpu`. [#2701](https://github.com/iced-rs/iced/pull/2701)
- `Image` not respecting `viewport` bounds. [#2752](https://github.com/iced-rs/iced/pull/2752)
- Attempting to draw empty meshes in `iced_wgpu`. [#2782](https://github.com/iced-rs/iced/pull/2782)
- Input placeholder text not clearing when IME is activated. [#2785](https://github.com/iced-rs/iced/pull/2785)
- Missing redraw request in `image::Viewer`. [#2795](https://github.com/iced-rs/iced/pull/2795)
- Wrong position of preedit text on scrolled content. [#2798](https://github.com/iced-rs/iced/pull/2798)
- Wrong initial candidate position for IME. [#2793](https://github.com/iced-rs/iced/pull/2793)
- Text spans in IME preedit not being properly cached. [#2806](https://github.com/iced-rs/iced/pull/2806)
- `cpu_brand` in `system_information` always being empty. [#2797](https://github.com/iced-rs/iced/pull/2797)
- Horizontal text alignment being ignored on multi-line text. [#2835](https://github.com/iced-rs/iced/pull/2835)
- Missing redraw request in `mouse_area` when hovered. [#2845](https://github.com/iced-rs/iced/pull/2845)
- `futures-executor` being pulled even when it's not the default executor. [#2841](https://github.com/iced-rs/iced/pull/2841)
- WebGPU failing to boot in Chromium. [#2686](https://github.com/iced-rs/iced/pull/2686)
- Crash when using WebGL due to wrong binding alignment. [#2883](https://github.com/iced-rs/iced/pull/2883)
- Wrong calculation of rows in `grid` widget when evenly distributed. [#2896](https://github.com/iced-rs/iced/pull/2896)
- Panic in `combo_box` due to cleared children during `diff`. [#2905](https://github.com/iced-rs/iced/pull/2905)
- OpenGL backend in `wgpu` interpreting atlas texture as cube map instead of texture array. [#2919](https://github.com/iced-rs/iced/pull/2919)
- `quad` shader blending without pre-multiplication. [#2925](https://github.com/iced-rs/iced/pull/2925)
- Inconsistent primitive pixel snapping in `iced_wgpu`. [#2962](https://github.com/iced-rs/iced/pull/2962)
- Inconsistent `Rectangle::is_within` implementation. [#2966](https://github.com/iced-rs/iced/pull/2966)
- Text damage calculation in `iced_tiny_skia`. [#2964](https://github.com/iced-rs/iced/pull/2964)
- Leftover `title` mention in documentation. [#2972](https://github.com/iced-rs/iced/pull/2972)
- Text bounds cutoff in `iced_wgpu`. [#2975](https://github.com/iced-rs/iced/pull/2975)
- Rectangle vertices not being snapped to the pixel grid independently. [#2768](https://github.com/iced-rs/iced/pull/2768)
- Lints for Rust 1.89. [#3030](https://github.com/iced-rs/iced/pull/3030)
- `debug` builds on macOS Tahoe. [#3056](https://github.com/iced-rs/iced/pull/3056)
- Typo in documentation comment for `filter_map`. [#3052](https://github.com/iced-rs/iced/pull/3052)
- `container::Style` not respecting `crisp` feature. [#3112](https://github.com/iced-rs/iced/pull/3112)
- Incorrect padding in `text_editor`. [#3115](https://github.com/iced-rs/iced/pull/3115)
- Outdated documentation of `Widget::mouse_interaction`. [#2696](https://github.com/iced-rs/iced/pull/2696)
- Incorrect render pass viewport in `custom_shader` example. [#2738](https://github.com/iced-rs/iced/pull/2738)
- Capturing `ButtonReleased` event inside `image::Viewer`. [#2744](https://github.com/iced-rs/iced/pull/2744)
- Incomplete docs for `on_link_click` in `rich_text`. [#2803](https://github.com/iced-rs/iced/pull/2803)
- Stale syntax highlighting on `text_editor` after theme changes. [#2818](https://github.com/iced-rs/iced/pull/2818)
- Wrong background color for `window::Preedit` on translucent themes. [#2819](https://github.com/iced-rs/iced/pull/2819)
- Panic on Chromium-like browsers when canvas initial size is `(0, 0)`. [#2829](https://github.com/iced-rs/iced/pull/2829)
- Outdated dev shell templates. [#2840](https://github.com/iced-rs/iced/pull/2840)
- Missing `derive` feature for `serde` dependency. [#2854](https://github.com/iced-rs/iced/pull/2854)
- `bezier_tool` listed as an example in the `Widget` trait docs. [#2867](https://github.com/iced-rs/iced/pull/2867)
- Incomplete doc comment of `Length::is_fill`. [#2892](https://github.com/iced-rs/iced/pull/2892)
- `scrollable` touch scrolling when out of bounds. [#2906](https://github.com/iced-rs/iced/pull/2906)
- `Element::explain` being hidden by multi-layer widgets. [#2913](https://github.com/iced-rs/iced/pull/2913)
- Missing `Shell::request_redraw` on `component`. [#2930](https://github.com/iced-rs/iced/pull/2930)
- Text clipping in `iced_tiny_skia`. [#2929](https://github.com/iced-rs/iced/pull/2929)
- Inconsistent naming of `tree` parameter in `Widget` trait. [#2950](https://github.com/iced-rs/iced/pull/2950)
- `text_editor` syntax highlighting not updating on paste. [#2947](https://github.com/iced-rs/iced/pull/2947)
- `svg` scaling in `iced_tiny_skia`. [#2954](https://github.com/iced-rs/iced/pull/2954)
- Stroke bounds calculation and clip transformations in `iced_tiny_skia`. [#2882](https://github.com/iced-rs/iced/pull/2882)
- Artifacts when drawing small arcs in `canvas` widget. [#2959](https://github.com/iced-rs/iced/pull/2959)
- Path not being closed in `Path::circle`. [#2979](https://github.com/iced-rs/iced/pull/2979)
- Incorrect transformation of cached primitives in `iced_tiny_skia`. [#2977](https://github.com/iced-rs/iced/pull/2977)
- Panic when drawing empty image in `iced_tiny_skia`. [#2986](https://github.com/iced-rs/iced/pull/2986)
- Incorrect mapping of navigation keys on higher keyboard layers. [#3007](https://github.com/iced-rs/iced/pull/3007)
- `Status` of `svg` widget not being updated on cursor movement. [#3009](https://github.com/iced-rs/iced/pull/3009)
- `hover` widget ignoring events in certain conditions. [#3015](https://github.com/iced-rs/iced/pull/3015)
- OpenGL backend in `iced_wgpu` choosing wrong texture format in `wgpu::image::atlas`. [#3016](https://github.com/iced-rs/iced/pull/3016)
- Missing redraw request in `geometry` example. [#3020](https://github.com/iced-rs/iced/pull/3020)
- Buffer presentation logic in `iced_tiny_skia`. [#3032](https://github.com/iced-rs/iced/pull/3032)
- `combo_box` text not getting cleared on selection. [#3063](https://github.com/iced-rs/iced/pull/3063)
- `wgpu` surface not being reconfigured on `SurfaceError::Lost` or `Outdated`. [#3067](https://github.com/iced-rs/iced/pull/3067)
- Incorrect cursor for `slider` widget on Windows . [#3068](https://github.com/iced-rs/iced/pull/3068)
- `Paragraph::hit_span` returning false positives at end of content. [#3072](https://github.com/iced-rs/iced/pull/3072)
- Incorrect `Limits::loose` documentation. [#3116](https://github.com/iced-rs/iced/pull/3116)
- Missing semicolon triggering a `clippy` lint. [#3118](https://github.com/iced-rs/iced/pull/3118)
- `iced_tiny_skia` using a `Window` instead of a `Display` handle for `softbuffer::Context` creation. [#3090](https://github.com/iced-rs/iced/pull/3090)
- Missing `fn operate` in `tooltip` widget. [#3132](https://github.com/iced-rs/iced/pull/3132)
- Panic when rendering problematic `svg`. [#3123](https://github.com/iced-rs/iced/pull/3123)
- Hotkey combinations not working on non-latin keyboard layouts. [#3134](https://github.com/iced-rs/iced/pull/3134)
- `keyboard::listen` reporting captured key events. [#3136](https://github.com/iced-rs/iced/pull/3136)
### Removed
- `is_over` method in `Overlay` trait. [#2921](https://github.com/iced-rs/iced/pull/2921)
- Short-hand notation support for `color!` macro. [#2592](https://github.com/iced-rs/iced/pull/2592)
- `surface` argument of `Compositor::screenshot`. [#2672](https://github.com/iced-rs/iced/pull/2672)
- `once_cell` dependency. [#2626](https://github.com/iced-rs/iced/pull/2626)
- `winapi` dependency. [#2760](https://github.com/iced-rs/iced/pull/2760)
- `palette` dependency. [#2839](https://github.com/iced-rs/iced/pull/2839)
Many thanks to...
- @edwloef
- @rhysd
- @DKolter
- @pml68
- @andymandias
- @dtzxporter
- @tarkah
- @tvolk131
- @alex-ds13
- @B0ney
- @bbb651
- @JL710
- @kenz-gelsoft
- @mfreeborn
- @mtkennerly
- @watsaig
- @13r0ck
- @airstrike
- @bungoboingo
- @EmmanuelDodoo
- @karolisr
- @Remmirad
- @semiversus
- @Ultrasquid9
- @xosxos
- @Zarthus
- @7h0ma5
- @7sDream
- @Adam-Ladd
- @AMS21
- @Atreyagaurav
- @AustinEvansWX
- @Azorlogh
- @berserkware
- @biglizards
- @boondocklabs
- @bradysimon
- @camspiers
- @chrismanning
- @codewing
- @csmoe
- @davehorner
- @DavidAguilo
- @dcz-self
- @dejang
- @dependabot[bot]
- @EleDiaz
- @ellieplayswow
- @Exidex
- @Fili-pk
- @flakes
- @Gobbel2000
- @GyulyVGC
- @hammerlink
- @hydra
- @ibaryshnikov
- @ids1024
- @iMohmmedSA
- @Integral-Tech
- @inthehack
- @jakobhellermann
- @janTatesa
- @jbirnick
- @jcdickinson
- @Jinderamarak
- @jsatka
- @kbjr
- @kgday
- @kiedtl
- @Konsl
- @Koranir
- @kosayoda
- @Krahos
- @l-const
- @l4l
- @laycookie
- @leo030303
- @Leonie-Theobald
- @libkurisu
- @lmaxyz
- @mariinkys
- @max-privatevoid
- @MichelleGranat
- @misaka10987
- @mytdragon
- @njust
- @nrjais
- @nz366
- @OpenSauce
- @Ottatop
- @Redhawk18
- @rhogenson
- @rizzen-yazston
- @rotmh
- @Rudxain
- @ryco117
- @Seppel3210
- @sgued
- @sopvop
- @T-256
- @tafia
- @thorn132
- @tigerros
- @tsuza
- @vincenthz
- @will-lynas
## [0.13.1] - 2024-09-19
### Added
- Some `From` trait implementations for `text_input::Id`. [#2582](https://github.com/iced-rs/iced/pull/2582)
- Custom `Executor` support for `Application` and `Daemon`. [#2580](https://github.com/iced-rs/iced/pull/2580)
- `rust-version` metadata to `Cargo.toml`. [#2579](https://github.com/iced-rs/iced/pull/2579)
- Widget examples to API reference. [#2587](https://github.com/iced-rs/iced/pull/2587)
### Fixed
- Inverted scrolling direction with trackpad in `scrollable`. [#2583](https://github.com/iced-rs/iced/pull/2583)
- `scrollable` transactions when `on_scroll` is not set. [#2584](https://github.com/iced-rs/iced/pull/2584)
- Incorrect text color styling in `text_editor` widget. [#2586](https://github.com/iced-rs/iced/pull/2586)
Many thanks to...
- @dcampbell24
- @lufte
- @mtkennerly
## [0.13.0] - 2024-09-18
### Added
- Introductory chapters to the [official guide book](https://book.iced.rs/).
- [Pocket guide](https://docs.rs/iced/0.13.0/iced/#the-pocket-guide) in API reference.
- `Program` API. [#2331](https://github.com/iced-rs/iced/pull/2331)
- `Task` API. [#2463](https://github.com/iced-rs/iced/pull/2463)
- `Daemon` API and Shell Runtime Unification. [#2469](https://github.com/iced-rs/iced/pull/2469)
- `rich_text` and `markdown` widgets. [#2508](https://github.com/iced-rs/iced/pull/2508)
- `stack` widget. [#2405](https://github.com/iced-rs/iced/pull/2405)
- `hover` widget. [#2408](https://github.com/iced-rs/iced/pull/2408)
- `row::Wrapping` widget. [#2539](https://github.com/iced-rs/iced/pull/2539)
- `text` macro helper. [#2338](https://github.com/iced-rs/iced/pull/2338)
- `text::Wrapping` support. [#2279](https://github.com/iced-rs/iced/pull/2279)
- Functional widget styling. [#2312](https://github.com/iced-rs/iced/pull/2312)
- Closure-based widget styling. [#2326](https://github.com/iced-rs/iced/pull/2326)
- Class-based Theming. [#2350](https://github.com/iced-rs/iced/pull/2350)
- Type-Driven Renderer Fallback. [#2351](https://github.com/iced-rs/iced/pull/2351)
- Background styling to `rich_text` widget. [#2516](https://github.com/iced-rs/iced/pull/2516)
- Underline support for `rich_text`. [#2526](https://github.com/iced-rs/iced/pull/2526)
- Strikethrough support for `rich_text`. [#2528](https://github.com/iced-rs/iced/pull/2528)
- Abortable `Task`. [#2496](https://github.com/iced-rs/iced/pull/2496)
- `abort_on_drop` to `task::Handle`. [#2503](https://github.com/iced-rs/iced/pull/2503)
- `Ferra` theme. [#2329](https://github.com/iced-rs/iced/pull/2329)
- `auto-detect-theme` feature. [#2343](https://github.com/iced-rs/iced/pull/2343)
- Custom key binding support for `text_editor`. [#2522](https://github.com/iced-rs/iced/pull/2522)
- `align_x` for `text_input` widget. [#2535](https://github.com/iced-rs/iced/pull/2535)
- `center` widget helper. [#2423](https://github.com/iced-rs/iced/pull/2423)
- Rotation support for `image` and `svg` widgets. [#2334](https://github.com/iced-rs/iced/pull/2334)
- Dynamic `opacity` support for `image` and `svg`. [#2424](https://github.com/iced-rs/iced/pull/2424)
- Scroll transactions for `scrollable` widget. [#2401](https://github.com/iced-rs/iced/pull/2401)
- `physical_key` and `modified_key` to `keyboard::Event`. [#2576](https://github.com/iced-rs/iced/pull/2576)
- `fetch_position` command in `window` module. [#2280](https://github.com/iced-rs/iced/pull/2280)
- `filter_method` property for `image::Viewer` widget. [#2324](https://github.com/iced-rs/iced/pull/2324)
- Support for pre-multiplied alpha `wgpu` composite mode. [#2341](https://github.com/iced-rs/iced/pull/2341)
- `text_size` and `line_height` properties for `text_editor` widget. [#2358](https://github.com/iced-rs/iced/pull/2358)
- `is_focused` method for `text_editor::State`. [#2386](https://github.com/iced-rs/iced/pull/2386)
- `canvas::Cache` Grouping. [#2415](https://github.com/iced-rs/iced/pull/2415)
- `ICED_PRESENT_MODE` env var to pick a `wgpu::PresentMode`. [#2428](https://github.com/iced-rs/iced/pull/2428)
- `SpecificWith` variant to `window::Position`. [#2435](https://github.com/iced-rs/iced/pull/2435)
- `scale_factor` field to `window::Screenshot`. [#2449](https://github.com/iced-rs/iced/pull/2449)
- Styling support for `overlay::Menu` of `pick_list` widget. [#2457](https://github.com/iced-rs/iced/pull/2457)
- `window::Id` in `Event` subscriptions. [#2456](https://github.com/iced-rs/iced/pull/2456)
- `FromIterator` implementation for `row` and `column`. [#2460](https://github.com/iced-rs/iced/pull/2460)
- `content_fit` for `image::viewer` widget. [#2330](https://github.com/iced-rs/iced/pull/2330)
- `Display` implementation for `Radians`. [#2446](https://github.com/iced-rs/iced/pull/2446)
- Helper methods for `window::Settings` in `Application`. [#2470](https://github.com/iced-rs/iced/pull/2470)
- `Copy` implementation for `canvas::Fill` and `canvas::Stroke`. [#2475](https://github.com/iced-rs/iced/pull/2475)
- Clarification of `Border` alignment for `Quad`. [#2485](https://github.com/iced-rs/iced/pull/2485)
- "Select All" functionality on `Ctrl+A` to `text_editor`. [#2321](https://github.com/iced-rs/iced/pull/2321)
- `stream::try_channel` helper. [#2497](https://github.com/iced-rs/iced/pull/2497)
- `iced` widget helper to display the iced logo :comet:. [#2498](https://github.com/iced-rs/iced/pull/2498)
- `align_x` and `align_y` helpers to `scrollable`. [#2499](https://github.com/iced-rs/iced/pull/2499)
- Built-in text styles for each `Palette` color. [#2500](https://github.com/iced-rs/iced/pull/2500)
- Embedded `Scrollbar` support for `scrollable`. [#2269](https://github.com/iced-rs/iced/pull/2269)
- `on_press_with` method for `button`. [#2502](https://github.com/iced-rs/iced/pull/2502)
- `resize_events` subscription to `window` module. [#2505](https://github.com/iced-rs/iced/pull/2505)
- `Link` support to `rich_text` widget. [#2512](https://github.com/iced-rs/iced/pull/2512)
- `image` and `svg` support for `canvas` widget. [#2537](https://github.com/iced-rs/iced/pull/2537)
- `Compact` variant for `pane_grid::Controls`. [#2555](https://github.com/iced-rs/iced/pull/2555)
- `image-without-codecs` feature flag. [#2244](https://github.com/iced-rs/iced/pull/2244)
- `container::background` styling helper. [#2261](https://github.com/iced-rs/iced/pull/2261)
- `undecorated_shadow` window setting for Windows. [#2285](https://github.com/iced-rs/iced/pull/2285)
- Tasks for setting mouse passthrough. [#2284](https://github.com/iced-rs/iced/pull/2284)
- `*_maybe` helpers for `text_input` widget. [#2390](https://github.com/iced-rs/iced/pull/2390)
- Wasm support for `download_progress` example. [#2419](https://github.com/iced-rs/iced/pull/2419)
- `scrollable::scroll_by` widget operation. [#2436](https://github.com/iced-rs/iced/pull/2436)
- Enhancements to `slider` widget styling. [#2444](https://github.com/iced-rs/iced/pull/2444)
- `on_scroll` handler to `mouse_area` widget. [#2450](https://github.com/iced-rs/iced/pull/2450)
- `stroke_rectangle` method to `canvas::Frame`. [#2473](https://github.com/iced-rs/iced/pull/2473)
- `override_redirect` setting for X11 windows. [#2476](https://github.com/iced-rs/iced/pull/2476)
- Disabled state support for `toggler` widget. [#2478](https://github.com/iced-rs/iced/pull/2478)
- `Color::parse` helper for parsing color strings. [#2486](https://github.com/iced-rs/iced/pull/2486)
- `rounded_rectangle` method to `canvas::Path`. [#2491](https://github.com/iced-rs/iced/pull/2491)
- `width` method to `text_editor` widget. [#2513](https://github.com/iced-rs/iced/pull/2513)
- `on_open` handler to `combo_box` widget. [#2534](https://github.com/iced-rs/iced/pull/2534)
- Additional `mouse::Interaction` cursors. [#2551](https://github.com/iced-rs/iced/pull/2551)
- Scroll wheel handling in `slider` widget. [#2565](https://github.com/iced-rs/iced/pull/2565)
### Changed
- Use a `StagingBelt` in `iced_wgpu` for regular buffer uploads. [#2357](https://github.com/iced-rs/iced/pull/2357)
- Use generic `Content` in `Text` to avoid reallocation in `fill_text`. [#2360](https://github.com/iced-rs/iced/pull/2360)
- Use `Iterator::size_hint` to initialize `Column` and `Row` capacity. [#2362](https://github.com/iced-rs/iced/pull/2362)
- Specialize `widget::text` helper. [#2363](https://github.com/iced-rs/iced/pull/2363)
- Use built-in `[lints]` table in `Cargo.toml`. [#2377](https://github.com/iced-rs/iced/pull/2377)
- Target `#iced` container by default on Wasm. [#2342](https://github.com/iced-rs/iced/pull/2342)
- Improved architecture for `iced_wgpu` and `iced_tiny_skia`. [#2382](https://github.com/iced-rs/iced/pull/2382)
- Make image `Cache` eviction strategy less aggressive in `iced_wgpu`. [#2403](https://github.com/iced-rs/iced/pull/2403)
- Retain caches in `iced_wgpu` as long as `Rc` values are alive. [#2409](https://github.com/iced-rs/iced/pull/2409)
- Use `bytes` crate for `image` widget. [#2356](https://github.com/iced-rs/iced/pull/2356)
- Update `winit` to `0.30`. [#2427](https://github.com/iced-rs/iced/pull/2427)
- Reuse `glyphon::Pipeline` state in `iced_wgpu`. [#2430](https://github.com/iced-rs/iced/pull/2430)
- Ask for explicit `Length` in `center_*` methods. [#2441](https://github.com/iced-rs/iced/pull/2441)
- Hide internal `Task` constructors. [#2492](https://github.com/iced-rs/iced/pull/2492)
- Hide `Subscription` internals. [#2493](https://github.com/iced-rs/iced/pull/2493)
- Improved `view` ergonomics. [#2504](https://github.com/iced-rs/iced/pull/2504)
- Update `cosmic-text` and `resvg`. [#2416](https://github.com/iced-rs/iced/pull/2416)
- Snap `Quad` lines to the pixel grid in `iced_wgpu`. [#2531](https://github.com/iced-rs/iced/pull/2531)
- Update `web-sys` to `0.3.69`. [#2507](https://github.com/iced-rs/iced/pull/2507)
- Allow disabled `TextInput` to still be interacted with. [#2262](https://github.com/iced-rs/iced/pull/2262)
- Enable horizontal scrolling without shift modifier for `srollable` widget. [#2392](https://github.com/iced-rs/iced/pull/2392)
- Add `mouse::Button` to `mouse::Click`. [#2414](https://github.com/iced-rs/iced/pull/2414)
- Notify `scrollable::Viewport` changes. [#2438](https://github.com/iced-rs/iced/pull/2438)
- Improved documentation of `Component` state management. [#2556](https://github.com/iced-rs/iced/pull/2556)
### Fixed
- Fix `block_on` in `iced_wgpu` hanging Wasm builds. [#2313](https://github.com/iced-rs/iced/pull/2313)
- Private `PaneGrid` style fields. [#2316](https://github.com/iced-rs/iced/pull/2316)
- Some documentation typos. [#2317](https://github.com/iced-rs/iced/pull/2317)
- Blurry input caret with non-integral scaling. [#2320](https://github.com/iced-rs/iced/pull/2320)
- Scrollbar stuck in a `scrollable` under some circumstances. [#2322](https://github.com/iced-rs/iced/pull/2322)
- Broken `wgpu` examples link in issue template. [#2327](https://github.com/iced-rs/iced/pull/2327)
- Empty `wgpu` draw calls in `image` pipeline. [#2344](https://github.com/iced-rs/iced/pull/2344)
- Layout invalidation for `Responsive` widget. [#2345](https://github.com/iced-rs/iced/pull/2345)
- Incorrect shadows on quads with rounded corners. [#2354](https://github.com/iced-rs/iced/pull/2354)
- Empty menu overlay on `combo_box`. [#2364](https://github.com/iced-rs/iced/pull/2364)
- Copy / cut vulnerability in a secure `TextInput`. [#2366](https://github.com/iced-rs/iced/pull/2366)
- Inadequate readability / contrast for built-in themes. [#2376](https://github.com/iced-rs/iced/pull/2376)
- Fix `pkg-config` typo in `DEPENDENCIES.md`. [#2379](https://github.com/iced-rs/iced/pull/2379)
- Unbounded memory consumption by `iced_winit::Proxy`. [#2389](https://github.com/iced-rs/iced/pull/2389)
- Typo in `icon::Error` message. [#2393](https://github.com/iced-rs/iced/pull/2393)
- Nested scrollables capturing all scroll events. [#2397](https://github.com/iced-rs/iced/pull/2397)
- Content capturing scrollbar events in a `scrollable`. [#2406](https://github.com/iced-rs/iced/pull/2406)
- Out of bounds caret and overflow when scrolling in `text_editor`. [#2407](https://github.com/iced-rs/iced/pull/2407)
- Missing `derive(Default)` in overview code snippet. [#2412](https://github.com/iced-rs/iced/pull/2412)
- `image::Viewer` triggering grab from outside the widget. [#2420](https://github.com/iced-rs/iced/pull/2420)
- Different windows fighting over shared `image::Cache`. [#2425](https://github.com/iced-rs/iced/pull/2425)
- Images not aligned to the (logical) pixel grid in `iced_wgpu`. [#2440](https://github.com/iced-rs/iced/pull/2440)
- Incorrect local time in `clock` example under Unix systems. [#2421](https://github.com/iced-rs/iced/pull/2421)
- `⌘ + ←` and `⌘ + →` behavior for `text_input` on macOS. [#2315](https://github.com/iced-rs/iced/pull/2315)
- Wayland packages in `DEPENDENCIES.md`. [#2465](https://github.com/iced-rs/iced/pull/2465)
- Typo in documentation. [#2487](https://github.com/iced-rs/iced/pull/2487)
- Extraneous comment in `scrollable` module. [#2488](https://github.com/iced-rs/iced/pull/2488)
- Top layer in `hover` widget hiding when focused. [#2544](https://github.com/iced-rs/iced/pull/2544)
- Out of bounds text in `text_editor` widget. [#2536](https://github.com/iced-rs/iced/pull/2536)
- Segfault on Wayland when closing the app. [#2547](https://github.com/iced-rs/iced/pull/2547)
- `lazy` feature flag sometimes not present in documentation. [#2289](https://github.com/iced-rs/iced/pull/2289)
- Border of `progress_bar` widget being rendered below the active bar. [#2443](https://github.com/iced-rs/iced/pull/2443)
- `radii` typo in `iced_wgpu` shader. [#2484](https://github.com/iced-rs/iced/pull/2484)
- Incorrect priority of `Binding::Delete` in `text_editor`. [#2514](https://github.com/iced-rs/iced/pull/2514)
- Division by zero in `multitouch` example. [#2517](https://github.com/iced-rs/iced/pull/2517)
- Invisible text in `svg` widget. [#2560](https://github.com/iced-rs/iced/pull/2560)
- `wasm32` deployments not displaying anything. [#2574](https://github.com/iced-rs/iced/pull/2574)
- Unnecessary COM initialization on Windows. [#2578](https://github.com/iced-rs/iced/pull/2578)
### Removed
- Unnecessary struct from `download_progress` example. [#2380](https://github.com/iced-rs/iced/pull/2380)
- Out of date comment from `custom_widget` example. [#2549](https://github.com/iced-rs/iced/pull/2549)
- `Clone` bound for `graphics::Cache::clear`. [#2575](https://github.com/iced-rs/iced/pull/2575)
Many thanks to...
- @Aaron-McGuire
- @airstrike
- @alex-ds13
- @alliby
- @Andrew-Schwartz
- @ayeniswe
- @B0ney
- @Bajix
- @blazra
- @Brady-Simon
- @breynard0
- @bungoboingo
- @casperstorm
- @Davidster
- @derezzedex
- @DKolter
- @dtoniolo
- @dtzxporter
- @fenhl
- @Gigas002
- @gintsgints
- @henrispriet
- @IsaacMarovitz
- @ivanceras
- @Jinderamarak
- @JL710
- @jquesada2016
- @JustSoup312
- @kiedtl
- @kmoon2437
- @Koranir
- @lufte
- @LuisLiraC
- @m4rch3n1ng
- @meithecatte
- @mtkennerly
- @myuujiku
- @n1ght-hunter
- @nrjais
- @PgBiel
- @PolyMeilex
- @rustrover
- @ryankopf
- @saihaze
- @shartrec
- @skygrango
- @SolidStateDj
- @sundaram123krishnan
- @tarkah
- @vladh
- @WailAbou
- @wiiznokes
- @woelfman
- @Zaubentrucker
## [0.12.1] - 2024-02-22
### Added
- `extend` and `from_vec` methods for `Column` and `Row`. [#2264](https://github.com/iced-rs/iced/pull/2264)
- `PartialOrd`, `Ord`, and `Hash` implementations for `keyboard::Modifiers`. [#2270](https://github.com/iced-rs/iced/pull/2270)
- `clipboard` module in `advanced` module. [#2272](https://github.com/iced-rs/iced/pull/2272)
- Default `disabled` style for `checkbox` and `hovered` style for `Svg`. [#2273](https://github.com/iced-rs/iced/pull/2273)
- `From<u16>` and `From<i32>` implementations for `border::Radius`. [#2274](https://github.com/iced-rs/iced/pull/2274)
- `size_hint` method for `Component` trait. [#2275](https://github.com/iced-rs/iced/pull/2275)
### Fixed
- Black images when using OpenGL backend in `iced_wgpu`. [#2259](https://github.com/iced-rs/iced/pull/2259)
- Documentation for `horizontal_space` and `vertical_space` helpers. [#2265](https://github.com/iced-rs/iced/pull/2265)
- WebAssembly platform. [#2271](https://github.com/iced-rs/iced/pull/2271)
- Decouple `Key` from `keyboard::Modifiers` and apply them to `text` in `KeyboardInput`. [#2238](https://github.com/iced-rs/iced/pull/2238)
- Text insertion not being prioritized in `TextInput` and `TextEditor`. [#2278](https://github.com/iced-rs/iced/pull/2278)
- `iced_tiny_skia` clipping line strokes. [#2282](https://github.com/iced-rs/iced/pull/2282)
Many thanks to...
- @PolyMeilex
- @rizzen-yazston
- @wash2
## [0.12.0] - 2024-02-15
### Added
- Multi-window support. [#1964](https://github.com/iced-rs/iced/pull/1964)
- `TextEditor` widget (or multi-line text input). [#2123](https://github.com/iced-rs/iced/pull/2123)
- `Shader` widget. [#2085](https://github.com/iced-rs/iced/pull/2085)
- Shadows. [#1882](https://github.com/iced-rs/iced/pull/1882)
- Vectorial text for `Canvas`. [#2204](https://github.com/iced-rs/iced/pull/2204)
- Layout consistency. [#2192](https://github.com/iced-rs/iced/pull/2192)
- Explicit text caching. [#2058](https://github.com/iced-rs/iced/pull/2058)
- Gradients in Oklab color space. [#2055](https://github.com/iced-rs/iced/pull/2055)
- `Themer` widget. [#2209](https://github.com/iced-rs/iced/pull/2209)
- `Transform` primitive. [#2120](https://github.com/iced-rs/iced/pull/2120)
- Cut functionality for `TextEditor`. [#2215](https://github.com/iced-rs/iced/pull/2215)
- Primary clipboard support. [#2240](https://github.com/iced-rs/iced/pull/2240)
- Disabled state for `Checkbox`. [#2109](https://github.com/iced-rs/iced/pull/2109)
- `skip_taskbar` window setting for Windows. [#2211](https://github.com/iced-rs/iced/pull/2211)
- `fetch_maximized` and `fetch_minimized` commands in `window`. [#2189](https://github.com/iced-rs/iced/pull/2189)
- `run_with_handle` command in `window`. [#2200](https://github.com/iced-rs/iced/pull/2200)
- `show_system_menu` command in `window`. [#2243](https://github.com/iced-rs/iced/pull/2243)
- `text_shaping` method for `Tooltip`. [#2172](https://github.com/iced-rs/iced/pull/2172)
- `interaction` method for `MouseArea`. [#2207](https://github.com/iced-rs/iced/pull/2207)
- `hovered` styling for `Svg` widget. [#2163](https://github.com/iced-rs/iced/pull/2163)
- `height` method for `TextEditor`. [#2221](https://github.com/iced-rs/iced/pull/2221)
- Customizable style for `TextEditor`. [#2159](https://github.com/iced-rs/iced/pull/2159)
- Customizable style for `QRCode`. [#2229](https://github.com/iced-rs/iced/pull/2229)
- Border width styling for `Toggler`. [#2219](https://github.com/iced-rs/iced/pull/2219)
- `RawText` variant for `Primitive` in `iced_graphics`. [#2158](https://github.com/iced-rs/iced/pull/2158)
- `Stream` support for `Command`. [#2150](https://github.com/iced-rs/iced/pull/2150)
- Access to bounds/content bounds from a `Scrollable` viewport. [#2072](https://github.com/iced-rs/iced/pull/2072)
- `Frame::scale_nonuniform` method. [#2070](https://github.com/iced-rs/iced/pull/2070)
- `theme::Custom::with_fn` to generate completely custom themes. [#2067](https://github.com/iced-rs/iced/pull/2067)
- `style` attribute for `Font`. [#2041](https://github.com/iced-rs/iced/pull/2041)
- Texture filtering options for `Image`. [#1894](https://github.com/iced-rs/iced/pull/1894)
- `default` and `shift_step` methods for `slider` widgets. [#2100](https://github.com/iced-rs/iced/pull/2100)
- `Custom` variant to `command::Action`. [#2146](https://github.com/iced-rs/iced/pull/2146)
- Mouse movement events for `MouseArea`. [#2147](https://github.com/iced-rs/iced/pull/2147)
- Dracula, Nord, Solarized, and Gruvbox variants for `Theme`. [#2170](https://github.com/iced-rs/iced/pull/2170)
- Catppuccin, Tokyo Night, Kanagawa, Moonfly, Nightfly and Oxocarbon variants for `Theme`. [#2233](https://github.com/iced-rs/iced/pull/2233)
- `From<T> where T: Into<PathBuf>` for `svg::Handle`. [#2235](https://github.com/iced-rs/iced/pull/2235)
- `on_open` and `on_close` handlers for `PickList`. [#2174](https://github.com/iced-rs/iced/pull/2174)
- Support for generic `Element` in `Tooltip`. [#2228](https://github.com/iced-rs/iced/pull/2228)
- Container and `gap` styling for `Scrollable`. [#2239](https://github.com/iced-rs/iced/pull/2239)
- Use `Borrow` for both `options` and `selected` in PickList. [#2251](https://github.com/iced-rs/iced/pull/2251)
- `clip` property for `Container`, `Column`, `Row`, and `Button`. #[2252](https://github.com/iced-rs/iced/pull/2252)
### Changed
- Enable WebGPU backend in `wgpu` by default instead of WebGL. [#2068](https://github.com/iced-rs/iced/pull/2068)
- Update `glyphon` to `0.4`. [#2203](https://github.com/iced-rs/iced/pull/2203)
- Require `Send` on stored pipelines. [#2197](https://github.com/iced-rs/iced/pull/2197)
- Update `wgpu` to `0.19`, `glyphon` to `0.5`, `softbuffer` to `0.4`, `window-clipboard` to `0.4`, and `raw-window-handle` to `0.6`. [#2191](https://github.com/iced-rs/iced/pull/2191)
- Update `winit` to `0.29`. [#2169](https://github.com/iced-rs/iced/pull/2169)
- Provide actual bounds to `Shader` primitives. [#2149](https://github.com/iced-rs/iced/pull/2149)
- Deny warnings in `test` workflow. [#2135](https://github.com/iced-rs/iced/pull/2135)
- Update `wgpu` to `0.18` and `cosmic-text` to `0.10`. [#2122](https://github.com/iced-rs/iced/pull/2122)
- Compute vertex positions in the shader. [#2099](https://github.com/iced-rs/iced/pull/2099)
- Migrate twox-hash -> xxhash-rust and switch to Xxh3 for better performance. [#2080](https://github.com/iced-rs/iced/pull/2080)
- Add `keyboard` subscriptions and rename `subscription::events` to `event::listen`. [#2073](https://github.com/iced-rs/iced/pull/2073)
- Use workspace dependencies and package inheritance. [#2069](https://github.com/iced-rs/iced/pull/2069)
- Update `wgpu` to `0.17`. [#2065](https://github.com/iced-rs/iced/pull/2065)
- Support automatic style type casting for `Button`. [#2046](https://github.com/iced-rs/iced/pull/2046)
- Make `with_clip` and `with_save` in `Frame` able to return the data of the provided closure. [#1994](https://github.com/iced-rs/iced/pull/1994)
- Use `Radians` for angle fields in `Arc` and `arc::Elliptical`. [#2027](https://github.com/iced-rs/iced/pull/2027)
- Assert dimensions of quads are normal in `iced_tiny_skia`. [#2082](https://github.com/iced-rs/iced/pull/2082)
- Remove `position` from `overlay::Element`. [#2226](https://github.com/iced-rs/iced/pull/2226)
- Add a capacity limit to the `GlyphCache` in `iced_tiny_skia`. [#2210](https://github.com/iced-rs/iced/pull/2210)
- Use pointer equality to speed up `PartialEq` implementation of `image::Bytes`. [#2220](https://github.com/iced-rs/iced/pull/2220)
- Update `bitflags`, `glam`, `kurbo`, `ouroboros`, `qrcode`, and `sysinfo` dependencies. [#2227](https://github.com/iced-rs/iced/pull/2227)
- Improve some widget ergonomics. [#2253](https://github.com/iced-rs/iced/pull/2253)
### Fixed
- Clipping of `TextInput` selection. [#2199](https://github.com/iced-rs/iced/pull/2199)
- `Paragraph::grapheme_position` when ligatures are present. [#2196](https://github.com/iced-rs/iced/pull/2196)
- Docs to include missing feature tags. [#2184](https://github.com/iced-rs/iced/pull/2184)
- `PaneGrid` click interaction on the top edge. [#2168](https://github.com/iced-rs/iced/pull/2168)
- `iced_wgpu` not rendering text in SVGs. [#2161](https://github.com/iced-rs/iced/pull/2161)
- Text clipping. [#2154](https://github.com/iced-rs/iced/pull/2154)
- Text transparency in `iced_tiny_skia`. [#2250](https://github.com/iced-rs/iced/pull/2250)
- Layout invalidation when `Tooltip` changes `overlay`. [#2143](https://github.com/iced-rs/iced/pull/2143)
- `Overlay` composition. [#2142](https://github.com/iced-rs/iced/pull/2142)
- Incorrect GIF for the `progress_bar` example. [#2141](https://github.com/iced-rs/iced/pull/2141)
- Standalone compilation of `iced_renderer` crate. [#2134](https://github.com/iced-rs/iced/pull/2134)
- Maximize window button enabled when `Settings::resizable` is `false`. [#2124](https://github.com/iced-rs/iced/pull/2124)
- Width of horizontal scrollbar in `Scrollable`. [#2084](https://github.com/iced-rs/iced/pull/2084)
- `ComboBox` widget panic on wasm. [#2078](https://github.com/iced-rs/iced/pull/2078)
- Majority of unresolved documentation links. [#2077](https://github.com/iced-rs/iced/pull/2077)
- Web examples not running. [#2076](https://github.com/iced-rs/iced/pull/2076)
- GIFs and video examples broken. [#2074](https://github.com/iced-rs/iced/pull/2074)
- `@interpolate(flat)` not used as attribute. [#2071](https://github.com/iced-rs/iced/pull/2071)
- `Checkbox` and `Toggler` hidden behind scrollbar in `styling` example. [#2062](https://github.com/iced-rs/iced/pull/2062)
- Absolute `LineHeight` sometimes being `0`. [#2059](https://github.com/iced-rs/iced/pull/2059)
- Paste while holding ALT. [#2006](https://github.com/iced-rs/iced/pull/2006)
- `Command<T>::perform` to return a `Command<T>`. [#2000](https://github.com/iced-rs/iced/pull/2000)
- `convert_text` not called on `Svg` trees. [#1908](https://github.com/iced-rs/iced/pull/1908)
- Unused `backend.rs` file in renderer crate. [#2182](https://github.com/iced-rs/iced/pull/2182)
- Some `clippy::pedantic` lints. [#2096](https://github.com/iced-rs/iced/pull/2096)
- Some minor clippy fixes. [#2092](https://github.com/iced-rs/iced/pull/2092)
- Clippy docs keyword quoting. [#2091](https://github.com/iced-rs/iced/pull/2091)
- Clippy map transformations. [#2090](https://github.com/iced-rs/iced/pull/2090)
- Inline format args for ease of reading. [#2089](https://github.com/iced-rs/iced/pull/2089)
- Stuck scrolling in `Scrollable` with touch events. [#1940](https://github.com/iced-rs/iced/pull/1940)
- Incorrect unit in `system::Information`. [#2223](https://github.com/iced-rs/iced/pull/2223)
- `size_hint` not being called from `element::Map`. [#2224](https://github.com/iced-rs/iced/pull/2224)
- `size_hint` not being called from `element::Explain`. [#2225](https://github.com/iced-rs/iced/pull/2225)
- Slow touch scrolling for `TextEditor` widget. [#2140](https://github.com/iced-rs/iced/pull/2140)
- `Subscription::map` using unreliable function pointer hash to identify mappers. [#2237](https://github.com/iced-rs/iced/pull/2237)
- Missing feature flag docs for `time::every`. [#2188](https://github.com/iced-rs/iced/pull/2188)
- Event loop not being resumed on Windows while resizing. [#2214](https://github.com/iced-rs/iced/pull/2214)
- Alpha mode misconfiguration in `iced_wgpu`. [#2231](https://github.com/iced-rs/iced/pull/2231)
- Outdated documentation leading to a dead link. [#2232](https://github.com/iced-rs/iced/pull/2232)
Many thanks to...
- @akshayr-mecha
- @alec-deason
- @arslee07
- @AustinMReppert
- @avsaase
- @blazra
- @brianch
- @bungoboingo
- @Calastrophe
- @casperstorm
- @cfrenette
- @clarkmoody
- @Davidster
- @Decodetalkers
- @derezzedex
- @DoomDuck
- @dtzxporter
- @Dworv
- @fogarecious
- @GyulyVGC
- @hicaru
- @ids1024
- @Imberflur
- @jhannyj
- @jhff
- @jim-ec
- @joshuamegnauth54
- @jpttrssn
- @julianbraha
- @Koranir
- @lufte
- @matze
- @MichalLebeda
- @MoSal
- @MrAntix
- @nicksenger
- @Nisatru
- @nyurik
- @Remmirad
- @ripytide
- @snaggen
- @Tahinli
- @tarkah
- @tzemanovic
- @varbhat
- @VAWVAW
- @william-shere
- @wyatt-herkamp
## [0.10.0] - 2023-07-28
### Added
- Text shaping, font fallback, and `iced_wgpu` overhaul. [#1697](https://github.com/iced-rs/iced/pull/1697)
- Software renderer, runtime renderer fallback, and core consolidation. [#1748](https://github.com/iced-rs/iced/pull/1748)
- Incremental rendering for `iced_tiny_skia`. [#1811](https://github.com/iced-rs/iced/pull/1811)
- Configurable `LineHeight` support for text widgets. [#1828](https://github.com/iced-rs/iced/pull/1828)
- `text::Shaping` strategy selection. [#1822](https://github.com/iced-rs/iced/pull/1822)
- Subpixel glyph positioning and layout linearity. [#1921](https://github.com/iced-rs/iced/pull/1921)
- Background gradients. [#1846](https://github.com/iced-rs/iced/pull/1846)
- Offscreen rendering and screenshots. [#1845](https://github.com/iced-rs/iced/pull/1845)
- Nested overlays. [#1719](https://github.com/iced-rs/iced/pull/1719)
- Cursor availability. [#1904](https://github.com/iced-rs/iced/pull/1904)
- Backend-specific primitives. [#1932](https://github.com/iced-rs/iced/pull/1932)
- `ComboBox` widget. [#1954](https://github.com/iced-rs/iced/pull/1954)
- `web-colors` feature flag to enable "sRGB linear" blending. [#1888](https://github.com/iced-rs/iced/pull/1888)
- `PaneGrid` logic to split panes by drag & drop. [#1856](https://github.com/iced-rs/iced/pull/1856)
- `PaneGrid` logic to drag & drop panes to the edges. [#1865](https://github.com/iced-rs/iced/pull/1865)
- Type-safe `Scrollable` direction. [#1878](https://github.com/iced-rs/iced/pull/1878)
- `Scrollable` alignment. [#1912](https://github.com/iced-rs/iced/pull/1912)
- Helpers to change viewport alignment of a `Scrollable`. [#1953](https://github.com/iced-rs/iced/pull/1953)
- `scroll_to` widget operation. [#1796](https://github.com/iced-rs/iced/pull/1796)
- `scroll_to` helper. [#1804](https://github.com/iced-rs/iced/pull/1804)
- `visible_bounds` widget operation for `Container`. [#1971](https://github.com/iced-rs/iced/pull/1971)
- Command to fetch window size. [#1927](https://github.com/iced-rs/iced/pull/1927)
- Conversion support from `Fn` trait to custom theme. [#1861](https://github.com/iced-rs/iced/pull/1861)
- Configurable border radii on relevant widgets. [#1869](https://github.com/iced-rs/iced/pull/1869)
- `border_radius` styling to `Slider` rail. [#1892](https://github.com/iced-rs/iced/pull/1892)
- `application_id` in `PlatformSpecific` settings for Linux. [#1963](https://github.com/iced-rs/iced/pull/1963)
- Aliased entries in `text::Cache`. [#1934](https://github.com/iced-rs/iced/pull/1934)
- Text cache modes. [#1938](https://github.com/iced-rs/iced/pull/1938)
- `operate` method for `program::State`. [#1913](https://github.com/iced-rs/iced/pull/1913)
- `Viewport` argument to `Widget::on_event`. [#1956](https://github.com/iced-rs/iced/pull/1956)
- Nix instructions to `DEPENDENCIES.md`. [#1859](https://github.com/iced-rs/iced/pull/1859)
- Loading spinners example. [#1902](https://github.com/iced-rs/iced/pull/1902)
- Workflow that verifies `CHANGELOG` is always up-to-date. [#1970](https://github.com/iced-rs/iced/pull/1970)
- Outdated mentions of `iced_native` in `README`. [#1979](https://github.com/iced-rs/iced/pull/1979)
### Changed
- Updated `wgpu` to `0.16`. [#1807](https://github.com/iced-rs/iced/pull/1807)
- Updated `glam` to `0.24`. [#1840](https://github.com/iced-rs/iced/pull/1840)
- Updated `winit` to `0.28`. [#1738](https://github.com/iced-rs/iced/pull/1738)
- Updated `palette` to `0.7`. [#1875](https://github.com/iced-rs/iced/pull/1875)
- Updated `ouroboros` to `0.17`. [#1925](https://github.com/iced-rs/iced/pull/1925)
- Updated `resvg` to `0.35` and `tiny-skia` to `0.10`. [#1907](https://github.com/iced-rs/iced/pull/1907)
- Changed `mouse::Button::Other` to take `u16` instead of `u8`. [#1797](https://github.com/iced-rs/iced/pull/1797)
- Changed `subscription::channel` to take a `FnOnce` non-`Sync` closure. [#1917](https://github.com/iced-rs/iced/pull/1917)
- Removed `Copy` requirement for text `StyleSheet::Style`. [#1814](https://github.com/iced-rs/iced/pull/1814)
- Removed `min_width` of 1 from scrollbar & scroller for `Scrollable`. [#1844](https://github.com/iced-rs/iced/pull/1844)
- Used `Widget::overlay` for `Tooltip`. [#1692](https://github.com/iced-rs/iced/pull/1692)
### Fixed
- `Responsive` layout not invalidated when shell layout is invalidated. [#1799](https://github.com/iced-rs/iced/pull/1799)
- `Responsive` layout not invalidated when size changes without a `view` call. [#1890](https://github.com/iced-rs/iced/pull/1890)
- Broken link in `ROADMAP.md`. [#1815](https://github.com/iced-rs/iced/pull/1815)
- `bounds` of selected option background in `Menu`. [#1831](https://github.com/iced-rs/iced/pull/1831)
- Border radius logic in `iced_tiny_skia`. [#1842](https://github.com/iced-rs/iced/pull/1842)
- `Svg` filtered color not premultiplied. [#1841](https://github.com/iced-rs/iced/pull/1841)
- Race condition when growing an `image::Atlas`. [#1847](https://github.com/iced-rs/iced/pull/1847)
- Clearing damaged surface with background color in `iced_tiny_skia`. [#1854](https://github.com/iced-rs/iced/pull/1854)
- Private gradient pack logic for `iced_graphics::Gradient`. [#1871](https://github.com/iced-rs/iced/pull/1871)
- Unordered quads of different background types. [#1873](https://github.com/iced-rs/iced/pull/1873)
- Panic in `glyphon` when glyphs are missing. [#1883](https://github.com/iced-rs/iced/pull/1883)
- Empty scissor rectangle in `iced_wgpu::triangle` pipeline. [#1893](https://github.com/iced-rs/iced/pull/1893)
- `Scrollable` scrolling when mouse not over it. [#1910](https://github.com/iced-rs/iced/pull/1910)
- `translation` in `layout` of `Nested` overlay. [#1924](https://github.com/iced-rs/iced/pull/1924)
- Build when using vendored dependencies. [#1928](https://github.com/iced-rs/iced/pull/1928)
- Minor grammar mistake. [#1931](https://github.com/iced-rs/iced/pull/1931)
- Quad rendering including border only inside of the bounds. [#1843](https://github.com/iced-rs/iced/pull/1843)
- Redraw requests not being forwarded for `Component` overlays. [#1949](https://github.com/iced-rs/iced/pull/1949)
- Blinking input cursor when window loses focus. [#1955](https://github.com/iced-rs/iced/pull/1955)
- `BorderRadius` not exposed in root crate. [#1972](https://github.com/iced-rs/iced/pull/1972)
- Outdated `ROADMAP`. [#1958](https://github.com/iced-rs/iced/pull/1958)
### Patched
- Keybinds to cycle `ComboBox` options. [#1991](https://github.com/iced-rs/iced/pull/1991)
- `Tooltip` overlay position inside `Scrollable`. [#1978](https://github.com/iced-rs/iced/pull/1978)
- `iced_wgpu` freezing on empty layers. [#1996](https://github.com/iced-rs/iced/pull/1996)
- `image::Viewer` reacting to any scroll event. [#1998](https://github.com/iced-rs/iced/pull/1998)
- `TextInput` pasting text when `Alt` key is pressed. [#2006](https://github.com/iced-rs/iced/pull/2006)
- Broken link to old `iced_native` crate in `README`. [#2024](https://github.com/iced-rs/iced/pull/2024)
- `Rectangle::contains` being non-exclusive. [#2017](https://github.com/iced-rs/iced/pull/2017)
- Documentation for `Arc` and `arc::Elliptical`. [#2008](https://github.com/iced-rs/iced/pull/2008)
Many thanks to...
- @a1phyr
- @alec-deason
- @AustinMReppert
- @bbb651
- @bungoboingo
- @casperstorm
- @clarkmoody
- @Davidster
- @Drakulix
- @genusistimelord
- @GyulyVGC
- @ids1024
- @jhff
- @JonathanLindsey
- @kr105
- @marienz
- @malramsay64
- @nicksenger
- @nicoburns
- @NyxAlexandra
- @Redhawk18
- @RGBCube
- @rs017991
- @tarkah
- @thunderstorm010
- @ua-kxie
- @wash2
- @wiiznokes
## [0.9.0] - 2023-04-13
### Added
- `MouseArea` widget. [#1594](https://github.com/iced-rs/iced/pull/1594)
- `channel` helper in `subscription`. [#1786](https://github.com/iced-rs/iced/pull/1786)
- Configurable `width` for `Scrollable`. [#1749](https://github.com/iced-rs/iced/pull/1749)
- Support for disabled `TextInput`. [#1744](https://github.com/iced-rs/iced/pull/1744)
- Platform-specific window settings. [#1730](https://github.com/iced-rs/iced/pull/1730)
- Left and right colors for sliders. [#1643](https://github.com/iced-rs/iced/pull/1643)
- Icon for `TextInput`. [#1702](https://github.com/iced-rs/iced/pull/1702)
- Mouse over scrollbar flag for `scrollable::StyleSheet`. [#1669](https://github.com/iced-rs/iced/pull/1669)
- Better example for `Radio`. [#1762](https://github.com/iced-rs/iced/pull/1762)
### Changed
- `wgpu` has been updated to `0.15` in `iced_wgpu`. [#1789](https://github.com/iced-rs/iced/pull/1789)
- `resvg` has been updated to `0.29` in `iced_graphics`. [#1733](https://github.com/iced-rs/iced/pull/1733)
- `subscription::run` now takes a function pointer. [#1723](https://github.com/iced-rs/iced/pull/1723)
### Fixed
- Redundant `on_scroll` messages for `Scrollable`. [#1788](https://github.com/iced-rs/iced/pull/1788)
- Outdated items in `ROADMAP.md` [#1782](https://github.com/iced-rs/iced/pull/1782)
- Colons in shader labels causing compilation issues in `iced_wgpu`. [#1779](https://github.com/iced-rs/iced/pull/1779)
- Re-expose winit features for window servers in Linux. [#1777](https://github.com/iced-rs/iced/pull/1777)
- Replacement of application node in Wasm. [#1765](https://github.com/iced-rs/iced/pull/1765)
- `clippy` lints for Rust 1.68. [#1755](https://github.com/iced-rs/iced/pull/1755)
- Unnecessary `Component` rebuilds. [#1754](https://github.com/iced-rs/iced/pull/1754)
- Incorrect package name in checkbox example docs. [#1750](https://github.com/iced-rs/iced/pull/1750)
- Fullscreen only working on primary monitor. [#1742](https://github.com/iced-rs/iced/pull/1742)
- `Padding::fit` on irregular values for an axis. [#1734](https://github.com/iced-rs/iced/pull/1734)
- `Debug` implementation of `Font` displaying its bytes. [#1731](https://github.com/iced-rs/iced/pull/1731)
- Sliders bleeding over their rail. [#1721](https://github.com/iced-rs/iced/pull/1721)
### Removed
- `Fill` variant for `Alignment`. [#1735](https://github.com/iced-rs/iced/pull/1735)
Many thanks to...
- @ahoneybun
- @bq-wrongway
- @bungoboingo
- @casperstorm
- @Davidster
- @ElhamAryanpur
- @FinnPerry
- @GyulyVGC
- @JungleTryne
- @lupd
- @mmstick
- @nicksenger
- @Night-Hunter-NF
- @tarkah
- @traxys
- @Xaeroxe
## [0.8.0] - 2023-02-18
### Added
- Generic pixel units. [#1711](https://github.com/iced-rs/iced/pull/1711)
- `custom` method to `widget::Operation` trait. [#1649](https://github.com/iced-rs/iced/pull/1649)
- `Group` overlay. [#1655](https://github.com/iced-rs/iced/pull/1655)
- Standalone `draw` helper for `image`. [#1682](https://github.com/iced-rs/iced/pull/1682)
- Dynamic `pick_list::Handle`. [#1675](https://github.com/iced-rs/iced/pull/1675)
- `Id` support for `Container`. [#1695](https://github.com/iced-rs/iced/pull/1695)
- Custom `Checkbox` icon support. [#1707](https://github.com/iced-rs/iced/pull/1707)
- `window` action to change always on top setting. [#1587](https://github.com/iced-rs/iced/pull/1587)
- `window` action to fetch its unique identifier. [#1589](https://github.com/iced-rs/iced/pull/1589)
### Changed
- Annotated `Command` and `Subscription` with `#[must_use]`. [#1676](https://github.com/iced-rs/iced/pull/1676)
- Replaced `Fn` with `FnOnce` in `canvas::Cache::draw`. [#1694](https://github.com/iced-rs/iced/pull/1694)
- Used `[default]` on enum in `game_of_life` example. [#1660](https://github.com/iced-rs/iced/pull/1660)
- Made `QRCode` hide when data is empty in `qr_code` example. [#1665](https://github.com/iced-rs/iced/pull/1665)
- Replaced `Cow` with `Bytes` in `image` to accept any kind of data that implements `AsRef<[u8]>`. [#1551](https://github.com/iced-rs/iced/pull/1551)
### Fixed
- Blank window on application startup. [#1698](https://github.com/iced-rs/iced/pull/1698)
- Off-by-one pixel error on `pick_list` width. [#1679](https://github.com/iced-rs/iced/pull/1679)
- Missing `text_input` implementation in `operation::Map`. [#1678](https://github.com/iced-rs/iced/pull/1678)
- Widget-driven animations for `Component`. [#1685](https://github.com/iced-rs/iced/pull/1685)
- Layout translation in `overlay::Group`. [#1686](https://github.com/iced-rs/iced/pull/1686)
- Missing `is_over` implementation for overlays of `iced_lazy` widgets. [#1699](https://github.com/iced-rs/iced/pull/1699)
- Panic when overlay event processing removes overlay. [#1700](https://github.com/iced-rs/iced/pull/1700)
- Panic when using operations with components in certain cases. [#1701](https://github.com/iced-rs/iced/pull/1701)
- `TextInput` width when using padding. [#1706](https://github.com/iced-rs/iced/pull/1706)
- `iced_glow` crash on some hardware. [#1703](https://github.com/iced-rs/iced/pull/1703)
- Height of `overlay::Menu`. [#1714](https://github.com/iced-rs/iced/pull/1714)
- Size of images in `README`. [#1659](https://github.com/iced-rs/iced/pull/1659)
- New `clippy` lints. [#1681](https://github.com/iced-rs/iced/pull/1681)
Many thanks to...
- @13r0ck
- @bungoboingo
- @casperstorm
- @frey
- @greatest-ape
- @ids1024
- @Jedsek
- @nicksenger
- @Night-Hunter-NF
- @sdroege
- @Sn-Kinos
- @sushigiri
- @tarkah
## [0.7.0] - 2023-01-14
### Added
- Widget-driven animations. [#1647](https://github.com/iced-rs/iced/pull/1647)
- Multidirectional scrolling support for `Scrollable`. [#1550](https://github.com/iced-rs/iced/pull/1550)
- `VerticalSlider` widget. [#1596](https://github.com/iced-rs/iced/pull/1596)
- `Shift+Click` text selection support in `TextInput`. [#1622](https://github.com/iced-rs/iced/pull/1622)
- Profiling support with the `chrome-trace` feature. [#1565](https://github.com/iced-rs/iced/pull/1565)
- Customization of the handle of a `PickList`. [#1562](https://github.com/iced-rs/iced/pull/1562)
- `window` action to request user attention. [#1584](https://github.com/iced-rs/iced/pull/1584)
- `window` action to gain focus. [#1585](https://github.com/iced-rs/iced/pull/1585)
- `window` action to toggle decorations. [#1588](https://github.com/iced-rs/iced/pull/1588)
- `Copy` implementation for `gradient::Location`. [#1636](https://github.com/iced-rs/iced/pull/1636)
### Changed
- Replaced `Application::should_exit` with a `window::close` action. [#1606](https://github.com/iced-rs/iced/pull/1606)
- Made `focusable::Count` fields public. [#1635](https://github.com/iced-rs/iced/pull/1635)
- Added `Dependency` argument to the closure of `Lazy`. [#1646](https://github.com/iced-rs/iced/pull/1646)
- Switched arguments order of `Toggler::new` for consistency. [#1616](https://github.com/iced-rs/iced/pull/1616)
- Switched arguments order of `Checkbox::new` for consistency. [#1633](https://github.com/iced-rs/iced/pull/1633)
### Fixed
- Compilation error in `iced_glow` when the `image` feature is enabled but `svg` isn't. [#1593](https://github.com/iced-rs/iced/pull/1593)
- Widget operations for `Responsive` widget. [#1615](https://github.com/iced-rs/iced/pull/1615)
- Overlay placement for `Responsive`. [#1638](https://github.com/iced-rs/iced/pull/1638)
- `overlay` implementation for `Lazy`. [#1644](https://github.com/iced-rs/iced/pull/1644)
- Minor typo in documentation. [#1624](https://github.com/iced-rs/iced/pull/1624)
- Links in documentation. [#1634](https://github.com/iced-rs/iced/pull/1634)
- Missing comment in documentation. [#1648](https://github.com/iced-rs/iced/pull/1648)
Many thanks to...
- @13r0ck
- @Araxeus
- @ben-wallis
- @bungoboingo
- @casperstorm
- @nicksenger
- @Night-Hunter-NF
- @rpitasky
- @rs017991
- @tarkah
- @wiktor-k
## [0.6.0] - 2022-12-07
### Added
- Support for non-uniform border radius for `Primitive::Quad`. [#1506](https://github.com/iced-rs/iced/pull/1506)
- Operation to query the current focused widget. [#1526](https://github.com/iced-rs/iced/pull/1526)
- Additional operations for `TextInput`. [#1529](https://github.com/iced-rs/iced/pull/1529)
- Styling support for `Svg`. [#1578](https://github.com/iced-rs/iced/pull/1578)
### Changed
- Triangle geometry using a solid color is now drawn in a single draw call. [#1538](https://github.com/iced-rs/iced/pull/1538)
### Fixed
- Gradients for WebAssembly target. [#1524](https://github.com/iced-rs/iced/pull/1524)
- `Overlay` layout cache not being invalidated. [#1528](https://github.com/iced-rs/iced/pull/1528)
- Operations not working for `PaneGrid`. [#1533](https://github.com/iced-rs/iced/pull/1533)
- Mapped `widget::Operation` always returning `Outcome::None`. [#1536](https://github.com/iced-rs/iced/pull/1536)
- Padding of `TextInput` with `Length::Units` width. [#1539](https://github.com/iced-rs/iced/pull/1539)
- Clipping of `Image` and `Svg` widgets in `iced_glow`. [#1557](https://github.com/iced-rs/iced/pull/1557)
- Invalid links in documentation. [#1560](https://github.com/iced-rs/iced/pull/1560)
- `Custom` style of `PickList` widget. [#1570](https://github.com/iced-rs/iced/pull/1570)
- Scroller in `Scrollable` always being drawn. [#1574](https://github.com/iced-rs/iced/pull/1574)
Many thanks to...
- @bungoboingo
- @l1Dan
- @mmstick
- @mtkennerly
- @PolyMeilex
- @rksm
- @rs017991
- @tarkah
- @wash2
## [0.5.0] - 2022-11-10
### Added
- __[Stabilization of stateless widgets][stateless]__ (#1393)
The old widget API has been completely replaced by stateless widgets (introduced in #1284). Alongside the new API, there are a bunch of new helper functions and macros for easily describing view logic (like `row!` and `column!`).
- __[First-class theming][theming]__ (#1362)
A complete overhaul of our styling primitives, introducing a `Theme` as a first-class concept of the library.
- __[Widget operations][operations]__ (#1399)
An abstraction that can be used to traverse (and operate on) the widget tree of an application in order to query or update some widget state.
- __[`Lazy` widget][lazy]__ (#1400)
A widget that can call some view logic lazily only when some data has changed. Thanks to @nicksenger!
- __[Linear gradient support for `Canvas`][gradient]__ (#1448)
The `Canvas` widget can draw linear gradients now. Thanks to @bungoboingo!
- __[Touch support for `Canvas`][touch]__ (#1305)
The `Canvas` widget now supports touch events. Thanks to @artursapek!
- __[`Image` and `Svg` support for `iced_glow`][image]__ (#1485)
Our OpenGL renderer now is capable of rendering both the `Image` and `Svg` widgets. Thanks to @ids1024!
[stateless]: https://github.com/iced-rs/iced/pull/1393
[theming]: https://github.com/iced-rs/iced/pull/1362
[operations]: https://github.com/iced-rs/iced/pull/1399
[lazy]: https://github.com/iced-rs/iced/pull/1400
[gradient]: https://github.com/iced-rs/iced/pull/1448
[touch]: https://github.com/iced-rs/iced/pull/1305
[image]: https://github.com/iced-rs/iced/pull/1485
## [0.4.2] - 2022-05-03
### Fixed
- `Padding` type not exposed in `iced`.
## [0.4.1] - 2022-05-02
### Fixed
- Version number in `README`.
## [0.4.0] - 2022-05-02
### Added
- __[Stateless widgets][stateless]__ (#1284)
A brand new widget API that removes the need to keep track of internal widget state. No more `button::State` in your application!
- __[`Component` trait][component]__ (#1131)
A new trait to implement custom widgets with internal mutable state while using composition and [The Elm Architecture].
- __[`Responsive` widget][responsive]__ (#1193)
A widget that is aware of its dimensions and can be used to easily build responsive user interfaces.
- __[Experimental WebGL support][webgl]__ (#1096)
Applications can now be rendered into an HTML `canvas` when targeting Wasm by leveraging the WebGL support in [`wgpu`]. Thanks to @pacmancoder and @kaimast!
- __[Support for Raspberry Pis and older devices][raspberry]__ (#1160)
The compatibility of our OpenGL renderer has been improved and should run on any hardware that supports OpenGL 3.0+ or OpenGL ES 2.0+. Additionally, we started maintaining [Docker images for `aarch64` and `armv7`](https://github.com/orgs/iced-rs/packages) to easily cross-compile `iced` applications and target Raspberry Pis. Thanks to @derezzedex!
- __[Simpler `Renderer` APIs][renderer_apis]__ (#1110)
The surface of the `Renderer` APIs of the library has been considerably reduced. Instead of a `Renderer` trait per widget, now there are only 3 traits that are reused by all the widgets.
[webgl]: https://github.com/iced-rs/iced/pull/1096
[renderer_apis]: https://github.com/iced-rs/iced/pull/1110
[component]: https://github.com/iced-rs/iced/pull/1131
[raspberry]: https://github.com/iced-rs/iced/pull/1160
[responsive]: https://github.com/iced-rs/iced/pull/1193
[stateless]: https://github.com/iced-rs/iced/pull/1284
[The Elm Architecture]: https://guide.elm-lang.org/architecture/
[`wgpu`]: https://github.com/gfx-rs/wgpu
## [0.3.0] - 2021-03-31
### Added
- Touch support. [#57] [#650] (thanks to @simlay and @discordance!)
- Clipboard write access for
- `TextInput` widget. [#770]
- `Application::update`. [#773]
- `image::Viewer` widget. It allows panning and scaling of an image. [#319] (thanks to @tarkah!)
- `Tooltip` widget. It annotates content with some text on mouse hover. [#465] (thanks to @yusdacra!)
- Support for the [`smol`] async runtime. [#699] (thanks to @JayceFayne!)
- Support for graceful exiting when using the `Application` trait. [#804]
- Image format features in [`iced_wgpu`] to reduce code bloat. [#392] (thanks to @unrelentingtech!)
- `Focused` and `Unfocused` variant to `window::Event`. [#701] (thanks to @cossonleo!)
- `WGPU_BACKEND` environment variable to configure the internal graphics backend of `iced_wgpu`. [#789] (thanks to @Cupnfish!)
### Changed
- The `TitleBar` of a `PaneGrid` now supports generic elements. [#657] (thanks to @clarkmoody!)
- The `Error` type now implements `Send` and `Sync`. [#719] (thanks to @taiki-e!)
- The `Style` types in `iced_style` now implement `Clone` and `Copy`. [#720] (thanks to @taiki-e!)
- The following dependencies have been updated:
- [`font-kit`] → `0.10` [#669]
- [`glutin`] → `0.26` [#658]
- [`resvg`] → `0.12` [#669]
- [`tokio`] → `1.0` [#672] (thanks to @yusdacra!)
- [`winit`] → `0.24` [#658]
- [`wgpu`] → `0.7` [#725] (thanks to @PolyMeilex)
- The following examples were improved:
- `download_progress` now showcases multiple file downloads at once. [#283] (thanks to @Folyd!)
- `solar_system` uses the new `rand` API. [#760] (thanks to @TriedAngle!)
### Fixed
- Button events not being propagated to contents. [#668]
- Incorrect overlay implementation for the `Button` widget. [#764]
- `Viewport::physical_width` returning the wrong value. [#700]
- Outdated documentation for the `Sandbox` trait. [#710]
[#57]: https://github.com/iced-rs/iced/pull/57
[#283]: https://github.com/iced-rs/iced/pull/283
[#319]: https://github.com/iced-rs/iced/pull/319
[#392]: https://github.com/iced-rs/iced/pull/392
[#465]: https://github.com/iced-rs/iced/pull/465
[#650]: https://github.com/iced-rs/iced/pull/650
[#657]: https://github.com/iced-rs/iced/pull/657
[#658]: https://github.com/iced-rs/iced/pull/658
[#668]: https://github.com/iced-rs/iced/pull/668
[#669]: https://github.com/iced-rs/iced/pull/669
[#672]: https://github.com/iced-rs/iced/pull/672
[#699]: https://github.com/iced-rs/iced/pull/699
[#700]: https://github.com/iced-rs/iced/pull/700
[#701]: https://github.com/iced-rs/iced/pull/701
[#710]: https://github.com/iced-rs/iced/pull/710
[#719]: https://github.com/iced-rs/iced/pull/719
[#720]: https://github.com/iced-rs/iced/pull/720
[#725]: https://github.com/iced-rs/iced/pull/725
[#760]: https://github.com/iced-rs/iced/pull/760
[#764]: https://github.com/iced-rs/iced/pull/764
[#770]: https://github.com/iced-rs/iced/pull/770
[#773]: https://github.com/iced-rs/iced/pull/773
[#789]: https://github.com/iced-rs/iced/pull/789
[#804]: https://github.com/iced-rs/iced/pull/804
[`smol`]: https://github.com/smol-rs/smol
[`winit`]: https://github.com/rust-windowing/winit
[`glutin`]: https://github.com/rust-windowing/glutin
[`font-kit`]: https://github.com/servo/font-kit
## [0.2.0] - 2020-11-26
### Added
- __[`Canvas` interactivity][canvas]__ (#325)
A trait-based approach to react to mouse and keyboard interactions in [the `Canvas` widget][#193].
- __[`iced_graphics` subcrate][opengl]__ (#354)
A backend-agnostic graphics subcrate that can be leveraged to build new renderers.
- __[OpenGL renderer][opengl]__ (#354)
An OpenGL renderer powered by [`iced_graphics`], [`glow`], and [`glutin`]. It is an alternative to the default [`wgpu`] renderer.
- __[Overlay support][pick_list]__ (#444)
Basic support for superpositioning interactive widgets on top of other widgets.
- __[Faster event loop][view]__ (#597)
The event loop now takes advantage of the data dependencies in [The Elm Architecture] and leverages the borrow checker to keep the widget tree alive between iterations, avoiding unnecessary rebuilds.
- __[Event capturing][event]__ (#614)
The runtime now can tell whether a widget has handled an event or not, easing [integration with existing applications].
- __[`PickList` widget][pick_list]__ (#444)
A drop-down selector widget built on top of the new overlay support.
- __[`QRCode` widget][qr_code]__ (#622)
A widget that displays a QR code, powered by [the `qrcode` crate].
[canvas]: https://github.com/iced-rs/iced/pull/325
[opengl]: https://github.com/iced-rs/iced/pull/354
[`iced_graphics`]: https://github.com/iced-rs/iced/pull/354
[pane_grid]: https://github.com/iced-rs/iced/pull/397
[pick_list]: https://github.com/iced-rs/iced/pull/444
[error]: https://github.com/iced-rs/iced/pull/514
[view]: https://github.com/iced-rs/iced/pull/597
[event]: https://github.com/iced-rs/iced/pull/614
[color]: https://github.com/iced-rs/iced/pull/200
[qr_code]: https://github.com/iced-rs/iced/pull/622
[#193]: https://github.com/iced-rs/iced/pull/193
[`glutin`]: https://github.com/rust-windowing/glutin
[`wgpu`]: https://github.com/gfx-rs/wgpu
[`glow`]: https://github.com/grovesNL/glow
[the `qrcode` crate]: https://docs.rs/qrcode/0.12.0/qrcode/
[integration with existing applications]: https://github.com/iced-rs/iced/pull/183
[The Elm Architecture]: https://guide.elm-lang.org/architecture/
## [0.1.1] - 2020-04-15
### Added
- `Settings::with_flags` to easily initialize some default settings with flags. [#266]
- `Default` implementation for `canvas::layer::Cache`. [#267]
- `Ctrl + Del` support for `TextInput`. [#268]
- Helper methods in `canvas::Path` to easily draw lines, rectangles, and circles. [#293]
- `From<Color>` implementation for `canvas::Fill`. [#293]
- `From<String>` implementation for `canvas::Text`. [#293]
- `From<&str>` implementation for `canvas::Text`. [#293]
### Changed
- `new` method of `Radio` and `Checkbox` now take a generic `Into<String>` for the label. [#260]
- `Frame::fill` now takes a generic `Into<canvas::Fill>`. [#293]
- `Frame::stroke` now takes a generic `Into<canvas::Stroke>`. [#293]
- `Frame::fill_text` now takes a generic `Into<canvas::Text>`. [#293]
### Fixed
- Feature flags not being referenced in documentation. [#259]
- Crash in some graphics drivers when displaying an empty `Canvas`. [#278]
- Text measuring when spaces where present at the beginning of a `TextInput` value. [#279]
- `TextInput` producing a `Clip` primitive when unnecessary. [#279]
- Alignment of `Text` primitive in `iced_wgpu`. [#281]
- `CursorEntered` and `CursorLeft` not being generated. [#289]
### Removed
- Unnecessary `'static` lifetimes in `Renderer` bounds. [#290]
[#259]: https://github.com/iced-rs/iced/pull/259
[#260]: https://github.com/iced-rs/iced/pull/260
[#266]: https://github.com/iced-rs/iced/pull/266
[#267]: https://github.com/iced-rs/iced/pull/267
[#268]: https://github.com/iced-rs/iced/pull/268
[#278]: https://github.com/iced-rs/iced/pull/278
[#279]: https://github.com/iced-rs/iced/pull/279
[#281]: https://github.com/iced-rs/iced/pull/281
[#289]: https://github.com/iced-rs/iced/pull/289
[#290]: https://github.com/iced-rs/iced/pull/290
[#293]: https://github.com/iced-rs/iced/pull/293
## [0.1.0] - 2020-04-02
### Added
- __[Event subscriptions]__ (#122)
A declarative way to listen to external events asynchronously by leveraging [streams].
- __[Custom styling]__ (#146)
A simple, trait-based approach for customizing the appearance of different widgets.
- __[`Canvas` widget]__ (#193)
A widget for drawing 2D graphics with an interface inspired by the [Web Canvas API] and powered by [`lyon`].
- __[`PaneGrid` widget]__ (#224)
A widget that dynamically organizes layout by splitting panes that can be resized and drag and dropped.
- __[`Svg` widget]__ (#111)
A widget that renders vector graphics on top of [`resvg`] and [`raqote`]. Thanks to @Maldela!
- __[`ProgressBar` widget]__ (#141)
A widget to notify progress of asynchronous tasks to your users. Thanks to @Songtronix!
- __[Configurable futures executor]__ (#164)
Support for plugging [`tokio`], [`async-std`], [`wasm-bindgen-futures`], or your own custom futures executor to an application.
- __[Compatibility with existing `wgpu` projects]__ (#183)
A bunch of improvements to the flexibility of [`iced_wgpu`] to allow integration in existing codebases.
- __[Text selection for `TextInput`]__ (#202)
Thanks to @FabianLars and @Finnerale!
- __[Texture atlas for `iced_wgpu`]__ (#154)
An atlas on top of [`guillotiere`] for batching draw calls. Thanks to @Maldela!
[Event subscriptions]: https://github.com/iced-rs/iced/pull/122
[Custom styling]: https://github.com/iced-rs/iced/pull/146
[`Canvas` widget]: https://github.com/iced-rs/iced/pull/193
[`PaneGrid` widget]: https://github.com/iced-rs/iced/pull/224
[`Svg` widget]: https://github.com/iced-rs/iced/pull/111
[`ProgressBar` widget]: https://github.com/iced-rs/iced/pull/141
[Configurable futures executor]: https://github.com/iced-rs/iced/pull/164
[Compatibility with existing `wgpu` projects]: https://github.com/iced-rs/iced/pull/183
[Clipboard access]: https://github.com/iced-rs/iced/pull/132
[Texture atlas for `iced_wgpu`]: https://github.com/iced-rs/iced/pull/154
[Text selection for `TextInput`]: https://github.com/iced-rs/iced/pull/202
[`lyon`]: https://github.com/nical/lyon
[`guillotiere`]: https://github.com/nical/guillotiere
[Web Canvas API]: https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API
[streams]: https://docs.rs/futures/0.3.4/futures/stream/index.html
[`tokio`]: https://github.com/tokio-rs/tokio
[`async-std`]: https://github.com/async-rs/async-std
[`wasm-bindgen-futures`]: https://github.com/rustwasm/wasm-bindgen/tree/master/crates/futures
[`resvg`]: https://github.com/RazrFalcon/resvg
[`raqote`]: https://github.com/jrmuizel/raqote
[`iced_wgpu`]: wgpu/
## [0.1.0-beta] - 2019-11-25
### Changed
- The old `iced` becomes `iced_native`. The current `iced` crate turns into a batteries-included, cross-platform GUI library.
## [0.1.0-alpha] - 2019-09-05
### Added
- First release! :tada:
[Unreleased]: https://github.com/iced-rs/iced/compare/0.14.0...HEAD
[0.14.0]: https://github.com/iced-rs/iced/compare/0.13.1...0.14.0
[0.13.1]: https://github.com/iced-rs/iced/compare/0.13.0...0.13.1
[0.13.0]: https://github.com/iced-rs/iced/compare/0.12.1...0.13.0
[0.12.1]: https://github.com/iced-rs/iced/compare/0.12.0...0.12.1
[0.12.0]: https://github.com/iced-rs/iced/compare/0.10.0...0.12.0
[0.10.0]: https://github.com/iced-rs/iced/compare/0.9.0...0.10.0
[0.9.0]: https://github.com/iced-rs/iced/compare/0.8.0...0.9.0
[0.8.0]: https://github.com/iced-rs/iced/compare/0.7.0...0.8.0
[0.7.0]: https://github.com/iced-rs/iced/compare/0.6.0...0.7.0
[0.6.0]: https://github.com/iced-rs/iced/compare/0.5.0...0.6.0
[0.5.0]: https://github.com/iced-rs/iced/compare/0.4.2...0.5.0
[0.4.2]: https://github.com/iced-rs/iced/compare/0.4.1...0.4.2
[0.4.1]: https://github.com/iced-rs/iced/compare/0.4.0...0.4.1
[0.4.0]: https://github.com/iced-rs/iced/compare/0.3.0...0.4.0
[0.3.0]: https://github.com/iced-rs/iced/compare/0.2.0...0.3.0
[0.2.0]: https://github.com/iced-rs/iced/compare/0.1.1...0.2.0
[0.1.1]: https://github.com/iced-rs/iced/compare/0.1.0...0.1.1
[0.1.0]: https://github.com/iced-rs/iced/compare/0.1.0-beta...0.1.0
[0.1.0-beta]: https://github.com/iced-rs/iced/compare/0.1.0-alpha...0.1.0-beta
[0.1.0-alpha]: https://github.com/iced-rs/iced/releases/tag/0.1.0-alpha
================================================
FILE: CONTRIBUTING.md
================================================
# Contributing
Thank you for considering contributing to Iced! Take a look at [the roadmap] to get an idea of the current state of the library.
The core team is busy and does not have time to mentor nor babysit new contributors. If a member of the core team thinks that reviewing and understanding your work will take more time and effort than writing it from scratch by themselves, your contribution will be dismissed. It is your responsibility to communicate and figure out how to reduce the likelihood of this!
The general advice for new contributors is to share your ideas with the community. You can share your ideas and gather feedback in [our Zulip forum]. This is a very important step. It helps to coordinate work, get on the same page, and start building trust. Remember that [Code is the Easy Part] and also [The Hard Parts of Open Source]!
Once you have started a channel of communication, you must wait until someone from the core team chimes in. If the core team is busy, this can take a long time (maybe months!). Your idea may need a bunch of iteration, or it may turn into something completely different, or it may be completely discarded! You will have to be patient and humble. Remember that open-source is a gift.
Besides directly writing code, there are many other different ways you can contribute. To name a few:
- Writing tutorials or blog posts
- Improving the documentation
- Submitting bug reports and use cases
- Sharing, discussing, researching and exploring new ideas or crates
[the roadmap]: ROADMAP.md
[our Zulip forum]: https://iced.zulipchat.com/
[Code is the Easy Part]: https://youtu.be/DSjbTC-hvqQ?t=1138
[The Hard Parts of Open Source]: https://www.youtube.com/watch?v=o_4EX4dPppA
================================================
FILE: Cargo.toml
================================================
[package]
name = "iced"
description = "A cross-platform GUI library inspired by Elm"
version.workspace = true
edition.workspace = true
authors.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true
categories.workspace = true
keywords.workspace = true
rust-version.workspace = true
[lints]
workspace = true
[package.metadata.docs.rs]
rustdoc-args = ["--cfg", "docsrs"]
all-features = true
[badges]
maintenance = { status = "actively-developed" }
[features]
default = ["wgpu", "tiny-skia", "crisp", "hinting", "web-colors", "thread-pool", "linux-theme-detection", "x11", "wayland"]
# Enables the `wgpu` GPU-accelerated renderer with all its default features (Vulkan, Metal, DX12, OpenGL, and WebGPU)
wgpu = ["wgpu-bare", "iced_renderer/wgpu"]
# Enables the `wgpu` GPU-accelerated renderer with the minimum required features (no backends!)
wgpu-bare = ["iced_renderer/wgpu-bare", "iced_widget/wgpu"]
# Enables the `tiny-skia` software renderer
tiny-skia = ["iced_renderer/tiny-skia"]
# Enables the `image` widget and image clipboard support
image = ["image-without-codecs", "image/default", "iced_winit/image"]
# Enables the `image` widget, without any built-in codecs of the `image` crate
image-without-codecs = ["iced_widget/image", "dep:image"]
# Enables the `svg` widget
svg = ["iced_widget/svg"]
# Enables the `canvas` widget
canvas = ["iced_widget/canvas"]
# Enables the `qr_code` widget
qr_code = ["iced_widget/qr_code"]
# Enables the `markdown` widget
markdown = ["iced_widget/markdown"]
# Enables lazy widgets
lazy = ["iced_widget/lazy"]
# Enables debug metrics in native platforms (press F12)
debug = ["iced_winit/debug", "dep:iced_devtools"]
# Enables time-travel debugging (very experimental!)
time-travel = ["debug", "iced_devtools/time-travel"]
# Enables hot reloading (very experimental!)
hot = ["debug", "iced_debug/hot"]
# Enables the tester developer tool for recording and playing tests (press F12)
tester = ["dep:iced_tester"]
# Enables the `thread-pool` futures executor as the `executor::Default` on native platforms
thread-pool = ["iced_futures/thread-pool"]
# Enables `tokio` as the `executor::Default` on native platforms
tokio = ["iced_futures/tokio"]
# Enables `smol` as the `executor::Default` on native platforms
smol = ["iced_futures/smol"]
# Enables querying system information
sysinfo = ["iced_winit/sysinfo"]
# Enables broken "sRGB linear" blending to reproduce color management of the Web
web-colors = ["iced_renderer/web-colors"]
# Enables pixel snapping for crisp edges by default (can cause jitter!)
crisp = ["iced_core/crisp"]
# Enables the WebGL backend
webgl = ["iced_renderer/webgl"]
# Enables syntax highlighting
highlighter = ["iced_highlighter", "iced_widget/highlighter"]
# Enables the `widget::selector` module
selector = ["iced_runtime/selector"]
# Enables the advanced module
advanced = ["iced_core/advanced", "iced_widget/advanced"]
# Embeds Fira Sans into the final application; useful for testing and Wasm builds
fira-sans = ["iced_renderer/fira-sans"]
# Enables basic text shaping by default
basic-shaping = ["iced_core/basic-shaping"]
# Enables advanced text shaping by default
advanced-shaping = ["iced_core/advanced-shaping"]
# Enables rendering hints (e.g. metrics hinting)
hinting = ["iced_winit/hinting"]
# Enables strict assertions for debugging purposes at the expense of performance
strict-assertions = ["iced_renderer/strict-assertions"]
# Redraws on every runtime event, and not only when a widget requests it
unconditional-rendering = ["iced_winit/unconditional-rendering"]
# Enables support for the `sipper` library
sipper = ["iced_runtime/sipper"]
# Enables Linux system theme detection
linux-theme-detection = ["iced_winit/linux-theme-detection"]
# Enables the Unix X11 backend
x11 = ["iced_renderer/x11", "iced_winit/x11"]
# Enables the Unix Wayland backend
wayland = ["iced_renderer/wayland", "iced_winit/wayland"]
[dependencies]
iced_debug.workspace = true
iced_core.workspace = true
iced_futures.workspace = true
iced_renderer.workspace = true
iced_runtime.workspace = true
iced_widget.workspace = true
iced_winit.workspace = true
iced_devtools.workspace = true
iced_devtools.optional = true
iced_tester.workspace = true
iced_tester.optional = true
iced_highlighter.workspace = true
iced_highlighter.optional = true
thiserror.workspace = true
image.workspace = true
image.optional = true
[dev-dependencies]
criterion = "0.5"
iced_wgpu.workspace = true
[[bench]]
name = "wgpu"
harness = false
required-features = ["canvas"]
[profile.release-opt]
inherits = "release"
codegen-units = 1
debug = false
lto = true
incremental = false
opt-level = 3
overflow-checks = false
strip = "debuginfo"
[workspace]
members = [
"beacon",
"core",
"debug",
"devtools",
"futures",
"graphics",
"highlighter",
"program",
"renderer",
"runtime",
"selector",
"test",
"tester",
"tiny_skia",
"wgpu",
"widget",
"winit",
"examples/*",
]
[workspace.package]
version = "0.15.0-dev"
authors = ["Héctor Ramón Jiménez <hector@hecrj.dev>"]
edition = "2024"
license = "MIT"
repository = "https://github.com/iced-rs/iced"
homepage = "https://iced.rs"
categories = ["gui"]
keywords = ["gui", "ui", "graphics", "interface", "widgets"]
rust-version = "1.92"
[workspace.dependencies]
iced = { version = "0.15.0-dev", path = "." }
iced_beacon = { version = "0.15.0-dev", path = "beacon" }
iced_core = { version = "0.15.0-dev", path = "core" }
iced_debug = { version = "0.15.0-dev", path = "debug" }
iced_devtools = { version = "0.15.0-dev", path = "devtools" }
iced_futures = { version = "0.15.0-dev", path = "futures" }
iced_graphics = { version = "0.15.0-dev", path = "graphics" }
iced_highlighter = { version = "0.15.0-dev", path = "highlighter" }
iced_program = { version = "0.15.0-dev", path = "program" }
iced_renderer = { version = "0.15.0-dev", path = "renderer" }
iced_runtime = { version = "0.15.0-dev", path = "runtime" }
iced_selector = { version = "0.15.0-dev", path = "selector" }
iced_test = { version = "0.15.0-dev", path = "test" }
iced_tester = { version = "0.15.0-dev", path = "tester" }
iced_tiny_skia = { version = "0.15.0-dev", path = "tiny_skia", default-features = false }
iced_wgpu = { version = "0.15.0-dev", path = "wgpu", default-features = false }
iced_widget = { version = "0.15.0-dev", path = "widget" }
iced_winit = { version = "0.15.0-dev", path = "winit", default-features = false }
arboard = { version = "3.6", default-features = false }
bincode = "1.3"
bitflags = "2.0"
bytemuck = { version = "1.0", features = ["derive"] }
bytes = "1.6"
cargo-hot = { version = "0.1", package = "cargo-hot-protocol" }
cosmic-text = "0.18"
cryoglyph = { git = "https://github.com/iced-rs/cryoglyph.git", rev = "1d68895e9c4c9b73739f826e81c2e3012c155cce" }
futures = { version = "0.3", default-features = false, features = ["std", "async-await"] }
glam = "0.25"
guillotiere = "0.6"
half = "2.2"
image = { version = "0.25", default-features = false }
kamadak-exif = "0.6"
kurbo = "0.10"
lilt = "0.8"
log = "0.4"
lyon = "1.0"
lyon_path = "1.0"
mundy = { version = "0.2", default-features = false }
nom = "8"
num-traits = "0.2"
ouroboros = "0.18"
png = "0.18"
pulldown-cmark = "0.12"
qrcode = { version = "0.13", default-features = false }
raw-window-handle = "0.6"
resvg = "0.45"
rfd = "0.16"
rustc-hash = "2.0"
semver = "1.0"
serde = "1.0"
sha2 = "0.10"
sipper = "0.1"
smol = "2"
smol_str = "0.2"
softbuffer = { version = "0.4", default-features = false }
sysinfo = "0.33"
thiserror = "2"
tiny-skia = { version = "0.11", default-features = false, features = ["std", "simd"] }
tokio = "1.0"
tracing = "0.1"
two-face = { version = "0.4", default-features = false, features = ["syntect-default-fancy"] }
unicode-segmentation = "1.0"
url = "2.5"
wasm-bindgen-futures = "0.4"
wasmtimer = "0.4.2"
web-sys = "=0.3.85"
web-time = "1.1"
wgpu = { version = "28.0", default-features = false, features = ["std", "wgsl"] }
winit = { git = "https://github.com/iced-rs/winit.git", rev = "05b8ff17a06562f0a10bb46e6eaacbe2a95cb5ed", default-features = false, features = ["rwh_06"] }
[workspace.lints.rust]
rust_2018_idioms = { level = "deny", priority = -1 }
missing_docs = "deny"
unsafe_code = "deny"
unused_results = "deny"
[workspace.lints.clippy]
type-complexity = "allow"
map-entry = "allow"
large-enum-variant = "allow"
result_large_err = "allow"
semicolon_if_nothing_returned = "deny"
trivially-copy-pass-by-ref = "deny"
default_trait_access = "deny"
match-wildcard-for-single-variants = "deny"
redundant-closure-for-method-calls = "deny"
filter_map_next = "deny"
manual_let_else = "deny"
unused_async = "deny"
from_over_into = "deny"
needless_borrow = "deny"
new_without_default = "deny"
useless_conversion = "deny"
[workspace.lints.rustdoc]
broken_intra_doc_links = "forbid"
================================================
FILE: Cross.toml
================================================
[target.aarch64-unknown-linux-gnu]
image = "ghcr.io/iced-rs/aarch64:latest"
xargo = false
[target.armv7-unknown-linux-gnueabihf]
image = "ghcr.io/iced-rs/armv7:latest"
xargo = false
================================================
FILE: DEPENDENCIES.md
================================================
# Dependencies
Iced requires some system dependencies to work, and not
all operating systems come with them installed.
You can follow the provided instructions for your system to
get them, if your system isn't here, add it!
## NixOS
You can add this `shell.nix` to your project and use it by running `nix-shell`:
```nix
{ pkgs ? import <nixpkgs> { } }:
let
dlopenLibraries = with pkgs; [
libxkbcommon
# GPU backend
vulkan-loader
# libGL
# Window system
wayland
# xorg.libX11
# xorg.libXcursor
# xorg.libXi
];
in pkgs.mkShell {
nativeBuildInputs = with pkgs; [
cargo
rustc
];
# additional libraries that your project
# links to at build time, e.g. OpenSSL
buildInputs = [];
env.RUSTFLAGS = "-C link-arg=-Wl,-rpath,${pkgs.lib.makeLibraryPath dlopenLibraries}";
}
```
Alternatively, you can use this `flake.nix` to create a dev shell, activated by `nix develop`:
```nix
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
systems.url = "github:nix-systems/default";
};
outputs = { nixpkgs, systems, ... }:
let
eachSystem = nixpkgs.lib.genAttrs (import systems);
pkgsFor = nixpkgs.legacyPackages;
in {
devShells = eachSystem (system:
let
pkgs = pkgsFor.${system};
dlopenLibraries = with pkgs; [
libxkbcommon
# GPU backend
vulkan-loader
# libGL
# Window system
wayland
# xorg.libX11
# xorg.libXcursor
# xorg.libXi
];
in {
default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
cargo
rustc
];
# additional libraries that your project
# links to at build time, e.g. OpenSSL
buildInputs = [];
env.RUSTFLAGS = "-C link-arg=-Wl,-rpath,${nixpkgs.lib.makeLibraryPath dlopenLibraries}";
};
});
};
}
```
================================================
FILE: LICENSE
================================================
Copyright 2019 Héctor Ramón, Iced contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
================================================
FILE: README.md
================================================
<div align="center">
<img src="docs/logo.svg" width="140px" />
# Iced
[][documentation]
[](https://crates.io/crates/iced)
[](https://github.com/iced-rs/iced/blob/master/LICENSE)
[](https://crates.io/crates/iced)
[](https://github.com/iced-rs/iced/actions)
[](https://iced.zulipchat.com/)
[](https://discord.gg/3xZJ65GAhd)
A cross-platform GUI library for Rust focused on simplicity and type-safety.
Inspired by [Elm].
<a href="https://github.com/squidowl/halloy">
<img src="https://iced.rs/showcase/halloy.gif" width="460px">
</a>
<a href="https://github.com/hecrj/icebreaker">
<img src="https://iced.rs/showcase/icebreaker.gif" width="360px">
</a>
</div>
## Features
* Simple, easy-to-use, batteries-included API
* Type-safe, reactive programming model
* [Cross-platform support] (Windows, macOS, Linux, and the Web)
* Responsive layout
* Built-in widgets (including [text inputs], [scrollables], and more!)
* Custom widget support (create your own!)
* [Debug tooling with performance metrics and time traveling]
* First-class support for async actions (use futures!)
* Modular ecosystem split into reusable parts:
* A [renderer-agnostic native runtime] enabling integration with existing systems
* Two built-in renderers leveraging [`wgpu`] and [`tiny-skia`]
* [`iced_wgpu`] supporting Vulkan, Metal and DX12
* [`iced_tiny_skia`] offering a software alternative as a fallback
* A [windowing shell]
__Iced is currently experimental software.__ [Take a look at the roadmap] and
[check out the issues].
[Cross-platform support]: https://raw.githubusercontent.com/iced-rs/iced/master/docs/images/todos_desktop.jpg
[text inputs]: https://iced.rs/examples/text_input.mp4
[scrollables]: https://iced.rs/examples/scrollable.mp4
[Debug tooling with performance metrics and time traveling]: https://github.com/user-attachments/assets/2e49695c-0261-4b43-ac2e-8d7da5454c4b
[renderer-agnostic native runtime]: runtime/
[`wgpu`]: https://github.com/gfx-rs/wgpu
[`tiny-skia`]: https://github.com/RazrFalcon/tiny-skia
[`iced_wgpu`]: wgpu/
[`iced_tiny_skia`]: tiny_skia/
[windowing shell]: winit/
[Take a look at the roadmap]: ROADMAP.md
[check out the issues]: https://github.com/iced-rs/iced/issues
## Overview
Inspired by [The Elm Architecture], Iced expects you to split user interfaces
into four different concepts:
* __State__ — the state of your application
* __Messages__ — user interactions or meaningful events that you care
about
* __View logic__ — a way to display your __state__ as widgets that
may produce __messages__ on user interaction
* __Update logic__ — a way to react to __messages__ and update your
__state__
We can build something to see how this works! Let's say we want a simple counter
that can be incremented and decremented using two buttons.
We start by modelling the __state__ of our application:
```rust
#[derive(Default)]
struct Counter {
value: i32,
}
```
Next, we need to define the possible user interactions of our counter:
the button presses. These interactions are our __messages__:
```rust
#[derive(Debug, Clone, Copy)]
pub enum Message {
Increment,
Decrement,
}
```
Now, let's show the actual counter by putting it all together in our
__view logic__:
```rust
use iced::widget::{button, column, text, Column};
impl Counter {
pub fn view(&self) -> Column<'_, Message> {
// We use a column: a simple vertical layout
column![
// The increment button. We tell it to produce an
// `Increment` message when pressed
button("+").on_press(Message::Increment),
// We show the value of the counter here
text(self.value).size(50),
// The decrement button. We tell it to produce a
// `Decrement` message when pressed
button("-").on_press(Message::Decrement),
]
}
}
```
Finally, we need to be able to react to any produced __messages__ and change our
__state__ accordingly in our __update logic__:
```rust
impl Counter {
// ...
pub fn update(&mut self, message: Message) {
match message {
Message::Increment => {
self.value += 1;
}
Message::Decrement => {
self.value -= 1;
}
}
}
}
```
And that's everything! We just wrote a whole user interface. Let's run it:
```rust
fn main() -> iced::Result {
iced::run(Counter::update, Counter::view)
}
```
Iced will automatically:
1. Take the result of our __view logic__ and layout its widgets.
1. Process events from our system and produce __messages__ for our
__update logic__.
1. Draw the resulting user interface.
Read the [book], the [documentation], and the [examples] to learn more!
## Implementation details
Iced was originally born as an attempt at bringing the simplicity of [Elm] and
[The Elm Architecture] into [Coffee], a 2D game library I am working on.
The core of the library was implemented during May 2019 in [this pull request].
[The first alpha version] was eventually released as
[a renderer-agnostic GUI library]. The library did not provide a renderer and
implemented the current [tour example] on top of [`ggez`], a game library.
Since then, the focus has shifted towards providing a batteries-included,
end-user-oriented GUI library, while keeping the ecosystem modular.
[this pull request]: https://github.com/hecrj/coffee/pull/35
[The first alpha version]: https://github.com/iced-rs/iced/tree/0.1.0-alpha
[a renderer-agnostic GUI library]: https://www.reddit.com/r/rust/comments/czzjnv/iced_a_rendereragnostic_gui_library_focused_on/
[tour example]: examples/README.md#tour
[`ggez`]: https://github.com/ggez/ggez
## Contributing / Feedback
If you want to contribute, please read our [contributing guidelines] for more details.
Feedback is also welcome! You can create a new topic in [our Zulip forum] or
come chat to [our Discord server].
## Sponsors
The development of Iced is sponsored by the [Cryptowatch] team at [Kraken.com]
[book]: https://book.iced.rs/
[documentation]: https://docs.rs/iced/
[examples]: https://github.com/iced-rs/iced/tree/master/examples#examples
[Coffee]: https://github.com/hecrj/coffee
[Elm]: https://elm-lang.org/
[The Elm Architecture]: https://guide.elm-lang.org/architecture/
[the current issues]: https://github.com/iced-rs/iced/issues
[contributing guidelines]: https://github.com/iced-rs/iced/blob/master/CONTRIBUTING.md
[our Zulip forum]: https://iced.zulipchat.com/
[our Discord server]: https://discord.gg/3xZJ65GAhd
[Cryptowatch]: https://cryptowat.ch/charts
[Kraken.com]: https://kraken.com/
================================================
FILE: ROADMAP.md
================================================
# Roadmap
We have [a detailed graphical roadmap now](https://whimsical.com/roadmap-iced-7vhq6R35Lp3TmYH4WeYwLM)!
================================================
FILE: beacon/Cargo.toml
================================================
[package]
name = "iced_beacon"
description = "A client/server protocol to monitor and supervise iced applications"
version.workspace = true
edition.workspace = true
authors.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true
categories.workspace = true
keywords.workspace = true
[dependencies]
iced_core.workspace = true
iced_core.features = ["serde"]
bincode.workspace = true
futures.workspace = true
log.workspace = true
thiserror.workspace = true
tokio.workspace = true
tokio.features = ["rt", "rt-multi-thread", "net", "sync", "time", "io-util", "macros"]
serde.workspace = true
serde.features = ["derive"]
semver.workspace = true
semver.features = ["serde"]
================================================
FILE: beacon/src/client.rs
================================================
use crate::Error;
use crate::core::theme::palette;
use crate::core::time::{Duration, SystemTime};
use crate::span;
use semver::Version;
use serde::{Deserialize, Serialize};
use tokio::io::{self, AsyncReadExt, AsyncWriteExt};
use tokio::net;
use tokio::sync::{Mutex, mpsc};
use tokio::task;
use tokio::time;
use std::sync::Arc;
use std::sync::atomic::{self, AtomicBool};
use std::thread;
#[derive(Debug, Clone)]
pub struct Client {
sender: mpsc::Sender<Action>,
is_connected: Arc<AtomicBool>,
_handle: Arc<thread::JoinHandle<()>>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub enum Message {
Connected {
at: SystemTime,
name: String,
version: Version,
theme: Option<palette::Seed>,
can_time_travel: bool,
},
EventLogged {
at: SystemTime,
event: Event,
},
Quit {
at: SystemTime,
},
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub enum Event {
ThemeChanged(palette::Seed),
SpanStarted(span::Stage),
SpanFinished(span::Stage, Duration),
MessageLogged { number: usize, message: String },
CommandsSpawned(usize),
SubscriptionsTracked(usize),
LayersRendered(usize),
}
impl Client {
pub fn log(&self, event: Event) {
let _ = self.sender.try_send(Action::Send(Message::EventLogged {
at: SystemTime::now(),
event,
}));
}
pub fn is_connected(&self) -> bool {
self.is_connected.load(atomic::Ordering::Relaxed)
}
pub fn quit(&self) {
let _ = self.sender.try_send(Action::Send(Message::Quit {
at: SystemTime::now(),
}));
}
pub fn subscribe(&self) -> mpsc::Receiver<Command> {
let (sender, receiver) = mpsc::channel(100);
let _ = self.sender.try_send(Action::Forward(sender));
receiver
}
}
#[derive(Debug, Clone, Default)]
pub struct Metadata {
pub name: &'static str,
pub theme: Option<palette::Seed>,
pub can_time_travel: bool,
}
#[must_use]
pub fn connect(metadata: Metadata) -> Client {
let (sender, receiver) = mpsc::channel(10_000);
let is_connected = Arc::new(AtomicBool::new(false));
let handle = {
let is_connected = is_connected.clone();
std::thread::spawn(move || run(metadata, is_connected, receiver))
};
Client {
sender,
is_connected,
_handle: Arc::new(handle),
}
}
enum Action {
Send(Message),
Forward(mpsc::Sender<Command>),
}
#[derive(Debug, Clone, Copy, Serialize, Deserialize)]
pub enum Command {
RewindTo { message: usize },
GoLive,
}
#[tokio::main]
async fn run(
mut metadata: Metadata,
is_connected: Arc<AtomicBool>,
mut receiver: mpsc::Receiver<Action>,
) {
let version = semver::Version::parse(env!("CARGO_PKG_VERSION")).expect("Parse package version");
let command_sender = {
// Discard by default
let (sender, _receiver) = mpsc::channel(1);
Arc::new(Mutex::new(sender))
};
loop {
match _connect().await {
Ok(stream) => {
is_connected.store(true, atomic::Ordering::Relaxed);
let (mut reader, mut writer) = stream.into_split();
let _ = send(
&mut writer,
Message::Connected {
at: SystemTime::now(),
name: metadata.name.to_owned(),
version: version.clone(),
can_time_travel: metadata.can_time_travel,
theme: metadata.theme,
},
)
.await;
{
let command_sender = command_sender.clone();
drop(task::spawn(async move {
let mut buffer = Vec::new();
loop {
match receive(&mut reader, &mut buffer).await {
Ok(command) => {
match command {
Command::RewindTo { .. } | Command::GoLive
if !metadata.can_time_travel =>
{
continue;
}
_ => {}
}
let sender = command_sender.lock().await;
let _ = sender.send(command).await;
}
Err(Error::DecodingFailed(_)) => {}
Err(Error::IOFailed(_)) => break,
}
}
}))
};
while let Some(action) = receiver.recv().await {
match action {
Action::Send(message) => {
if let Message::EventLogged {
event: Event::ThemeChanged(palette),
..
} = message
{
metadata.theme = Some(palette);
}
match send(&mut writer, message).await {
Ok(()) => {}
Err(error) => {
if error.kind() != io::ErrorKind::BrokenPipe {
log::warn!("Error sending message to server: {error}");
}
is_connected.store(false, atomic::Ordering::Relaxed);
break;
}
}
}
Action::Forward(sender) => {
*command_sender.lock().await = sender;
}
}
}
}
Err(_) => {
is_connected.store(false, atomic::Ordering::Relaxed);
time::sleep(time::Duration::from_secs(2)).await;
}
}
}
}
/// Returns the address of the beacon server in this environment.
///
/// The value of the `ICED_BEACON_SERVER_ADDRESS` env variable will
/// be returned, if defined.
///
/// Otherwise, a default local server address will be returned.
pub fn server_address_from_env() -> String {
const DEFAULT_ADDRESS: &str = "127.0.0.1:9167";
std::env::var("ICED_BEACON_SERVER_ADDRESS").unwrap_or_else(|_| String::from(DEFAULT_ADDRESS))
}
async fn _connect() -> Result<net::TcpStream, io::Error> {
log::debug!("Attempting to connect to server...");
let stream = net::TcpStream::connect(server_address_from_env()).await?;
stream.set_nodelay(true)?;
stream.writable().await?;
Ok(stream)
}
async fn send(stream: &mut net::tcp::OwnedWriteHalf, message: Message) -> Result<(), io::Error> {
let bytes = bincode::serialize(&message).expect("Encode input message");
let size = bytes.len() as u64;
stream.write_all(&size.to_be_bytes()).await?;
stream.write_all(&bytes).await?;
stream.flush().await?;
Ok(())
}
async fn receive(
stream: &mut net::tcp::OwnedReadHalf,
buffer: &mut Vec<u8>,
) -> Result<Command, Error> {
let size = stream.read_u64().await? as usize;
if buffer.len() < size {
buffer.resize(size, 0);
}
let _n = stream.read_exact(&mut buffer[..size]).await?;
Ok(bincode::deserialize(buffer)?)
}
================================================
FILE: beacon/src/error.rs
================================================
use std::io;
#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error("input/output operation failed: {0}")]
IOFailed(#[from] io::Error),
#[error("decoding failed: {0}")]
DecodingFailed(#[from] Box<bincode::ErrorKind>),
}
================================================
FILE: beacon/src/lib.rs
================================================
pub use iced_core as core;
pub use semver::Version;
pub mod client;
pub mod span;
mod error;
mod stream;
pub use client::Client;
pub use span::Span;
use crate::core::theme::palette;
use crate::core::time::{Duration, SystemTime};
use crate::error::Error;
use crate::span::present;
use futures::{SinkExt, Stream};
use tokio::io::{self, AsyncReadExt, AsyncWriteExt};
use tokio::net;
use tokio::sync::mpsc;
use tokio::task;
#[derive(Debug, Clone)]
pub struct Connection {
commands: mpsc::Sender<client::Command>,
}
impl Connection {
pub fn rewind_to<'a>(&self, message: usize) -> impl Future<Output = ()> + 'a {
let commands = self.commands.clone();
async move {
let _ = commands.send(client::Command::RewindTo { message }).await;
}
}
pub fn go_live<'a>(&self) -> impl Future<Output = ()> + 'a {
let commands = self.commands.clone();
async move {
let _ = commands.send(client::Command::GoLive).await;
}
}
}
#[derive(Debug, Clone)]
pub enum Event {
Connected {
connection: Connection,
at: SystemTime,
name: String,
version: Version,
theme: Option<palette::Seed>,
can_time_travel: bool,
},
Disconnected {
at: SystemTime,
},
ThemeChanged {
at: SystemTime,
seed: palette::Seed,
},
SpanFinished {
at: SystemTime,
duration: Duration,
span: Span,
},
QuitRequested {
at: SystemTime,
},
AlreadyRunning {
at: SystemTime,
},
}
impl Event {
pub fn at(&self) -> SystemTime {
match self {
Self::Connected { at, .. }
| Self::Disconnected { at, .. }
| Self::ThemeChanged { at, .. }
| Self::SpanFinished { at, .. }
| Self::QuitRequested { at }
| Self::AlreadyRunning { at } => *at,
}
}
}
pub fn is_running() -> bool {
std::net::TcpListener::bind(client::server_address_from_env()).is_err()
}
pub fn run() -> impl Stream<Item = Event> {
stream::channel(|mut output| async move {
let mut buffer = Vec::new();
let server = loop {
match net::TcpListener::bind(client::server_address_from_env()).await {
Ok(server) => break server,
Err(error) => {
if error.kind() == io::ErrorKind::AddrInUse {
let _ = output
.send(Event::AlreadyRunning {
at: SystemTime::now(),
})
.await;
}
delay().await;
}
};
};
loop {
let Ok((stream, _)) = server.accept().await else {
continue;
};
let (mut reader, mut writer) = {
let _ = stream.set_nodelay(true);
stream.into_split()
};
let (command_sender, mut command_receiver) = mpsc::channel(1);
let mut last_message = String::new();
let mut last_update_number = 0;
let mut last_tasks = 0;
let mut last_subscriptions = 0;
let mut last_present_layers = 0;
let mut last_prepare = present::Stage::default();
let mut last_render = present::Stage::default();
drop(task::spawn(async move {
let mut last_message_number = None;
while let Some(command) = command_receiver.recv().await {
match command {
client::Command::RewindTo { message } => {
if Some(message) == last_message_number {
continue;
}
last_message_number = Some(message);
}
client::Command::GoLive => {
last_message_number = None;
}
}
let _ = send(&mut writer, command)
.await
.inspect_err(|error| log::error!("Error when sending command: {error}"));
}
}));
loop {
match receive(&mut reader, &mut buffer).await {
Ok(message) => {
match message {
client::Message::Connected {
at,
name,
version,
theme,
can_time_travel,
} => {
let _ = output
.send(Event::Connected {
connection: Connection {
commands: command_sender.clone(),
},
at,
name,
version,
theme,
can_time_travel,
})
.await;
}
client::Message::EventLogged { at, event } => match event {
client::Event::ThemeChanged(seed) => {
let _ = output.send(Event::ThemeChanged { at, seed }).await;
}
client::Event::SubscriptionsTracked(amount_alive) => {
last_subscriptions = amount_alive;
}
client::Event::MessageLogged { number, message } => {
last_update_number = number;
last_message = message;
}
client::Event::CommandsSpawned(commands) => {
last_tasks = commands;
}
client::Event::LayersRendered(layers) => {
last_present_layers = layers;
}
client::Event::SpanStarted(span::Stage::Update) => {
last_message.clear();
last_tasks = 0;
}
client::Event::SpanStarted(_) => {}
client::Event::SpanFinished(stage, duration) => {
let span = match stage {
span::Stage::Boot => Span::Boot,
span::Stage::Update => Span::Update {
number: last_update_number,
message: last_message.clone(),
tasks: last_tasks,
subscriptions: last_subscriptions,
},
span::Stage::View(window) => Span::View { window },
span::Stage::Layout(window) => Span::Layout { window },
span::Stage::Interact(window) => Span::Interact { window },
span::Stage::Draw(window) => Span::Draw { window },
span::Stage::Prepare(primitive)
| span::Stage::Render(primitive) => {
let stage = if matches!(stage, span::Stage::Prepare(_),)
{
&mut last_prepare
} else {
&mut last_render
};
let primitive = match primitive {
present::Primitive::Quad => &mut stage.quads,
present::Primitive::Triangle => {
&mut stage.triangles
}
present::Primitive::Shader => &mut stage.shaders,
present::Primitive::Text => &mut stage.text,
present::Primitive::Image => &mut stage.images,
};
*primitive += duration;
continue;
}
span::Stage::Present(window) => {
let span = Span::Present {
window,
prepare: last_prepare,
render: last_render,
layers: last_present_layers,
};
last_prepare = present::Stage::default();
last_render = present::Stage::default();
last_present_layers = 0;
span
}
span::Stage::Custom(name) => Span::Custom { name },
};
let _ = output
.send(Event::SpanFinished { at, duration, span })
.await;
}
},
client::Message::Quit { at } => {
let _ = output.send(Event::QuitRequested { at }).await;
}
};
}
Err(Error::IOFailed(_)) => {
let _ = output
.send(Event::Disconnected {
at: SystemTime::now(),
})
.await;
break;
}
Err(Error::DecodingFailed(error)) => {
log::warn!("Error decoding beacon output: {error}")
}
}
}
}
})
}
async fn receive(
stream: &mut net::tcp::OwnedReadHalf,
buffer: &mut Vec<u8>,
) -> Result<client::Message, Error> {
let size = stream.read_u64().await? as usize;
if buffer.len() < size {
buffer.resize(size, 0);
}
let _n = stream.read_exact(&mut buffer[..size]).await?;
Ok(bincode::deserialize(buffer)?)
}
async fn send(
stream: &mut net::tcp::OwnedWriteHalf,
command: client::Command,
) -> Result<(), io::Error> {
let bytes = bincode::serialize(&command).expect("Encode input message");
let size = bytes.len() as u64;
stream.write_all(&size.to_be_bytes()).await?;
stream.write_all(&bytes).await?;
stream.flush().await?;
Ok(())
}
async fn delay() {
tokio::time::sleep(Duration::from_secs(2)).await;
}
================================================
FILE: beacon/src/span.rs
================================================
use crate::core::window;
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum Span {
Boot,
Update {
number: usize,
message: String,
tasks: usize,
subscriptions: usize,
},
View {
window: window::Id,
},
Layout {
window: window::Id,
},
Interact {
window: window::Id,
},
Draw {
window: window::Id,
},
Present {
window: window::Id,
prepare: present::Stage,
render: present::Stage,
layers: usize,
},
Custom {
name: String,
},
}
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
pub enum Stage {
Boot,
Update,
View(window::Id),
Layout(window::Id),
Interact(window::Id),
Draw(window::Id),
Present(window::Id),
Prepare(present::Primitive),
Render(present::Primitive),
Custom(String),
}
impl std::fmt::Display for Stage {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str(match self {
Stage::Boot => "Boot",
Stage::Update => "Update",
Stage::View(_) => "View",
Stage::Layout(_) => "Layout",
Stage::Interact(_) => "Interact",
Stage::Draw(_) => "Draw",
Stage::Prepare(_) => "Prepare",
Stage::Render(_) => "Render",
Stage::Present(_) => "Present",
Stage::Custom(name) => name,
})
}
}
pub mod present {
use crate::core::time::Duration;
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
pub struct Stage {
pub quads: Duration,
pub triangles: Duration,
pub shaders: Duration,
pub text: Duration,
pub images: Duration,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
pub enum Primitive {
Quad,
Triangle,
Shader,
Text,
Image,
}
}
================================================
FILE: beacon/src/stream.rs
================================================
use futures::Future;
use futures::channel::mpsc;
use futures::stream::{self, Stream, StreamExt};
pub fn channel<T, F>(f: impl Fn(mpsc::Sender<T>) -> F) -> impl Stream<Item = T>
where
F: Future<Output = ()>,
{
let (sender, receiver) = mpsc::channel(1);
stream::select(
receiver,
stream::once(f(sender)).filter_map(|_| async { None }),
)
}
================================================
FILE: benches/ipsum.txt
================================================
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur at elit mollis, dictum nunc non, tempus metus. Sed iaculis ac mauris eu lobortis. Integer elementum venenatis eros, id placerat odio feugiat vel. Maecenas consequat convallis tincidunt. Nunc eu lorem justo. Praesent quis ornare sapien. Aliquam interdum tortor ut rhoncus faucibus. Suspendisse molestie scelerisque nulla, eget sodales lacus sodales vel. Nunc placerat id arcu sodales venenatis. Praesent ullamcorper viverra nibh eget efficitur. Aliquam molestie felis vehicula, finibus sapien eget, accumsan purus. Praesent vestibulum eleifend consectetur. Sed tincidunt lectus a libero efficitur, non scelerisque lectus tincidunt.
Cras ullamcorper tincidunt tellus non tempor. Integer pulvinar turpis quam, nec pharetra purus egestas non. Vivamus sed ipsum consequat, dignissim ante et, suscipit nibh. Quisque et mauris eu erat rutrum cursus. Pellentesque ut neque eu neque eleifend auctor ac hendrerit dolor. Morbi eget egestas ex. Integer hendrerit ipsum in enim bibendum, at vehicula ipsum dapibus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce tempus consectetur tortor, vel fermentum sem pulvinar eget. Maecenas rutrum fringilla eros a pellentesque. Cras quis magna consectetur, tristique massa vel, aliquet nunc. Aliquam erat volutpat. Suspendisse porttitor risus id auctor fermentum. Vivamus efficitur tellus sed tortor cursus tincidunt. Sed auctor varius arcu, non congue tellus vehicula finibus.
Fusce a tincidunt urna. Nunc at quam ac enim tempor vehicula imperdiet in sapien. Donec lobortis tristique felis vel semper. Quisque vulputate felis eu enim vestibulum malesuada. Fusce a lobortis mauris, iaculis eleifend ligula. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Vivamus sodales vel elit dignissim mattis.
Aliquam placerat vulputate dignissim. Proin pellentesque vitae arcu ut feugiat. Nunc mi felis, ornare at gravida sed, vestibulum sed urna. Duis fermentum maximus viverra. Donec imperdiet pellentesque sollicitudin. Cras non sem quis metus bibendum molestie. Duis imperdiet nec lectus eu rutrum. Mauris congue enim purus, in iaculis arcu dapibus ut. Nullam id erat tincidunt, iaculis dolor non, lobortis magna. Proin convallis scelerisque maximus. Morbi at lorem fringilla libero blandit fringilla. Ut aliquet tellus non sem dictum viverra. Aenean venenatis purus eget lacus placerat, non mollis mauris pellentesque.
Etiam elit diam, aliquet quis suscipit non, condimentum viverra odio. Praesent mi enim, suscipit id mi in, rhoncus ultricies lorem. Nulla facilisi. Integer convallis sagittis euismod. Vestibulum porttitor sodales turpis ac accumsan. Nullam molestie turpis vel lacus tincidunt, sed finibus erat pharetra. Nullam vestibulum turpis id sollicitudin accumsan. Praesent eget posuere lacus. Donec vehicula, nisl nec suscipit porta, felis lorem gravida orci, a hendrerit tellus nibh sit amet elit.
================================================
FILE: benches/wgpu.rs
================================================
#![allow(missing_docs)]
use criterion::{Bencher, Criterion, criterion_group, criterion_main};
use iced::alignment;
use iced::mouse;
use iced::widget::{canvas, scrollable, stack, text};
use iced::{Color, Element, Font, Length, Pixels, Point, Rectangle, Size, Theme};
use iced_wgpu::Renderer;
use iced_wgpu::wgpu;
criterion_main!(benches);
criterion_group!(benches, wgpu_benchmark);
#[allow(unused_results)]
pub fn wgpu_benchmark(c: &mut Criterion) {
use iced_futures::futures::executor;
use iced_wgpu::wgpu;
let instance = wgpu::Instance::new(&wgpu::InstanceDescriptor {
backends: wgpu::Backends::all(),
..Default::default()
});
let adapter = executor::block_on(instance.request_adapter(&wgpu::RequestAdapterOptions {
power_preference: wgpu::PowerPreference::HighPerformance,
compatible_surface: None,
force_fallback_adapter: false,
}))
.expect("request adapter");
let (device, queue) = executor::block_on(adapter.request_device(&wgpu::DeviceDescriptor {
label: None,
required_features: wgpu::Features::empty(),
required_limits: wgpu::Limits::default(),
memory_hints: wgpu::MemoryHints::MemoryUsage,
trace: wgpu::Trace::Off,
experimental_features: wgpu::ExperimentalFeatures::disabled(),
}))
.expect("request device");
c.bench_function("wgpu — canvas (light)", |b| {
benchmark(b, &adapter, &device, &queue, |_| scene(10));
});
c.bench_function("wgpu — canvas (heavy)", |b| {
benchmark(b, &adapter, &device, &queue, |_| scene(1_000));
});
c.bench_function("wgpu - layered text (light)", |b| {
benchmark(b, &adapter, &device, &queue, |_| layered_text(10));
});
c.bench_function("wgpu - layered text (heavy)", |b| {
benchmark(b, &adapter, &device, &queue, |_| layered_text(1_000));
});
c.bench_function("wgpu - dynamic text (light)", |b| {
benchmark(b, &adapter, &device, &queue, |i| dynamic_text(1_000, i));
});
c.bench_function("wgpu - dynamic text (heavy)", |b| {
benchmark(b, &adapter, &device, &queue, |i| dynamic_text(100_000, i));
});
c.bench_function("wgpu - advanced shaping (light)", |b| {
benchmark(b, &adapter, &device, &queue, |i| advanced_shaping(1_000, i));
});
c.bench_function("wgpu - advanced shaping (heavy)", |b| {
benchmark(b, &adapter, &device, &queue, |i| {
advanced_shaping(100_000, i)
});
});
}
fn benchmark<'a>(
bencher: &mut Bencher<'_>,
adapter: &wgpu::Adapter,
device: &wgpu::Device,
queue: &wgpu::Queue,
view: impl Fn(usize) -> Element<'a, (), Theme, Renderer>,
) {
use iced_wgpu::graphics;
use iced_wgpu::graphics::{Antialiasing, Shell};
use iced_wgpu::wgpu;
use iced_winit::core;
use iced_winit::core::renderer;
use iced_winit::runtime;
let format = wgpu::TextureFormat::Bgra8UnormSrgb;
let engine = iced_wgpu::Engine::new(
adapter,
device.clone(),
queue.clone(),
format,
Some(Antialiasing::MSAAx4),
Shell::headless(),
);
let mut renderer = Renderer::new(engine, renderer::Settings::default());
let viewport = graphics::Viewport::with_physical_size(Size::new(3840, 2160), 2.0);
let texture = device.create_texture(&wgpu::TextureDescriptor {
label: None,
size: wgpu::Extent3d {
width: 3840,
height: 2160,
depth_or_array_layers: 1,
},
mip_level_count: 1,
sample_count: 1,
dimension: wgpu::TextureDimension::D2,
format,
usage: wgpu::TextureUsages::RENDER_ATTACHMENT,
view_formats: &[],
});
let texture_view = texture.create_view(&wgpu::TextureViewDescriptor::default());
let mut i = 0;
let mut cache = Some(runtime::user_interface::Cache::default());
bencher.iter(|| {
let mut user_interface = runtime::UserInterface::build(
view(i),
viewport.logical_size(),
cache.take().unwrap(),
&mut renderer,
);
user_interface.draw(
&mut renderer,
&Theme::Dark,
&core::renderer::Style {
text_color: Color::WHITE,
},
mouse::Cursor::Unavailable,
);
cache = Some(user_interface.into_cache());
let submission = renderer.present(Some(Color::BLACK), format, &texture_view, &viewport);
let _ = device.poll(wgpu::PollType::Wait {
submission_index: Some(submission),
timeout: None,
});
i += 1;
});
}
fn scene<'a, Message: 'a>(n: usize) -> Element<'a, Message, Theme, Renderer> {
struct Scene {
n: usize,
}
impl<Message, Theme> canvas::Program<Message, Theme, Renderer> for Scene {
type State = canvas::Cache<Renderer>;
fn draw(
&self,
cache: &Self::State,
renderer: &Renderer,
_theme: &Theme,
bounds: Rectangle,
_cursor: mouse::Cursor,
) -> Vec<canvas::Geometry<Renderer>> {
vec![cache.draw(renderer, bounds.size(), |frame| {
for i in 0..self.n {
frame.fill_rectangle(
Point::new(0.0, i as f32),
Size::new(10.0, 10.0),
Color::WHITE,
);
}
for i in 0..self.n {
frame.fill_text(canvas::Text {
content: i.to_string(),
position: Point::new(0.0, i as f32),
color: Color::BLACK,
size: Pixels::from(16),
line_height: text::LineHeight::default(),
font: Font::DEFAULT,
align_x: text::Alignment::Left,
align_y: alignment::Vertical::Top,
shaping: text::Shaping::Basic,
wrapping: text::Wrapping::default(),
ellipsis: text::Ellipsis::default(),
max_width: f32::INFINITY,
});
}
})]
}
}
canvas(Scene { n })
.width(Length::Fill)
.height(Length::Fill)
.into()
}
fn layered_text<'a, Message: 'a>(n: usize) -> Element<'a, Message, Theme, Renderer> {
stack((0..n).map(|i| text!("I am paragraph {i}!").into()))
.width(Length::Fill)
.height(Length::Fill)
.into()
}
fn dynamic_text<'a, Message: 'a>(n: usize, i: usize) -> Element<'a, Message, Theme, Renderer> {
const LOREM_IPSUM: &str = include_str!("ipsum.txt");
scrollable(
text!(
"{}... Iteration {i}",
std::iter::repeat(LOREM_IPSUM.chars())
.flatten()
.take(n)
.collect::<String>(),
)
.size(10),
)
.into()
}
fn advanced_shaping<'a, Message: 'a>(n: usize, i: usize) -> Element<'a, Message, Theme, Renderer> {
const LOREM_IPSUM: &str = include_str!("ipsum.txt");
scrollable(
text!(
"{}... Iteration {i} 😎",
std::iter::repeat(LOREM_IPSUM.chars())
.flatten()
.take(n)
.collect::<String>(),
)
.shaping(text::Shaping::Advanced)
.size(10),
)
.into()
}
================================================
FILE: clippy.toml
================================================
too-many-arguments-threshold = 20
enum-variant-name-threshold = 10
================================================
FILE: core/Cargo.toml
================================================
[package]
name = "iced_core"
description = "The essential ideas of iced"
version.workspace = true
edition.workspace = true
authors.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true
categories.workspace = true
keywords.workspace = true
[lints]
workspace = true
[features]
advanced = []
crisp = []
image = []
basic-shaping = []
advanced-shaping = []
[dependencies]
bitflags.workspace = true
bytes.workspace = true
glam.workspace = true
lilt.workspace = true
log.workspace = true
num-traits.workspace = true
rustc-hash.workspace = true
smol_str.workspace = true
thiserror.workspace = true
web-time.workspace = true
serde.workspace = true
serde.optional = true
serde.features = ["derive"]
================================================
FILE: core/README.md
================================================
# `iced_core`
[][documentation]
[](https://crates.io/crates/iced_core)
[](https://github.com/iced-rs/iced/blob/master/LICENSE)
[](https://discord.gg/3xZJ65GAhd)
`iced_core` holds basic reusable types of the public API. For instance, basic data types like `Point`, `Rectangle`, `Length`, etc.
This crate is meant to be a starting point for an Iced runtime.
<p align="center">
<img alt="The foundations" src="../docs/graphs/foundations.png" width="50%">
</p>
[documentation]: https://docs.rs/iced_core
================================================
FILE: core/src/alignment.rs
================================================
//! Align and position widgets.
/// Alignment on the axis of a container.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum Alignment {
/// Align at the start of the axis.
Start,
/// Align at the center of the axis.
Center,
/// Align at the end of the axis.
End,
}
impl From<Horizontal> for Alignment {
fn from(horizontal: Horizontal) -> Self {
match horizontal {
Horizontal::Left => Self::Start,
Horizontal::Center => Self::Center,
Horizontal::Right => Self::End,
}
}
}
impl From<Vertical> for Alignment {
fn from(vertical: Vertical) -> Self {
match vertical {
Vertical::Top => Self::Start,
Vertical::Center => Self::Center,
Vertical::Bottom => Self::End,
}
}
}
/// The horizontal [`Alignment`] of some resource.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum Horizontal {
/// Align left
Left,
/// Horizontally centered
Center,
/// Align right
Right,
}
impl From<Alignment> for Horizontal {
fn from(alignment: Alignment) -> Self {
match alignment {
Alignment::Start => Self::Left,
Alignment::Center => Self::Center,
Alignment::End => Self::Right,
}
}
}
/// The vertical [`Alignment`] of some resource.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum Vertical {
/// Align top
Top,
/// Vertically centered
Center,
/// Align bottom
Bottom,
}
impl From<Alignment> for Vertical {
fn from(alignment: Alignment) -> Self {
match alignment {
Alignment::Start => Self::Top,
Alignment::Center => Self::Center,
Alignment::End => Self::Bottom,
}
}
}
================================================
FILE: core/src/angle.rs
================================================
use crate::{Point, Rectangle, Vector};
use std::f32::consts::{FRAC_PI_2, PI};
use std::fmt::Display;
use std::ops::{Add, AddAssign, Div, Mul, RangeInclusive, Rem, Sub, SubAssign};
/// Degrees
#[derive(Debug, Copy, Clone, PartialEq, PartialOrd)]
pub struct Degrees(pub f32);
impl Degrees {
/// The range of degrees of a circle.
pub const RANGE: RangeInclusive<Self> = Self(0.0)..=Self(360.0);
}
impl PartialEq<f32> for Degrees {
fn eq(&self, other: &f32) -> bool {
self.0.eq(other)
}
}
impl PartialOrd<f32> for Degrees {
fn partial_cmp(&self, other: &f32) -> Option<std::cmp::Ordering> {
self.0.partial_cmp(other)
}
}
impl From<f32> for Degrees {
fn from(degrees: f32) -> Self {
Self(degrees)
}
}
impl From<u8> for Degrees {
fn from(degrees: u8) -> Self {
Self(f32::from(degrees))
}
}
impl From<Degrees> for f32 {
fn from(degrees: Degrees) -> Self {
degrees.0
}
}
impl From<Degrees> for f64 {
fn from(degrees: Degrees) -> Self {
Self::from(degrees.0)
}
}
impl Mul<f32> for Degrees {
type Output = Degrees;
fn mul(self, rhs: f32) -> Self::Output {
Self(self.0 * rhs)
}
}
impl num_traits::FromPrimitive for Degrees {
fn from_i64(n: i64) -> Option<Self> {
Some(Self(n as f32))
}
fn from_u64(n: u64) -> Option<Self> {
Some(Self(n as f32))
}
fn from_f64(n: f64) -> Option<Self> {
Some(Self(n as f32))
}
}
/// Radians
#[derive(Debug, Copy, Clone, PartialEq, PartialOrd)]
pub struct Radians(pub f32);
impl Radians {
/// The range of radians of a circle.
pub const RANGE: RangeInclusive<Self> = Self(0.0)..=Self(2.0 * PI);
/// The amount of radians in half a circle.
pub const PI: Self = Self(PI);
/// Calculates the line in which the angle intercepts the `bounds`.
pub fn to_distance(&self, bounds: &Rectangle) -> (Point, Point) {
let angle = self.0 - FRAC_PI_2;
let r = Vector::new(f32::cos(angle), f32::sin(angle));
let distance_to_rect = f32::max(
f32::abs(r.x * bounds.width / 2.0),
f32::abs(r.y * bounds.height / 2.0),
);
let start = bounds.center() - r * distance_to_rect;
let end = bounds.center() + r * distance_to_rect;
(start, end)
}
}
impl From<Degrees> for Radians {
fn from(degrees: Degrees) -> Self {
Self(degrees.0 * PI / 180.0)
}
}
impl From<f32> for Radians {
fn from(radians: f32) -> Self {
Self(radians)
}
}
impl From<u8> for Radians {
fn from(radians: u8) -> Self {
Self(f32::from(radians))
}
}
impl From<Radians> for f32 {
fn from(radians: Radians) -> Self {
radians.0
}
}
impl From<Radians> for f64 {
fn from(radians: Radians) -> Self {
Self::from(radians.0)
}
}
impl num_traits::FromPrimitive for Radians {
fn from_i64(n: i64) -> Option<Self> {
Some(Self(n as f32))
}
fn from_u64(n: u64) -> Option<Self> {
Some(Self(n as f32))
}
fn from_f64(n: f64) -> Option<Self> {
Some(Self(n as f32))
}
}
impl Sub for Radians {
type Output = Self;
fn sub(self, rhs: Self) -> Self::Output {
Self(self.0 - rhs.0)
}
}
impl SubAssign for Radians {
fn sub_assign(&mut self, rhs: Self) {
self.0 = self.0 - rhs.0;
}
}
impl Add for Radians {
type Output = Self;
fn add(self, rhs: Self) -> Self::Output {
Self(self.0 + rhs.0)
}
}
impl Add<Degrees> for Radians {
type Output = Self;
fn add(self, rhs: Degrees) -> Self::Output {
Self(self.0 + rhs.0.to_radians())
}
}
impl AddAssign for Radians {
fn add_assign(&mut self, rhs: Radians) {
self.0 = self.0 + rhs.0;
}
}
impl Mul for Radians {
type Output = Self;
fn mul(self, rhs: Radians) -> Self::Output {
Radians(self.0 * rhs.0)
}
}
impl Mul<f32> for Radians {
type Output = Self;
fn mul(self, rhs: f32) -> Self::Output {
Self(self.0 * rhs)
}
}
impl Mul<Radians> for f32 {
type Output = Radians;
fn mul(self, rhs: Radians) -> Self::Output {
Radians(self * rhs.0)
}
}
impl Div<f32> for Radians {
type Output = Self;
fn div(self, rhs: f32) -> Self::Output {
Radians(self.0 / rhs)
}
}
impl Div for Radians {
type Output = Self;
fn div(self, rhs: Self) -> Self::Output {
Self(self.0 / rhs.0)
}
}
impl Rem for Radians {
type Output = Self;
fn rem(self, rhs: Self) -> Self::Output {
Self(self.0 % rhs.0)
}
}
impl PartialEq<f32> for Radians {
fn eq(&self, other: &f32) -> bool {
self.0.eq(other)
}
}
impl PartialOrd<f32> for Radians {
fn partial_cmp(&self, other: &f32) -> Option<std::cmp::Ordering> {
self.0.partial_cmp(other)
}
}
impl Display for Radians {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{} rad", self.0)
}
}
================================================
FILE: core/src/animation.rs
================================================
//! Animate your applications.
use crate::time::{Duration, Instant};
pub use lilt::{Easing, FloatRepresentable as Float, Interpolable};
/// The animation of some particular state.
///
/// It tracks state changes and allows projecting interpolated values
/// through time.
#[derive(Debug, Clone)]
pub struct Animation<T>
where
T: Clone + Copy + PartialEq + Float,
{
raw: lilt::Animated<T, Instant>,
duration: Duration, // TODO: Expose duration getter in `lilt`
}
impl<T> Animation<T>
where
T: Clone + Copy + PartialEq + Float,
{
/// Creates a new [`Animation`] with the given initial state.
pub fn new(state: T) -> Self {
Self {
raw: lilt::Animated::new(state),
duration: Duration::from_millis(100),
}
}
/// Sets the [`Easing`] function of the [`Animation`].
///
/// See the [Easing Functions Cheat Sheet](https://easings.net) for
/// details!
pub fn easing(mut self, easing: Easing) -> Self {
self.raw = self.raw.easing(easing);
self
}
/// Sets the duration of the [`Animation`] to 100ms.
pub fn very_quick(self) -> Self {
self.duration(Duration::from_millis(100))
}
/// Sets the duration of the [`Animation`] to 200ms.
pub fn quick(self) -> Self {
self.duration(Duration::from_millis(200))
}
/// Sets the duration of the [`Animation`] to 400ms.
pub fn slow(self) -> Self {
self.duration(Duration::from_millis(400))
}
/// Sets the duration of the [`Animation`] to 500ms.
pub fn very_slow(self) -> Self {
self.duration(Duration::from_millis(500))
}
/// Sets the duration of the [`Animation`] to the given value.
pub fn duration(mut self, duration: Duration) -> Self {
self.raw = self.raw.duration(duration.as_secs_f32() * 1_000.0);
self.duration = duration;
self
}
/// Sets a delay for the [`Animation`].
pub fn delay(mut self, duration: Duration) -> Self {
self.raw = self.raw.delay(duration.as_secs_f64() as f32 * 1000.0);
self
}
/// Makes the [`Animation`] repeat a given amount of times.
///
/// Providing 1 repetition plays the animation twice in total.
pub fn repeat(mut self, repetitions: u32) -> Self {
self.raw = self.raw.repeat(repetitions);
self
}
/// Makes the [`Animation`] repeat forever.
pub fn repeat_forever(mut self) -> Self {
self.raw = self.raw.repeat_forever();
self
}
/// Makes the [`Animation`] automatically reverse when repeating.
pub fn auto_reverse(mut self) -> Self {
self.raw = self.raw.auto_reverse();
self
}
/// Transitions the [`Animation`] from its current state to the given new state
/// at the given time.
pub fn go(mut self, new_state: T, at: Instant) -> Self {
self.go_mut(new_state, at);
self
}
/// Transitions the [`Animation`] from its current state to the given new state
/// at the given time, by reference.
pub fn go_mut(&mut self, new_state: T, at: Instant) {
self.raw.transition(new_state, at);
}
/// Returns true if the [`Animation`] is currently in progress.
///
/// An [`Animation`] is in progress when it is transitioning to a different state.
pub fn is_animating(&self, at: Instant) -> bool {
self.raw.in_progress(at)
}
/// Projects the [`Animation`] into an interpolated value at the given [`Instant`]; using the
/// closure provided to calculate the different keyframes of interpolated values.
///
/// If the [`Animation`] state is a `bool`, you can use the simpler [`interpolate`] method.
///
/// [`interpolate`]: Animation::interpolate
pub fn interpolate_with<I>(&self, f: impl Fn(T) -> I, at: Instant) -> I
where
I: Interpolable,
{
self.raw.animate(f, at)
}
/// Retuns the current state of the [`Animation`].
pub fn value(&self) -> T {
self.raw.value
}
}
impl Animation<bool> {
/// Projects the [`Animation`] into an interpolated value at the given [`Instant`]; using the
/// `start` and `end` values as the origin and destination keyframes.
pub fn interpolate<I>(&self, start: I, end: I, at: Instant) -> I
where
I: Interpolable + Clone,
{
self.raw.animate_bool(start, end, at)
}
/// Returns the remaining [`Duration`] of the [`Animation`].
pub fn remaining(&self, at: Instant) -> Duration {
Duration::from_secs_f32(self.interpolate(self.duration.as_secs_f32(), 0.0, at))
}
}
================================================
FILE: core/src/background.rs
================================================
use crate::Color;
use crate::gradient::{self, Gradient};
/// The background of some element.
#[derive(Debug, Clone, Copy, PartialEq)]
pub enum Background {
/// A solid color.
Color(Color),
/// Linearly interpolate between several colors.
Gradient(Gradient),
// TODO: Add image variant
}
impl Background {
/// Scales the alpha channel of the [`Background`] by the given
/// factor.
pub fn scale_alpha(self, factor: f32) -> Self {
match self {
Self::Color(color) => Self::Color(color.scale_alpha(factor)),
Self::Gradient(gradient) => Self::Gradient(gradient.scale_alpha(factor)),
}
}
}
impl From<Color> for Background {
fn from(color: Color) -> Self {
Background::Color(color)
}
}
impl From<Gradient> for Background {
fn from(gradient: Gradient) -> Self {
Background::Gradient(gradient)
}
}
impl From<gradient::Linear> for Background {
fn from(gradient: gradient::Linear) -> Self {
Background::Gradient(Gradient::Linear(gradient))
}
}
================================================
FILE: core/src/border.rs
================================================
//! Draw lines around containers.
use crate::{Color, Pixels};
/// A border.
#[derive(Debug, Clone, Copy, PartialEq, Default)]
pub struct Border {
/// The color of the border.
pub color: Color,
/// The width of the border.
pub width: f32,
/// The [`Radius`] of the border.
pub radius: Radius,
}
/// Creates a new [`Border`] with the given [`Radius`].
///
/// ```
/// # use iced_core::border::{self, Border};
/// #
/// assert_eq!(border::rounded(10), Border::default().rounded(10));
/// ```
pub fn rounded(radius: impl Into<Radius>) -> Border {
Border::default().rounded(radius)
}
/// Creates a new [`Border`] with the given [`Color`].
///
/// ```
/// # use iced_core::border::{self, Border};
/// # use iced_core::Color;
/// #
/// assert_eq!(border::color(Color::BLACK), Border::default().color(Color::BLACK));
/// ```
pub fn color(color: impl Into<Color>) -> Border {
Border::default().color(color)
}
/// Creates a new [`Border`] with the given `width`.
///
/// ```
/// # use iced_core::border::{self, Border};
/// # use iced_core::Color;
/// #
/// assert_eq!(border::width(10), Border::default().width(10));
/// ```
pub fn width(width: impl Into<Pixels>) -> Border {
Border::default().width(width)
}
impl Border {
/// Sets the [`Color`] of the [`Border`].
pub fn color(self, color: impl Into<Color>) -> Self {
Self {
color: color.into(),
..self
}
}
/// Sets the [`Radius`] of the [`Border`].
pub fn rounded(self, radius: impl Into<Radius>) -> Self {
Self {
radius: radius.into(),
..self
}
}
/// Sets the width of the [`Border`].
pub fn width(self, width: impl Into<Pixels>) -> Self {
Self {
width: width.into().0,
..self
}
}
}
/// The border radii for the corners of a graphics primitive in the order:
/// top-left, top-right, bottom-right, bottom-left.
#[derive(Debug, Clone, Copy, PartialEq, Default)]
pub struct Radius {
/// Top left radius
pub top_left: f32,
/// Top right radius
pub top_right: f32,
/// Bottom right radius
pub bottom_right: f32,
/// Bottom left radius
pub bottom_left: f32,
}
/// Creates a new [`Radius`] with the same value for each corner.
pub fn radius(value: impl Into<Pixels>) -> Radius {
Radius::new(value)
}
/// Creates a new [`Radius`] with the given top left value.
pub fn top_left(value: impl Into<Pixels>) -> Radius {
Radius::default().top_left(value)
}
/// Creates a new [`Radius`] with the given top right value.
pub fn top_right(value: impl Into<Pixels>) -> Radius {
Radius::default().top_right(value)
}
/// Creates a new [`Radius`] with the given bottom right value.
pub fn bottom_right(value: impl Into<Pixels>) -> Radius {
Radius::default().bottom_right(value)
}
/// Creates a new [`Radius`] with the given bottom left value.
pub fn bottom_left(value: impl Into<Pixels>) -> Radius {
Radius::default().bottom_left(value)
}
/// Creates a new [`Radius`] with the given value as top left and top right.
pub fn top(value: impl Into<Pixels>) -> Radius {
Radius::default().top(value)
}
/// Creates a new [`Radius`] with the given value as bottom left and bottom right.
pub fn bottom(value: impl Into<Pixels>) -> Radius {
Radius::default().bottom(value)
}
/// Creates a new [`Radius`] with the given value as top left and bottom left.
pub fn left(value: impl Into<Pixels>) -> Radius {
Radius::default().left(value)
}
/// Creates a new [`Radius`] with the given value as top right and bottom right.
pub fn right(value: impl Into<Pixels>) -> Radius {
Radius::default().right(value)
}
impl Radius {
/// Creates a new [`Radius`] with the same value for each corner.
pub fn new(value: impl Into<Pixels>) -> Self {
let value = value.into().0;
Self {
top_left: value,
top_right: value,
bottom_right: value,
bottom_left: value,
}
}
/// Sets the top left value of the [`Radius`].
pub fn top_left(self, value: impl Into<Pixels>) -> Self {
Self {
top_left: value.into().0,
..self
}
}
/// Sets the top right value of the [`Radius`].
pub fn top_right(self, value: impl Into<Pixels>) -> Self {
Self {
top_right: value.into().0,
..self
}
}
/// Sets the bottom right value of the [`Radius`].
pub fn bottom_right(self, value: impl Into<Pixels>) -> Self {
Self {
bottom_right: value.into().0,
..self
}
}
/// Sets the bottom left value of the [`Radius`].
pub fn bottom_left(self, value: impl Into<Pixels>) -> Self {
Self {
bottom_left: value.into().0,
..self
}
}
/// Sets the top left and top right values of the [`Radius`].
pub fn top(self, value: impl Into<Pixels>) -> Self {
let value = value.into().0;
Self {
top_left: value,
top_right: value,
..self
}
}
/// Sets the bottom left and bottom right values of the [`Radius`].
pub fn bottom(self, value: impl Into<Pixels>) -> Self {
let value = value.into().0;
Self {
bottom_left: value,
bottom_right: value,
..self
}
}
/// Sets the top left and bottom left values of the [`Radius`].
pub fn left(self, value: impl Into<Pixels>) -> Self {
let value = value.into().0;
Self {
top_left: value,
bottom_left: value,
..self
}
}
/// Sets the top right and bottom right values of the [`Radius`].
pub fn right(self, value: impl Into<Pixels>) -> Self {
let value = value.into().0;
Self {
top_right: value,
bottom_right: value,
..self
}
}
}
impl From<f32> for Radius {
fn from(radius: f32) -> Self {
Self {
top_left: radius,
top_right: radius,
bottom_right: radius,
bottom_left: radius,
}
}
}
impl From<u8> for Radius {
fn from(w: u8) -> Self {
Self::from(f32::from(w))
}
}
impl From<u32> for Radius {
fn from(w: u32) -> Self {
Self::from(w as f32)
}
}
impl From<i32> for Radius {
fn from(w: i32) -> Self {
Self::from(w as f32)
}
}
impl From<Radius> for [f32; 4] {
fn from(radi: Radius) -> Self {
[
radi.top_left,
radi.top_right,
radi.bottom_right,
radi.bottom_left,
]
}
}
impl std::ops::Mul<f32> for Radius {
type Output = Self;
fn mul(self, scale: f32) -> Self::Output {
Self {
top_left: self.top_left * scale,
top_right: self.top_right * scale,
bottom_right: self.bottom_right * scale,
bottom_left: self.bottom_left * scale,
}
}
}
================================================
FILE: core/src/clipboard.rs
================================================
//! Access the clipboard.
use std::path::PathBuf;
use std::sync::Arc;
/// A set of clipboard requests.
#[derive(Debug, Clone)]
pub struct Clipboard {
/// The read requests the runtime must fulfill.
pub reads: Vec<Kind>,
/// The content that must be written to the clipboard by the runtime,
/// if any.
pub write: Option<Content>,
}
impl Clipboard {
/// Creates a new empty set of [`Clipboard`] requests.
pub fn new() -> Self {
Self {
reads: Vec::new(),
write: None,
}
}
/// Merges the current [`Clipboard`] requests with others.
pub fn merge(&mut self, other: &mut Self) {
self.reads.append(&mut other.reads);
self.write = other.write.take().or(self.write.take());
}
}
impl Default for Clipboard {
fn default() -> Self {
Self::new()
}
}
/// A clipboard event.
#[derive(Debug, Clone, PartialEq)]
pub enum Event {
/// The clipboard was read.
Read(Result<Arc<Content>, Error>),
/// The clipboard was written.
Written(Result<(), Error>),
}
/// Some clipboard content.
#[derive(Debug, Clone, PartialEq)]
#[allow(missing_docs)]
#[non_exhaustive]
pub enum Content {
Text(String),
Html(String),
#[cfg(feature = "image")]
Image(Image),
Files(Vec<PathBuf>),
}
impl From<String> for Content {
fn from(text: String) -> Self {
Self::Text(text)
}
}
#[cfg(feature = "image")]
impl From<Image> for Content {
fn from(image: Image) -> Self {
Self::Image(image)
}
}
impl From<Vec<PathBuf>> for Content {
fn from(files: Vec<PathBuf>) -> Self {
Self::Files(files)
}
}
/// The kind of some clipboard [`Content`].
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[allow(missing_docs)]
#[non_exhaustive]
pub enum Kind {
Text,
Html,
#[cfg(feature = "image")]
Image,
Files,
}
/// A clipboard image.
#[cfg(feature = "image")]
#[derive(Debug, Clone, PartialEq)]
pub struct Image {
/// The pixels of the image in RGBA format.
pub rgba: crate::Bytes,
/// The physical [`Size`](crate::Size) of the image.
pub size: crate::Size<u32>,
}
/// A clipboard error.
#[derive(Debug, Clone, PartialEq)]
pub enum Error {
/// The clipboard in the current environment is either not present or could not be accessed.
ClipboardUnavailable,
/// The native clipboard is not accessible due to being held by another party.
ClipboardOccupied,
/// The clipboard contents were not available in the requested format.
/// This could either be due to the clipboard being empty or the clipboard contents having
/// an incompatible format to the requested one
ContentNotAvailable,
/// The image or the text that was about the be transferred to/from the clipboard could not be
/// converted to the appropriate format.
ConversionFailure,
/// Any error that doesn't fit the other error types.
Unknown {
/// A description only meant to help the developer that should not be relied on as a
/// means to identify an error case during runtime.
description: Arc<String>,
},
}
================================================
FILE: core/src/color.rs
================================================
use crate::animation::Interpolable;
/// A color in the `sRGB` color space.
///
/// # String Representation
///
/// A color can be represented in either of the following valid formats: `#rrggbb`, `#rrggbbaa`, `#rgb`, and `#rgba`.
/// Where `rgba` represent hexadecimal digits. Both uppercase and lowercase letters are supported.
///
/// If `a` (transparency) is not specified, `1.0` (completely opaque) would be used by default.
///
/// If you have a static color string, using the [`color!`] macro should be preferred
/// since it leverages hexadecimal literal notation and arithmetic directly.
///
/// [`color!`]: crate::color!
#[derive(Debug, Clone, Copy, PartialEq, Default)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[must_use]
pub struct Color {
/// Red component, 0.0 - 1.0
pub r: f32,
/// Green component, 0.0 - 1.0
pub g: f32,
/// Blue component, 0.0 - 1.0
pub b: f32,
/// Transparency, 0.0 - 1.0
pub a: f32,
}
impl Color {
/// The black color.
pub const BLACK: Color = Color {
r: 0.0,
g: 0.0,
b: 0.0,
a: 1.0,
};
/// The white color.
pub const WHITE: Color = Color {
r: 1.0,
g: 1.0,
b: 1.0,
a: 1.0,
};
/// A color with no opacity.
pub const TRANSPARENT: Color = Color {
r: 0.0,
g: 0.0,
b: 0.0,
a: 0.0,
};
/// Creates a new [`Color`].
///
/// In debug mode, it will panic if the values are not in the correct
/// range: 0.0 - 1.0
const fn new(r: f32, g: f32, b: f32, a: f32) -> Color {
debug_assert!(
r >= 0.0 && r <= 1.0,
"Red component must be in [0, 1] range."
);
debug_assert!(
g >= 0.0 && g <= 1.0,
"Green component must be in [0, 1] range."
);
debug_assert!(
b >= 0.0 && b <= 1.0,
"Blue component must be in [0, 1] range."
);
Self { r, g, b, a }
}
/// Creates a [`Color`] from its RGB components.
pub const fn from_rgb(r: f32, g: f32, b: f32) -> Self {
Self::from_rgba(r, g, b, 1.0f32)
}
/// Creates a [`Color`] from its RGBA components.
pub const fn from_rgba(r: f32, g: f32, b: f32, a: f32) -> Self {
Self::new(r, g, b, a)
}
/// Creates a [`Color`] from its RGB8 components.
pub const fn from_rgb8(r: u8, g: u8, b: u8) -> Self {
Self::from_rgba8(r, g, b, 1.0)
}
/// Creates a [`Color`] from its RGB8 components and an alpha value.
pub const fn from_rgba8(r: u8, g: u8, b: u8, a: f32) -> Self {
Self::new(r as f32 / 255.0, g as f32 / 255.0, b as f32 / 255.0, a)
}
/// Creates a [`Color`] from its RGB8 components packed in the lower bits of a `u32`.
pub const fn from_packed_rgb8(rgb: u32) -> Self {
Self::from_packed_rgba8(rgb, 1.0)
}
/// Creates a [`Color`] from its RGB8 components packed in the lower bits of a `u32`
/// and an alpha value.
pub const fn from_packed_rgba8(rgb: u32, a: f32) -> Self {
let r = (rgb & 0xff0000) >> 16;
let g = (rgb & 0xff00) >> 8;
let b = rgb & 0xff;
Self::from_rgba8(r as u8, g as u8, b as u8, a)
}
/// Creates a [`Color`] from its linear RGBA components.
pub fn from_linear_rgba(r: f32, g: f32, b: f32, a: f32) -> Self {
// As described in:
// https://en.wikipedia.org/wiki/SRGB
fn gamma_component(u: f32) -> f32 {
if u < 0.0031308 {
12.92 * u
} else {
1.055 * u.powf(1.0 / 2.4) - 0.055
}
}
Self::new(
gamma_component(r),
gamma_component(g),
gamma_component(b),
a,
)
}
/// Inverts the [`Color`] in-place.
pub const fn invert(&mut self) {
self.r = 1.0f32 - self.r;
self.b = 1.0f32 - self.g;
self.g = 1.0f32 - self.b;
}
/// Returns the inverted [`Color`].
pub const fn inverse(self) -> Self {
Self::new(1.0f32 - self.r, 1.0f32 - self.g, 1.0f32 - self.b, self.a)
}
/// Scales the alpha channel of the [`Color`] by the given factor.
pub const fn scale_alpha(self, factor: f32) -> Self {
Self {
a: self.a * factor,
..self
}
}
/// Mixes the current [`Color`] with another one by the given factor.
pub fn mix(self, b: Color, factor: f32) -> Color {
let b_amount = factor.clamp(0.0, 1.0);
let a_amount = 1.0 - b_amount;
let a_linear = self.into_linear().map(|c| c * a_amount);
let b_linear = b.into_linear().map(|c| c * b_amount);
Color::from_linear_rgba(
a_linear[0] + b_linear[0],
a_linear[1] + b_linear[1],
a_linear[2] + b_linear[2],
a_linear[3] + b_linear[3],
)
}
/// Returns the relative luminance of the [`Color`].
/// <https://www.w3.org/TR/WCAG21/#dfn-relative-luminance>
#[must_use]
pub fn relative_luminance(self) -> f32 {
let linear = self.into_linear();
0.2126 * linear[0] + 0.7152 * linear[1] + 0.0722 * linear[2]
}
/// Returns the [relative contrast ratio] of the [`Color`] against another one.
///
/// [relative contrast ratio]: https://www.w3.org/TR/WCAG21/#dfn-contrast-ratio
#[must_use]
pub fn relative_contrast(self, b: Self) -> f32 {
let lum_a = self.relative_luminance();
let lum_b = b.relative_luminance();
(lum_a.max(lum_b) + 0.05) / (lum_a.min(lum_b) + 0.05)
}
/// Returns true if the current [`Color`] is readable on top
/// of the given background [`Color`].
#[must_use]
pub fn is_readable_on(self, background: Self) -> bool {
background.relative_contrast(self) >= 6.0
}
/// Converts the [`Color`] into its RGBA8 equivalent.
#[must_use]
pub const fn into_rgba8(self) -> [u8; 4] {
[
(self.r * 255.0).round() as u8,
(self.g * 255.0).round() as u8,
(self.b * 255.0).round() as u8,
(self.a * 255.0).round() as u8,
]
}
/// Converts the [`Color`] into its linear values.
#[must_use]
pub fn into_linear(self) -> [f32; 4] {
// As described in:
// https://en.wikipedia.org/wiki/SRGB#The_reverse_transformation
fn linear_component(u: f32) -> f32 {
if u < 0.04045 {
u / 12.92
} else {
((u + 0.055) / 1.055).powf(2.4)
}
}
[
linear_component(self.r),
linear_component(self.g),
linear_component(self.b),
self.a,
]
}
}
impl From<[f32; 3]> for Color {
fn from([r, g, b]: [f32; 3]) -> Self {
Color::new(r, g, b, 1.0)
}
}
impl From<[f32; 4]> for Color {
fn from([r, g, b, a]: [f32; 4]) -> Self {
Color::new(r, g, b, a)
}
}
/// An error which can be returned when parsing color from an RGB hexadecimal string.
///
/// See [`Color`] for specifications for the string.
#[derive(Debug, thiserror::Error)]
pub enum ParseError {
/// The string could not be parsed to valid integers.
#[error(transparent)]
ParseIntError(#[from] std::num::ParseIntError),
/// The string is of invalid length.
#[error("expected hex string of length 3, 4, 6 or 8 excluding optional prefix '#', found {0}")]
InvalidLength(usize),
}
impl std::str::FromStr for Color {
type Err = ParseError;
fn from_str(s: &str) -> Result<Self, Self::Err> {
let hex = s.strip_prefix('#').unwrap_or(s);
let parse_channel = |from: usize, to: usize| -> Result<f32, std::num::ParseIntError> {
let num = usize::from_str_radix(&hex[from..=to], 16)? as f32 / 255.0;
// If we only got half a byte (one letter), expand it into a full byte (two letters)
Ok(if from == to { num + num * 16.0 } else { num })
};
let val = match hex.len() {
3 => Color::from_rgb(
parse_channel(0, 0)?,
parse_channel(1, 1)?,
parse_channel(2, 2)?,
),
4 => Color::from_rgba(
parse_channel(0, 0)?,
parse_channel(1, 1)?,
parse_channel(2, 2)?,
parse_channel(3, 3)?,
),
6 => Color::from_rgb(
parse_channel(0, 1)?,
parse_channel(2, 3)?,
parse_channel(4, 5)?,
),
8 => Color::from_rgba(
parse_channel(0, 1)?,
parse_channel(2, 3)?,
parse_channel(4, 5)?,
parse_channel(6, 7)?,
),
_ => return Err(ParseError::InvalidLength(hex.len())),
};
Ok(val)
}
}
impl std::fmt::Display for Color {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let [r, g, b, a] = self.into_rgba8();
if self.a == 1.0 {
return write!(f, "#{r:02x}{g:02x}{b:02x}");
}
write!(f, "#{r:02x}{g:02x}{b:02x}{a:02x}")
}
}
impl Interpolable for Color {
/// Interpolates the color. Equivalent to [`Color::mix`].
fn interpolated(&self, other: Self, ratio: f32) -> Self {
self.mix(other, ratio)
}
}
/// Creates a [`Color`] with shorter and cleaner syntax.
///
/// # Examples
///
/// ```
/// # use iced_core::{Color, color};
/// assert_eq!(color!(0, 0, 0), Color::BLACK);
/// assert_eq!(color!(0, 0, 0, 0.0), Color::TRANSPARENT);
/// assert_eq!(color!(0xffffff), Color::from_rgb(1.0, 1.0, 1.0));
/// assert_eq!(color!(0xffffff, 0.), Color::from_rgba(1.0, 1.0, 1.0, 0.0));
/// assert_eq!(color!(0x0000ff), Color::from_rgba(0.0, 0.0, 1.0, 1.0));
/// ```
#[macro_export]
macro_rules! color {
($r:expr, $g:expr, $b:expr) => {
$crate::Color::from_rgb8($r, $g, $b)
};
($r:expr, $g:expr, $b:expr, $a:expr) => {{ $crate::Color::from_rgba8($r, $g, $b, $a) }};
($hex:literal) => {{ $crate::color!($hex, 1.0) }};
($hex:literal, $a:expr) => {{
let mut hex = $hex as u32;
// Shorthand notation: 0x123
if stringify!($hex).len() == 5 {
let r = hex & 0xF00;
let g = hex & 0xF0;
let b = hex & 0xF;
hex = (r << 12) | (r << 8) | (g << 8) | (g << 4) | (b << 4) | b;
}
debug_assert!(hex <= 0xffffff, "color! value must not exceed 0xffffff");
$crate::Color::from_packed_rgba8(hex, $a)
}};
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn parse() {
let tests = [
("#ff0000", [255, 0, 0, 255], "#ff0000"),
("00ff0080", [0, 255, 0, 128], "#00ff0080"),
("#F80", [255, 136, 0, 255], "#ff8800"),
("#00f1", [0, 0, 255, 17], "#0000ff11"),
("#00ff", [0, 0, 255, 255], "#0000ff"),
];
for (arg, expected_rgba8, expected_str) in tests {
let color = arg.parse::<Color>().expect("color must parse");
assert_eq!(color.into_rgba8(), expected_rgba8);
assert_eq!(color.to_string(), expected_str);
}
assert!("invalid".parse::<Color>().is_err());
}
const SHORTHAND: Color = color!(0x123);
#[test]
fn shorthand_notation() {
assert_eq!(SHORTHAND, Color::from_rgb8(0x11, 0x22, 0x33));
}
}
================================================
FILE: core/src/content_fit.rs
================================================
//! Control the fit of some content (like an image) within a space.
use crate::Size;
use std::fmt;
/// The strategy used to fit the contents of a widget to its bounding box.
///
/// Each variant of this enum is a strategy that can be applied for resolving
/// differences in aspect ratio and size between the image being displayed and
/// the space its being displayed in.
///
/// For an interactive demonstration of these properties as they are implemented
/// in CSS, see [Mozilla's docs][1], or run the `tour` example
///
/// [1]: https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit
#[derive(Debug, Hash, Clone, Copy, PartialEq, Eq, Default)]
pub enum ContentFit {
/// Scale as big as it can be without needing to crop or hide parts.
///
/// The image will be scaled (preserving aspect ratio) so that it just fits
/// within the window. This won't distort the image or crop/hide any edges,
/// but if the image doesn't fit perfectly, there may be whitespace on the
/// top/bottom or left/right.
///
/// This is a great fit for when you need to display an image without losing
/// any part of it, particularly when the image itself is the focus of the
/// screen.
#[default]
Contain,
/// Scale the image to cover all of the bounding box, cropping if needed.
///
/// This doesn't distort the image, and it ensures that the widget's area is
/// completely covered, but it might crop off a bit of the edges of the
/// widget, particularly when there is a big difference between the aspect
/// ratio of the widget and the aspect ratio of the image.
///
/// This is best for when you're using an image as a background, or to fill
/// space, and any details of the image around the edge aren't too
/// important.
Cover,
/// Distort the image so the widget is 100% covered without cropping.
///
/// This stretches the image to fit the widget, without any whitespace or
/// cropping. However, because of the stretch, the image may look distorted
/// or elongated, particularly when there's a mismatch of aspect ratios.
Fill,
/// Don't resize or scale the image at all.
///
/// This will not apply any transformations to the provided image, but also
/// means that unless you do the math yourself, the widget's area will not
/// be completely covered, or the image might be cropped.
///
/// This is best for when you've sized the image yourself.
None,
/// Scale the image down if it's too big for the space, but never scale it
/// up.
///
/// This works much like [`Contain`](Self::Contain), except that if the
/// image would have been scaled up, it keeps its original resolution to
/// avoid the bluring that accompanies upscaling images.
ScaleDown,
}
impl ContentFit {
/// Attempt to apply the given fit for a content size within some bounds.
///
/// The returned value is the recommended scaled size of the content.
pub fn fit(&self, content: Size, bounds: Size) -> Size {
let content_ar = content.width / content.height;
let bounds_ar = bounds.width / bounds.height;
match self {
Self::Contain => {
if bounds_ar > content_ar {
Size {
width: content.width * bounds.height / content.height,
..bounds
}
} else {
Size {
height: content.height * bounds.width / content.width,
..bounds
}
}
}
Self::Cover => {
if bounds_ar < content_ar {
Size {
width: content.width * bounds.height / content.height,
..bounds
}
} else {
Size {
height: content.height * bounds.width / content.width,
..bounds
}
}
}
Self::Fill => bounds,
Self::None => content,
Self::ScaleDown => {
if bounds_ar > content_ar && bounds.height < content.height {
Size {
width: content.width * bounds.height / content.height,
..bounds
}
} else if bounds.
gitextract_lpzyxa4s/
├── .cargo/
│ └── config.toml
├── .github/
│ ├── FUNDING.yml
│ ├── ISSUE_TEMPLATE/
│ │ ├── BUG-REPORT.yml
│ │ └── config.yml
│ ├── PULL_REQUEST_TEMPLATE.md
│ └── workflows/
│ ├── audit.yml
│ ├── build.yml
│ ├── check.yml
│ ├── document.yml
│ ├── format.yml
│ ├── lint.yml
│ └── test.yml
├── .gitignore
├── CHANGELOG.md
├── CONTRIBUTING.md
├── Cargo.toml
├── Cross.toml
├── DEPENDENCIES.md
├── LICENSE
├── README.md
├── ROADMAP.md
├── beacon/
│ ├── Cargo.toml
│ └── src/
│ ├── client.rs
│ ├── error.rs
│ ├── lib.rs
│ ├── span.rs
│ └── stream.rs
├── benches/
│ ├── ipsum.txt
│ └── wgpu.rs
├── clippy.toml
├── core/
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ ├── alignment.rs
│ ├── angle.rs
│ ├── animation.rs
│ ├── background.rs
│ ├── border.rs
│ ├── clipboard.rs
│ ├── color.rs
│ ├── content_fit.rs
│ ├── element.rs
│ ├── event.rs
│ ├── font.rs
│ ├── gradient.rs
│ ├── image.rs
│ ├── input_method.rs
│ ├── keyboard/
│ │ ├── event.rs
│ │ ├── key.rs
│ │ ├── location.rs
│ │ └── modifiers.rs
│ ├── keyboard.rs
│ ├── layout/
│ │ ├── DRUID_LICENSE
│ │ ├── flex.rs
│ │ ├── limits.rs
│ │ └── node.rs
│ ├── layout.rs
│ ├── length.rs
│ ├── lib.rs
│ ├── mouse/
│ │ ├── button.rs
│ │ ├── click.rs
│ │ ├── cursor.rs
│ │ ├── event.rs
│ │ └── interaction.rs
│ ├── mouse.rs
│ ├── overlay/
│ │ ├── element.rs
│ │ ├── group.rs
│ │ └── nested.rs
│ ├── overlay.rs
│ ├── padding.rs
│ ├── pixels.rs
│ ├── point.rs
│ ├── rectangle.rs
│ ├── renderer/
│ │ └── null.rs
│ ├── renderer.rs
│ ├── rotation.rs
│ ├── settings.rs
│ ├── shadow.rs
│ ├── shell.rs
│ ├── size.rs
│ ├── svg.rs
│ ├── text/
│ │ ├── editor.rs
│ │ ├── highlighter.rs
│ │ └── paragraph.rs
│ ├── text.rs
│ ├── theme/
│ │ └── palette.rs
│ ├── theme.rs
│ ├── time.rs
│ ├── touch.rs
│ ├── transformation.rs
│ ├── vector.rs
│ ├── widget/
│ │ ├── id.rs
│ │ ├── operation/
│ │ │ ├── focusable.rs
│ │ │ ├── scrollable.rs
│ │ │ └── text_input.rs
│ │ ├── operation.rs
│ │ ├── text.rs
│ │ └── tree.rs
│ ├── widget.rs
│ ├── window/
│ │ ├── direction.rs
│ │ ├── event.rs
│ │ ├── icon.rs
│ │ ├── id.rs
│ │ ├── level.rs
│ │ ├── mode.rs
│ │ ├── position.rs
│ │ ├── redraw_request.rs
│ │ ├── screenshot.rs
│ │ ├── settings/
│ │ │ ├── linux.rs
│ │ │ ├── macos.rs
│ │ │ ├── other.rs
│ │ │ ├── wasm.rs
│ │ │ └── windows.rs
│ │ ├── settings.rs
│ │ └── user_attention.rs
│ └── window.rs
├── debug/
│ ├── Cargo.toml
│ └── src/
│ └── lib.rs
├── devtools/
│ ├── Cargo.toml
│ └── src/
│ ├── comet.rs
│ ├── lib.rs
│ └── time_machine.rs
├── docs/
│ ├── redirect.html
│ └── release_summary.py
├── examples/
│ ├── README.md
│ ├── arc/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── bezier_tool/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── changelog/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ ├── changelog.rs
│ │ ├── icon.rs
│ │ └── main.rs
│ ├── checkbox/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── clock/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── color_palette/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── combo_box/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── counter/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── index.html
│ │ └── src/
│ │ └── main.rs
│ ├── custom_quad/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── custom_shader/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ ├── main.rs
│ │ ├── scene/
│ │ │ ├── camera.rs
│ │ │ ├── pipeline/
│ │ │ │ ├── buffer.rs
│ │ │ │ ├── cube.rs
│ │ │ │ ├── uniforms.rs
│ │ │ │ └── vertex.rs
│ │ │ └── pipeline.rs
│ │ ├── scene.rs
│ │ └── shaders/
│ │ ├── cubes.wgsl
│ │ └── depth.wgsl
│ ├── custom_widget/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── delineate/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── download_progress/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── index.html
│ │ └── src/
│ │ ├── download.rs
│ │ └── main.rs
│ ├── editor/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── events/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── exit/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── ferris/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── gallery/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ ├── civitai.rs
│ │ └── main.rs
│ ├── game_of_life/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ ├── main.rs
│ │ └── preset.rs
│ ├── geometry/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── gradient/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── integration/
│ │ ├── .gitignore
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ ├── controls.rs
│ │ ├── main.rs
│ │ ├── scene.rs
│ │ └── shader/
│ │ ├── frag.wgsl
│ │ └── vert.wgsl
│ ├── layout/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── lazy/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── loading_spinners/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ ├── circular.rs
│ │ ├── easing.rs
│ │ ├── linear.rs
│ │ └── main.rs
│ ├── loupe/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── markdown/
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ ├── fonts/
│ │ │ └── markdown-icons.toml
│ │ ├── overview.md
│ │ └── src/
│ │ ├── icon.rs
│ │ └── main.rs
│ ├── modal/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── multi_window/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── multitouch/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── pane_grid/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── pick_list/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── pokedex/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── progress_bar/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── qr_code/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── sandpiles/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── screenshot/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── scrollable/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── sierpinski_triangle/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── slider/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── solar_system/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── stopwatch/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── styling/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── snapshots/
│ │ │ ├── catppuccin_frappé-tiny-skia.sha256
│ │ │ ├── catppuccin_latte-tiny-skia.sha256
│ │ │ ├── catppuccin_macchiato-tiny-skia.sha256
│ │ │ ├── catppuccin_mocha-tiny-skia.sha256
│ │ │ ├── dark-tiny-skia.sha256
│ │ │ ├── dracula-tiny-skia.sha256
│ │ │ ├── ferra-tiny-skia.sha256
│ │ │ ├── gruvbox_dark-tiny-skia.sha256
│ │ │ ├── gruvbox_light-tiny-skia.sha256
│ │ │ ├── kanagawa_dragon-tiny-skia.sha256
│ │ │ ├── kanagawa_lotus-tiny-skia.sha256
│ │ │ ├── kanagawa_wave-tiny-skia.sha256
│ │ │ ├── light-tiny-skia.sha256
│ │ │ ├── moonfly-tiny-skia.sha256
│ │ │ ├── nightfly-tiny-skia.sha256
│ │ │ ├── nord-tiny-skia.sha256
│ │ │ ├── oxocarbon-tiny-skia.sha256
│ │ │ ├── solarized_dark-tiny-skia.sha256
│ │ │ ├── solarized_light-tiny-skia.sha256
│ │ │ ├── tokyo_night-tiny-skia.sha256
│ │ │ ├── tokyo_night_light-tiny-skia.sha256
│ │ │ └── tokyo_night_storm-tiny-skia.sha256
│ │ └── src/
│ │ └── main.rs
│ ├── svg/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── system_information/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── table/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── text/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── the_matrix/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── toast/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── todos/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── iced-todos.desktop
│ │ ├── index.html
│ │ ├── snapshots/
│ │ │ └── creates_a_new_task-tiny-skia.sha256
│ │ ├── src/
│ │ │ └── main.rs
│ │ └── tests/
│ │ └── carl_sagan.ice
│ ├── tooltip/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ └── src/
│ │ └── main.rs
│ ├── tour/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── index.html
│ │ └── src/
│ │ └── main.rs
│ ├── url_handler/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ ├── vectorial_text/
│ │ ├── Cargo.toml
│ │ └── src/
│ │ └── main.rs
│ └── websocket/
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ ├── echo/
│ │ └── server.rs
│ ├── echo.rs
│ └── main.rs
├── futures/
│ ├── Cargo.toml
│ └── src/
│ ├── backend/
│ │ ├── default.rs
│ │ ├── native/
│ │ │ ├── smol.rs
│ │ │ ├── thread_pool.rs
│ │ │ └── tokio.rs
│ │ ├── native.rs
│ │ ├── null.rs
│ │ ├── wasm/
│ │ │ └── wasm_bindgen.rs
│ │ └── wasm.rs
│ ├── backend.rs
│ ├── event.rs
│ ├── executor.rs
│ ├── keyboard.rs
│ ├── lib.rs
│ ├── maybe.rs
│ ├── runtime.rs
│ ├── stream.rs
│ ├── subscription/
│ │ └── tracker.rs
│ └── subscription.rs
├── graphics/
│ ├── Cargo.toml
│ └── src/
│ ├── antialiasing.rs
│ ├── cache.rs
│ ├── color.rs
│ ├── compositor.rs
│ ├── damage.rs
│ ├── error.rs
│ ├── geometry/
│ │ ├── cache.rs
│ │ ├── fill.rs
│ │ ├── frame.rs
│ │ ├── path/
│ │ │ ├── arc.rs
│ │ │ └── builder.rs
│ │ ├── path.rs
│ │ ├── stroke.rs
│ │ ├── style.rs
│ │ └── text.rs
│ ├── geometry.rs
│ ├── gradient.rs
│ ├── image/
│ │ └── storage.rs
│ ├── image.rs
│ ├── layer.rs
│ ├── lib.rs
│ ├── mesh.rs
│ ├── shell.rs
│ ├── text/
│ │ ├── cache.rs
│ │ ├── editor.rs
│ │ └── paragraph.rs
│ ├── text.rs
│ └── viewport.rs
├── highlighter/
│ ├── Cargo.toml
│ └── src/
│ └── lib.rs
├── program/
│ ├── Cargo.toml
│ └── src/
│ ├── lib.rs
│ ├── message.rs
│ └── preset.rs
├── renderer/
│ ├── Cargo.toml
│ └── src/
│ ├── fallback.rs
│ └── lib.rs
├── runtime/
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ ├── clipboard.rs
│ ├── font.rs
│ ├── image.rs
│ ├── keyboard.rs
│ ├── lib.rs
│ ├── system.rs
│ ├── task.rs
│ ├── user_interface.rs
│ ├── widget/
│ │ ├── operation.rs
│ │ └── selector.rs
│ ├── widget.rs
│ └── window.rs
├── selector/
│ ├── Cargo.toml
│ └── src/
│ ├── find.rs
│ ├── lib.rs
│ └── target.rs
├── src/
│ ├── advanced.rs
│ ├── application/
│ │ └── timed.rs
│ ├── application.rs
│ ├── daemon.rs
│ ├── error.rs
│ ├── lib.rs
│ ├── time.rs
│ ├── touch.rs
│ ├── window/
│ │ └── icon.rs
│ └── window.rs
├── test/
│ ├── Cargo.toml
│ └── src/
│ ├── emulator.rs
│ ├── error.rs
│ ├── ice.rs
│ ├── instruction.rs
│ ├── lib.rs
│ └── simulator.rs
├── tester/
│ ├── Cargo.toml
│ ├── fonts/
│ │ └── iced_tester-icons.toml
│ └── src/
│ ├── icon.rs
│ ├── lib.rs
│ └── recorder.rs
├── tiny_skia/
│ ├── Cargo.toml
│ └── src/
│ ├── engine.rs
│ ├── geometry.rs
│ ├── layer.rs
│ ├── lib.rs
│ ├── primitive.rs
│ ├── raster.rs
│ ├── text.rs
│ ├── vector.rs
│ ├── window/
│ │ └── compositor.rs
│ └── window.rs
├── wgpu/
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ ├── buffer.rs
│ ├── color.rs
│ ├── engine.rs
│ ├── geometry.rs
│ ├── image/
│ │ ├── atlas/
│ │ │ ├── allocation.rs
│ │ │ ├── allocator.rs
│ │ │ ├── entry.rs
│ │ │ └── layer.rs
│ │ ├── atlas.rs
│ │ ├── cache.rs
│ │ ├── mod.rs
│ │ ├── null.rs
│ │ ├── raster.rs
│ │ └── vector.rs
│ ├── layer.rs
│ ├── lib.rs
│ ├── primitive.rs
│ ├── quad/
│ │ ├── gradient.rs
│ │ └── solid.rs
│ ├── quad.rs
│ ├── shader/
│ │ ├── blit.wgsl
│ │ ├── color/
│ │ │ └── linear_rgb.wgsl
│ │ ├── color.wgsl
│ │ ├── image.wgsl
│ │ ├── quad/
│ │ │ ├── gradient.wgsl
│ │ │ └── solid.wgsl
│ │ ├── quad.wgsl
│ │ ├── triangle/
│ │ │ ├── gradient.wgsl
│ │ │ └── solid.wgsl
│ │ ├── triangle.wgsl
│ │ └── vertex.wgsl
│ ├── text.rs
│ ├── triangle/
│ │ └── msaa.rs
│ ├── triangle.rs
│ ├── window/
│ │ └── compositor.rs
│ └── window.rs
├── widget/
│ ├── Cargo.toml
│ └── src/
│ ├── action.rs
│ ├── button.rs
│ ├── canvas/
│ │ └── program.rs
│ ├── canvas.rs
│ ├── checkbox.rs
│ ├── column.rs
│ ├── combo_box.rs
│ ├── container.rs
│ ├── float.rs
│ ├── grid.rs
│ ├── helpers.rs
│ ├── image/
│ │ └── viewer.rs
│ ├── image.rs
│ ├── keyed/
│ │ └── column.rs
│ ├── keyed.rs
│ ├── lazy/
│ │ ├── cache.rs
│ │ ├── component.rs
│ │ └── helpers.rs
│ ├── lazy.rs
│ ├── lib.rs
│ ├── markdown.rs
│ ├── mouse_area.rs
│ ├── overlay/
│ │ └── menu.rs
│ ├── overlay.rs
│ ├── pane_grid/
│ │ ├── axis.rs
│ │ ├── configuration.rs
│ │ ├── content.rs
│ │ ├── controls.rs
│ │ ├── direction.rs
│ │ ├── draggable.rs
│ │ ├── node.rs
│ │ ├── pane.rs
│ │ ├── split.rs
│ │ ├── state.rs
│ │ └── title_bar.rs
│ ├── pane_grid.rs
│ ├── pick_list.rs
│ ├── pin.rs
│ ├── progress_bar.rs
│ ├── qr_code.rs
│ ├── radio.rs
│ ├── responsive.rs
│ ├── row.rs
│ ├── rule.rs
│ ├── scrollable.rs
│ ├── sensor.rs
│ ├── shader/
│ │ └── program.rs
│ ├── shader.rs
│ ├── slider.rs
│ ├── space.rs
│ ├── stack.rs
│ ├── svg.rs
│ ├── table.rs
│ ├── text/
│ │ └── rich.rs
│ ├── text.rs
│ ├── text_editor.rs
│ ├── text_input/
│ │ ├── cursor.rs
│ │ ├── editor.rs
│ │ └── value.rs
│ ├── text_input.rs
│ ├── themer.rs
│ ├── toggler.rs
│ ├── tooltip.rs
│ └── vertical_slider.rs
└── winit/
├── Cargo.toml
├── README.md
└── src/
├── clipboard.rs
├── conversion.rs
├── error.rs
├── lib.rs
├── proxy.rs
├── window/
│ └── state.rs
└── window.rs
Showing preview only (425K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (5744 symbols across 343 files)
FILE: beacon/src/client.rs
type Client (line 19) | pub struct Client {
method log (line 55) | pub fn log(&self, event: Event) {
method is_connected (line 62) | pub fn is_connected(&self) -> bool {
method quit (line 66) | pub fn quit(&self) {
method subscribe (line 72) | pub fn subscribe(&self) -> mpsc::Receiver<Command> {
type Message (line 26) | pub enum Message {
type Event (line 44) | pub enum Event {
type Metadata (line 81) | pub struct Metadata {
function connect (line 88) | pub fn connect(metadata: Metadata) -> Client {
type Action (line 105) | enum Action {
type Command (line 111) | pub enum Command {
function run (line 117) | async fn run(
function server_address_from_env (line 221) | pub fn server_address_from_env() -> String {
function _connect (line 227) | async fn _connect() -> Result<net::TcpStream, io::Error> {
function send (line 237) | async fn send(stream: &mut net::tcp::OwnedWriteHalf, message: Message) -...
function receive (line 248) | async fn receive(
FILE: beacon/src/error.rs
type Error (line 4) | pub enum Error {
FILE: beacon/src/lib.rs
type Connection (line 25) | pub struct Connection {
method rewind_to (line 30) | pub fn rewind_to<'a>(&self, message: usize) -> impl Future<Output = ()...
method go_live (line 38) | pub fn go_live<'a>(&self) -> impl Future<Output = ()> + 'a {
type Event (line 48) | pub enum Event {
method at (line 78) | pub fn at(&self) -> SystemTime {
function is_running (line 90) | pub fn is_running() -> bool {
function run (line 94) | pub fn run() -> impl Stream<Item = Event> {
function receive (line 282) | async fn receive(
function send (line 297) | async fn send(
function delay (line 311) | async fn delay() {
FILE: beacon/src/span.rs
type Span (line 6) | pub enum Span {
type Stage (line 38) | pub enum Stage {
method fmt (line 52) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
type Stage (line 74) | pub struct Stage {
method fmt (line 52) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
type Primitive (line 83) | pub enum Primitive {
FILE: beacon/src/stream.rs
function channel (line 5) | pub fn channel<T, F>(f: impl Fn(mpsc::Sender<T>) -> F) -> impl Stream<It...
FILE: benches/wgpu.rs
function wgpu_benchmark (line 15) | pub fn wgpu_benchmark(c: &mut Criterion) {
function benchmark (line 72) | fn benchmark<'a>(
function scene (line 151) | fn scene<'a, Message: 'a>(n: usize) -> Element<'a, Message, Theme, Rende...
function layered_text (line 202) | fn layered_text<'a, Message: 'a>(n: usize) -> Element<'a, Message, Theme...
function dynamic_text (line 209) | fn dynamic_text<'a, Message: 'a>(n: usize, i: usize) -> Element<'a, Mess...
function advanced_shaping (line 225) | fn advanced_shaping<'a, Message: 'a>(n: usize, i: usize) -> Element<'a, ...
FILE: core/src/alignment.rs
type Alignment (line 5) | pub enum Alignment {
method from (line 17) | fn from(horizontal: Horizontal) -> Self {
method from (line 27) | fn from(vertical: Vertical) -> Self {
type Horizontal (line 38) | pub enum Horizontal {
method from (line 50) | fn from(alignment: Alignment) -> Self {
type Vertical (line 61) | pub enum Vertical {
method from (line 73) | fn from(alignment: Alignment) -> Self {
FILE: core/src/angle.rs
type Degrees (line 9) | pub struct Degrees(pub f32);
constant RANGE (line 13) | pub const RANGE: RangeInclusive<Self> = Self(0.0)..=Self(360.0);
method eq (line 17) | fn eq(&self, other: &f32) -> bool {
method partial_cmp (line 23) | fn partial_cmp(&self, other: &f32) -> Option<std::cmp::Ordering> {
method from (line 29) | fn from(degrees: f32) -> Self {
method from (line 35) | fn from(degrees: u8) -> Self {
type Output (line 53) | type Output = Degrees;
method mul (line 55) | fn mul(self, rhs: f32) -> Self::Output {
method from_i64 (line 61) | fn from_i64(n: i64) -> Option<Self> {
method from_u64 (line 65) | fn from_u64(n: u64) -> Option<Self> {
method from_f64 (line 69) | fn from_f64(n: f64) -> Option<Self> {
function from (line 41) | fn from(degrees: Degrees) -> Self {
function from (line 47) | fn from(degrees: Degrees) -> Self {
type Radians (line 76) | pub struct Radians(pub f32);
constant RANGE (line 80) | pub const RANGE: RangeInclusive<Self> = Self(0.0)..=Self(2.0 * PI);
constant PI (line 83) | pub const PI: Self = Self(PI);
method to_distance (line 86) | pub fn to_distance(&self, bounds: &Rectangle) -> (Point, Point) {
method from (line 103) | fn from(degrees: Degrees) -> Self {
method from (line 109) | fn from(radians: f32) -> Self {
method from (line 115) | fn from(radians: u8) -> Self {
method from_i64 (line 133) | fn from_i64(n: i64) -> Option<Self> {
method from_u64 (line 137) | fn from_u64(n: u64) -> Option<Self> {
method from_f64 (line 141) | fn from_f64(n: f64) -> Option<Self> {
type Output (line 169) | type Output = Self;
method add (line 171) | fn add(self, rhs: Degrees) -> Self::Output {
type Output (line 191) | type Output = Self;
method mul (line 193) | fn mul(self, rhs: f32) -> Self::Output {
type Output (line 207) | type Output = Self;
method div (line 209) | fn div(self, rhs: f32) -> Self::Output {
method eq (line 231) | fn eq(&self, other: &f32) -> bool {
method partial_cmp (line 237) | fn partial_cmp(&self, other: &f32) -> Option<std::cmp::Ordering> {
function from (line 121) | fn from(radians: Radians) -> Self {
function from (line 127) | fn from(radians: Radians) -> Self {
type Output (line 147) | type Output = Self;
method sub (line 149) | fn sub(self, rhs: Self) -> Self::Output {
method sub_assign (line 155) | fn sub_assign(&mut self, rhs: Self) {
type Output (line 161) | type Output = Self;
method add (line 163) | fn add(self, rhs: Self) -> Self::Output {
method add_assign (line 177) | fn add_assign(&mut self, rhs: Radians) {
type Output (line 183) | type Output = Self;
method mul (line 185) | fn mul(self, rhs: Radians) -> Self::Output {
type Output (line 199) | type Output = Radians;
function mul (line 201) | fn mul(self, rhs: Radians) -> Self::Output {
type Output (line 215) | type Output = Self;
method div (line 217) | fn div(self, rhs: Self) -> Self::Output {
type Output (line 223) | type Output = Self;
method rem (line 225) | fn rem(self, rhs: Self) -> Self::Output {
method fmt (line 243) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
FILE: core/src/animation.rs
type Animation (line 11) | pub struct Animation<T>
function new (line 24) | pub fn new(state: T) -> Self {
function easing (line 35) | pub fn easing(mut self, easing: Easing) -> Self {
function very_quick (line 41) | pub fn very_quick(self) -> Self {
function quick (line 46) | pub fn quick(self) -> Self {
function slow (line 51) | pub fn slow(self) -> Self {
function very_slow (line 56) | pub fn very_slow(self) -> Self {
function duration (line 61) | pub fn duration(mut self, duration: Duration) -> Self {
function delay (line 68) | pub fn delay(mut self, duration: Duration) -> Self {
function repeat (line 76) | pub fn repeat(mut self, repetitions: u32) -> Self {
function repeat_forever (line 82) | pub fn repeat_forever(mut self) -> Self {
function auto_reverse (line 88) | pub fn auto_reverse(mut self) -> Self {
function go (line 95) | pub fn go(mut self, new_state: T, at: Instant) -> Self {
function go_mut (line 102) | pub fn go_mut(&mut self, new_state: T, at: Instant) {
function is_animating (line 109) | pub fn is_animating(&self, at: Instant) -> bool {
function interpolate_with (line 119) | pub fn interpolate_with<I>(&self, f: impl Fn(T) -> I, at: Instant) -> I
function value (line 127) | pub fn value(&self) -> T {
function interpolate (line 135) | pub fn interpolate<I>(&self, start: I, end: I, at: Instant) -> I
function remaining (line 143) | pub fn remaining(&self, at: Instant) -> Duration {
FILE: core/src/background.rs
type Background (line 6) | pub enum Background {
method scale_alpha (line 17) | pub fn scale_alpha(self, factor: f32) -> Self {
method from (line 26) | fn from(color: Color) -> Self {
method from (line 32) | fn from(gradient: Gradient) -> Self {
method from (line 38) | fn from(gradient: gradient::Linear) -> Self {
FILE: core/src/border.rs
type Border (line 6) | pub struct Border {
method color (line 54) | pub fn color(self, color: impl Into<Color>) -> Self {
method rounded (line 62) | pub fn rounded(self, radius: impl Into<Radius>) -> Self {
method width (line 70) | pub fn width(self, width: impl Into<Pixels>) -> Self {
function rounded (line 24) | pub fn rounded(radius: impl Into<Radius>) -> Border {
function color (line 36) | pub fn color(color: impl Into<Color>) -> Border {
function width (line 48) | pub fn width(width: impl Into<Pixels>) -> Border {
type Radius (line 81) | pub struct Radius {
method new (line 139) | pub fn new(value: impl Into<Pixels>) -> Self {
method top_left (line 151) | pub fn top_left(self, value: impl Into<Pixels>) -> Self {
method top_right (line 159) | pub fn top_right(self, value: impl Into<Pixels>) -> Self {
method bottom_right (line 167) | pub fn bottom_right(self, value: impl Into<Pixels>) -> Self {
method bottom_left (line 175) | pub fn bottom_left(self, value: impl Into<Pixels>) -> Self {
method top (line 183) | pub fn top(self, value: impl Into<Pixels>) -> Self {
method bottom (line 194) | pub fn bottom(self, value: impl Into<Pixels>) -> Self {
method left (line 205) | pub fn left(self, value: impl Into<Pixels>) -> Self {
method right (line 216) | pub fn right(self, value: impl Into<Pixels>) -> Self {
method from (line 228) | fn from(radius: f32) -> Self {
method from (line 239) | fn from(w: u8) -> Self {
method from (line 245) | fn from(w: u32) -> Self {
method from (line 251) | fn from(w: i32) -> Self {
type Output (line 268) | type Output = Self;
method mul (line 270) | fn mul(self, scale: f32) -> Self::Output {
function radius (line 93) | pub fn radius(value: impl Into<Pixels>) -> Radius {
function top_left (line 98) | pub fn top_left(value: impl Into<Pixels>) -> Radius {
function top_right (line 103) | pub fn top_right(value: impl Into<Pixels>) -> Radius {
function bottom_right (line 108) | pub fn bottom_right(value: impl Into<Pixels>) -> Radius {
function bottom_left (line 113) | pub fn bottom_left(value: impl Into<Pixels>) -> Radius {
function top (line 118) | pub fn top(value: impl Into<Pixels>) -> Radius {
function bottom (line 123) | pub fn bottom(value: impl Into<Pixels>) -> Radius {
function left (line 128) | pub fn left(value: impl Into<Pixels>) -> Radius {
function right (line 133) | pub fn right(value: impl Into<Pixels>) -> Radius {
function from (line 257) | fn from(radi: Radius) -> Self {
FILE: core/src/clipboard.rs
type Clipboard (line 7) | pub struct Clipboard {
method new (line 17) | pub fn new() -> Self {
method merge (line 25) | pub fn merge(&mut self, other: &mut Self) {
method default (line 32) | fn default() -> Self {
type Event (line 39) | pub enum Event {
type Content (line 51) | pub enum Content {
method from (line 60) | fn from(text: String) -> Self {
method from (line 67) | fn from(image: Image) -> Self {
method from (line 73) | fn from(files: Vec<PathBuf>) -> Self {
type Kind (line 82) | pub enum Kind {
type Image (line 93) | pub struct Image {
type Error (line 103) | pub enum Error {
FILE: core/src/color.rs
type Color (line 19) | pub struct Color {
constant BLACK (line 32) | pub const BLACK: Color = Color {
constant WHITE (line 40) | pub const WHITE: Color = Color {
constant TRANSPARENT (line 48) | pub const TRANSPARENT: Color = Color {
method new (line 59) | const fn new(r: f32, g: f32, b: f32, a: f32) -> Color {
method from_rgb (line 77) | pub const fn from_rgb(r: f32, g: f32, b: f32) -> Self {
method from_rgba (line 82) | pub const fn from_rgba(r: f32, g: f32, b: f32, a: f32) -> Self {
method from_rgb8 (line 87) | pub const fn from_rgb8(r: u8, g: u8, b: u8) -> Self {
method from_rgba8 (line 92) | pub const fn from_rgba8(r: u8, g: u8, b: u8, a: f32) -> Self {
method from_packed_rgb8 (line 97) | pub const fn from_packed_rgb8(rgb: u32) -> Self {
method from_packed_rgba8 (line 103) | pub const fn from_packed_rgba8(rgb: u32, a: f32) -> Self {
method from_linear_rgba (line 112) | pub fn from_linear_rgba(r: f32, g: f32, b: f32, a: f32) -> Self {
method invert (line 132) | pub const fn invert(&mut self) {
method inverse (line 139) | pub const fn inverse(self) -> Self {
method scale_alpha (line 144) | pub const fn scale_alpha(self, factor: f32) -> Self {
method mix (line 152) | pub fn mix(self, b: Color, factor: f32) -> Color {
method relative_luminance (line 170) | pub fn relative_luminance(self) -> f32 {
method relative_contrast (line 179) | pub fn relative_contrast(self, b: Self) -> f32 {
method is_readable_on (line 189) | pub fn is_readable_on(self, background: Self) -> bool {
method into_rgba8 (line 195) | pub const fn into_rgba8(self) -> [u8; 4] {
method into_linear (line 206) | pub fn into_linear(self) -> [f32; 4] {
method from (line 227) | fn from([r, g, b]: [f32; 3]) -> Self {
method from (line 233) | fn from([r, g, b, a]: [f32; 4]) -> Self {
type Err (line 252) | type Err = ParseError;
method from_str (line 254) | fn from_str(s: &str) -> Result<Self, Self::Err> {
method fmt (line 295) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
type ParseError (line 242) | pub enum ParseError {
method interpolated (line 308) | fn interpolated(&self, other: Self, ratio: f32) -> Self {
function parse (line 355) | fn parse() {
constant SHORTHAND (line 374) | const SHORTHAND: Color = color!(0x123);
function shorthand_notation (line 377) | fn shorthand_notation() {
FILE: core/src/content_fit.rs
type ContentFit (line 17) | pub enum ContentFit {
method fit (line 72) | pub fn fit(&self, content: Size, bounds: Size) -> Size {
method fmt (line 125) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
FILE: core/src/element.rs
type Element (line 20) | pub struct Element<'a, Message, Theme, Renderer> {
function new (line 26) | pub fn new(widget: impl Widget<Message, Theme, Renderer> + 'a) -> Self
function as_widget (line 36) | pub fn as_widget(&self) -> &dyn Widget<Message, Theme, Renderer> {
function as_widget_mut (line 41) | pub fn as_widget_mut(&mut self) -> &mut dyn Widget<Message, Theme, Rende...
function map (line 184) | pub fn map<B>(self, f: impl Fn(Message) -> B + 'a) -> Element<'a, B, The...
function explain (line 200) | pub fn explain<C: Into<Color>>(self, color: C) -> Element<'a, Message, T...
function borrow (line 215) | fn borrow(&self) -> &(dyn Widget<Message, Theme, Renderer> + 'a) {
function borrow (line 223) | fn borrow(&self) -> &(dyn Widget<Message, Theme, Renderer> + 'a) {
type Map (line 228) | struct Map<'a, A, B, Theme, Renderer> {
function new (line 234) | pub fn new<F>(
function tag (line 254) | fn tag(&self) -> tree::Tag {
function state (line 258) | fn state(&self) -> tree::State {
function children (line 262) | fn children(&self) -> Vec<Tree> {
function diff (line 266) | fn diff(&self, tree: &mut Tree) {
function size (line 270) | fn size(&self) -> Size<Length> {
function size_hint (line 274) | fn size_hint(&self) -> Size<Length> {
function layout (line 278) | fn layout(
function operate (line 287) | fn operate(
function update (line 297) | fn update(
function draw (line 323) | fn draw(
function mouse_interaction (line 337) | fn mouse_interaction(
function overlay (line 349) | fn overlay<'b>(
type Explain (line 365) | struct Explain<'a, Message, Theme, Renderer: crate::Renderer> {
function new (line 374) | fn new(element: Element<'a, Message, Theme, Renderer>, color: Color) -> ...
function size (line 384) | fn size(&self) -> Size<Length> {
function size_hint (line 388) | fn size_hint(&self) -> Size<Length> {
function tag (line 392) | fn tag(&self) -> tree::Tag {
function state (line 396) | fn state(&self) -> tree::State {
function children (line 400) | fn children(&self) -> Vec<Tree> {
function diff (line 404) | fn diff(&self, tree: &mut Tree) {
function layout (line 408) | fn layout(
function operate (line 417) | fn operate(
function update (line 429) | fn update(
function draw (line 444) | fn draw(
function mouse_interaction (line 486) | fn mouse_interaction(
function overlay (line 499) | fn overlay<'b>(
function from (line 518) | fn from(element: Option<T>) -> Self {
FILE: core/src/event.rs
type Event (line 16) | pub enum Event {
type Status (line 38) | pub enum Status {
method merge (line 59) | pub fn merge(self, b: Self) -> Self {
FILE: core/src/font.rs
type Font (line 6) | pub struct Font {
constant DEFAULT (line 19) | pub const DEFAULT: Font = Font {
constant MONOSPACE (line 27) | pub const MONOSPACE: Font = Font {
method new (line 33) | pub const fn new(name: &'static str) -> Self {
method with_family (line 41) | pub fn with_family(family: impl Into<Family>) -> Self {
method weight (line 49) | pub const fn weight(self, weight: Weight) -> Self {
method stretch (line 54) | pub const fn stretch(self, stretch: Stretch) -> Self {
method style (line 59) | pub const fn style(self, style: Style) -> Self {
method from (line 65) | fn from(name: &'static str) -> Self {
method from (line 71) | fn from(family: Family) -> Self {
type Family (line 78) | pub enum Family {
constant VARIANTS (line 107) | pub const VARIANTS: &[Self] = &[
method name (line 118) | pub fn name(name: &str) -> Self {
method from (line 138) | fn from(name: &str) -> Self {
method fmt (line 144) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
type Weight (line 159) | pub enum Weight {
type Stretch (line 175) | pub enum Stretch {
type Style (line 191) | pub enum Style {
type Error (line 200) | pub enum Error {}
FILE: core/src/gradient.rs
type Gradient (line 9) | pub enum Gradient {
method scale_alpha (line 16) | pub fn scale_alpha(self, factor: f32) -> Self {
method from (line 24) | fn from(gradient: Linear) -> Self {
type ColorStop (line 33) | pub struct ColorStop {
type Linear (line 45) | pub struct Linear {
method new (line 54) | pub fn new(angle: impl Into<Radians>) -> Self {
method add_stop (line 66) | pub fn add_stop(mut self, offset: f32, color: Color) -> Self {
method add_stops (line 86) | pub fn add_stops(mut self, stops: impl IntoIterator<Item = ColorStop>)...
method scale_alpha (line 96) | pub fn scale_alpha(mut self, factor: f32) -> Self {
FILE: core/src/image.rs
type Image (line 14) | pub struct Image<H = Handle> {
method from (line 67) | fn from(handle: &Handle) -> Self {
function new (line 37) | pub fn new(handle: impl Into<Handle>) -> Self {
function filter_method (line 48) | pub fn filter_method(mut self, filter_method: FilterMethod) -> Self {
function rotation (line 54) | pub fn rotation(mut self, rotation: impl Into<Radians>) -> Self {
function opacity (line 60) | pub fn opacity(mut self, opacity: impl Into<f32>) -> Self {
type Handle (line 74) | pub enum Handle {
method from_path (line 111) | pub fn from_path<T: Into<PathBuf>>(path: T) -> Handle {
method from_bytes (line 123) | pub fn from_bytes(bytes: impl Into<Bytes>) -> Handle {
method from_rgba (line 134) | pub fn from_rgba(width: u32, height: u32, pixels: impl Into<Bytes>) ->...
method id (line 144) | pub fn id(&self) -> Id {
method from (line 155) | fn from(path: T) -> Handle {
method from (line 161) | fn from(value: &Handle) -> Self {
method fmt (line 167) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
type Id (line 182) | pub struct Id(_Id);
method unique (line 191) | fn unique() -> Self {
method path (line 199) | fn path(path: impl AsRef<Path>) -> Self {
type _Id (line 185) | enum _Id {
type FilterMethod (line 213) | pub enum FilterMethod {
type Allocation (line 237) | pub struct Allocation(Arc<Memory>);
method downgrade (line 248) | pub fn downgrade(&self) -> Weak<Memory> {
method upgrade (line 253) | pub fn upgrade(weak: &Weak<Memory>) -> Option<Allocation> {
method handle (line 258) | pub fn handle(&self) -> &Handle {
method size (line 263) | pub fn size(&self) -> Size<u32> {
type Memory (line 241) | pub struct Memory {
function allocate (line 275) | pub unsafe fn allocate(handle: &Handle, size: Size<u32>) -> Allocation {
type Renderer (line 285) | pub trait Renderer: crate::Renderer {
method load_image (line 295) | fn load_image(&self, handle: &Self::Handle) -> Result<Allocation, Error>;
method measure_image (line 303) | fn measure_image(&self, handle: &Self::Handle) -> Option<Size<u32>>;
method draw_image (line 312) | fn draw_image(&mut self, image: Image<Self::Handle>, bounds: Rectangle...
type Error (line 317) | pub enum Error {
FILE: core/src/input_method.rs
type InputMethod (line 8) | pub enum InputMethod<T = String> {
method merge (line 112) | pub fn merge<T: AsRef<str>>(&mut self, other: &InputMethod<T>) {
method is_enabled (line 121) | pub fn is_enabled(&self) -> bool {
type Preedit (line 30) | pub struct Preedit<T = String> {
method as_ref (line 63) | pub fn as_ref(&self) -> Preedit<&str> {
function new (line 41) | pub fn new() -> Self
function to_owned (line 49) | pub fn to_owned(&self) -> Preedit
type Purpose (line 74) | pub enum Purpose {
function to_owned (line 128) | pub fn to_owned(&self) -> InputMethod
type Event (line 157) | pub enum Event {
FILE: core/src/keyboard/event.rs
type Event (line 12) | pub enum Event {
FILE: core/src/keyboard/key.rs
type Key (line 10) | pub enum Key<C = SmolStr> {
method as_ref (line 26) | pub fn as_ref(&self) -> Key<&str> {
method to_latin (line 60) | pub fn to_latin(&self, physical_key: Physical) -> Option<char> {
method from (line 121) | fn from(named: Named) -> Self {
type Named (line 133) | pub enum Named {
type Code (line 849) | pub enum Code {
method eq (line 1348) | fn eq(&self, rhs: &Physical) -> bool {
type NativeCode (line 1307) | pub enum NativeCode {
method eq (line 1365) | fn eq(&self, rhs: &Physical) -> bool {
type Physical (line 1325) | pub enum Physical {
method eq (line 1338) | fn eq(&self, rhs: &Code) -> bool {
method eq (line 1355) | fn eq(&self, rhs: &NativeCode) -> bool {
FILE: core/src/keyboard/location.rs
type Location (line 3) | pub enum Location {
FILE: core/src/keyboard/modifiers.rs
constant COMMAND (line 39) | pub const COMMAND: Self = if cfg!(target_os = "macos") {
method shift (line 48) | pub fn shift(self) -> bool {
method control (line 55) | pub fn control(self) -> bool {
method alt (line 62) | pub fn alt(self) -> bool {
method logo (line 69) | pub fn logo(self) -> bool {
method command (line 80) | pub fn command(self) -> bool {
method jump (line 94) | pub fn jump(self) -> bool {
method macos_command (line 106) | pub fn macos_command(self) -> bool {
FILE: core/src/layout.rs
type Layout (line 14) | pub struct Layout<'a> {
function new (line 21) | pub fn new(node: &'a Node) -> Self {
function with_offset (line 27) | pub fn with_offset(offset: Vector, node: &'a Node) -> Self {
function position (line 37) | pub fn position(&self) -> Point {
function bounds (line 45) | pub fn bounds(&self) -> Rectangle {
function children (line 57) | pub fn children(self) -> impl DoubleEndedIterator<Item = Layout<'a>> + E...
function child (line 70) | pub fn child(self, index: usize) -> Layout<'a> {
function next_to_each_other (line 78) | pub fn next_to_each_other(
function atomic (line 112) | pub fn atomic(limits: &Limits, width: impl Into<Length>, height: impl In...
function sized (line 122) | pub fn sized(
function contained (line 140) | pub fn contained(
function padded (line 158) | pub fn padded(
function positioned (line 169) | pub fn positioned(
FILE: core/src/layout/flex.rs
type Axis (line 27) | pub enum Axis {
method main (line 36) | fn main(&self, size: Size) -> f32 {
method cross (line 43) | fn cross(&self, size: Size) -> f32 {
method pack (line 50) | fn pack<T>(&self, main: T, cross: T) -> (T, T) {
function resolve (line 62) | pub fn resolve<Message, Theme, Renderer>(
FILE: core/src/layout/limits.rs
type Limits (line 6) | pub struct Limits {
constant NONE (line 14) | pub const NONE: Limits = Limits {
method new (line 21) | pub const fn new(min: Size, max: Size) -> Limits {
method with_compression (line 27) | pub const fn with_compression(min: Size, max: Size, compress: Size<boo...
method min (line 36) | pub fn min(&self) -> Size {
method max (line 41) | pub fn max(&self) -> Size {
method compression (line 46) | pub fn compression(&self) -> Size<bool> {
method width (line 51) | pub fn width(mut self, width: impl Into<Length>) -> Limits {
method height (line 70) | pub fn height(mut self, height: impl Into<Length>) -> Limits {
method min_width (line 89) | pub fn min_width(mut self, min_width: f32) -> Limits {
method max_width (line 96) | pub fn max_width(mut self, max_width: f32) -> Limits {
method min_height (line 103) | pub fn min_height(mut self, min_height: f32) -> Limits {
method max_height (line 110) | pub fn max_height(mut self, max_height: f32) -> Limits {
method shrink (line 117) | pub fn shrink(&self, size: impl Into<Size>) -> Limits {
method loose (line 138) | pub fn loose(&self) -> Limits {
method resolve (line 149) | pub fn resolve(
FILE: core/src/layout/node.rs
type Node (line 5) | pub struct Node {
method new (line 12) | pub const fn new(size: Size) -> Self {
method with_children (line 17) | pub const fn with_children(size: Size, children: Vec<Node>) -> Self {
method container (line 30) | pub fn container(child: Self, padding: Padding) -> Self {
method size (line 38) | pub fn size(&self) -> Size {
method bounds (line 43) | pub fn bounds(&self) -> Rectangle {
method children (line 48) | pub fn children(&self) -> &[Node] {
method align (line 53) | pub fn align(mut self, align_x: Alignment, align_y: Alignment, space: ...
method align_mut (line 59) | pub fn align_mut(&mut self, align_x: Alignment, align_y: Alignment, sp...
method move_to (line 82) | pub fn move_to(mut self, position: impl Into<Point>) -> Self {
method move_to_mut (line 88) | pub fn move_to_mut(&mut self, position: impl Into<Point>) {
method translate (line 96) | pub fn translate(mut self, translation: impl Into<Vector>) -> Self {
method translate_mut (line 102) | pub fn translate_mut(&mut self, translation: impl Into<Vector>) {
FILE: core/src/length.rs
type Length (line 5) | pub enum Length {
method fill_factor (line 31) | pub fn fill_factor(&self) -> u16 {
method is_fill (line 42) | pub fn is_fill(&self) -> bool {
method fluid (line 51) | pub fn fluid(&self) -> Self {
method enclose (line 61) | pub fn enclose(self, other: Length) -> Self {
method from (line 70) | fn from(amount: Pixels) -> Self {
method from (line 76) | fn from(amount: f32) -> Self {
method from (line 82) | fn from(units: u32) -> Self {
FILE: core/src/lib.rs
function never (line 95) | pub fn never<T>(never: Never) -> T {
type Function (line 103) | pub trait Function<A, B, O> {
method with (line 142) | fn with(self, prefix: A) -> impl Fn(B) -> O;
method with (line 151) | fn with(self, prefix: A) -> impl Fn(B) -> O {
FILE: core/src/mouse/button.rs
type Button (line 3) | pub enum Button {
FILE: core/src/mouse/click.rs
type Click (line 10) | pub struct Click {
method new (line 43) | pub fn new(position: Point, button: Button, previous: Option<Click>) -...
method kind (line 65) | pub fn kind(&self) -> Kind {
method position (line 70) | pub fn position(&self) -> Point {
method is_consecutive (line 74) | fn is_consecutive(&self, new_position: Point, time: Instant) -> bool {
type Output (line 89) | type Output = Click;
method mul (line 91) | fn mul(self, transformation: Transformation) -> Click {
type Kind (line 19) | pub enum Kind {
method next (line 31) | fn next(self) -> Kind {
FILE: core/src/mouse/cursor.rs
type Cursor (line 5) | pub enum Cursor {
method position (line 19) | pub fn position(self) -> Option<Point> {
method position_over (line 31) | pub fn position_over(self, bounds: Rectangle) -> Option<Point> {
method position_in (line 40) | pub fn position_in(self, bounds: Rectangle) -> Option<Point> {
method position_from (line 47) | pub fn position_from(self, origin: Point) -> Option<Point> {
method is_over (line 52) | pub fn is_over(self, bounds: Rectangle) -> bool {
method is_levitating (line 57) | pub fn is_levitating(self) -> bool {
method levitate (line 62) | pub fn levitate(self) -> Self {
method land (line 70) | pub fn land(self) -> Self {
type Output (line 79) | type Output = Self;
method add (line 81) | fn add(self, translation: Vector) -> Self::Output {
type Output (line 91) | type Output = Self;
method sub (line 93) | fn sub(self, translation: Vector) -> Self::Output {
type Output (line 103) | type Output = Self;
method mul (line 105) | fn mul(self, transformation: Transformation) -> Self {
FILE: core/src/mouse/event.rs
type Event (line 12) | pub enum Event {
type ScrollDelta (line 40) | pub enum ScrollDelta {
FILE: core/src/mouse/interaction.rs
type Interaction (line 4) | pub enum Interaction {
FILE: core/src/overlay.rs
type Overlay (line 18) | pub trait Overlay<Message, Theme, Renderer>
method layout (line 28) | fn layout(&mut self, renderer: &Renderer, bounds: Size) -> layout::Node;
method draw (line 31) | fn draw(
method operate (line 41) | fn operate(
method update (line 52) | fn update(
method mouse_interaction (line 65) | fn mouse_interaction(
method overlay (line 75) | fn overlay<'a>(
method index (line 89) | fn index(&self) -> f32 {
function from_children (line 98) | pub fn from_children<'a, Message, Theme, Renderer>(
FILE: core/src/overlay/element.rs
type Element (line 10) | pub struct Element<'a, Message, Theme, Renderer> {
function new (line 19) | pub fn new(overlay: Box<dyn Overlay<Message, Theme, Renderer> + 'a>) -> ...
function as_overlay (line 24) | pub fn as_overlay(&self) -> &dyn Overlay<Message, Theme, Renderer> {
function as_overlay_mut (line 29) | pub fn as_overlay_mut(&mut self) -> &mut dyn Overlay<Message, Theme, Ren...
function map (line 34) | pub fn map<B>(self, f: &'a dyn Fn(Message) -> B) -> Element<'a, B, Theme...
type Map (line 47) | struct Map<'a, A, B, Theme, Renderer> {
function new (line 53) | pub fn new(
function layout (line 65) | fn layout(&mut self, renderer: &Renderer, bounds: Size) -> layout::Node {
function operate (line 69) | fn operate(
function update (line 78) | fn update(
function mouse_interaction (line 95) | fn mouse_interaction(
function draw (line 104) | fn draw(
function overlay (line 115) | fn overlay<'a>(
FILE: core/src/overlay/group.rs
type Group (line 10) | pub struct Group<'a, Message, Theme, Renderer> {
function new (line 21) | pub fn new() -> Self {
function with_children (line 26) | pub fn with_children(
function overlay (line 42) | pub fn overlay(self) -> overlay::Element<'a, Message, Theme, Renderer> {
method default (line 53) | fn default() -> Self {
function layout (line 63) | fn layout(&mut self, renderer: &Renderer, bounds: Size) -> layout::Node {
function update (line 73) | fn update(
function draw (line 88) | fn draw(
function mouse_interaction (line 103) | fn mouse_interaction(
function operate (line 121) | fn operate(
function overlay (line 137) | fn overlay<'a>(
function index (line 152) | fn index(&self) -> f32 {
function from (line 167) | fn from(group: Group<'a, Message, Theme, Renderer>) -> Self {
FILE: core/src/overlay/nested.rs
type Nested (line 10) | pub struct Nested<'a, Message, Theme, Renderer> {
function new (line 19) | pub fn new(element: overlay::Element<'a, Message, Theme, Renderer>) -> S...
function layout (line 26) | pub fn layout(&mut self, renderer: &Renderer, bounds: Size) -> layout::N...
function draw (line 54) | pub fn draw(
function operate (line 118) | pub fn operate(
function update (line 151) | pub fn update(
function mouse_interaction (line 221) | pub fn mouse_interaction(
FILE: core/src/padding.rs
type Padding (line 36) | pub struct Padding {
constant ZERO (line 84) | pub const ZERO: Padding = Padding {
method new (line 92) | pub const fn new(padding: f32) -> Padding {
method top (line 104) | pub fn top(self, top: impl Into<Pixels>) -> Self {
method bottom (line 114) | pub fn bottom(self, bottom: impl Into<Pixels>) -> Self {
method left (line 124) | pub fn left(self, left: impl Into<Pixels>) -> Self {
method right (line 134) | pub fn right(self, right: impl Into<Pixels>) -> Self {
method horizontal (line 145) | pub fn horizontal(self, horizontal: impl Into<Pixels>) -> Self {
method vertical (line 159) | pub fn vertical(self, vertical: impl Into<Pixels>) -> Self {
method x (line 170) | pub fn x(self) -> f32 {
method y (line 175) | pub fn y(self) -> f32 {
method fit (line 180) | pub fn fit(self, inner: Size, outer: Size) -> Self {
method from (line 195) | fn from(p: u16) -> Self {
method from (line 206) | fn from(p: [u16; 2]) -> Self {
method from (line 217) | fn from(p: f32) -> Self {
method from (line 228) | fn from(p: [f32; 2]) -> Self {
method from (line 245) | fn from(pixels: Pixels) -> Self {
function all (line 48) | pub fn all(padding: impl Into<Pixels>) -> Padding {
function top (line 53) | pub fn top(padding: impl Into<Pixels>) -> Padding {
function bottom (line 58) | pub fn bottom(padding: impl Into<Pixels>) -> Padding {
function left (line 63) | pub fn left(padding: impl Into<Pixels>) -> Padding {
function right (line 68) | pub fn right(padding: impl Into<Pixels>) -> Padding {
function horizontal (line 73) | pub fn horizontal(padding: impl Into<Pixels>) -> Padding {
function vertical (line 78) | pub fn vertical(padding: impl Into<Pixels>) -> Padding {
method from (line 239) | fn from(padding: Padding) -> Self {
FILE: core/src/pixels.rs
type Pixels (line 10) | pub struct Pixels(pub f32);
constant ZERO (line 14) | pub const ZERO: Self = Self(0.0);
method from (line 18) | fn from(amount: f32) -> Self {
method from (line 24) | fn from(amount: u32) -> Self {
type Output (line 36) | type Output = Pixels;
method add (line 38) | fn add(self, rhs: Self) -> Self {
type Output (line 44) | type Output = Pixels;
method add (line 46) | fn add(self, rhs: f32) -> Self {
type Output (line 52) | type Output = Pixels;
method mul (line 54) | fn mul(self, rhs: Self) -> Self {
type Output (line 60) | type Output = Pixels;
method mul (line 62) | fn mul(self, rhs: f32) -> Self {
type Output (line 68) | type Output = Pixels;
method div (line 70) | fn div(self, rhs: Self) -> Self {
type Output (line 76) | type Output = Pixels;
method div (line 78) | fn div(self, rhs: f32) -> Self {
type Output (line 84) | type Output = Pixels;
method div (line 86) | fn div(self, rhs: u32) -> Self {
function from (line 30) | fn from(pixels: Pixels) -> Self {
FILE: core/src/point.rs
type Point (line 8) | pub struct Point<T = f32> {
constant ORIGIN (line 18) | pub const ORIGIN: Self = Self::new(0.0, 0.0);
function new (line 23) | pub const fn new(x: T, y: T) -> Self {
function distance (line 28) | pub fn distance(&self, to: Self) -> T
function from (line 43) | fn from([x, y]: [T; 2]) -> Self {
function from (line 52) | fn from((x, y): (T, T)) -> Self {
function from (line 58) | fn from(point: Point<T>) -> [T; 2] {
type Output (line 67) | type Output = Self;
function add (line 69) | fn add(self, vector: Vector<T>) -> Self {
function add_assign (line 81) | fn add_assign(&mut self, vector: Vector<T>) {
type Output (line 91) | type Output = Self;
function sub (line 93) | fn sub(self, vector: Vector<T>) -> Self {
function sub_assign (line 105) | fn sub_assign(&mut self, vector: Vector<T>) {
type Output (line 115) | type Output = Vector<T>;
function sub (line 117) | fn sub(self, point: Self) -> Vector<T> {
function fmt (line 126) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
function round (line 133) | pub fn round(self) -> Self {
function snap (line 141) | pub fn snap(self) -> Point<u32> {
FILE: core/src/rectangle.rs
type Rectangle (line 6) | pub struct Rectangle<T = f32> {
function with_size (line 26) | pub fn with_size(size: Size<T>) -> Self {
constant INFINITE (line 38) | pub const INFINITE: Self = Self::new(
function new (line 45) | pub const fn new(top_left: Point, size: Size) -> Self {
function with_radius (line 56) | pub fn with_radius(radius: f32) -> Self {
function with_vertices (line 68) | pub fn with_vertices(
function center (line 109) | pub fn center(&self) -> Point {
function center_x (line 115) | pub fn center_x(&self) -> f32 {
function center_y (line 121) | pub fn center_y(&self) -> f32 {
function position (line 126) | pub fn position(&self) -> Point {
function size (line 131) | pub fn size(&self) -> Size {
function area (line 136) | pub fn area(&self) -> f32 {
function contains (line 142) | pub fn contains(&self, point: Point) -> bool {
function distance (line 151) | pub fn distance(&self, point: Point) -> f32 {
function offset (line 163) | pub fn offset(&self, container: &Rectangle) -> Vector {
function is_within (line 187) | pub fn is_within(&self, container: &Rectangle) -> bool {
function intersection (line 195) | pub fn intersection(&self, other: &Rectangle<f32>) -> Option<Rectangle<f...
function intersects (line 218) | pub fn intersects(&self, other: &Self) -> bool {
function union (line 223) | pub fn union(&self, other: &Self) -> Self {
function round (line 242) | pub fn round(self) -> Self {
function snap (line 255) | pub fn snap(self) -> Option<Rectangle<u32>> {
function expand (line 271) | pub fn expand(self, padding: impl Into<Padding>) -> Self {
function shrink (line 283) | pub fn shrink(self, padding: impl Into<Padding>) -> Self {
function rotate (line 296) | pub fn rotate(self, rotation: Radians) -> Self {
function zoom (line 308) | pub fn zoom(self, zoom: f32) -> Self {
function anchor (line 320) | pub fn anchor(
type Output (line 343) | type Output = Self;
function mul (line 345) | fn mul(self, scale: f32) -> Self {
function from (line 356) | fn from(rectangle: Rectangle<u32>) -> Rectangle<f32> {
type Output (line 370) | type Output = Rectangle<T>;
function add (line 372) | fn add(self, translation: Vector<T>) -> Self {
type Output (line 385) | type Output = Rectangle<T>;
function sub (line 387) | fn sub(self, translation: Vector<T>) -> Self {
FILE: core/src/renderer.rs
constant CRISP (line 12) | pub const CRISP: bool = cfg!(feature = "crisp");
type Renderer (line 15) | pub trait Renderer {
method start_layer (line 17) | fn start_layer(&mut self, bounds: Rectangle);
method end_layer (line 22) | fn end_layer(&mut self);
method with_layer (line 27) | fn with_layer(&mut self, bounds: Rectangle, f: impl FnOnce(&mut Self)) {
method start_transformation (line 34) | fn start_transformation(&mut self, transformation: Transformation);
method end_transformation (line 39) | fn end_transformation(&mut self);
method with_transformation (line 42) | fn with_transformation(&mut self, transformation: Transformation, f: i...
method with_translation (line 49) | fn with_translation(&mut self, translation: Vector, f: impl FnOnce(&mu...
method fill_quad (line 54) | fn fill_quad(&mut self, quad: Quad, background: impl Into<Background>);
method allocate_image (line 57) | fn allocate_image(
method hint (line 71) | fn hint(&mut self, scale_factor: f32);
method scale_factor (line 74) | fn scale_factor(&self) -> Option<f32>;
method reset (line 77) | fn reset(&mut self, new_bounds: Rectangle);
method tick (line 82) | fn tick(&mut self) {}
type Quad (line 87) | pub struct Quad {
method default (line 102) | fn default() -> Self {
type Style (line 114) | pub struct Style {
method default (line 120) | fn default() -> Self {
type Headless (line 129) | pub trait Headless {
method new (line 131) | fn new(settings: Settings, backend: Option<&str>) -> impl Future<Outpu...
method name (line 139) | fn name(&self) -> String;
method screenshot (line 143) | fn screenshot(
type Settings (line 153) | pub struct Settings {
method default (line 164) | fn default() -> Self {
FILE: core/src/renderer/null.rs
method start_layer (line 9) | fn start_layer(&mut self, _bounds: Rectangle) {}
method end_layer (line 11) | fn end_layer(&mut self) {}
method start_transformation (line 13) | fn start_transformation(&mut self, _transformation: Transformation) {}
method end_transformation (line 15) | fn end_transformation(&mut self) {}
method fill_quad (line 17) | fn fill_quad(&mut self, _quad: renderer::Quad, _background: impl Into<Ba...
method allocate_image (line 19) | fn allocate_image(
method hint (line 28) | fn hint(&mut self, _scale_factor: f32) {}
method scale_factor (line 30) | fn scale_factor(&self) -> Option<f32> {
method reset (line 34) | fn reset(&mut self, _new_bounds: Rectangle) {}
type Font (line 38) | type Font = Font;
type Paragraph (line 39) | type Paragraph = ();
type Editor (line 40) | type Editor = ();
constant ICON_FONT (line 42) | const ICON_FONT: Font = Font::DEFAULT;
constant CHECKMARK_ICON (line 43) | const CHECKMARK_ICON: char = '0';
constant ARROW_DOWN_ICON (line 44) | const ARROW_DOWN_ICON: char = '0';
constant SCROLL_UP_ICON (line 45) | const SCROLL_UP_ICON: char = '0';
constant SCROLL_DOWN_ICON (line 46) | const SCROLL_DOWN_ICON: char = '0';
constant SCROLL_LEFT_ICON (line 47) | const SCROLL_LEFT_ICON: char = '0';
constant SCROLL_RIGHT_ICON (line 48) | const SCROLL_RIGHT_ICON: char = '0';
constant ICED_LOGO (line 49) | const ICED_LOGO: char = '0';
function default_font (line 51) | fn default_font(&self) -> Self::Font {
function default_size (line 55) | fn default_size(&self) -> Pixels {
function fill_paragraph (line 59) | fn fill_paragraph(
function fill_editor (line 68) | fn fill_editor(
function fill_text (line 77) | fn fill_text(
type Font (line 88) | type Font = Font;
function with_text (line 90) | fn with_text(_text: Text<&str>) -> Self {}
function with_spans (line 92) | fn with_spans<Link>(_text: Text<&[text::Span<'_, Link, Self::Font>], Sel...
function resize (line 94) | fn resize(&mut self, _new_bounds: Size) {}
function compare (line 96) | fn compare(&self, _text: Text<()>) -> text::Difference {
function hint_factor (line 100) | fn hint_factor(&self) -> Option<f32> {
function size (line 104) | fn size(&self) -> Pixels {
function font (line 108) | fn font(&self) -> Font {
function line_height (line 112) | fn line_height(&self) -> text::LineHeight {
function align_x (line 116) | fn align_x(&self) -> text::Alignment {
function align_y (line 120) | fn align_y(&self) -> alignment::Vertical {
function wrapping (line 124) | fn wrapping(&self) -> text::Wrapping {
function ellipsis (line 128) | fn ellipsis(&self) -> text::Ellipsis {
function shaping (line 132) | fn shaping(&self) -> text::Shaping {
function grapheme_position (line 136) | fn grapheme_position(&self, _line: usize, _index: usize) -> Option<Point> {
function bounds (line 140) | fn bounds(&self) -> Size {
function min_bounds (line 144) | fn min_bounds(&self) -> Size {
function hit_test (line 148) | fn hit_test(&self, _point: Point) -> Option<text::Hit> {
function hit_span (line 152) | fn hit_span(&self, _point: Point) -> Option<usize> {
function span_bounds (line 156) | fn span_bounds(&self, _index: usize) -> Vec<Rectangle> {
type Font (line 162) | type Font = Font;
function with_text (line 164) | fn with_text(_text: &str) -> Self {}
function is_empty (line 166) | fn is_empty(&self) -> bool {
function cursor (line 170) | fn cursor(&self) -> text::editor::Cursor {
function selection (line 177) | fn selection(&self) -> text::editor::Selection {
function copy (line 181) | fn copy(&self) -> Option<String> {
function line (line 185) | fn line(&self, _index: usize) -> Option<text::editor::Line<'_>> {
function line_count (line 189) | fn line_count(&self) -> usize {
function perform (line 193) | fn perform(&mut self, _action: text::editor::Action) {}
function move_to (line 195) | fn move_to(&mut self, _cursor: text::editor::Cursor) {}
function bounds (line 197) | fn bounds(&self) -> Size {
function hint_factor (line 201) | fn hint_factor(&self) -> Option<f32> {
function min_bounds (line 205) | fn min_bounds(&self) -> Size {
function update (line 209) | fn update(
function highlight (line 221) | fn highlight<H: text::Highlighter>(
type Handle (line 231) | type Handle = image::Handle;
function load_image (line 233) | fn load_image(&self, handle: &Self::Handle) -> Result<image::Allocation,...
function measure_image (line 238) | fn measure_image(&self, _handle: &Self::Handle) -> Option<Size<u32>> {
function draw_image (line 242) | fn draw_image(&mut self, _image: Image, _bounds: Rectangle, _clip_bounds...
function measure_svg (line 246) | fn measure_svg(&self, _handle: &svg::Handle) -> Size<u32> {
function draw_svg (line 250) | fn draw_svg(&mut self, _svg: svg::Svg, _bounds: Rectangle, _clip_bounds:...
function new (line 254) | async fn new(_settings: renderer::Settings, _backend: Option<&str>) -> O...
function name (line 261) | fn name(&self) -> String {
function screenshot (line 265) | fn screenshot(
FILE: core/src/rotation.rs
type Rotation (line 9) | pub enum Rotation {
method radians (line 28) | pub fn radians(self) -> Radians {
method radians_mut (line 35) | pub fn radians_mut(&mut self) -> &mut Radians {
method degrees (line 42) | pub fn degrees(self) -> Degrees {
method apply (line 48) | pub fn apply(self, size: Size) -> Size {
method from (line 63) | fn from(radians: Radians) -> Self {
method from (line 69) | fn from(radians: f32) -> Self {
method default (line 57) | fn default() -> Self {
FILE: core/src/settings.rs
type Settings (line 9) | pub struct Settings {
method default (line 47) | fn default() -> Self {
function from (line 62) | fn from(settings: &Settings) -> Self {
FILE: core/src/shadow.rs
type Shadow (line 5) | pub struct Shadow {
FILE: core/src/shell.rs
type Shell (line 13) | pub struct Shell<'a, Message> {
function new (line 25) | pub fn new(messages: &'a mut Vec<Message>) -> Self {
function is_empty (line 42) | pub fn is_empty(&self) -> bool {
function publish (line 47) | pub fn publish(&mut self, message: Message) {
function capture_event (line 55) | pub fn capture_event(&mut self) {
function event_status (line 61) | pub fn event_status(&self) -> event::Status {
function is_event_captured (line 67) | pub fn is_event_captured(&self) -> bool {
function request_redraw (line 72) | pub fn request_redraw(&mut self) {
function request_redraw_at (line 77) | pub fn request_redraw_at(&mut self, redraw_request: impl Into<window::Re...
function redraw_request (line 83) | pub fn redraw_request(&self) -> window::RedrawRequest {
function replace_redraw_request (line 92) | pub fn replace_redraw_request(shell: &mut Self, redraw_request: window::...
function read_clipboard (line 99) | pub fn read_clipboard(&mut self, kind: clipboard::Kind) {
function write_clipboard (line 106) | pub fn write_clipboard(&mut self, content: clipboard::Content) {
function clipboard_mut (line 111) | pub fn clipboard_mut(&mut self) -> &mut Clipboard {
function request_input_method (line 119) | pub fn request_input_method<T: AsRef<str>>(&mut self, ime: &InputMethod<...
function input_method (line 125) | pub fn input_method(&self) -> &InputMethod {
function input_method_mut (line 131) | pub fn input_method_mut(&mut self) -> &mut InputMethod {
function is_layout_invalid (line 137) | pub fn is_layout_invalid(&self) -> bool {
function invalidate_layout (line 144) | pub fn invalidate_layout(&mut self) {
function revalidate_layout (line 150) | pub fn revalidate_layout(&mut self, f: impl FnOnce()) {
function are_widgets_invalid (line 161) | pub fn are_widgets_invalid(&self) -> bool {
function invalidate_widgets (line 168) | pub fn invalidate_widgets(&mut self) {
function merge (line 176) | pub fn merge<B>(&mut self, mut other: Shell<'_, B>, f: impl Fn(B) -> Mes...
FILE: core/src/size.rs
type Size (line 5) | pub struct Size<T = f32> {
constant ZERO (line 21) | pub const ZERO: Size = Size::new(0., 0.);
constant UNIT (line 24) | pub const UNIT: Size = Size::new(1., 1.);
constant INFINITE (line 27) | pub const INFINITE: Size = Size::new(f32::INFINITY, f32::INFINITY);
method min (line 30) | pub fn min(self, other: Self) -> Self {
method max (line 38) | pub fn max(self, other: Self) -> Self {
method expand (line 46) | pub fn expand(self, other: impl Into<Size>) -> Self {
method rotate (line 57) | pub fn rotate(self, rotation: Radians) -> Size {
method ratio (line 68) | pub const fn ratio(self, aspect_ratio: f32) -> Size {
method from (line 97) | fn from((width, height): (u32, u32)) -> Self {
function new (line 14) | pub const fn new(width: T, height: T) -> Self {
function is_void (line 79) | pub fn is_void(&self) -> bool {
function from (line 85) | fn from([width, height]: [T; 2]) -> Self {
function from (line 91) | fn from((width, height): (T, T)) -> Self {
function from (line 103) | fn from(vector: Vector<T>) -> Self {
function from (line 112) | fn from(size: Size<T>) -> Self {
function from (line 118) | fn from(size: Size<T>) -> Self {
type Output (line 127) | type Output = Size<T>;
function add (line 129) | fn add(self, rhs: Self) -> Self::Output {
type Output (line 141) | type Output = Size<T>;
function sub (line 143) | fn sub(self, rhs: Self) -> Self::Output {
type Output (line 155) | type Output = Size<T>;
function mul (line 157) | fn mul(self, rhs: T) -> Self::Output {
type Output (line 169) | type Output = Size<T>;
function div (line 171) | fn div(self, rhs: T) -> Self::Output {
type Output (line 183) | type Output = Size<T>;
function mul (line 185) | fn mul(self, scale: Vector<T>) -> Self::Output {
FILE: core/src/svg.rs
type Svg (line 12) | pub struct Svg<H = Handle> {
method from (line 65) | fn from(handle: &Handle) -> Self {
function new (line 36) | pub fn new(handle: impl Into<Handle>) -> Self {
function color (line 46) | pub fn color(mut self, color: impl Into<Color>) -> Self {
function rotation (line 52) | pub fn rotation(mut self, rotation: impl Into<Radians>) -> Self {
function opacity (line 58) | pub fn opacity(mut self, opacity: impl Into<f32>) -> Self {
type Handle (line 72) | pub struct Handle {
method from_path (line 80) | pub fn from_path(path: impl Into<PathBuf>) -> Handle {
method from_memory (line 89) | pub fn from_memory(bytes: impl Into<Cow<'static, [u8]>>) -> Handle {
method from_data (line 93) | fn from_data(data: Data) -> Handle {
method id (line 104) | pub fn id(&self) -> u64 {
method data (line 109) | pub fn data(&self) -> &Data {
method from (line 118) | fn from(path: T) -> Handle {
method hash (line 124) | fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
type Data (line 131) | pub enum Data {
method fmt (line 142) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
type Renderer (line 153) | pub trait Renderer: crate::Renderer {
method measure_svg (line 155) | fn measure_svg(&self, handle: &Handle) -> Size<u32>;
method draw_svg (line 158) | fn draw_svg(&mut self, svg: Svg, bounds: Rectangle, clip_bounds: Recta...
FILE: core/src/text.rs
type Text (line 18) | pub struct Text<Content = String, Font = crate::Font> {
function with_content (line 66) | pub fn with_content<T>(&self, content: T) -> Text<T, Font> {
function as_ref (line 89) | pub fn as_ref(&self) -> Text<&str, Font> {
type Alignment (line 96) | pub enum Alignment {
method from (line 114) | fn from(alignment: alignment::Horizontal) -> Self {
method from (line 124) | fn from(alignment: crate::Alignment) -> Self {
function from (line 134) | fn from(alignment: Alignment) -> Self {
type Shaping (line 147) | pub enum Shaping {
method default (line 181) | fn default() -> Self {
type Wrapping (line 194) | pub enum Wrapping {
type Ellipsis (line 210) | pub enum Ellipsis {
type LineHeight (line 226) | pub enum LineHeight {
method to_absolute (line 236) | pub fn to_absolute(self, text_size: Pixels) -> Pixels {
method from (line 251) | fn from(factor: f32) -> Self {
method from (line 257) | fn from(pixels: Pixels) -> Self {
method default (line 245) | fn default() -> Self {
method hash (line 263) | fn hash<H: Hasher>(&self, state: &mut H) {
type Hit (line 279) | pub enum Hit {
method cursor (line 286) | pub fn cursor(self) -> usize {
type Difference (line 300) | pub enum Difference {
type Renderer (line 321) | pub trait Renderer: crate::Renderer {
constant ICON_FONT (line 332) | const ICON_FONT: Self::Font;
constant CHECKMARK_ICON (line 337) | const CHECKMARK_ICON: char;
constant ARROW_DOWN_ICON (line 342) | const ARROW_DOWN_ICON: char;
constant SCROLL_UP_ICON (line 347) | const SCROLL_UP_ICON: char;
constant SCROLL_DOWN_ICON (line 352) | const SCROLL_DOWN_ICON: char;
constant SCROLL_LEFT_ICON (line 357) | const SCROLL_LEFT_ICON: char;
constant SCROLL_RIGHT_ICON (line 362) | const SCROLL_RIGHT_ICON: char;
constant ICED_LOGO (line 367) | const ICED_LOGO: char;
method default_font (line 370) | fn default_font(&self) -> Self::Font;
method default_size (line 373) | fn default_size(&self) -> Pixels;
method fill_paragraph (line 377) | fn fill_paragraph(
method fill_editor (line 387) | fn fill_editor(
method fill_text (line 397) | fn fill_text(
type Span (line 408) | pub struct Span<'a, Link = (), Font = crate::Font> {
type Highlight (line 435) | pub struct Highlight {
function new (line 444) | pub fn new(fragment: impl IntoFragment<'a>) -> Self {
function size (line 452) | pub fn size(mut self, size: impl Into<Pixels>) -> Self {
function line_height (line 458) | pub fn line_height(mut self, line_height: impl Into<LineHeight>) -> Self {
function font (line 464) | pub fn font(mut self, font: impl Into<Font>) -> Self {
function font_maybe (line 470) | pub fn font_maybe(mut self, font: Option<impl Into<Font>>) -> Self {
function color (line 476) | pub fn color(mut self, color: impl Into<Color>) -> Self {
function color_maybe (line 482) | pub fn color_maybe(mut self, color: Option<impl Into<Color>>) -> Self {
function link (line 488) | pub fn link(mut self, link: impl Into<Link>) -> Self {
function link_maybe (line 494) | pub fn link_maybe(mut self, link: Option<impl Into<Link>>) -> Self {
function background (line 500) | pub fn background(self, background: impl Into<Background>) -> Self {
function background_maybe (line 505) | pub fn background_maybe(mut self, background: Option<impl Into<Backgroun...
function border (line 526) | pub fn border(self, border: impl Into<Border>) -> Self {
function border_maybe (line 531) | pub fn border_maybe(mut self, border: Option<impl Into<Border>>) -> Self {
function padding (line 558) | pub fn padding(mut self, padding: impl Into<Padding>) -> Self {
function underline (line 564) | pub fn underline(mut self, underline: bool) -> Self {
function strikethrough (line 570) | pub fn strikethrough(mut self, strikethrough: bool) -> Self {
function to_static (line 576) | pub fn to_static(self) -> Span<'static, Link, Font> {
method default (line 593) | fn default() -> Self {
function from (line 610) | fn from(value: &'a str) -> Self {
method eq (line 616) | fn eq(&self, other: &Self) -> bool {
type Fragment (line 629) | pub type Fragment<'a> = Cow<'a, str>;
type IntoFragment (line 632) | pub trait IntoFragment<'a> {
method into_fragment (line 634) | fn into_fragment(self) -> Fragment<'a>;
function into_fragment (line 638) | fn into_fragment(self) -> Fragment<'a> {
function into_fragment (line 644) | fn into_fragment(self) -> Fragment<'a> {
function into_fragment (line 650) | fn into_fragment(self) -> Fragment<'a> {
function into_fragment (line 656) | fn into_fragment(self) -> Fragment<'a> {
method into_fragment (line 662) | fn into_fragment(self) -> Fragment<'a> {
FILE: core/src/text/editor.rs
type Editor (line 10) | pub trait Editor: Sized + Default {
method with_text (line 15) | fn with_text(text: &str) -> Self;
method is_empty (line 18) | fn is_empty(&self) -> bool;
method cursor (line 21) | fn cursor(&self) -> Cursor;
method selection (line 24) | fn selection(&self) -> Selection;
method copy (line 27) | fn copy(&self) -> Option<String>;
method line (line 30) | fn line(&self, index: usize) -> Option<Line<'_>>;
method line_count (line 33) | fn line_count(&self) -> usize;
method perform (line 36) | fn perform(&mut self, action: Action);
method move_to (line 39) | fn move_to(&mut self, cursor: Cursor);
method bounds (line 42) | fn bounds(&self) -> Size;
method min_bounds (line 46) | fn min_bounds(&self) -> Size;
method hint_factor (line 49) | fn hint_factor(&self) -> Option<f32>;
method update (line 52) | fn update(
method highlight (line 64) | fn highlight<H: Highlighter>(
type Action (line 74) | pub enum Action {
method is_edit (line 100) | pub fn is_edit(&self) -> bool {
type Edit (line 107) | pub enum Edit {
type Motion (line 126) | pub enum Motion {
method widen (line 155) | pub fn widen(self) -> Self {
method direction (line 166) | pub fn direction(&self) -> Direction {
type Direction (line 186) | pub enum Direction {
type Selection (line 195) | pub enum Selection {
type Cursor (line 205) | pub struct Cursor {
type Position (line 215) | pub struct Position {
type Line (line 224) | pub struct Line<'a> {
type LineEnding (line 233) | pub enum LineEnding {
method as_str (line 249) | pub fn as_str(self) -> &'static str {
FILE: core/src/text/highlighter.rs
type Highlighter (line 11) | pub trait Highlighter: 'static {
method new (line 24) | fn new(settings: &Self::Settings) -> Self;
method update (line 27) | fn update(&mut self, new_settings: &Self::Settings);
method change_line (line 30) | fn change_line(&mut self, line: usize);
method highlight_line (line 36) | fn highlight_line(&mut self, line: &str) -> Self::Iterator<'_>;
method current_line (line 42) | fn current_line(&self) -> usize;
type Settings (line 50) | type Settings = ();
type Highlight (line 51) | type Highlight = ();
type Iterator (line 53) | type Iterator<'a> = std::iter::Empty<(Range<usize>, Self::Highlight)>;
method new (line 55) | fn new(_settings: &Self::Settings) -> Self {
method update (line 59) | fn update(&mut self, _new_settings: &Self::Settings) {}
method change_line (line 61) | fn change_line(&mut self, _line: usize) {}
method highlight_line (line 63) | fn highlight_line(&mut self, _line: &str) -> Self::Iterator<'_> {
method current_line (line 67) | fn current_line(&self) -> usize {
type PlainText (line 47) | pub struct PlainText;
type Format (line 74) | pub struct Format<Font> {
method default (line 82) | fn default() -> Self {
FILE: core/src/text/paragraph.rs
type Paragraph (line 9) | pub trait Paragraph: Sized + Default {
method with_text (line 14) | fn with_text(text: Text<&str, Self::Font>) -> Self;
method with_spans (line 17) | fn with_spans<Link>(text: Text<&[Span<'_, Link, Self::Font>], Self::Fo...
method resize (line 20) | fn resize(&mut self, new_bounds: Size);
method compare (line 24) | fn compare(&self, text: Text<(), Self::Font>) -> Difference;
method size (line 27) | fn size(&self) -> Pixels;
method hint_factor (line 30) | fn hint_factor(&self) -> Option<f32>;
method font (line 33) | fn font(&self) -> Self::Font;
method line_height (line 36) | fn line_height(&self) -> LineHeight;
method align_x (line 39) | fn align_x(&self) -> Alignment;
method align_y (line 42) | fn align_y(&self) -> alignment::Vertical;
method wrapping (line 45) | fn wrapping(&self) -> Wrapping;
method ellipsis (line 48) | fn ellipsis(&self) -> Ellipsis;
method shaping (line 51) | fn shaping(&self) -> Shaping;
method bounds (line 54) | fn bounds(&self) -> Size;
method min_bounds (line 58) | fn min_bounds(&self) -> Size;
method hit_test (line 62) | fn hit_test(&self, point: Point) -> Option<Hit>;
method hit_span (line 67) | fn hit_span(&self, point: Point) -> Option<usize>;
method span_bounds (line 71) | fn span_bounds(&self, index: usize) -> Vec<Rectangle>;
method grapheme_position (line 74) | fn grapheme_position(&self, line: usize, index: usize) -> Option<Point>;
method min_width (line 77) | fn min_width(&self) -> f32 {
method min_height (line 82) | fn min_height(&self) -> f32 {
type Plain (line 89) | pub struct Plain<P: Paragraph> {
function new (line 96) | pub fn new(text: Text<String, P::Font>) -> Self {
function update (line 106) | pub fn update(&mut self, text: Text<&str, P::Font>) -> bool {
function align_x (line 127) | pub fn align_x(&self) -> Alignment {
function align_y (line 132) | pub fn align_y(&self) -> alignment::Vertical {
function min_bounds (line 138) | pub fn min_bounds(&self) -> Size {
function min_width (line 144) | pub fn min_width(&self) -> f32 {
function min_height (line 150) | pub fn min_height(&self) -> f32 {
function raw (line 155) | pub fn raw(&self) -> &P {
function content (line 160) | pub fn content(&self) -> &str {
function as_text (line 165) | pub fn as_text(&self) -> Text<&str, P::Font> {
FILE: core/src/theme.rs
type Theme (line 14) | pub enum Theme {
constant ALL (line 65) | pub const ALL: &'static [Self] = &[
method custom (line 91) | pub fn custom(name: impl Into<Cow<'static, str>>, seed: palette::Seed)...
method custom_with_fn (line 97) | pub fn custom_with_fn(
method palette (line 106) | pub fn palette(&self) -> &palette::Palette {
method seed (line 135) | pub fn seed(&self) -> palette::Seed {
method fmt (line 165) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
type Custom (line 172) | pub struct Custom {
method new (line 180) | pub fn new(name: String, seed: palette::Seed) -> Self {
method with_fn (line 186) | pub fn with_fn(
method fmt (line 200) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
type Mode (line 207) | pub enum Mode {
type Style (line 219) | pub struct Style {
type Base (line 228) | pub trait Base {
method default (line 230) | fn default(preference: Mode) -> Self;
method mode (line 233) | fn mode(&self) -> Mode;
method base (line 236) | fn base(&self) -> Style;
method seed (line 242) | fn seed(&self) -> Option<palette::Seed>;
method name (line 248) | fn name(&self) -> &str;
method default (line 252) | fn default(preference: Mode) -> Self {
method mode (line 277) | fn mode(&self) -> Mode {
method base (line 285) | fn base(&self) -> Style {
method seed (line 289) | fn seed(&self) -> Option<palette::Seed> {
method name (line 293) | fn name(&self) -> &str {
function default (line 323) | pub fn default(theme: &Theme) -> Style {
FILE: core/src/theme/palette.rs
type Palette (line 8) | pub struct Palette {
method generate (line 27) | pub fn generate(palette: Seed) -> Self {
type Pair (line 42) | pub struct Pair {
method new (line 56) | pub fn new(color: Color, text: Color) -> Self {
type Background (line 66) | pub struct Background {
method new (line 87) | pub fn new(base: Color, text: Color) -> Self {
type Swatch (line 111) | pub struct Swatch {
method generate (line 122) | pub fn generate(base: Color, background: Color, text: Color) -> Self {
method derive (line 134) | pub fn derive(base: Color, text: Color) -> Self {
type Seed (line 152) | pub struct Seed {
constant LIGHT (line 169) | pub const LIGHT: Self = Self {
constant DARK (line 179) | pub const DARK: Self = Self {
constant DRACULA (line 191) | pub const DRACULA: Self = Self {
constant NORD (line 203) | pub const NORD: Self = Self {
constant SOLARIZED_LIGHT (line 215) | pub const SOLARIZED_LIGHT: Self = Self {
constant SOLARIZED_DARK (line 227) | pub const SOLARIZED_DARK: Self = Self {
constant GRUVBOX_LIGHT (line 239) | pub const GRUVBOX_LIGHT: Self = Self {
constant GRUVBOX_DARK (line 251) | pub const GRUVBOX_DARK: Self = Self {
constant CATPPUCCIN_LATTE (line 263) | pub const CATPPUCCIN_LATTE: Self = Self {
constant CATPPUCCIN_FRAPPE (line 275) | pub const CATPPUCCIN_FRAPPE: Self = Self {
constant CATPPUCCIN_MACCHIATO (line 287) | pub const CATPPUCCIN_MACCHIATO: Self = Self {
constant CATPPUCCIN_MOCHA (line 299) | pub const CATPPUCCIN_MOCHA: Self = Self {
constant TOKYO_NIGHT (line 311) | pub const TOKYO_NIGHT: Self = Self {
constant TOKYO_NIGHT_STORM (line 323) | pub const TOKYO_NIGHT_STORM: Self = Self {
constant TOKYO_NIGHT_LIGHT (line 335) | pub const TOKYO_NIGHT_LIGHT: Self = Self {
constant KANAGAWA_WAVE (line 347) | pub const KANAGAWA_WAVE: Self = Self {
constant KANAGAWA_DRAGON (line 359) | pub const KANAGAWA_DRAGON: Self = Self {
constant KANAGAWA_LOTUS (line 371) | pub const KANAGAWA_LOTUS: Self = Self {
constant MOONFLY (line 383) | pub const MOONFLY: Self = Self {
constant NIGHTFLY (line 395) | pub const NIGHTFLY: Self = Self {
constant OXOCARBON (line 407) | pub const OXOCARBON: Self = Self {
constant FERRA (line 419) | pub const FERRA: Self = Self {
type Oklch (line 508) | struct Oklch {
function darken (line 516) | pub fn darken(color: Color, amount: f32) -> Color {
function lighten (line 535) | pub fn lighten(color: Color, amount: f32) -> Color {
function deviate (line 553) | pub fn deviate(color: Color, amount: f32) -> Color {
function readable (line 563) | pub fn readable(background: Color, text: Color) -> Color {
function is_dark (line 594) | pub fn is_dark(color: Color) -> bool {
function to_oklch (line 599) | fn to_oklch(color: Color) -> Oklch {
function from_oklch (line 625) | fn from_oklch(oklch: Oklch) -> Color {
FILE: core/src/time.rs
function milliseconds (line 8) | pub fn milliseconds(milliseconds: u64) -> Duration {
function seconds (line 13) | pub fn seconds(seconds: u64) -> Duration {
function minutes (line 18) | pub fn minutes(minutes: u64) -> Duration {
function hours (line 23) | pub fn hours(hours: u64) -> Duration {
function days (line 28) | pub fn days(days: u64) -> Duration {
FILE: core/src/touch.rs
type Event (line 7) | pub enum Event {
type Finger (line 23) | pub struct Finger(pub u64);
FILE: core/src/transformation.rs
type Transformation (line 8) | pub struct Transformation(Mat4);
constant IDENTITY (line 12) | pub const IDENTITY: Self = Self(Mat4::IDENTITY);
method orthographic (line 16) | pub fn orthographic(width: u32, height: u32) -> Self{
method translate (line 25) | pub fn translate(x: f32, y: f32) -> Self {
method scale (line 30) | pub fn scale(scaling: f32) -> Self {
method inverse (line 35) | pub fn inverse(self) -> Self {
method scale_factor (line 40) | pub fn scale_factor(&self) -> f32 {
method translation (line 45) | pub fn translation(&self) -> Vector {
method as_ref (line 112) | fn as_ref(&self) -> &[f32; 16] {
method default (line 51) | fn default() -> Self {
type Output (line 57) | type Output = Self;
method mul (line 59) | fn mul(self, rhs: Self) -> Self {
type Output (line 65) | type Output = Self;
method mul (line 67) | fn mul(self, transformation: Transformation) -> Self {
type Output (line 77) | type Output = Self;
method mul (line 79) | fn mul(self, transformation: Transformation) -> Self {
type Output (line 89) | type Output = Self;
method mul (line 91) | fn mul(self, transformation: Transformation) -> Self {
type Output (line 101) | type Output = Self;
method mul (line 103) | fn mul(self, transformation: Transformation) -> Self {
function from (line 118) | fn from(t: Transformation) -> [f32; 16] {
method from (line 124) | fn from(transformation: Transformation) -> Self {
FILE: core/src/vector.rs
type Vector (line 3) | pub struct Vector<T = f32> {
constant ZERO (line 20) | pub const ZERO: Self = Self::new(0.0, 0.0);
method round (line 23) | pub fn round(self) -> Self {
function new (line 13) | pub const fn new(x: T, y: T) -> Self {
type Output (line 35) | type Output = Self;
function neg (line 37) | fn neg(self) -> Self::Output {
type Output (line 46) | type Output = Self;
function add (line 48) | fn add(self, b: Self) -> Self {
function add_assign (line 57) | fn add_assign(&mut self, b: Self) {
type Output (line 67) | type Output = Self;
function sub (line 69) | fn sub(self, b: Self) -> Self {
function sub_assign (line 78) | fn sub_assign(&mut self, b: Self) {
type Output (line 88) | type Output = Self;
function mul (line 90) | fn mul(self, scale: T) -> Self {
function mul_assign (line 99) | fn mul_assign(&mut self, scale: T) {
type Output (line 109) | type Output = Self;
function div (line 111) | fn div(self, scale: T) -> Self {
function div_assign (line 120) | fn div_assign(&mut self, scale: T) {
function from (line 127) | fn from([x, y]: [T; 2]) -> Self {
function from (line 136) | fn from(other: Vector<T>) -> Self {
FILE: core/src/widget.rs
type Widget (line 37) | pub trait Widget<Message, Theme, Renderer>
method size (line 42) | fn size(&self) -> Size<Length>;
method size_hint (line 48) | fn size_hint(&self) -> Size<Length> {
method layout (line 56) | fn layout(
method draw (line 64) | fn draw(
method tag (line 78) | fn tag(&self) -> tree::Tag {
method state (line 85) | fn state(&self) -> tree::State {
method children (line 90) | fn children(&self) -> Vec<Tree> {
method diff (line 95) | fn diff(&self, tree: &mut Tree) {
method operate (line 100) | fn operate(
method update (line 112) | fn update(
method mouse_interaction (line 127) | fn mouse_interaction(
method overlay (line 139) | fn overlay<'a>(
FILE: core/src/widget/id.rs
type Id (line 8) | pub struct Id(Internal);
method new (line 12) | pub const fn new(id: &'static str) -> Self {
method unique (line 19) | pub fn unique() -> Self {
method from (line 27) | fn from(value: &'static str) -> Self {
method from (line 33) | fn from(value: String) -> Self {
type Internal (line 39) | enum Internal {
function unique_generates_different_ids (line 49) | fn unique_generates_different_ids() {
FILE: core/src/widget/operation.rs
type Operation (line 20) | pub trait Operation<T = ()>: Send {
method traverse (line 27) | fn traverse(&mut self, operate: &mut dyn FnMut(&mut dyn Operation<T>));
method container (line 30) | fn container(&mut self, _id: Option<&Id>, _bounds: Rectangle) {}
method scrollable (line 33) | fn scrollable(
method focusable (line 44) | fn focusable(&mut self, _id: Option<&Id>, _bounds: Rectangle, _state: ...
method text_input (line 47) | fn text_input(&mut self, _id: Option<&Id>, _bounds: Rectangle, _state:...
method text (line 50) | fn text(&mut self, _id: Option<&Id>, _bounds: Rectangle, _text: &str) {}
method custom (line 53) | fn custom(&mut self, _id: Option<&Id>, _bounds: Rectangle, _state: &mu...
method finish (line 56) | fn finish(&self) -> Outcome<T> {
function traverse (line 65) | fn traverse(&mut self, operate: &mut dyn FnMut(&mut dyn Operation<O>)) {
function container (line 69) | fn container(&mut self, id: Option<&Id>, bounds: Rectangle) {
function focusable (line 73) | fn focusable(&mut self, id: Option<&Id>, bounds: Rectangle, state: &mut ...
function scrollable (line 77) | fn scrollable(
function text_input (line 89) | fn text_input(&mut self, id: Option<&Id>, bounds: Rectangle, state: &mut...
function text (line 93) | fn text(&mut self, id: Option<&Id>, bounds: Rectangle, text: &str) {
function custom (line 97) | fn custom(&mut self, id: Option<&Id>, bounds: Rectangle, state: &mut dyn...
function finish (line 101) | fn finish(&self) -> Outcome<O> {
type Outcome (line 107) | pub enum Outcome<T> {
function fmt (line 122) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
function black_box (line 132) | pub fn black_box<'a, T, O>(operation: &'a mut dyn Operation<T>) -> impl ...
function map (line 191) | pub fn map<A, B>(
function then (line 324) | pub fn then<A, B, O>(operation: impl Operation<A> + 'static, f: fn(A) ->...
function scope (line 403) | pub fn scope<T: 'static>(target: Id, operation: impl Operation<T> + 'sta...
FILE: core/src/widget/operation/focusable.rs
type Focusable (line 7) | pub trait Focusable {
method is_focused (line 9) | fn is_focused(&self) -> bool;
method focus (line 12) | fn focus(&mut self);
method unfocus (line 15) | fn unfocus(&mut self);
type Count (line 20) | pub struct Count {
function focus (line 29) | pub fn focus<T>(target: Id) -> impl Operation<T> {
function unfocus (line 55) | pub fn unfocus<T>() -> impl Operation<T> {
function count (line 73) | pub fn count() -> impl Operation<Count> {
function focus_previous (line 104) | pub fn focus_previous<T>() -> impl Operation<T>
function focus_next (line 142) | pub fn focus_next<T>() -> impl Operation<T>
function find_focused (line 173) | pub fn find_focused() -> impl Operation<Id> {
function is_focused (line 204) | pub fn is_focused(target: Id) -> impl Operation<bool> {
FILE: core/src/widget/operation/scrollable.rs
type Scrollable (line 6) | pub trait Scrollable {
method snap_to (line 8) | fn snap_to(&mut self, offset: RelativeOffset<Option<f32>>);
method scroll_to (line 11) | fn scroll_to(&mut self, offset: AbsoluteOffset<Option<f32>>);
method scroll_by (line 14) | fn scroll_by(&mut self, offset: AbsoluteOffset, bounds: Rectangle, con...
function snap_to (line 19) | pub fn snap_to<T>(target: Id, offset: RelativeOffset<Option<f32>>) -> im...
function scroll_to (line 49) | pub fn scroll_to<T>(target: Id, offset: AbsoluteOffset<Option<f32>>) -> ...
function scroll_by (line 79) | pub fn scroll_by<T>(target: Id, offset: AbsoluteOffset) -> impl Operatio...
type AbsoluteOffset (line 109) | pub struct AbsoluteOffset<T = f32> {
function from (line 117) | fn from(offset: AbsoluteOffset) -> Self {
type RelativeOffset (line 129) | pub struct RelativeOffset<T = f32> {
constant START (line 138) | pub const START: Self = Self { x: 0.0, y: 0.0 };
constant END (line 141) | pub const END: Self = Self { x: 1.0, y: 1.0 };
function from (line 145) | fn from(offset: RelativeOffset) -> Self {
FILE: core/src/widget/operation/text_input.rs
type TextInput (line 7) | pub trait TextInput {
method text (line 11) | fn text(&self) -> &str;
method move_cursor_to_front (line 14) | fn move_cursor_to_front(&mut self);
method move_cursor_to_end (line 17) | fn move_cursor_to_end(&mut self);
method move_cursor_to (line 20) | fn move_cursor_to(&mut self, position: usize);
method select_all (line 23) | fn select_all(&mut self);
method select_range (line 25) | fn select_range(&mut self, start: usize, end: usize);
function move_cursor_to_front (line 30) | pub fn move_cursor_to_front<T>(target: Id) -> impl Operation<T> {
function move_cursor_to_end (line 55) | pub fn move_cursor_to_end<T>(target: Id) -> impl Operation<T> {
function move_cursor_to (line 80) | pub fn move_cursor_to<T>(target: Id, position: usize) -> impl Operation<...
function select_all (line 105) | pub fn select_all<T>(target: Id) -> impl Operation<T> {
function select_range (line 129) | pub fn select_range<T>(target: Id, start: usize, end: usize) -> impl Ope...
FILE: core/src/widget/text.rs
type Text (line 57) | pub struct Text<'a, Theme, Renderer>
function new (line 73) | pub fn new(fragment: impl text::IntoFragment<'a>) -> Self {
function size (line 82) | pub fn size(mut self, size: impl Into<Pixels>) -> Self {
function line_height (line 88) | pub fn line_height(mut self, line_height: impl Into<LineHeight>) -> Self {
function font (line 96) | pub fn font(mut self, font: impl Into<Renderer::Font>) -> Self {
function font_maybe (line 104) | pub fn font_maybe(mut self, font: Option<impl Into<Renderer::Font>>) -> ...
function width (line 110) | pub fn width(mut self, width: impl Into<Length>) -> Self {
function height (line 116) | pub fn height(mut self, height: impl Into<Length>) -> Self {
function center (line 122) | pub fn center(self) -> Self {
function align_x (line 128) | pub fn align_x(mut self, alignment: impl Into<text::Alignment>) -> Self {
function align_y (line 134) | pub fn align_y(mut self, alignment: impl Into<alignment::Vertical>) -> S...
function shaping (line 140) | pub fn shaping(mut self, shaping: Shaping) -> Self {
function wrapping (line 146) | pub fn wrapping(mut self, wrapping: Wrapping) -> Self {
function ellipsis (line 152) | pub fn ellipsis(mut self, ellipsis: Ellipsis) -> Self {
function style (line 158) | pub fn style(mut self, style: impl Fn(&Theme) -> Style + 'a) -> Self
function color (line 167) | pub fn color(self, color: impl Into<Color>) -> Self
function color_maybe (line 175) | pub fn color_maybe(self, color: Option<impl Into<Color>>) -> Self
function class (line 186) | pub fn class(mut self, class: impl Into<Theme::Class<'a>>) -> Self {
type State (line 193) | pub type State<P> = paragraph::Plain<P>;
function tag (line 200) | fn tag(&self) -> tree::Tag {
function state (line 204) | fn state(&self) -> tree::State {
function size (line 208) | fn size(&self) -> Size<Length> {
function layout (line 215) | fn layout(
function draw (line 230) | fn draw(
function operate (line 253) | fn operate(
type Format (line 270) | pub struct Format<Font> {
method default (line 284) | fn default() -> Self {
function layout (line 301) | pub fn layout<Renderer>(
function draw (line 336) | pub fn draw<Renderer>(
function from (line 366) | fn from(text: Text<'a, Theme, Renderer>) -> Element<'a, Message, Theme, ...
function from (line 376) | fn from(content: &'a str) -> Self {
function from (line 386) | fn from(content: &'a str) -> Self {
type Style (line 393) | pub struct Style {
type Catalog (line 401) | pub trait Catalog: Sized {
method default (line 406) | fn default<'a>() -> Self::Class<'a>;
method style (line 409) | fn style(&self, item: &Self::Class<'_>) -> Style;
type Class (line 418) | type Class<'a> = StyleFn<'a, Self>;
method default (line 420) | fn default<'a>() -> Self::Class<'a> {
method style (line 424) | fn style(&self, class: &Self::Class<'_>) -> Style {
type StyleFn (line 415) | pub type StyleFn<'a, Theme> = Box<dyn Fn(&Theme) -> Style + 'a>;
function default (line 430) | pub fn default(_theme: &Theme) -> Style {
function base (line 435) | pub fn base(theme: &Theme) -> Style {
function primary (line 442) | pub fn primary(theme: &Theme) -> Style {
function secondary (line 449) | pub fn secondary(theme: &Theme) -> Style {
function success (line 456) | pub fn success(theme: &Theme) -> Style {
function warning (line 463) | pub fn warning(theme: &Theme) -> Style {
function danger (line 470) | pub fn danger(theme: &Theme) -> Style {
FILE: core/src/widget/tree.rs
type Tree (line 12) | pub struct Tree {
method empty (line 25) | pub fn empty() -> Self {
method new (line 34) | pub fn new<'a, Message, Theme, Renderer>(
method diff (line 57) | pub fn diff<'a, Message, Theme, Renderer>(
method diff_children (line 71) | pub fn diff_children<'a, Message, Theme, Renderer>(
method diff_children_custom (line 86) | pub fn diff_children_custom<T>(
function diff_children_custom_with_search (line 112) | pub fn diff_children_custom_with_search<T>(
type Tag (line 184) | pub struct Tag(any::TypeId);
method of (line 188) | pub fn of<T>() -> Self
method stateless (line 196) | pub fn stateless() -> Self {
type State (line 202) | pub enum State {
method new (line 212) | pub fn new<T>(state: T) -> Self
method downcast_ref (line 223) | pub fn downcast_ref<T>(&self) -> &T
method downcast_mut (line 237) | pub fn downcast_mut<T>(&mut self) -> &mut T
method fmt (line 249) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
FILE: core/src/window/direction.rs
type Direction (line 3) | pub enum Direction {
FILE: core/src/window/event.rs
type Event (line 8) | pub enum Event {
FILE: core/src/window/icon.rs
function from_rgba (line 7) | pub fn from_rgba(rgba: Vec<u8>, width: u32, height: u32) -> Result<Icon,...
type Icon (line 35) | pub struct Icon {
method into_raw (line 42) | pub fn into_raw(self) -> (Vec<u8>, Size<u32>) {
method fmt (line 48) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
type Error (line 58) | pub enum Error {
FILE: core/src/window/id.rs
type Id (line 8) | pub struct Id(u64);
method unique (line 14) | pub fn unique() -> Id {
method fmt (line 20) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
FILE: core/src/window/level.rs
type Level (line 7) | pub enum Level {
FILE: core/src/window/mode.rs
type Mode (line 3) | pub enum Mode {
FILE: core/src/window/position.rs
type Position (line 5) | pub enum Position {
FILE: core/src/window/redraw_request.rs
type RedrawRequest (line 5) | pub enum RedrawRequest {
method from (line 17) | fn from(time: Instant) -> Self {
function ordering (line 28) | fn ordering() {
FILE: core/src/window/screenshot.rs
type Screenshot (line 10) | pub struct Screenshot {
method new (line 34) | pub fn new(rgba: impl Into<Bytes>, size: Size<u32>, scale_factor: f32)...
method crop (line 44) | pub fn crop(&self, region: Rectangle<u32>) -> Result<Self, CropError> {
method as_ref (line 83) | fn as_ref(&self) -> &[u8] {
method fmt (line 21) | fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
method from (line 89) | fn from(screenshot: Screenshot) -> Self {
type CropError (line 96) | pub enum CropError {
FILE: core/src/window/settings.rs
type Settings (line 34) | pub struct Settings {
method default (line 104) | fn default() -> Self {
FILE: core/src/window/settings/linux.rs
type PlatformSpecific (line 5) | pub struct PlatformSpecific {
FILE: core/src/window/settings/macos.rs
type PlatformSpecific (line 5) | pub struct PlatformSpecific {
FILE: core/src/window/settings/other.rs
type PlatformSpecific (line 3) | pub struct PlatformSpecific;
FILE: core/src/window/settings/wasm.rs
type PlatformSpecific (line 5) | pub struct PlatformSpecific {
method default (line 16) | fn default() -> Self {
FILE: core/src/window/settings/windows.rs
type PlatformSpecific (line 5) | pub struct PlatformSpecific {
method default (line 25) | fn default() -> Self {
type CornerPreference (line 38) | pub enum CornerPreference {
FILE: core/src/window/user_attention.rs
type UserAttention (line 10) | pub enum UserAttention {
FILE: debug/src/lib.rs
type Metadata (line 11) | pub struct Metadata {
type Primitive (line 18) | pub enum Primitive {
type Command (line 27) | pub enum Command {
function enable (line 32) | pub fn enable() {
function disable (line 36) | pub fn disable() {
function init (line 40) | pub fn init(metadata: Metadata) {
function quit (line 45) | pub fn quit() -> bool {
function theme_changed (line 49) | pub fn theme_changed(f: impl FnOnce() -> Option<palette::Seed>) {
function tasks_spawned (line 53) | pub fn tasks_spawned(amount: usize) {
function subscriptions_tracked (line 57) | pub fn subscriptions_tracked(amount: usize) {
function layers_rendered (line 61) | pub fn layers_rendered(amount: impl FnOnce() -> usize) {
function boot (line 65) | pub fn boot() -> Span {
function update (line 69) | pub fn update(message: &impl std::fmt::Debug) -> Span {
function view (line 73) | pub fn view(window: window::Id) -> Span {
function layout (line 77) | pub fn layout(window: window::Id) -> Span {
function interact (line 81) | pub fn interact(window: window::Id) -> Span {
function draw (line 85) | pub fn draw(window: window::Id) -> Span {
function prepare (line 89) | pub fn prepare(primitive: Primitive) -> Span {
function render (line 93) | pub fn render(primitive: Primitive) -> Span {
function present (line 97) | pub fn present(window: window::Id) -> Span {
function time (line 101) | pub fn time(name: impl Into<String>) -> Span {
function time_with (line 105) | pub fn time_with<T>(name: impl Into<String>, f: impl FnOnce() -> T) -> T {
function commands (line 113) | pub fn commands() -> Subscription<Command> {
function hot (line 117) | pub fn hot<O>(f: impl FnOnce() -> O) -> O {
function on_hotpatch (line 121) | pub fn on_hotpatch(f: impl Fn() + Send + Sync + 'static) {
function is_stale (line 125) | pub fn is_stale() -> bool {
function init (line 147) | pub fn init(metadata: Metadata) {
function quit (line 157) | pub fn quit() -> bool {
function theme_changed (line 167) | pub fn theme_changed(f: impl FnOnce() -> Option<palette::Seed>) {
function tasks_spawned (line 179) | pub fn tasks_spawned(amount: usize) {
function subscriptions_tracked (line 183) | pub fn subscriptions_tracked(amount: usize) {
function layers_rendered (line 187) | pub fn layers_rendered(amount: impl FnOnce() -> usize) {
function boot (line 191) | pub fn boot() -> Span {
function update (line 195) | pub fn update(message: &impl std::fmt::Debug) -> Span {
function view (line 223) | pub fn view(window: window::Id) -> Span {
function layout (line 227) | pub fn layout(window: window::Id) -> Span {
function interact (line 231) | pub fn interact(window: window::Id) -> Span {
function draw (line 235) | pub fn draw(window: window::Id) -> Span {
function prepare (line 239) | pub fn prepare(primitive: Primitive) -> Span {
function render (line 243) | pub fn render(primitive: Primitive) -> Span {
function present (line 247) | pub fn present(window: window::Id) -> Span {
function time (line 251) | pub fn time(name: impl Into<String>) -> Span {
function enable (line 255) | pub fn enable() {
function disable (line 259) | pub fn disable() {
function commands (line 263) | pub fn commands() -> Subscription<Command> {
function span (line 280) | fn span(span: span::Stage) -> Span {
function to_primitive (line 289) | fn to_primitive(primitive: Primitive) -> present::Primitive {
function log (line 299) | fn log(event: client::Event) {
type Span (line 306) | pub struct Span {
method finish (line 312) | pub fn finish(self) {
method finish (line 405) | pub fn finish(self) {}
function enable (line 340) | pub fn enable() {}
function disable (line 341) | pub fn disable() {}
function init (line 343) | pub fn init(_metadata: Metadata) {}
function quit (line 345) | pub fn quit() -> bool {
function theme_changed (line 349) | pub fn theme_changed(_f: impl FnOnce() -> Option<palette::Seed>) {}
function tasks_spawned (line 351) | pub fn tasks_spawned(_amount: usize) {}
function subscriptions_tracked (line 353) | pub fn subscriptions_tracked(_amount: usize) {}
function layers_rendered (line 355) | pub fn layers_rendered(_amount: impl FnOnce() -> usize) {}
function boot (line 357) | pub fn boot() -> Span {
function update (line 361) | pub fn update(_message: &impl std::fmt::Debug) -> Span {
function view (line 365) | pub fn view(_window: window::Id) -> Span {
function layout (line 369) | pub fn layout(_window: window::Id) -> Span {
function interact (line 373) | pub fn interact(_window: window::Id) -> Span {
function draw (line 377) | pub fn draw(_window: window::Id) -> Span {
function prepare (line 381) | pub fn prepare(_primitive: Primitive) -> Span {
function render (line 385) | pub fn render(_primitive: Primitive) -> Span {
function present (line 389) | pub fn present(_window: window::Id) -> Span {
function time (line 393) | pub fn time(_name: impl Into<String>) -> Span {
function commands (line 397) | pub fn commands() -> Subscription<Command> {
type Span (line 402) | pub struct Span;
method finish (line 312) | pub fn finish(self) {
method finish (line 405) | pub fn finish(self) {}
function init (line 421) | pub fn init() {
function call (line 437) | pub fn call<O>(f: impl FnOnce() -> O) -> O {
function on_hotpatch (line 462) | pub fn on_hotpatch(f: impl Fn() + Send + Sync + 'static) {
function is_stale (line 466) | pub fn is_stale() -> bool {
function init (line 473) | pub fn init() {}
function call (line 475) | pub fn call<O>(f: impl FnOnce() -> O) -> O {
function on_hotpatch (line 479) | pub fn on_hotpatch(_f: impl Fn()) {}
function is_stale (line 481) | pub fn is_stale() -> bool {
FILE: devtools/src/comet.rs
constant COMPATIBLE_REVISION (line 5) | pub const COMPATIBLE_REVISION: &str = "fbef808eed51562f0ea601d8fc7c715be...
function launch (line 7) | pub fn launch() -> Task<launch::Result> {
function install (line 48) | pub fn install() -> Task<install::Result> {
type Result (line 97) | pub type Result = std::result::Result<(), Error>;
type Error (line 100) | pub enum Error {
method from (line 107) | fn from(error: io::Error) -> Self {
method from (line 133) | fn from(error: io::Error) -> Self {
type Result (line 118) | pub type Result = std::result::Result<Event, Error>;
type Event (line 121) | pub enum Event {
type Error (line 127) | pub enum Error {
method from (line 107) | fn from(error: io::Error) -> Self {
method from (line 133) | fn from(error: io::Error) -> Self {
FILE: devtools/src/lib.rs
function attach (line 31) | pub fn attach<P: Program + 'static>(program: P) -> Attach<P> {
type Attach (line 37) | pub struct Attach<P> {
type State (line 47) | type State = DevTools<P>;
type Message (line 48) | type Message = Event<P>;
type Theme (line 49) | type Theme = P::Theme;
type Renderer (line 50) | type Renderer = P::Renderer;
type Executor (line 51) | type Executor = P::Executor;
method name (line 53) | fn name() -> &'static str {
method settings (line 57) | fn settings(&self) -> Settings {
method window (line 61) | fn window(&self) -> Option<window::Settings> {
method boot (line 65) | fn boot(&self) -> (Self::State, Task<Self::Message>) {
method update (line 75) | fn update(&self, state: &mut Self::State, message: Self::Message) -> Tas...
method view (line 79) | fn view<'a>(
method title (line 87) | fn title(&self, state: &Self::State, window: window::Id) -> String {
method subscription (line 91) | fn subscription(&self, state: &Self::State) -> Subscription<Self::Messag...
method theme (line 95) | fn theme(&self, state: &Self::State, window: window::Id) -> Option<Self:...
method style (line 99) | fn style(&self, state: &Self::State, theme: &Self::Theme) -> theme::Style {
method scale_factor (line 103) | fn scale_factor(&self, state: &Self::State, window: window::Id) -> f32 {
type DevTools (line 109) | pub struct DevTools<P>
type Message (line 120) | pub enum Message {
type Mode (line 129) | enum Mode {
type Setup (line 134) | enum Setup {
type Goal (line 139) | enum Goal {
function new (line 149) | pub fn new(state: P::State) -> (Self, Task<Message>) {
function title (line 165) | pub fn title(&self, program: &P, window: window::Id) -> String {
function update (line 169) | pub fn update(&mut self, program: &P, event: Event<P>) -> Task<Event<P>> {
function view (line 291) | pub fn view(
function subscription (line 358) | pub fn subscription(&self, program: &P) -> Subscription<Event<P>> {
function theme (line 377) | pub fn theme(&self, program: &P, window: window::Id) -> Option<P::Theme> {
function style (line 381) | pub fn style(&self, program: &P, theme: &P::Theme) -> theme::Style {
function scale_factor (line 385) | pub fn scale_factor(&self, program: &P, window: window::Id) -> f32 {
function state (line 389) | pub fn state(&self) -> &P::State {
type Event (line 394) | pub enum Event<P>
function fmt (line 409) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
function setup (line 419) | fn setup<Renderer>(goal: &Goal) -> Element<'_, Message, Theme, Renderer>
function installation (line 507) | fn installation<'a, Renderer>(logs: &'a [String]) -> Element<'a, Message...
function inline_code (line 533) | fn inline_code<'a, Renderer>(
FILE: devtools/src/time_machine.rs
type TimeMachine (line 4) | pub struct TimeMachine<P>
function new (line 18) | pub fn new() -> Self {
function is_rewinding (line 25) | pub fn is_rewinding(&self) -> bool {
function push (line 29) | pub fn push(&mut self, message: &P::Message) {
function rewind (line 33) | pub fn rewind(&mut self, program: &P, message: usize) {
function go_to_present (line 47) | pub fn go_to_present(&mut self) {
function state (line 52) | pub fn state(&self) -> Option<&P::State> {
type TimeMachine (line 58) | pub struct TimeMachine<P>
function new (line 70) | pub fn new() -> Self {
function is_rewinding (line 76) | pub fn is_rewinding(&self) -> bool {
function push (line 80) | pub fn push(&mut self, _message: &P::Message) {}
function rewind (line 82) | pub fn rewind(&mut self, _program: &P, _message: usize) {}
function go_to_present (line 84) | pub fn go_to_present(&mut self) {}
function state (line 86) | pub fn state(&self) -> Option<&P::State> {
FILE: docs/release_summary.py
function get_merged_prs (line 4) | def get_merged_prs(repo, milestone, token):
function categorize_prs (line 30) | def categorize_prs(prs):
function get_authors (line 44) | def get_authors(prs):
function main (line 50) | def main():
FILE: examples/arc/src/main.rs
function main (line 8) | pub fn main() -> iced::Result {
type Arc (line 15) | struct Arc {
method new (line 26) | fn new() -> Self {
method update (line 33) | fn update(&mut self, _: Message) {
method view (line 37) | fn view(&self) -> Element<'_, Message> {
method subscription (line 41) | fn subscription(&self) -> Subscription<Message> {
type State (line 47) | type State = ();
method draw (line 49) | fn draw(
type Message (line 21) | enum Message {
FILE: examples/bezier_tool/src/main.rs
function main (line 5) | pub fn main() -> iced::Result {
type Example (line 12) | struct Example {
method update (line 24) | fn update(&mut self, message: Message) {
method view (line 37) | fn view(&self) -> Element<'_, Message> {
type Message (line 18) | enum Message {
type State (line 62) | pub struct State {
method view (line 67) | pub fn view<'a>(&'a self, curves: &'a [Curve]) -> Element<'a, Curve> {
method request_redraw (line 77) | pub fn request_redraw(&mut self) {
type Bezier (line 82) | struct Bezier<'a> {
type State (line 88) | type State = Option<Pending>;
method view (line 67) | pub fn view<'a>(&'a self, curves: &'a [Curve]) -> Element<'a, Curve> {
method request_redraw (line 77) | pub fn request_redraw(&mut self) {
function update (line 90) | fn update(
function draw (line 136) | fn draw(
function mouse_interaction (line 162) | fn mouse_interaction(
type Curve (line 177) | pub struct Curve {
method draw_all (line 184) | fn draw_all(curves: &[Curve], frame: &mut Frame, theme: &Theme) {
type Pending (line 202) | enum Pending {
method draw (line 208) | fn draw(
FILE: examples/changelog/src/changelog.rs
type Changelog (line 13) | pub struct Changelog {
method new (line 24) | pub fn new() -> Self {
method list (line 36) | pub async fn list() -> Result<(Self, Vec<Contribution>), Error> {
method save (line 126) | pub async fn save(self) -> Result<(), Error> {
method len (line 147) | pub fn len(&self) -> usize {
method entries (line 151) | pub fn entries(&self) -> impl Iterator<Item = u64> + '_ {
method push (line 155) | pub fn push(&mut self, entry: Entry) {
method fmt (line 192) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
type Entry (line 228) | pub struct Entry {
method new (line 236) | pub fn new(title: &str, category: Category, pull_request: &PullRequest...
type Category (line 253) | pub enum Category {
constant ALL (line 261) | pub const ALL: &'static [Self] = &[Self::Added, Self::Changed, Self::F...
method guess (line 263) | pub fn guess(label: &str) -> Option<Self> {
method fmt (line 274) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
type Contribution (line 285) | pub struct Contribution {
method list (line 291) | pub async fn list() -> Result<Vec<Contribution>, Error> {
type PullRequest (line 330) | pub struct PullRequest {
method fetch (line 340) | pub async fn fetch(contribution: Contribution) -> Result<Self, Error> {
type Error (line 391) | pub enum Error {
method from (line 409) | fn from(error: io::Error) -> Self {
method from (line 415) | fn from(error: reqwest::Error) -> Self {
FILE: examples/changelog/src/icon.rs
constant FONT_BYTES (line 4) | pub const FONT_BYTES: &[u8] = include_bytes!("../fonts/changelog-icons.t...
constant FONT (line 6) | const FONT: Font = Font::with_name("changelog-icons");
function copy (line 8) | pub fn copy() -> Text<'static> {
FILE: examples/changelog/src/main.rs
function main (line 12) | pub fn main() -> iced::Result {
type Generator (line 20) | enum Generator {
method new (line 56) | fn new() -> (Self, Task<Message>) {
method update (line 63) | fn update(&mut self, message: Message) -> Task<Message> {
method view (line 211) | fn view(&self) -> Element<'_, Message> {
method theme (line 347) | fn theme(&self) -> Theme {
type State (line 32) | enum State {
type Message (line 43) | enum Message {
FILE: examples/checkbox/src/main.rs
constant ICON_FONT (line 4) | const ICON_FONT: Font = Font::new("icons");
function main (line 6) | pub fn main() -> iced::Result {
type Example (line 13) | struct Example {
method update (line 27) | fn update(&mut self, message: Message) {
method view (line 41) | fn view(&self) -> Element<'_, Message> {
type Message (line 20) | enum Message {
FILE: examples/clock/src/main.rs
function main (line 11) | pub fn main() -> iced::Result {
type Clock (line 20) | struct Clock {
method new (line 31) | fn new() -> Self {
method update (line 38) | fn update(&mut self, message: Message) {
method view (line 51) | fn view(&self) -> Element<'_, Message> {
method subscription (line 57) | fn subscription(&self) -> Subscription<Message> {
method theme (line 61) | fn theme(&self) -> Theme {
type State (line 67) | type State = ();
method draw (line 69) | fn draw(
type Message (line 26) | enum Message {
function hand_rotation (line 188) | fn hand_rotation(n: u32, total: u32) -> Degrees {
FILE: examples/color_palette/src/main.rs
function main (line 12) | pub fn main() -> iced::Result {
type ColorPalette (line 24) | pub struct ColorPalette {
method update (line 45) | fn update(&mut self, message: Message) {
method view (line 58) | fn view(&self) -> Element<'_, Message> {
method theme (line 82) | fn theme(&self) -> iced::Theme {
type Message (line 35) | pub enum Message {
type Theme (line 98) | struct Theme {
method new (line 106) | pub fn new(base: impl Into<Color>) -> Theme {
method len (line 140) | pub fn len(&self) -> usize {
method colors (line 144) | pub fn colors(&self) -> impl Iterator<Item = &Color> {
method view (line 151) | pub fn view(&self) -> Element<'_, Message> {
method draw (line 155) | fn draw(&self, frame: &mut Frame, text_color: Color) {
type State (line 246) | type State = ();
method draw (line 248) | fn draw(
method default (line 267) | fn default() -> Self {
function color_hex_string (line 272) | fn color_hex_string(color: &Color) -> String {
type ColorPicker (line 282) | struct ColorPicker<C: ColorSpace> {
type ColorSpace (line 286) | trait ColorSpace: Sized {
constant LABEL (line 287) | const LABEL: &'static str;
constant COMPONENT_RANGES (line 288) | const COMPONENT_RANGES: [RangeInclusive<f64>; 3];
method new (line 290) | fn new(a: f32, b: f32, c: f32) -> Self;
method components (line 292) | fn components(&self) -> [f32; 3];
method to_string (line 294) | fn to_string(&self) -> String;
constant LABEL (line 324) | const LABEL: &'static str = "RGB";
constant COMPONENT_RANGES (line 325) | const COMPONENT_RANGES: [RangeInclusive<f64>; 3] = [0.0..=1.0, 0.0..=1...
method new (line 327) | fn new(r: f32, g: f32, b: f32) -> Self {
method components (line 331) | fn components(&self) -> [f32; 3] {
method to_string (line 335) | fn to_string(&self) -> String {
constant LABEL (line 346) | const LABEL: &'static str = "HSL";
constant COMPONENT_RANGES (line 347) | const COMPONENT_RANGES: [RangeInclusive<f64>; 3] = [0.0..=360.0, 0.0.....
method new (line 349) | fn new(hue: f32, saturation: f32, lightness: f32) -> Self {
method components (line 353) | fn components(&self) -> [f32; 3] {
method to_string (line 361) | fn to_string(&self) -> String {
constant LABEL (line 372) | const LABEL: &'static str = "HSV";
constant COMPONENT_RANGES (line 373) | const COMPONENT_RANGES: [RangeInclusive<f64>; 3] = [0.0..=360.0, 0.0.....
method new (line 375) | fn new(hue: f32, saturation: f32, value: f32) -> Self {
method components (line 379) | fn components(&self) -> [f32; 3] {
method to_string (line 387) | fn to_string(&self) -> String {
constant LABEL (line 398) | const LABEL: &'static str = "HWB";
constant COMPONENT_RANGES (line 399) | const COMPONENT_RANGES: [RangeInclusive<f64>; 3] = [0.0..=360.0, 0.0.....
method new (line 401) | fn new(hue: f32, whiteness: f32, blackness: f32) -> Self {
method components (line 405) | fn components(&self) -> [f32; 3] {
method to_string (line 413) | fn to_string(&self) -> String {
constant LABEL (line 424) | const LABEL: &'static str = "Lab";
constant COMPONENT_RANGES (line 425) | const COMPONENT_RANGES: [RangeInclusive<f64>; 3] =
method new (line 428) | fn new(l: f32, a: f32, b: f32) -> Self {
method components (line 432) | fn components(&self) -> [f32; 3] {
method to_string (line 436) | fn to_string(&self) -> String {
constant LABEL (line 442) | const LABEL: &'static str = "Lch";
constant COMPONENT_RANGES (line 443) | const COMPONENT_RANGES: [RangeInclusive<f64>; 3] = [0.0..=100.0, 0.0.....
method new (line 445) | fn new(l: f32, chroma: f32, hue: f32) -> Self {
method components (line 449) | fn components(&self) -> [f32; 3] {
method to_string (line 453) | fn to_string(&self) -> String {
function view (line 298) | fn view(&self, color: C) -> Element<'_, C> {
function to_rgb (line 463) | fn to_rgb(color: Color) -> Rgb {
function to_color (line 472) | fn to_color(rgb: Rgb) -> Color {
FILE: examples/combo_box/src/main.rs
function main (line 4) | pub fn main() -> iced::Result {
type Example (line 8) | struct Example {
method new (line 22) | fn new() -> Self {
method update (line 30) | fn update(&mut self, message: Message) {
method view (line 48) | fn view(&self) -> Element<'_, Message> {
type Message (line 15) | enum Message {
method default (line 74) | fn default() -> Self {
type Language (line 80) | pub enum Language {
constant ALL (line 94) | const ALL: [Language; 9] = [
method hello (line 106) | fn hello(&self) -> &str {
method fmt (line 122) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
FILE: examples/counter/src/main.rs
function main (line 4) | pub fn main() -> iced::Result {
type Counter (line 9) | struct Counter {
method update (line 20) | fn update(&mut self, message: Message) {
method view (line 31) | fn view(&self) -> Column<'_, Message> {
type Message (line 14) | enum Message {
function it_counts (line 48) | fn it_counts() -> Result<(), Error> {
FILE: examples/custom_quad/src/main.rs
function main (line 6) | pub fn main() -> iced::Result {
type Example (line 10) | struct Example {
method new (line 32) | fn new() -> Self {
method update (line 45) | fn update(&mut self, message: Message) {
method view (line 77) | fn view(&self) -> Element<'_, Message> {
type Message (line 19) | enum Message {
method default (line 123) | fn default() -> Self {
type CustomQuad (line 136) | pub struct CustomQuad {
method new (line 145) | pub fn new(
method size (line 166) | fn size(&self) -> Size<Length> {
method layout (line 173) | fn layout(
method draw (line 182) | fn draw(
function from (line 209) | fn from(circle: CustomQuad) -> Self {
FILE: examples/custom_shader/src/main.rs
function main (line 11) | fn main() -> iced::Result {
type IcedCubes (line 17) | struct IcedCubes {
method new (line 32) | fn new() -> Self {
method update (line 39) | fn update(&mut self, message: Message) {
method view (line 59) | fn view(&self) -> Element<'_, Message> {
method subscription (line 129) | fn subscription(&self) -> Subscription<Message> {
type Message (line 23) | enum Message {
method default (line 135) | fn default() -> Self {
function control (line 140) | fn control<'a>(
FILE: examples/custom_shader/src/scene.rs
constant MAX (line 20) | pub const MAX: u32 = 500;
type Scene (line 23) | pub struct Scene {
method new (line 32) | pub fn new() -> Self {
method update (line 46) | pub fn update(&mut self, time: Duration) {
method change_amount (line 52) | pub fn change_amount(&mut self, amount: u32) {
type State (line 82) | type State = ();
type Primitive (line 83) | type Primitive = Primitive;
method draw (line 85) | fn draw(
type Primitive (line 103) | pub struct Primitive {
method new (line 110) | pub fn new(
type Pipeline (line 131) | type Pipeline = Pipeline;
method prepare (line 133) | fn prepare(
method render (line 152) | fn render(
function rnd_origin (line 170) | fn rnd_origin() -> Vec3 {
method new (line 179) | fn new(device: &wgpu::Device, queue: &wgpu::Queue, format: wgpu::Texture...
FILE: examples/custom_shader/src/scene/camera.rs
type Camera (line 5) | pub struct Camera {
method build_view_proj_matrix (line 35) | pub fn build_view_proj_matrix(&self, bounds: Rectangle) -> glam::Mat4 {
method position (line 43) | pub fn position(&self) -> glam::Vec4 {
method default (line 15) | fn default() -> Self {
constant OPENGL_TO_WGPU_MATRIX (line 27) | pub const OPENGL_TO_WGPU_MATRIX: glam::Mat4 = mat4(
FILE: examples/custom_shader/src/scene/pipeline.rs
constant SKY_TEXTURE_SIZE (line 17) | const SKY_TEXTURE_SIZE: u32 = 128;
type Pipeline (line 19) | pub struct Pipeline {
method new (line 31) | pub fn new(device: &wgpu::Device, queue: &wgpu::Queue, format: wgpu::T...
method update_depth_texture (line 282) | fn update_depth_texture(&mut self, device: &wgpu::Device, size: Size<u...
method update (line 309) | pub fn update(
method render (line 332) | pub fn render(
type DepthPipeline (line 386) | struct DepthPipeline {
method new (line 395) | pub fn new(
method update (line 496) | pub fn update(&mut self, device: &wgpu::Device, depth_texture: &wgpu::...
method render (line 515) | pub fn render(
function load_skybox_data (line 556) | fn load_skybox_data() -> Vec<u8> {
function load_normal_map_data (line 577) | fn load_normal_map_data() -> Vec<u8> {
FILE: examples/custom_shader/src/scene/pipeline/buffer.rs
type Buffer (line 4) | pub struct Buffer {
method new (line 12) | pub fn new(
method resize (line 31) | pub fn resize(&mut self, device: &wgpu::Device, new_size: u64) {
FILE: examples/custom_shader/src/scene/pipeline/cube.rs
type Cube (line 9) | pub struct Cube {
method new (line 30) | pub fn new(size: f32, origin: Vec3) -> Self {
method update (line 48) | pub fn update(&mut self, size: f32, time: f32) {
method default (line 18) | fn default() -> Self {
type Raw (line 57) | pub struct Raw {
constant ATTRIBS (line 64) | const ATTRIBS: [wgpu::VertexAttribute; 7] = wgpu::vertex_attr_array![
method desc (line 76) | pub fn desc<'a>() -> wgpu::VertexBufferLayout<'a> {
method from_cube (line 86) | pub fn from_cube(cube: &Cube) -> Raw {
method vertices (line 98) | pub fn vertices() -> [Vertex; 36] {
FILE: examples/custom_shader/src/scene/pipeline/uniforms.rs
type Uniforms (line 7) | pub struct Uniforms {
method new (line 14) | pub fn new(camera: &Camera, bounds: Rectangle, light_color: Color) -> ...
FILE: examples/custom_shader/src/scene/pipeline/vertex.rs
type Vertex (line 5) | pub struct Vertex {
constant ATTRIBS (line 13) | const ATTRIBS: [wgpu::VertexAttribute; 4] = wgpu::vertex_attr_array![
method desc (line 24) | pub fn desc<'a>() -> wgpu::VertexBufferLayout<'a> {
FILE: examples/custom_widget/src/main.rs
type Circle (line 10) | pub struct Circle {
method new (line 15) | pub fn new(radius: f32) -> Self {
method size (line 28) | fn size(&self) -> Size<Length> {
method layout (line 35) | fn layout(
method draw (line 44) | fn draw(
function circle (line 20) | pub fn circle(radius: f32) -> Circle {
function from (line 69) | fn from(circle: Circle) -> Self {
function main (line 79) | pub fn main() -> iced::Result {
type Example (line 83) | struct Example {
method new (line 93) | fn new() -> Self {
method update (line 97) | fn update(&mut self, message: Message) {
method view (line 105) | fn view(&self) -> Element<'_, Message> {
type Message (line 88) | enum Message {
method default (line 121) | fn default() -> Self {
FILE: examples/delineate/src/main.rs
function main (line 7) | pub fn main() -> iced::Result {
type Example (line 15) | struct Example {
method update (line 31) | fn update(&mut self, message: Message) -> Task<Message> {
method view (line 55) | fn view(&self) -> Element<'_, Message> {
method subscription (line 138) | fn subscription(&self) -> Subscription<Message> {
type Message (line 22) | enum Message {
constant OUTER_CONTAINER (line 149) | const OUTER_CONTAINER: widget::Id = widget::Id::new("outer");
constant INNER_CONTAINER (line 150) | const INNER_CONTAINER: widget::Id = widget::Id::new("inner");
FILE: examples/download_progress/src/download.rs
function download (line 6) | pub fn download(url: impl AsRef<str>) -> impl Straw<(), Progress, Error> {
type Progress (line 32) | pub struct Progress {
type Error (line 37) | pub enum Error {
method from (line 43) | fn from(error: reqwest::Error) -> Self {
FILE: examples/download_progress/src/main.rs
function main (line 9) | pub fn main() -> iced::Result {
type Example (line 14) | struct Example {
method new (line 27) | fn new() -> Self {
method update (line 34) | fn update(&mut self, message: Message) -> Task<Message> {
method view (line 63) | fn view(&self) -> Element<'_, Message> {
type Message (line 20) | pub enum Message {
method default (line 78) | fn default() -> Self {
type Download (line 84) | struct Download {
method new (line 104) | pub fn new(id: usize) -> Self {
method start (line 111) | pub fn start(&mut self) -> Task<Update> {
method update (line 136) | pub fn update(&mut self, update: Update) {
method view (line 153) | pub fn view(&self) -> Element<'_, Message> {
type Update (line 90) | pub enum Update {
type State (line 96) | enum State {
FILE: examples/editor/src/main.rs
function main (line 15) | pub fn main() -> iced::Result {
type Editor (line 23) | struct Editor {
method new (line 45) | fn new() -> (Self, Task<Message>) {
method update (line 65) | fn update(&mut self, message: Message) -> Task<Message> {
method view (line 145) | fn view(&self) -> Element<'_, Message> {
method theme (line 233) | fn theme(&self) -> Theme {
type Message (line 33) | enum Message {
type Error (line 243) | pub enum Error {
function open_file (line 248) | fn open_file(
function load_file (line 262) | async fn load_file(path: impl Into<PathBuf>) -> Result<(PathBuf, Arc<Str...
function save_file (line 273) | async fn save_file(path: Option<PathBuf>, contents: String) -> Result<Pa...
function action (line 293) | fn action<'a, Message: Clone + 'a>(
function new_icon (line 313) | fn new_icon<'a, Message>() -> Element<'a, Message> {
function save_icon (line 317) | fn save_icon<'a, Message>() -> Element<'a, Message> {
function open_icon (line 321) | fn open_icon<'a, Message>() -> Element<'a, Message> {
function icon (line 325) | fn icon<'a, Message>(codepoint: char) -> Element<'a, Message> {
constant EDITOR (line 334) | const EDITOR: &str = "editor";
FILE: examples/events/src/main.rs
function main (line 6) | pub fn main() -> iced::Result {
type Events (line 14) | struct Events {
method update (line 27) | fn update(&mut self, message: Message) -> Task<Message> {
method subscription (line 54) | fn subscription(&self) -> Subscription<Message> {
method view (line 58) | fn view(&self) -> Element<'_, Message> {
type Message (line 20) | enum Message {
FILE: examples/exit/src/main.rs
function main (line 5) | pub fn main() -> iced::Result {
type Exit (line 10) | struct Exit {
method update (line 21) | fn update(&mut self, message: Message) -> Task<Message> {
method view (line 32) | fn view(&self) -> Element<'_, Message> {
type Message (line 15) | enum Message {
FILE: examples/ferris/src/main.rs
function main (line 9) | pub fn main() -> iced::Result {
type Image (line 16) | struct Image {
method update (line 37) | fn update(&mut self, message: Message) {
method subscription (line 77) | fn subscription(&self) -> Subscription<Message> {
method view (line 85) | fn view(&self) -> Element<'_, Message> {
type Message (line 26) | enum Message {
method default (line 169) | fn default() -> Self {
type RotationStrategy (line 182) | enum RotationStrategy {
method fmt (line 188) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
function with_value (line 196) | fn with_value<'a>(control: impl Into<Element<'a, Message>>, value: Strin...
FILE: examples/gallery/src/civitai.rs
type Image (line 12) | pub struct Image {
constant LIMIT (line 19) | pub const LIMIT: usize = 200;
method list (line 21) | pub async fn list() -> Result<Vec<Self>, Error> {
method blurhash (line 48) | pub async fn blurhash(self, width: u32, height: u32) -> Result<Blurhas...
method download (line 63) | pub fn download(self, size: Size) -> impl Straw<Bytes, Blurhash, Error> {
type Id (line 103) | pub struct Id(u32);
type Blurhash (line 106) | pub struct Blurhash {
type Rgba (line 111) | pub struct Rgba {
method fmt (line 118) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
type Bytes (line 127) | pub struct Bytes(bytes::Bytes);
method as_slice (line 130) | pub fn as_slice(&self) -> &[u8] {
method fmt (line 142) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
function from (line 136) | fn from(value: Bytes) -> Self {
type Size (line 150) | pub enum Size {
type Error (line 157) | pub enum Error {
method from (line 166) | fn from(error: reqwest::Error) -> Self {
method from (line 172) | fn from(error: io::Error) -> Self {
method from (line 178) | fn from(error: task::JoinError) -> Self {
method from (line 184) | fn from(error: blurhash::Error) -> Self {
FILE: examples/gallery/src/main.rs
function main (line 22) | fn main() -> iced::Result {
type Gallery (line 34) | struct Gallery {
method new (line 59) | pub fn new() -> (Self, Task<Message>) {
method theme (line 73) | pub fn theme(&self) -> Theme {
method subscription (line 77) | pub fn subscription(&self) -> Subscription<Message> {
method update (line 91) | pub fn update(&mut self, message: Message, now: Instant) -> Task<Messa...
method view (line 245) | pub fn view(&self) -> Element<'_, Message> {
type Message (line 44) | enum Message {
function card (line 281) | fn card<'a>(
function placeholder (line 352) | fn placeholder<'a>() -> Element<'a, Message> {
type Preview (line 356) | enum Preview {
constant WIDTH (line 391) | const WIDTH: u32 = 320;
constant HEIGHT (line 392) | const HEIGHT: u32 = 410;
method loading (line 394) | fn loading(rgba: Rgba, now: Instant) -> Self {
method ready (line 406) | fn ready(bytes: Bytes) -> Self {
method load (line 413) | fn load(self, bytes: Bytes) -> Self {
method toggle_zoom (line 424) | fn toggle_zoom(&mut self, enabled: bool, now: Instant) {
method is_animating (line 430) | fn is_animating(&self, now: Instant) -> bool {
method blurhash (line 446) | fn blurhash(&self, now: Instant) -> Option<&Blurhash> {
type Blurhash (line 366) | struct Blurhash {
method show (line 372) | pub fn show(&mut self, now: Instant) {
method reset (line 376) | pub fn reset(&mut self) {
type Thumbnail (line 383) | struct Thumbnail {
method new (line 462) | pub fn new(bytes: Bytes) -> Self {
method reset (line 475) | pub fn reset(&mut self) {
method show (line 482) | pub fn show(&mut self, allocation: image::Allocation, now: Instant) {
type Viewer (line 488) | struct Viewer {
method new (line 495) | fn new() -> Self {
method open (line 507) | fn open(&mut self, now: Instant) {
method show (line 512) | fn show(&mut self, allocation: image::Allocation, now: Instant) {
method close (line 518) | fn close(&mut self, now: Instant) {
method is_animating (line 523) | fn is_animating(&self, now: Instant) -> bool {
method view (line 527) | fn view(&self, now: Instant) -> Option<Element<'_, Message>> {
function to_rgba (line 556) | fn to_rgba(bytes: Bytes) -> Task<image::Handle> {
function rounded (line 571) | fn rounded(theme: &Theme) -> container::Style {
constant BORDER_RADIUS (line 575) | const BORDER_RADIUS: u32 = 10;
FILE: examples/game_of_life/src/main.rs
function main (line 12) | pub fn main() -> iced::Result {
type GameOfLife (line 22) | struct GameOfLife {
method new (line 44) | fn new() -> Self {
method update (line 55) | fn update(&mut self, message: Message) -> Task<Message> {
method subscription (line 103) | fn subscription(&self) -> Subscription<Message> {
method view (line 111) | fn view(&self) -> Element<'_, Message> {
type Message (line 32) | enum Message {
method default (line 129) | fn default() -> Self {
function view_controls (line 134) | fn view_controls<'a>(
type Grid (line 190) | pub struct Grid {
constant MIN_SCALING (line 226) | const MIN_SCALING: f32 = 0.1;
constant MAX_SCALING (line 227) | const MAX_SCALING: f32 = 2.0;
method from_preset (line 229) | pub fn from_preset(preset: Preset) -> Self {
method tick (line 249) | pub fn tick(&mut self, amount: usize) -> Option<impl Future<Output = M...
method update (line 266) | pub fn update(&mut self, message: Message) {
method view (line 313) | pub fn view(&self) -> Element<'_, Message> {
method clear (line 317) | pub fn clear(&mut self) {
method preset (line 324) | pub fn preset(&self) -> Preset {
method toggle_lines (line 328) | pub fn toggle_lines(&mut self, enabled: bool) {
method are_lines_visible (line 332) | pub fn are_lines_visible(&self) -> bool {
method visible_region (line 336) | fn visible_region(&self, size: Size) -> Region {
method project (line 348) | fn project(&self, position: Point, size: Size) -> Point {
type State (line 359) | type State = Interaction;
method update (line 361) | fn update(
method draw (line 497) | fn draw(
method mouse_interaction (line 626) | fn mouse_interaction(
type Message (line 203) | pub enum Message {
type TickError (line 215) | pub enum TickError {
method default (line 220) | fn default() -> Self {
type State (line 643) | struct State {
method with_life (line 650) | pub fn with_life(life: Life) -> Self {
method cell_count (line 657) | fn cell_count(&self) -> usize {
method contains (line 661) | fn contains(&self, cell: &Cell) -> bool {
method cells (line 665) | fn cells(&self) -> impl Iterator<Item = &Cell> {
method populate (line 669) | fn populate(&mut self, cell: Cell) {
method unpopulate (line 677) | fn unpopulate(&mut self, cell: &Cell) {
method update (line 685) | fn update(&mut self, mut life: Life) {
method tick (line 692) | fn tick(
type Life (line 719) | pub struct Life {
method len (line 724) | fn len(&self) -> usize {
method contains (line 728) | fn contains(&self, cell: &Cell) -> bool {
method populate (line 732) | fn populate(&mut self, cell: Cell) {
method unpopulate (line 736) | fn unpopulate(&mut self, cell: &Cell) {
method tick (line 740) | fn tick(&mut self) {
method iter (line 766) | pub fn iter(&self) -> impl Iterator<Item = &Cell> {
method from_iter (line 772) | fn from_iter<I: IntoIterator<Item = Cell>>(iter: I) -> Self {
method fmt (line 780) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
type Cell (line 788) | pub struct Cell {
constant SIZE (line 794) | const SIZE: u16 = 20;
method at (line 796) | fn at(position: Point) -> Cell {
method cluster (line 806) | fn cluster(cell: Cell) -> impl Iterator<Item = Cell> {
method neighbors (line 815) | fn neighbors(cell: Cell) -> impl Iterator<Item = Cell> {
type Region (line 820) | pub struct Region {
method rows (line 828) | fn rows(&self) -> RangeInclusive<isize> {
method columns (line 836) | fn columns(&self) -> RangeInclusive<isize> {
method cull (line 844) | fn cull<'a>(
type Interaction (line 856) | pub enum Interaction {
FILE: examples/game_of_life/src/preset.rs
type Preset (line 2) | pub enum Preset {
method life (line 30) | pub fn life(self) -> Vec<(isize, isize)> {
method fmt (line 117) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
FILE: examples/geometry/src/main.rs
type Rainbow (line 13) | pub struct Rainbow;
method size (line 20) | fn size(&self) -> Size<Length> {
method layout (line 27) | fn layout(
method update (line 38) | fn update(
method draw (line 53) | fn draw(
function rainbow (line 15) | pub fn rainbow() -> Rainbow {
function from (line 157) | fn from(rainbow: Rainbow) -> Self {
function main (line 167) | pub fn main() -> iced::Result {
function view (line 171) | fn view(_state: &()) -> Element<'_, Never> {
FILE: examples/gradient/src/main.rs
function main (line 6) | pub fn main() -> iced::Result {
type Gradient (line 16) | struct Gradient {
method new (line 32) | fn new() -> Self {
method update (line 41) | fn update(&mut self, message: Message) {
method view (line 52) | fn view(&self) -> Element<'_, Message> {
method style (line 96) | fn style(&self, theme: &Theme) -> theme::Style {
type Message (line 24) | enum Message {
method default (line 109) | fn default() -> Self {
function color_picker (line 114) | fn color_picker(label: &str, color: Color) -> Element<'_, Color> {
FILE: examples/integration/src/controls.rs
type Controls (line 5) | pub struct Controls {
method new (line 17) | pub fn new() -> Controls {
method background_color (line 24) | pub fn background_color(&self) -> Color {
method update (line 30) | pub fn update(&mut self, message: Message) {
method view (line 41) | pub fn view(&self) -> Element<'_, Message, Theme, Renderer> {
type Message (line 11) | pub enum Message {
FILE: examples/integration/src/main.rs
function main (line 27) | pub fn main() -> Result<(), winit::error::EventLoopError> {
FILE: examples/integration/src/scene.rs
type Scene (line 4) | pub struct Scene {
method new (line 9) | pub fn new(device: &wgpu::Device, texture_format: wgpu::TextureFormat)...
method clear (line 15) | pub fn clear<'a>(
method draw (line 47) | pub fn draw<'a>(&'a self, render_pass: &mut wgpu::RenderPass<'a>) {
function build_pipeline (line 53) | fn build_pipeline(
FILE: examples/layout/src/main.rs
function main (line 13) | pub fn main() -> iced::Result {
type Layout (line 22) | struct Layout {
method title (line 37) | fn title(&self) -> String {
method update (line 41) | fn update(&mut self, message: Message) {
method subscription (line 58) | fn subscription(&self) -> Subscription<Message> {
method view (line 79) | fn view(&self) -> Element<'_, Message> {
method theme (line 126) | fn theme(&self) -> Option<Theme> {
type Message (line 29) | enum Message {
type Example (line 132) | struct Example {
constant LIST (line 138) | const LIST: &'static [Self] = &[
method is_first (line 173) | fn is_first(self) -> bool {
method is_last (line 177) | fn is_last(self) -> bool {
method previous (line 181) | fn previous(self) -> Self {
method next (line 192) | fn next(self) -> Self {
method view (line 200) | fn view(&self) -> Element<'_, Message> {
method default (line 206) | fn default() -> Self {
method eq (line 212) | fn eq(&self, other: &Self) -> bool {
function centered (line 217) | fn centered<'a>() -> Element<'a, Message> {
function column_ (line 221) | fn column_<'a>() -> Element<'a, Message> {
function row_ (line 235) | fn row_<'a>() -> Element<'a, Message> {
function space_ (line 247) | fn space_<'a>() -> Element<'a, Message> {
function application (line 251) | fn application<'a>() -> Element<'a, Message> {
function quotes (line 299) | fn quotes<'a>() -> Element<'a, Message> {
function pinning (line 327) | fn pinning<'a>() -> Element<'a, Message> {
function responsive_ (line 344) | fn responsive_<'a>() -> Element<'a, Message> {
function square (line 379) | fn square<'a>(size: impl Into<Length> + Copy) -> Element<'a, Message> {
FILE: examples/lazy/src/main.rs
function main (line 7) | pub fn main() -> iced::Result {
type App (line 11) | struct App {
method update (line 121) | fn update(&mut self, message: Message) {
method view (line 154) | fn view(&self) -> Element<'_, Message> {
method default (line 19) | fn default() -> Self {
type Color (line 33) | enum Color {
constant ALL (line 45) | const ALL: &'static [Color] = &[
method fmt (line 57) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
function from (line 71) | fn from(value: Color) -> Self {
type Item (line 85) | struct Item {
method from (line 103) | fn from(s: &str) -> Self {
method hash (line 91) | fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
method eq (line 97) | fn eq(&self, other: &Self) -> bool {
type Message (line 112) | enum Message {
type Order (line 198) | enum Order {
method fmt (line 204) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
FILE: examples/loading_spinners/src/circular.rs
constant MIN_ANGLE (line 17) | const MIN_ANGLE: Radians = Radians(PI / 8.0);
constant WRAP_ANGLE (line 18) | const WRAP_ANGLE: Radians = Radians(2.0 * PI - PI / 4.0);
constant BASE_ROTATION_SPEED (line 19) | const BASE_ROTATION_SPEED: u32 = u32::MAX / 80;
type Circular (line 21) | pub struct Circular<'a, Theme>
function new (line 38) | pub fn new() -> Self {
function size (line 50) | pub fn size(mut self, size: f32) -> Self {
function bar_height (line 56) | pub fn bar_height(mut self, bar_height: f32) -> Self {
function style (line 62) | pub fn style(mut self, style: <Theme as StyleSheet>::Style) -> Self {
function easing (line 68) | pub fn easing(mut self, easing: &'a Easing) -> Self {
function cycle_duration (line 74) | pub fn cycle_duration(mut self, duration: Duration) -> Self {
function rotation_duration (line 81) | pub fn rotation_duration(mut self, duration: Duration) -> Self {
method default (line 91) | fn default() -> Self {
type Animation (line 97) | enum Animation {
method next (line 124) | fn next(&self, additional_rotation: u32, now: Instant) -> Self {
method start (line 143) | fn start(&self) -> Instant {
method last (line 149) | fn last(&self) -> Instant {
method timed_transition (line 155) | fn timed_transition(
method with_elapsed (line 172) | fn with_elapsed(
method rotation (line 200) | fn rotation(&self) -> f32 {
method default (line 113) | fn default() -> Self {
type State (line 210) | struct State {
function tag (line 220) | fn tag(&self) -> tree::Tag {
function state (line 224) | fn state(&self) -> tree::State {
function size (line 228) | fn size(&self) -> Size<Length> {
function layout (line 235) | fn layout(
function update (line 244) | fn update(
function draw (line 267) | fn draw(
function from (line 340) | fn from(circular: Circular<'a, Theme>) -> Self {
type Appearance (line 346) | pub struct Appearance {
method default (line 356) | fn default() -> Self {
type StyleSheet (line 366) | pub trait StyleSheet {
method appearance (line 371) | fn appearance(&self, style: &Self::Style) -> Appearance;
type Style (line 375) | type Style = ();
method appearance (line 377) | fn appearance(&self, _style: &Self::Style) -> Appearance {
FILE: examples/loading_spinners/src/easing.rs
type Easing (line 45) | pub struct Easing {
method builder (line 51) | pub fn builder() -> Builder {
method y_at_x (line 55) | pub fn y_at_x(&self, x: f32) -> f32 {
type Builder (line 65) | pub struct Builder(NoAttributes<BuilderImpl>);
method new (line 68) | pub fn new() -> Self {
method line_to (line 76) | pub fn line_to(mut self, to: impl Into<Point>) -> Self {
method quadratic_bezier_to (line 83) | pub fn quadratic_bezier_to(mut self, ctrl: impl Into<Point>, to: impl ...
method cubic_bezier_to (line 91) | pub fn cubic_bezier_to(
method build (line 103) | pub fn build(mut self) -> Easing {
method point (line 113) | fn point(p: impl Into<Point>) -> lyon_algorithms::geom::Point<f32> {
method default (line 120) | fn default() -> Self {
FILE: examples/loading_spinners/src/linear.rs
type Linear (line 15) | pub struct Linear<'a, Theme>
function new (line 31) | pub fn new() -> Self {
function width (line 42) | pub fn width(mut self, width: impl Into<Length>) -> Self {
function height (line 48) | pub fn height(mut self, height: impl Into<Length>) -> Self {
function style (line 54) | pub fn style(mut self, style: impl Into<Theme::Style>) -> Self {
function easing (line 60) | pub fn easing(mut self, easing: &'a Easing) -> Self {
function cycle_duration (line 66) | pub fn cycle_duration(mut self, duration: Duration) -> Self {
method default (line 76) | fn default() -> Self {
type State (line 82) | enum State {
method next (line 97) | fn next(&self, now: Instant) -> Self {
method start (line 110) | fn start(&self) -> Instant {
method timed_transition (line 116) | fn timed_transition(&self, cycle_duration: Duration, now: Instant) -> ...
method with_elapsed (line 125) | fn with_elapsed(&self, cycle_duration: Duration, elapsed: Duration) ->...
method default (line 88) | fn default() -> Self {
function tag (line 146) | fn tag(&self) -> tree::Tag {
function state (line 150) | fn state(&self) -> tree::State {
function size (line 154) | fn size(&self) -> Size<Length> {
function layout (line 161) | fn layout(
function update (line 170) | fn update(
function draw (line 189) | fn draw(
function from (line 252) | fn from(linear: Linear<'a, Theme>) -> Self {
type Appearance (line 258) | pub struct Appearance {
method default (line 266) | fn default() -> Self {
type StyleSheet (line 275) | pub trait StyleSheet {
method appearance (line 280) | fn appearance(&self, style: &Self::Style) -> Appearance;
type Style (line 284) | type Style = ();
method appearance (line 286) | fn appearance(&self, _style: &Self::Style) -> Appearance {
FILE: examples/loading_spinners/src/main.rs
function main (line 13) | pub fn main() -> iced::Result {
type LoadingSpinners (line 22) | struct LoadingSpinners {
method update (line 32) | fn update(&mut self, message: Message) {
method view (line 40) | fn view(&self) -> Element<'_, Message> {
type Message (line 27) | enum Message {
method default (line 94) | fn default() -> Self {
FILE: examples/loupe/src/main.rs
function main (line 6) | pub fn main() -> iced::Result {
type Loupe (line 11) | struct Loupe {
method update (line 22) | fn update(&mut self, message: Message) {
method view (line 33) | fn view(&self) -> Element<'_, Message> {
type Message (line 16) | enum Message {
function loupe (line 56) | pub fn loupe<'a, Message>(
type Loupe (line 69) | pub struct Loupe<'a, Message> {
method update (line 22) | fn update(&mut self, message: Message) {
method view (line 33) | fn view(&self) -> Element<'_, Message> {
function tag (line 75) | fn tag(&self) -> widget::tree::Tag {
function state (line 79) | fn state(&self) -> widget::tree::State {
function children (line 83) | fn children(&self) -> Vec<widget::Tree> {
function diff (line 87) | fn diff(&self, tree: &mut widget::Tree) {
function size (line 91) | fn size(&self) -> Size<Length> {
function layout (line 95) | fn layout(
function draw (line 104) | fn draw(
function mouse_interaction (line 144) | fn mouse_interaction(
function from (line 164) | fn from(loupe: Loupe<'a, Message>) -> Self {
FILE: examples/markdown/build.rs
function main (line 1) | pub fn main() {
FILE: examples/markdown/src/icon.rs
constant FONT (line 6) | pub const FONT: &[u8] = include_bytes!("../fonts/markdown-icons.ttf");
function copy (line 8) | pub fn copy<'a>() -> Text<'a> {
function icon (line 12) | fn icon(codepoint: &str) -> Text<'_> {
FILE: examples/markdown/src/main.rs
function main (line 18) | pub fn main() -> iced::Result {
type Markdown (line 30) | struct Markdown {
method new (line 67) | fn new() -> (Self, Task<Message>) {
method update (line 83) | fn update(&mut self, message: Message, now: Instant) -> Task<Message> {
method view (line 171) | fn view(&self) -> Element<'_, Message> {
method theme (line 210) | fn theme(&self) -> Theme {
method subscription (line 214) | fn subscription(&self) -> Subscription<Message> {
type Mode (line 39) | enum Mode {
type Image (line 44) | enum Image {
type Message (line 55) | enum Message {
type CustomViewer (line 237) | struct CustomViewer<'a> {
function on_link_click (line 243) | fn on_link_click(url: markdown::Uri) -> Message {
function image (line 247) | fn image(
function code_block (line 270) | fn code_block(
function download_image (line 291) | async fn download_image(uri: markdown::Uri) -> Result<image::Handle, Err...
type Error (line 335) | pub enum Error {
method from (line 343) | fn from(error: reqwest::Error) -> Self {
method from (line 349) | fn from(error: io::Error) -> Self {
method from (line 355) | fn from(error: tokio::task::JoinError) -> Self {
method from (line 361) | fn from(error: ::image::ImageError) -> Self {
FILE: examples/modal/src/main.rs
function main (line 12) | pub fn main() -> iced::Result {
type App (line 19) | struct App {
method subscription (line 38) | fn subscription(&self) -> Subscription<Message> {
method update (line 42) | fn update(&mut self, message: Message) -> Task<Message> {
method view (line 95) | fn view(&self) -> Element<'_, Message> {
method hide_modal (line 159) | fn hide_modal(&mut self) {
type Message (line 27) | enum Message {
type Plan (line 167) | enum Plan {
constant ALL (line 175) | pub const ALL: &'static [Self] = &[Self::Basic, Self::Pro, Self::Enter...
method fmt (line 179) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
function modal (line 189) | fn modal<'a, Message>(
FILE: examples/multi_window/src/main.rs
function main (line 9) | fn main() -> iced::Result {
type Example (line 18) | struct Example {
method new (line 41) | fn new() -> (Self, Task<Message>) {
method title (line 52) | fn title(&self, window: window::Id) -> String {
method update (line 59) | fn update(&mut self, message: Message) -> Task<Message> {
method view (line 126) | fn view(&self, window_id: window::Id) -> Element<'_, Message> {
method theme (line 134) | fn theme(&self, window: window::Id) -> Option<Theme> {
method scale_factor (line 138) | fn scale_factor(&self, window: window::Id) -> f32 {
method subscription (line 145) | fn subscription(&self) -> Subscription<Message> {
type Window (line 23) | struct Window {
method new (line 151) | fn new(count: usize) -> Self {
method view (line 160) | fn view(&self, id: window::Id) -> Element<'_, Message> {
type Message (line 31) | enum Message {
FILE: examples/multitouch/src/main.rs
function main (line 12) | pub fn main() -> iced::Result {
type Multitouch (line 21) | struct Multitouch {
method update (line 33) | fn update(&mut self, message: Message) {
method view (line 46) | fn view(&self) -> Element<'_, Message> {
type State (line 52) | type State = ();
method update (line 54) | fn update(
method draw (line 77) | fn draw(
type Message (line 27) | enum Message {
FILE: examples/pane_grid/src/main.rs
function main (line 6) | pub fn main() -> iced::Result {
type Example (line 12) | struct Example {
method new (line 34) | fn new() -> Self {
method update (line 44) | fn update(&mut self, message: Message) {
method subscription (line 109) | fn subscription(&self) -> Subscription<Message> {
method view (line 123) | fn view(&self) -> Element<'_, Message> {
type Message (line 19) | enum Message {
method default (line 186) | fn default() -> Self {
constant PANE_ID_COLOR_UNFOCUSED (line 191) | const PANE_ID_COLOR_UNFOCUSED: Color = Color::from_rgb(
constant PANE_ID_COLOR_FOCUSED (line 196) | const PANE_ID_COLOR_FOCUSED: Color = Color::from_rgb(
function handle_hotkey (line 202) | fn handle_hotkey(key: keyboard::Key) -> Option<Message> {
type Pane (line 226) | struct Pane {
method new (line 232) | fn new(id: usize) -> Self {
function view_content (line 240) | fn view_content<'a>(
function view_controls (line 278) | fn view_controls<'a>(
function title_bar_active (line 317) | pub fn title_bar_active(theme: &Theme) -> container::Style {
function title_bar_focused (line 327) | pub fn title_bar_focused(theme: &Theme) -> container::Style {
function pane_active (line 337) | pub fn pane_active(theme: &Theme) -> container::Style {
function pane_focused (line 351) | pub fn pane_focused(theme: &Theme) -> container::Style {
FILE: examples/pick_list/src/main.rs
function main (line 4) | pub fn main() -> iced::Result {
type Example (line 9) | struct Example {
method update (line 19) | fn update(&mut self, message: Message) {
method view (line 27) | fn view(&self) -> Element<'_, Message> {
type Message (line 14) | enum Message {
type Language (line 47) | pub enum Language {
constant ALL (line 59) | const ALL: &[Language] = &[
method fmt (line 71) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
FILE: examples/pokedex/src/main.rs
function main (line 5) | pub fn main() -> iced::Result {
type Pokedex (line 12) | enum Pokedex {
method new (line 25) | fn new() -> (Self, Task<Message>) {
method search (line 29) | fn search() -> Task<Message> {
method title (line 33) | fn title(&self) -> String {
method update (line 43) | fn update(&mut self, message: Message) -> Task<Message> {
method view (line 66) | fn view(&self) -> Element<'_, Message> {
type Message (line 19) | enum Message {
type Pokemon (line 91) | struct Pokemon {
constant TOTAL (line 99) | const TOTAL: u16 = 807;
method view (line 101) | fn view(&self) -> Element<'_, Message> {
method search (line 120) | async fn search() -> Result<Pokemon, Error> {
method fetch_image (line 174) | async fn fetch_image(id: u16) -> Result<image::Handle, reqwest::Error> {
type Error (line 192) | enum Error {
method from (line 198) | fn from(error: reqwest::Error) -> Error {
function button (line 205) | fn button(text: &str) -> widget::Button<'_, Message> {
FILE: examples/progress_bar/src/main.rs
function main (line 6) | pub fn main() -> iced::Result {
type Progress (line 11) | struct Progress {
method update (line 23) | fn update(&mut self, message: Message) {
method view (line 30) | fn view(&self) -> Element<'_, Message> {
type Message (line 17) | enum Message {
FILE: examples/qr_code/src/main.rs
function main (line 6) | pub fn main() -> iced::Result {
type QRGenerator (line 13) | struct QRGenerator {
constant SIZE_RANGE (line 29) | const SIZE_RANGE: RangeInclusive<f32> = 200.0..=400.0;
method update (line 31) | fn update(&mut self, message: Message) {
method view (line 59) | fn view(&self) -> Element<'_, Message> {
method theme (line 104) | fn theme(&self) -> Option<Theme> {
type Message (line 21) | enum Message {
FILE: examples/sandpiles/src/main.rs
function main (line 11) | pub fn main() -> iced::Result {
type Sandpiles (line 17) | struct Sandpiles {
method new (line 32) | fn new() -> Self {
method update (line 50) | fn update(&mut self, message: Message) {
method view (line 73) | fn view(&self) -> Element<'_, Message> {
method subscription (line 101) | fn subscription(&self) -> Subscription<Message> {
type Message (line 25) | enum Message {
type Grid (line 111) | struct Grid {
method new (line 117) | pub fn new() -> Self {
method add (line 124) | pub fn add(&mut self, cell: Cell, amount: u32) {
method topple (line 134) | pub fn topple(&mut self) -> bool {
type Cell (line 154) | struct Cell {
constant ORIGIN (line 160) | pub const ORIGIN: Self = Self { row: 0, column: 0 };
method neighbors (line 162) | pub fn neighbors(self) -> impl Iterator<Item = Cell> {
type Viewer (line 172) | struct Viewer<'a> {
constant CELL_SIZE (line 178) | const CELL_SIZE: f32 = 10.0;
type State (line 182) | type State = ();
function update (line 184) | fn update(
function draw (line 206) | fn draw(
function mouse_interaction (line 283) | fn mouse_interaction(
FILE: examples/screenshot/src/main.rs
function main (line 10) | fn main() -> iced::Result {
type Example (line 19) | struct Example {
method update (line 44) | fn update(&mut self, message: Message) -> Task<Message> {
method view (line 116) | fn view(&self) -> Element<'_, Message> {
method subscription (line 214) | fn subscription(&self) -> Subscription<Message> {
type Message (line 31) | enum Message {
function save_to_png (line 231) | async fn save_to_png(screenshot: Screenshot) -> Result<String, PngError> {
type PngError (line 250) | struct PngError(String);
function numeric_input (line 252) | fn numeric_input(placeholder: &str, value: Option<u32>) -> Element<'_, O...
function centered_text (line 270) | fn centered_text(content: &str) -> Element<'_, Message> {
FILE: examples/scrollable/src/main.rs
function main (line 6) | pub fn main() -> iced::Result {
type ScrollableDemo (line 16) | struct ScrollableDemo {
method new (line 45) | fn new() -> Self {
method update (line 56) | fn update(&mut self, message: Message) -> Task<Message> {
method view (line 103) | fn view(&self) -> Element<'_, Message> {
method theme (line 306) | fn theme(&self) -> Theme {
type Direction (line 26) | enum Direction {
type Message (line 33) | enum Message {
method default (line 312) | fn default() -> Self {
function progress_bar_custom_style (line 317) | fn progress_bar_custom_style(theme: &Theme) -> progress_bar::Style {
constant SCROLLABLE (line 325) | const SCROLLABLE: &str = "scrollable";
FILE: examples/sierpinski_triangle/src/main.rs
function main (line 9) | fn main() -> iced::Result {
type SierpinskiEmulator (line 19) | struct SierpinskiEmulator {
method update (line 31) | fn update(&mut self, message: Message) {
method view (line 49) | fn view(&self) -> Element<'_, Message> {
type Message (line 24) | pub enum Message {
type SierpinskiGraph (line 65) | struct SierpinskiGraph {
type State (line 73) | type State = ();
method update (line 75) | fn update(
method draw (line 97) | fn draw(
method redraw (line 137) | fn redraw(&mut self) {
method gen_rand_point (line 141) | fn gen_rand_point(&self, last: Option<Point>) -> Point {
FILE: examples/slider/src/main.rs
function main (line 4) | pub fn main() -> iced::Result {
type Message (line 9) | pub enum Message {
type Slider (line 13) | pub struct Slider {
method new (line 18) | fn new() -> Self {
method update (line 22) | fn update(&mut self, message: Message) {
method view (line 30) | fn view(&self) -> Element<'_, Message> {
method default (line 57) | fn default() -> Self {
FILE: examples/solar_system/src/main.rs
function main (line 18) | pub fn main() -> iced::Result {
type SolarSystem (line 31) | struct SolarSystem {
method new (line 41) | fn new() -> Self {
method update (line 47) | fn update(&mut self, message: Message, now: Instant) {
method view (line 55) | fn view(&self) -> Element<'_, Message> {
method theme (line 59) | fn theme(&self) -> Theme {
method subscription (line 63) | fn subscription(&self) -> Subscription<Message> {
type Message (line 36) | enum Message {
type State (line 69) | struct State {
constant SUN_RADIUS (line 81) | const SUN_RADIUS: f32 = 70.0;
constant ORBIT_RADIUS (line 82) | const ORBIT_RADIUS: f32 = 150.0;
constant EARTH_RADIUS (line 83) | const EARTH_RADIUS: f32 = 12.0;
constant MOON_RADIUS (line 84) | const MOON_RADIUS: f32 = 4.0;
constant MOON_DISTANCE (line 85) | const MOON_DISTANCE: f32 = 28.0;
method new (line 87) | pub fn new() -> State {
method update (line 103) | pub fn update(&mut self, now: Instant) {
method generate_stars (line 109) | fn generate_stars(width: f32, height: f32) -> Vec<(Point, f32)> {
type State (line 129) | type State = ();
method draw (line 131) | fn draw(
FILE: examples/stopwatch/src/main.rs
function main (line 6) | pub fn main() -> iced::Result {
type Stopwatch (line 13) | struct Stopwatch {
method update (line 35) | fn update(&mut self, message: Message) {
method subscription (line 59) | fn subscription(&self) -> Subscription<Message> {
method view (line 82) | fn view(&self) -> Element<'_, Message> {
type State (line 19) | enum State {
type Message (line 28) | enum Message {
FILE: examples/styling/src/main.rs
function main (line 8) | pub fn main() -> iced::Result {
type Styling (line 16) | struct Styling {
method update (line 38) | fn update(&mut self, message: Message) {
method view (line 75) | fn view(&self) -> Element<'_, Message> {
method subscription (line 171) | fn subscription(&self) -> Subscription<Message> {
method theme (line 195) | fn theme(&self) -> Option<Theme> {
type Message (line 25) | enum Message {
function it_showcases_every_theme (line 209) | fn it_showcases_every_theme() -> Result<(), Error> {
FILE: examples/svg/src/main.rs
function main (line 4) | pub fn main() -> iced::Result {
type Tiger (line 9) | struct Tiger {
method update (line 19) | fn update(&mut self, message: Message) {
method view (line 27) | fn view(&self) -> Element<'_, Message> {
type Message (line 14) | pub enum Message {
FILE: examples/system_information/src/main.rs
function main (line 5) | pub fn main() -> iced::Result {
type Example (line 11) | enum Example {
method new (line 27) | fn new() -> (Self, Task<Message>) {
method update (line 34) | fn update(&mut self, message: Message) -> Task<Message> {
method view (line 51) | fn view(&self) -> Element<'_, Message> {
type Message (line 21) | enum Message {
FILE: examples/table/src/main.rs
function main (line 8) | pub fn main() -> iced::Result {
type Table (line 14) | struct Table {
method new (line 27) | fn new() -> Self {
method update (line 35) | fn update(&mut self, message: Message) {
method view (line 42) | fn view(&self) -> Element<'_, Message> {
type Message (line 21) | enum Message {
type Event (line 141) | struct Event {
method list (line 149) | fn list() -> Vec<Self> {
FILE: examples/text/src/main.rs
function main (line 7) | pub fn main() -> iced::Result {
type Text (line 13) | struct Text {
method new (line 27) | fn new() -> (Self, Task<Message>) {
method update (line 46) | fn update(&mut self, message: Message) {
method subscription (line 63) | fn subscription(&self) -> Subscription<Message> {
method view (line 73) | fn view(&self) -> Element<'_, Message> {
type Message (line 20) | enum Message {
FILE: examples/the_matrix/src/main.rs
function main (line 8) | pub fn main() -> iced::Result {
type TheMatrix (line 17) | struct TheMatrix {
method update (line 27) | fn update(&mut self, message: Message) {
method view (line 35) | fn view(&self) -> Element<'_, Message> {
method subscription (line 39) | fn subscription(&self) -> Subscription<Message> {
type State (line 45) | type State = RefCell<Vec<canvas::Cache>>;
method draw (line 47) | fn draw(
type Message (line 22) | enum Message {
FILE: examples/toast/src/main.rs
function main (line 9) | pub fn main() -> iced::Result {
type App (line 15) | struct App {
method new (line 34) | fn new() -> Self {
method subscription (line 46) | fn subscription(&self) -> Subscription<Message> {
method update (line 50) | fn update(&mut self, message: Message) -> Task<Message> {
method view (line 91) | fn view(&self) -> Element<'_, Message> {
type Message (line 23) | enum Message {
method default (line 150) | fn default() -> Self {
constant DEFAULT_TIMEOUT (line 172) | pub const DEFAULT_TIMEOUT: u64 = 5;
type Status (line 175) | pub enum Status {
constant ALL (line 185) | pub const ALL: &'static [Self] = &[
method fmt (line 195) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
type Toast (line 208) | pub struct Toast {
type Manager (line 214) | pub struct Manager<'a, Message> {
function new (line 225) | pub fn new(
function timeout (line 271) | pub fn timeout(self, seconds: u64) -> Self {
function size (line 280) | fn size(&self) -> Size<Length> {
function layout (line 284) | fn layout(
function tag (line 295) | fn tag(&self) -> widget::tree::Tag {
function state (line 300) | fn state(&self) -> widget::tree::State {
function children (line 304) | fn children(&self) -> Vec<Tree> {
function diff (line 310) | fn diff(&self, tree: &mut Tree) {
function operate (line 335) | fn operate(
function update (line 353) | fn update(
function draw (line 374) | fn draw(
function mouse_interaction (line 395) | fn mouse_interaction(
function overlay (line 412) | fn overlay<'b>(
type Overlay (line 449) | struct Overlay<'a, 'b, Message> {
function layout (line 460) | fn layout(&mut self, renderer: &Renderer, bounds: Size) -> layout::Node {
function update (line 478) | fn update(
function draw (line 535) | fn draw(
function operate (line 557) | fn operate(
function mouse_interaction (line 577) | fn mouse_interaction(
function from (line 606) | fn from(manager: Manager<'a, Message>) -> Self {
FILE: examples/todos/src/main.rs
function main (line 15) | pub fn main() -> iced::Result {
function application (line 22) | fn application() -> Application<impl Program<Message = Message, Theme = ...
type Todos (line 32) | enum Todos {
constant ICON_FONT (line 59) | const ICON_FONT: &'static [u8] = include_bytes!("../fonts/icons.ttf");
method new (line 61) | fn new() -> (Self, Command<Message>) {
method title (line 68) | fn title(&self) -> String {
method update (line 77) | fn update(&mut self, message: Message) -> Command<Message> {
method view (line 188) | fn view(&self) -> Element<'_, Message> {
method subscription (line 243) | fn subscription(&self) -> Subscription<Message> {
type State (line 38) | struct State {
type Message (line 47) | enum Message {
type Task (line 269) | struct Task {
method text_input_id (line 296) | fn text_input_id(i: usize) -> widget::Id {
method new (line 300) | fn new(description: String) -> Self {
method update (line 309) | fn update(&mut self, message: TaskMessage) {
method view (line 329) | fn view(&self, i: usize) -> Element<'_, TaskMessage> {
type TaskState (line 280) | pub enum TaskState {
type TaskMessage (line 287) | pub enum TaskMessage {
function view_controls (line 372) | fn view_controls(tasks: &[Task], current_filter: Filter) -> Element<'_, ...
type Filter (line 406) | pub enum Filter {
method matches (line 414) | fn matches(self, task: &Task) -> bool {
function loading_message (line 423) | fn loading_message<'a>() -> Element<'a, Message> {
function empty_message (line 427) | fn empty_message(message: &str) -> Element<'_, Message> {
function icon (line 441) | fn icon(unicode: char) -> Text<'static> {
function edit_icon (line 449) | fn edit_icon() -> Text<'static> {
function delete_icon (line 453) | fn delete_icon() -> Text<'static> {
function subtle (line 457) | fn subtle(theme: &Theme) -> text::Style {
type SavedState (line 465) | struct SavedState {
method path (line 485) | fn path() -> std::path::PathBuf {
method load (line 498) | async fn load() -> Result<SavedState, LoadError> {
method save (line 506) | async fn save(self) -> Result<(), SaveError> {
method storage (line 534) | fn storage() -> Option<web_sys::Storage> {
method load (line 540) | async fn load() -> Result<SavedState, LoadError> {
method save (line 551) | async fn save(self) -> Result<(), SaveError> {
type LoadError (line 472) | enum LoadError {
type SaveError (line 478) | enum SaveError {
function presets (line 566) | fn presets() -> impl IntoIterator<Item = Preset<Todos, Message>> {
function simulator (line 600) | fn simulator(todos: &Todos) -> Simulator<'_, Message> {
function it_creates_a_new_task (line 612) | fn it_creates_a_new_task() -> Result<(), Error> {
function it_passes_the_ice_tests (line 640) | fn it_passes_the_ice_tests() -> Result<(), Error> {
FILE: examples/tooltip/src/main.rs
function main (line 7) | pub fn main() -> iced::Result {
type Tooltip (line 12) | struct Tooltip {
method update (line 24) | fn update(&mut self, message: Message) {
method view (line 43) | fn view(&self) -> Element<'_, Message> {
type Message (line 18) | enum Message {
function position_to_text (line 66) | fn position_to_text<'a>(position: Position) -> &'a str {
FILE: examples/tour/src/main.rs
function main (line 8) | pub fn main() -> iced::Result {
type Tour (line 24) | pub struct Tour {
method title (line 62) | fn title(&self) -> String {
method update (line 80) | fn update(&mut self, event: Message) {
method view (line 142) | fn view(&self) -> Element<'_, Message> {
method can_continue (line 181) | fn can_continue(&self) -> bool {
method welcome (line 197) | fn welcome(&self) -> Column<'_, Message> {
method slider (line 235) | fn slider(&self) -> Column<'_, Message> {
method rows_and_columns (line 249) | fn rows_and_columns(&self) -> Column<'_, Message> {
method text (line 292) | fn text(&self) -> Column<'_, Message> {
method radio (line 328) | fn radio(&self) -> Column<'_, Message> {
method toggler (line 358) | fn toggler(&self) -> Column<'_, Message> {
method image (line 371) | fn image(&self) -> Column<'_, Message> {
method scrollable (line 388) | fn scrollable(&self) -> Column<'_, Message> {
method text_input (line 407) | fn text_input(&self) -> Column<'_, Message> {
method debugger (line 455) | fn debugger(&self) -> Column<'_, Message> {
method end (line 473) | fn end(&self) -> Column<'_, Message> {
method container (line 479) | fn container(title: &str) -> Column<'_, Message> {
type Message (line 42) | pub enum Message {
type Screen (line 485) | enum Screen {
constant ALL (line 500) | const ALL: &'static [Self] = &[
method next (line 514) | pub fn next(self) -> Option<Screen> {
method previous (line 527) | pub fn previous(self) -> Option<Screen> {
function ferris (line 542) | fn ferris<'a>(width: u32, filter_method: image::FilterMethod) -> Contain...
function padded_button (line 556) | fn padded_button<Message: Clone>(label: &str) -> Button<'_, Message> {
function color_slider (line 560) | fn color_slider<'a>(
type Language (line 571) | pub enum Language {
method all (line 581) | fn all() -> [Language; 6] {
method from (line 594) | fn from(language: Language) -> String {
type Layout (line 607) | pub enum Layout {
method default (line 613) | fn default() -> Self {
FILE: examples/url_handler/src/main.rs
function main (line 5) | pub fn main() -> iced::Result {
type App (line 12) | struct App {
method update (line 22) | fn update(&mut self, message: Message) {
method subscription (line 30) | fn subscription(&self) -> Subscription<Message> {
method view (line 34) | fn view(&self) -> Element<'_, Message> {
type Message (line 17) | enum Message {
FILE: examples/vectorial_text/src/main.rs
function main (line 6) | pub fn main() -> iced::Result {
type VectorialText (line 17) | struct VectorialText {
method update (line 30) | fn update(&mut self, message: Message) {
method view (line 49) | fn view(&self) -> Element<'_, Message> {
type Message (line 22) | enum Message {
type State (line 95) | struct State {
method new (line 104) | pub fn new() -> Self {
type State (line 116) | type State = ();
method draw (line 118) | fn draw(
method default (line 155) | fn default() -> Self {
FILE: examples/websocket/src/echo.rs
function connect (line 14) | pub fn connect() -> impl Sipper<Never, Event> {
type Event (line 63) | pub enum Event {
type Connection (line 70) | pub struct Connection(mpsc::Sender<Message>);
method send (line 73) | pub fn send(&mut self, message: Message) {
type Message (line 81) | pub enum Message {
method new (line 88) | pub fn new(message: &str) -> Option<Self> {
method connected (line 96) | pub fn connected() -> Self {
method disconnected (line 100) | pub fn disconnected() -> Self {
method as_str (line 104) | pub fn as_str(&self) -> &str {
method fmt (line 114) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
function into_fragment (line 120) | fn into_fragment(self) -> text::Fragment<'a> {
FILE: examples/websocket/src/echo/server.rs
function run (line 29) | pub async fn run() {
function user_connected (line 37) | async fn user_connected(ws: WebSocket) {
FILE: examples/websocket/src/main.rs
function main (line 6) | pub fn main() -> iced::Result {
type WebSocket (line 12) | struct WebSocket {
method new (line 26) | fn new() -> (Self, Task<Message>) {
method update (line 40) | fn update(&mut self, message: Message) -> Task<Message> {
method subscription (line 81) | fn subscription(&self) -> Subscription<Message> {
method view (line 85) | fn view(&self) -> Element<'_, Message> {
type Message (line 19) | enum Message {
type State (line 121) | enum State {
constant MESSAGE_LOG (line 126) | const MESSAGE_LOG: &str = "message_log";
FILE: futures/src/backend/native/smol.rs
type Executor (line 5) | pub struct Executor;
method new (line 8) | fn new() -> Result<Self, futures::io::Error> {
method spawn (line 12) | fn spawn(&self, future: impl Future<Output = ()> + Send + 'static) {
method block_on (line 16) | fn block_on<T>(&self, future: impl Future<Output = T>) -> T {
function every (line 33) | pub fn every(duration: Duration) -> Subscription<Instant> {
function repeat (line 45) | pub fn repeat<F, T>(f: fn() -> F, interval: Duration) -> Subscription<T>
FILE: futures/src/backend/native/thread_pool.rs
type Executor (line 4) | pub type Executor = futures::executor::ThreadPool;
method new (line 7) | fn new() -> Result<Self, futures::io::Error> {
method spawn (line 11) | fn spawn(&self, future: impl Future<Output = ()> + Send + 'static) {
method block_on (line 15) | fn block_on<T>(&self, future: impl Future<Output = T>) -> T {
FILE: futures/src/backend/native/tokio.rs
type Executor (line 4) | pub type Executor = tokio::runtime::Runtime;
method new (line 7) | fn new() -> Result<Self, futures::io::Error> {
method spawn (line 12) | fn spawn(&self, future: impl Future<Output = ()> + Send + 'static) {
method enter (line 16) | fn enter<R>(&self, f: impl FnOnce() -> R) -> R {
method block_on (line 21) | fn block_on<T>(&self, future: impl Future<Output = T>) -> T {
function every (line 38) | pub fn every(duration: Duration) -> Subscription<Instant> {
function repeat (line 59) | pub fn repeat<F, T>(f: fn() -> F, interval: Duration) -> Subscription<T>
FILE: futures/src/backend/null.rs
type Executor (line 6) | pub struct Executor;
method new (line 9) | fn new() -> Result<Self, futures::io::Error> {
method spawn (line 13) | fn spawn(&self, _future: impl Future<Output = ()> + MaybeSend + 'stati...
method block_on (line 16) | fn block_on<T>(&self, _future: impl Future<Output = T>) -> T {
FILE: futures/src/backend/wasm/wasm_bindgen.rs
type Executor (line 5) | pub struct Executor;
method new (line 8) | fn new() -> Result<Self, futures::io::Error> {
method spawn (line 12) | fn spawn(&self, future: impl futures::Future<Output = ()> + 'static) {
function every (line 27) | pub fn every(duration: std::time::Duration) -> Subscription<Instant> {
FILE: futures/src/event.rs
function listen (line 11) | pub fn listen() -> Subscription<Event> {
function listen_with (line 26) | pub fn listen_with<Message>(
function listen_raw (line 55) | pub fn listen_raw<Message>(
function listen_url (line 82) | pub fn listen_url() -> Subscription<String> {
FILE: futures/src/executor.rs
type Executor (line 5) | pub trait Executor: Sized {
method new (line 7) | fn new() -> Result<Self, futures::io::Error>
method spawn (line 12) | fn spawn(&self, future: impl Future<Output = ()> + MaybeSend + 'static);
method block_on (line 16) | fn block_on<T>(&self, future: impl Future<Output = T>) -> T;
method enter (line 24) | fn enter<R>(&self, f: impl FnOnce() -> R) -> R {
FILE: futures/src/keyboard.rs
function listen (line 7) | pub fn listen() -> Subscription<Event> {
FILE: futures/src/lib.rs
type BoxFuture (line 33) | pub type BoxFuture<T> = futures::future::BoxFuture<'static, T>;
type BoxStream (line 39) | pub type BoxStream<T> = futures::stream::BoxStream<'static, T>;
function boxed_stream (line 45) | pub fn boxed_stream<T, S>(stream: S) -> BoxStream<T>
type BoxFuture (line 59) | pub type BoxFuture<T> = futures::future::LocalBoxFuture<'static, T>;
type BoxStream (line 65) | pub type BoxStream<T> = futures::stream::LocalBoxStream<'static, T>;
function boxed_stream (line 71) | pub fn boxed_stream<T, S>(stream: S) -> BoxStream<T>
FILE: futures/src/maybe.rs
type MaybeSend (line 6) | pub trait MaybeSend: Send {}
type MaybeSync (line 13) | pub trait MaybeSync: Sync {}
type MaybeSend (line 23) | pub trait MaybeSend {}
type MaybeSync (line 30) | pub trait MaybeSync {}
FILE: futures/src/runtime.rs
type Runtime (line 15) | pub struct Runtime<Executor, Sender, Message> {
function new (line 33) | pub fn new(executor: Executor, sender: Sender) -> Self {
function enter (line 45) | pub fn enter<R>(&self, f: impl FnOnce() -> R) -> R {
function block_on (line 51) | pub fn block_on<T>(&mut self, future: impl Future<Output = T>) -> T {
function run (line 61) | pub fn run(&mut self, stream: BoxStream<Message>) {
function send (line 76) | pub fn send(&mut self, message: Message) {
function track (line 91) | pub fn track(
function broadcast (line 115) | pub fn broadcast(&mut self, event: subscription::Event) {
FILE: futures/src/stream.rs
function channel (line 11) | pub fn channel<T>(size: usize, f: impl AsyncFnOnce(mpsc::Sender<T>)) -> ...
function try_channel (line 21) | pub fn try_channel<T, E>(
FILE: futures/src/subscription.rs
type Event (line 17) | pub enum Event {
type PlatformSpecific (line 40) | pub enum PlatformSpecific {
type MacOS (line 47) | pub enum MacOS {
type EventStream (line 59) | pub type EventStream = BoxStream<Event>;
type Hasher (line 62) | pub type Hasher = rustc_hash::FxHasher;
type Subscription (line 121) | pub struct Subscription<T> {
function none (line 127) | pub fn none() -> Self {
function run (line 203) | pub fn run<S>(builder: fn() -> S) -> Self
function run_with (line 219) | pub fn run_with<D, S>(data: D, builder: fn(&D) -> S) -> Self
function batch (line 233) | pub fn batch(subscriptions: impl IntoIterator<Item = Subscription<T>>) -...
function with (line 245) | pub fn with<A>(self, value: A) -> Subscription<(A, T)>
function map (line 298) | pub fn map<F, A>(self, f: F) -> Subscription<A>
function filter_map (line 354) | pub fn filter_map<F, A>(mut self, f: F) -> Subscription<A>
function units (line 414) | pub fn units(&self) -> usize {
function from_recipe (line 420) | pub fn from_recipe<T>(recipe: impl Recipe<Output = T> + 'static) -> Subs...
function into_recipes (line 427) | pub fn into_recipes<T>(subscription: Subscription<T>) -> Vec<Box<dyn Rec...
function fmt (line 432) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
type Recipe (line 442) | pub trait Recipe {
method hash (line 450) | fn hash(&self, state: &mut Hasher);
method stream (line 454) | fn stream(self: Box<Self>, input: EventStream) -> BoxStream<Self::Outp...
type Output (line 490) | type Output = T;
method hash (line 492) | fn hash(&self, state: &mut Hasher) {
method stream (line 497) | fn stream(self: Box<Self>, input: EventStream) -> BoxStream<Self::Outp...
function filter_map (line 458) | pub fn filter_map<I, F, T>(id: I, f: F) -> Subscription<T>
type Runner (line 475) | struct Runner<I, F, S, T>
function check_zero_sized (line 502) | const fn check_zero_sized<T>() {
FILE: futures/src/subscription/tracker.rs
type Tracker (line 18) | pub struct Tracker {
method new (line 30) | pub fn new() -> Self {
method update (line 55) | pub fn update<Message, Receiver>(
method broadcast (line 135) | pub fn broadcast(&mut self, event: Event) {
type Execution (line 23) | pub struct Execution {
FILE: graphics/src/antialiasing.rs
type Antialiasing (line 3) | pub enum Antialiasing {
method sample_count (line 16) | pub fn sample_count(self) -> u32 {
FILE: graphics/src/cache.rs
type Cache (line 10) | pub struct Cache<T> {
function new (line 17) | pub fn new() -> Self {
function with_group (line 30) | pub fn with_group(group: Group) -> Self {
function group (line 43) | pub fn group(&self) -> Group {
function put (line 52) | pub fn put(&self, value: T) {
function state (line 57) | pub fn state(&self) -> &RefCell<State<T>> {
function clear (line 62) | pub fn clear(&self) {
type Group (line 83) | pub struct Group {
method unique (line 90) | pub fn unique() -> Self {
method is_singleton (line 108) | pub fn is_singleton(self) -> bool {
method singleton (line 112) | fn singleton() -> Self {
function fmt (line 124) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
method default (line 141) | fn default() -> Self {
type State (line 148) | pub enum State<T> {
type Cached (line 162) | pub trait Cached: Sized {
method load (line 169) | fn load(cache: &Self::Cache) -> Self;
method cache (line 174) | fn cache(self, group: Group, previous: Option<Self::Cache>) -> Self::C...
type Cache (line 179) | type Cache = ();
method load (line 181) | fn load(_cache: &Self::Cache) -> Self {}
method cache (line 183) | fn cache(self, _group: Group, _previous: Option<Self::Cache>) -> Self:...
FILE: graphics/src/color.rs
type Packed (line 9) | pub struct Packed([f32; 4]);
method components (line 13) | pub fn components(self) -> [f32; 4] {
constant GAMMA_CORRECTION (line 19) | pub const GAMMA_CORRECTION: bool = internal::GAMMA_CORRECTION;
function pack (line 22) | pub fn pack(color: impl Into<Color>) -> Packed {
constant GAMMA_CORRECTION (line 30) | pub const GAMMA_CORRECTION: bool = true;
function pack (line 32) | pub fn pack(color: Color) -> [f32; 4] {
constant GAMMA_CORRECTION (line 41) | pub const GAMMA_CORRECTION: bool = false;
function pack (line 43) | pub fn pack(color: Color) -> [f32; 4] {
FILE: graphics/src/compositor.rs
type Compositor (line 16) | pub trait Compositor: Sized {
method new (line 24) | fn new(
method with_backend (line 37) | fn with_backend(
method create_renderer (line 46) | fn create_renderer(&self, settings: renderer::Settings) -> Self::Rende...
method create_surface (line 51) | fn create_surface<W: Window + Clone>(
method configure_surface (line 61) | fn configure_surface(&mut self, surface: &mut Self::Surface, width: u3...
method information (line 64) | fn information(&self) -> Information;
method load_font (line 67) | fn load_font(&mut self, font: Cow<'static, [u8]>) -> Result<(), font::...
method list_fonts (line 78) | fn list_fonts(&mut self) -> Result<Vec<font::Family>, font::Error> {
method present (line 94) | fn present(
method screenshot (line 107) | fn screenshot(
type Renderer (line 200) | type Renderer = ();
type Surface (line 201) | type Surface = ();
method with_backend (line 203) | async fn with_backend(
method create_renderer (line 213) | fn create_renderer(&self, _settings: renderer::Settings) -> Self::Rend...
method create_surface (line 215) | fn create_surface<W: Window + Clone>(
method configure_surface (line 223) | fn configure_surface(&mut self, _surface: &mut Self::Surface, _width: ...
method load_font (line 225) | fn load_font(&mut self, _font: Cow<'static, [u8]>) -> Result<(), font:...
method list_fonts (line 229) | fn list_fonts(&mut self) -> Result<Vec<font::Family>, font::Error> {
method information (line 233) | fn information(&self) -> Information {
method present (line 240) | fn present(
method screenshot (line 251) | fn screenshot(
type Settings (line 117) | pub struct Settings {
method default (line 130) | fn default() -> Settings {
method from (line 139) | fn from(settings: &core::Settings) -> Self {
type Window (line 151) | pub trait Window: HasWindowHandle + HasDisplayHandle + MaybeSend + Maybe...
type Display (line 159) | pub trait Display: HasDisplayHandle + MaybeSend + MaybeSync + 'static {}
type Default (line 164) | pub trait Default {
type Compositor (line 263) | type Compositor = ();
type SurfaceError (line 171) | pub enum SurfaceError {
type Information (line 191) | pub struct Information {
FILE: graphics/src/damage.rs
function diff (line 5) | pub fn diff<T>(
function list (line 30) | pub fn list<T>(
function group (line 47) | pub fn group(mut damage: Vec<Rectangle>, bounds: Rectangle) -> Vec<Recta...
FILE: graphics/src/error.rs
type Error (line 5) | pub enum Error {
type Reason (line 34) | pub enum Reason {
FILE: graphics/src/geometry.rs
type Renderer (line 26) | pub trait Renderer: core::Renderer {
method new_frame (line 34) | fn new_frame(&self, bounds: Rectangle) -> Self::Frame;
method draw_geometry (line 37) | fn draw_geometry(&mut self, geometry: Self::Geometry);
type Geometry (line 42) | type Geometry = ();
type Frame (line 43) | type Frame = ();
method new_frame (line 45) | fn new_frame(&self, _bounds: Rectangle) -> Self::Frame {}
method draw_geometry (line 47) | fn draw_geometry(&mut self, _geometry: Self::Geometry) {}
FILE: graphics/src/geometry/cache.rs
type Cache (line 11) | pub struct Cache<Renderer>
type Data (line 19) | struct Data<T> {
function new (line 29) | pub fn new() -> Self {
function with_group (line 41) | pub fn with_group(group: Group) -> Self {
function clear (line 48) | pub fn clear(&self) {
function draw (line 62) | pub fn draw(
function draw_with_bounds (line 76) | pub fn draw_with_bounds(
function fmt (line 116) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
method default (line 125) | fn default() -> Self {
FILE: graphics/src/geometry/fill.rs
type Fill (line 11) | pub struct Fill {
method from (line 38) | fn from(color: Color) -> Fill {
method from (line 47) | fn from(gradient: Gradient) -> Self {
method from (line 56) | fn from(gradient: gradient::Linear) -> Self {
method default (line 29) | fn default() -> Self {
type Rule (line 72) | pub enum Rule {
FILE: graphics/src/geometry/frame.rs
type Frame (line 6) | pub struct Frame<Renderer>
function new (line 21) | pub fn new(renderer: &Renderer, size: Size) -> Self {
function with_bounds (line 26) | pub fn with_bounds(renderer: &Renderer, bounds: Rectangle) -> Self {
function width (line 33) | pub fn width(&self) -> f32 {
function height (line 38) | pub fn height(&self) -> f32 {
function size (line 43) | pub fn size(&self) -> Size {
function center (line 48) | pub fn center(&self) -> Point {
function fill (line 54) | pub fn fill(&mut self, path: &Path, fill: impl Into<Fill>) {
function fill_rectangle (line 60) | pub fn fill_rectangle(&mut self, top_left: Point, size: Size, fill: impl...
function stroke (line 66) | pub fn stroke<'a>(&mut self, path: &Path, stroke: impl Into<Stroke<'a>>) {
function stroke_rectangle (line 72) | pub fn stroke_rectangle<'a>(
function fill_text (line 87) | pub fn fill_text(&mut self, text: impl Into<Text>) {
function draw_image (line 93) | pub fn draw_image(&mut self, bounds: Rectangle, image: impl Into<Image>) {
function draw_svg (line 99) | pub fn draw_svg(&mut self, bounds: Rectangle, svg: impl Into<Svg>) {
function with_save (line 109) | pub fn with_save<R>(&mut self, f: impl FnOnce(&mut Self) -> R) -> R {
function push_transform (line 120) | pub fn push_transform(&mut self) {
function pop_transform (line 125) | pub fn pop_transform(&mut self) {
function with_clip (line 136) | pub fn with_clip<R>(&mut self, region: Rectangle, f: impl FnOnce(&mut Se...
function draft (line 150) | fn draft(&mut self, clip_bounds: Rectangle) -> Self {
function paste (line 157) | fn paste(&mut self, frame: Self) {
function translate (line 162) | pub fn translate(&mut self, translation: Vector) {
function rotate (line 167) | pub fn rotate(&mut self, angle: impl Into<Radians>) {
function scale (line 172) | pub fn scale(&mut self, scale: impl Into<f32>) {
function scale_nonuniform (line 177) | pub fn scale_nonuniform(&mut self, scale: impl Into<Vector>) {
function into_geometry (line 182) | pub fn into_geometry(self) -> Renderer::Geometry {
type Backend (line 192) | pub trait Backend: Sized {
method width (line 195) | fn width(&self) -> f32;
method height (line 196) | fn height(&self) -> f32;
method size (line 197) | fn size(&self) -> Size;
method center (line 198) | fn center(&self) -> Point;
method push_transform (line 200) | fn push_transform(&mut self);
method pop_transform (line 201) | fn pop_transform(&mut self);
method translate (line 203) | fn translate(&mut self, translation: Vector);
method rotate (line 204) | fn rotate(&mut self, angle: impl Into<Radians>);
method scale (line 205) | fn scale(&mut self, scale: impl Into<f32>);
method scale_nonuniform (line 206) | fn scale_nonuniform(&mut self, scale: impl Into<Vector>);
method draft (line 208) | fn draft(&mut self, clip_bounds: Rectangle) -> Self;
method paste (line 209) | fn paste(&mut self, frame: Self);
method stroke (line 211) | fn stroke<'a>(&mut self, path: &Path, stroke: impl Into<Stroke<'a>>);
method stroke_rectangle (line 212) | fn stroke_rectangle<'a>(&mut self, top_left: Point, size: Size, stroke...
method stroke_text (line 213) | fn stroke_text<'a>(&mut self, text: impl Into<Text>, stroke: impl Into...
method fill (line 215) | fn fill(&mut self, path: &Path, fill: impl Into<Fill>);
method fill_text (line 216) | fn fill_text(&mut self, text: impl Into<Text>);
method fill_rectangle (line 217) | fn fill_rectangle(&mut self, top_left: Point, size: Size, fill: impl I...
method draw_image (line 219) | fn draw_image(&mut self, bounds: Rectangle, image: impl Into<Image>);
method draw_svg (line 220) | fn draw_svg(&mut self, bounds: Rectangle, svg: impl Into<Svg>);
method into_geometry (line 222) | fn into_geometry(self) -> Self::Geometry;
type Geometry (line 227) | type Geometry = ();
method width (line 229) | fn width(&self) -> f32 {
method height (line 233) | fn height(&self) -> f32 {
method size (line 237) | fn size(&self) -> Size {
method center (line 241) | fn center(&self) -> Point {
method push_transform (line 245) | fn push_transform(&mut self) {}
method pop_transform (line 246) | fn pop_transform(&mut self) {}
method translate (line 248) | fn translate(&mut self, _translation: Vector) {}
method rotate (line 249) | fn rotate(&mut self, _angle: impl Into<Radians>) {}
method scale (line 250) | fn scale(&mut self, _scale: impl Into<f32>) {}
method scale_nonuniform (line 251) | fn scale_nonuniform(&mut self, _scale: impl Into<Vector>) {}
method draft (line 253) | fn draft(&mut self, _clip_bounds: Rectangle) -> Self {}
method paste (line 254) | fn paste(&mut self, _frame: Self) {}
method stroke (line 256) | fn stroke<'a>(&mut self, _path: &Path, _stroke: impl Into<Stroke<'a>>) {}
method stroke_rectangle (line 257) | fn stroke_rectangle<'a>(
method stroke_text (line 264) | fn stroke_text<'a>(&mut self, _text: impl Into<Text>, _stroke: impl In...
method fill (line 266) | fn fill(&mut self, _path: &Path, _fill: impl Into<Fill>) {}
method fill_text (line 267) | fn fill_text(&mut self, _text: impl Into<Text>) {}
method fill_rectangle (line 268) | fn fill_rectangle(&mut self, _top_left: Point, _size: Size, _fill: imp...
method draw_image (line 270) | fn draw_image(&mut self, _bounds: Rectangle, _image: impl Into<Image>) {}
method draw_svg (line 271) | fn draw_svg(&mut self, _bounds: Rectangle, _svg: impl Into<Svg>) {}
method into_geometry (line 273) | fn into_geometry(self) -> Self::Geometry {}
FILE: graphics/src/geometry/path.rs
type Path (line 19) | pub struct Path {
method new (line 27) | pub fn new(f: impl FnOnce(&mut Builder)) -> Self {
method line (line 38) | pub fn line(from: Point, to: Point) -> Self {
method rectangle (line 47) | pub fn rectangle(top_left: Point, size: Size) -> Self {
method rounded_rectangle (line 53) | pub fn rounded_rectangle(top_left: Point, size: Size, radius: border::...
method circle (line 59) | pub fn circle(center: Point, radius: f32) -> Self {
method raw (line 68) | pub fn raw(&self) -> &lyon_path::Path {
method transform (line 74) | pub fn transform(&self, transform: &lyon_path::math::Transform) -> Path {
FILE: graphics/src/geometry/path/arc.rs
type Arc (line 6) | pub struct Arc {
type Elliptical (line 19) | pub struct Elliptical {
method from (line 33) | fn from(arc: Arc) -> Elliptical {
FILE: graphics/src/geometry/path/builder.rs
type Builder (line 13) | pub struct Builder {
method new (line 19) | pub fn new() -> Builder {
method move_to (line 27) | pub fn move_to(&mut self, point: Point) {
method line_to (line 34) | pub fn line_to(&mut self, point: Point) {
method arc (line 41) | pub fn arc(&mut self, arc: Arc) {
method arc_to (line 58) | pub fn arc_to(&mut self, a: Point, b: Point, radius: f32) {
method ellipse (line 104) | pub fn ellipse(&mut self, arc: arc::Elliptical) {
method bezier_curve_to (line 124) | pub fn bezier_curve_to(&mut self, control_a: Point, control_b: Point, ...
method quadratic_curve_to (line 135) | pub fn quadratic_curve_to(&mut self, control: Point, to: Point) {
method rectangle (line 145) | pub fn rectangle(&mut self, top_left: Point, size: Size) {
method rounded_rectangle (line 159) | pub fn rounded_rectangle(&mut self, top_left: Point, size: Size, radiu...
method circle (line 223) | pub fn circle(&mut self, center: Point, radius: f32) {
method close (line 235) | pub fn close(&mut self) {
method build (line 241) | pub fn build(self) -> Path {
method default (line 249) | fn default() -> Self {
FILE: graphics/src/geometry/stroke.rs
type Stroke (line 10) | pub struct Stroke<'a> {
function with_color (line 28) | pub fn with_color(self, color: Color) -> Self {
function with_width (line 36) | pub fn with_width(self, width: f32) -> Self {
function with_line_cap (line 41) | pub fn with_line_cap(self, line_cap: LineCap) -> Self {
function with_line_join (line 46) | pub fn with_line_join(self, line_join: LineJoin) -> Self {
method default (line 52) | fn default() -> Self {
type LineCap (line 65) | pub enum LineCap {
type LineJoin (line 80) | pub enum LineJoin {
type LineDash (line 92) | pub struct LineDash<'a> {
FILE: graphics/src/geometry/style.rs
type Style (line 6) | pub enum Style {
method from (line 15) | fn from(color: Color) -> Self {
method from (line 21) | fn from(gradient: Gradient) -> Self {
FILE: graphics/src/geometry/text.rs
type Text (line 10) | pub struct Text {
method draw_with (line 52) | pub fn draw_with(&self, mut f: impl FnMut(Path, Color)) {
method from (line 178) | fn from(content: String) -> Text {
method from (line 187) | fn from(content: &str) -> Text {
method default (line 159) | fn default() -> Text {
FILE: graphics/src/gradient.rs
type Gradient (line 16) | pub enum Gradient {
method from (line 23) | fn from(gradient: Linear) -> Self {
method pack (line 30) | pub fn pack(&self) -> Packed {
type Linear (line 39) | pub struct Linear {
method new (line 52) | pub fn new(start: Point, end: Point) -> Self {
method add_stop (line 65) | pub fn add_stop(mut self, offset: f32, color: Color) -> Self {
method add_stops (line 85) | pub fn add_stops(mut self, stops: impl IntoIterator<Item = ColorStop>)...
method pack (line 94) | pub fn pack(&self) -> Packed {
type Packed (line 129) | pub struct Packed {
function pack (line 138) | pub fn pack(gradient: &core::Gradient, bounds: Rectangle) -> Packed {
function pack_f16s (line 177) | fn pack_f16s(f: [f16; 2]) -> u32 {
FILE: graphics/src/image.rs
type Image (line 12) | pub enum Image {
method bounds (line 30) | pub fn bounds(&self) -> Rectangle {
type Buffer (line 40) | pub type Buffer = ::image::ImageBuffer<::image::Rgba<u8>, Bytes>;
function load (line 46) | pub fn load(handle: &image::Handle) -> Result<Buffer, image::Error> {
function to_error (line 156) | fn to_error(error: ::image::ImageError) -> image::Error {
FILE: graphics/src/image/storage.rs
type Storage (line 7) | pub trait Storage {
method upload (line 15) | fn upload(
method remove (line 24) | fn remove(&mut self, entry: &Self::Entry, state: &mut Self::State<'_>);
type Entry (line 28) | pub trait Entry: Debug {
method size (line 30) | fn size(&self) -> Size<u32>;
FILE: graphics/src/layer.rs
type Layer (line 8) | pub trait Layer: Default {
method with_bounds (line 10) | fn with_bounds(bounds: Rectangle) -> Self;
method bounds (line 13) | fn bounds(&self) -> Rectangle;
method flush (line 19) | fn flush(&mut self);
method resize (line 22) | fn resize(&mut self, bounds: Rectangle);
method reset (line 25) | fn reset(&mut self);
method start (line 37) | fn start(&self) -> usize;
method end (line 40) | fn end(&self) -> usize;
method merge (line 43) | fn merge(&mut self, _layer: &mut Self);
type Stack (line 48) | pub struct Stack<T: Layer> {
function new (line 58) | pub fn new() -> Self {
function current_mut (line 71) | pub fn current_mut(&mut self) -> (&mut T, Transformation) {
function transformation (line 79) | pub fn transformation(&self) -> Transformation {
function push_clip (line 85) | pub fn push_clip(&mut self, bounds: Rectangle) {
function pop_clip (line 103) | pub fn pop_clip(&mut self) {
function push_transformation (line 115) | pub fn push_transformation(&mut self, transformation: Transformation) {
function pop_transformation (line 121) | pub fn pop_transformation(&mut self) {
function iter (line 126) | pub fn iter(&self) -> impl Iterator<Item = &T> {
function as_slice (line 131) | pub fn as_slice(&self) -> &[T] {
function flush (line 136) | pub fn flush(&mut self) {
function merge (line 143) | pub fn merge(&mut self) {
function reset (line 205) | pub fn reset(&mut self, new_bounds: Rectangle) {
method default (line 218) | fn default() -> Self {
FILE: graphics/src/mesh.rs
type Mesh (line 13) | pub enum Mesh {
method indices (line 40) | pub fn indices(&self) -> &[u32] {
method transformation (line 48) | pub fn transformation(&self) -> Transformation {
method clip_bounds (line 57) | pub fn clip_bounds(&self) -> Rectangle {
type Indexed (line 75) | pub struct Indexed<T> {
type SolidVertex2D (line 88) | pub struct SolidVertex2D {
type GradientVertex2D (line 99) | pub struct GradientVertex2D {
type AttributeCount (line 109) | pub struct AttributeCount {
function attribute_count_of (line 127) | pub fn attribute_count_of(meshes: &[Mesh]) -> AttributeCount {
type Cache (line 150) | pub struct Cache {
method new (line 162) | pub fn new(meshes: Arc<[Mesh]>) -> Self {
method id (line 173) | pub fn id(&self) -> Id {
method version (line 178) | pub fn version(&self) -> usize {
method batch (line 183) | pub fn batch(&self) -> &Arc<[Mesh]> {
method is_empty (line 188) | pub fn is_empty(&self) -> bool {
method update (line 193) | pub fn update(&mut self, meshes: Arc<[Mesh]>) {
type Id (line 158) | pub struct Id(u64);
type Renderer (line 200) | pub trait Renderer {
method draw_mesh (line 202) | fn draw_mesh(&mut self, mesh: Mesh);
method draw_mesh_cache (line 205) | fn draw_mesh_cache(&mut self, cache: Cache);
FILE: graphics/src/shell.rs
type Shell (line 6) | pub struct Shell(Arc<dyn Notifier>);
method new (line 10) | pub fn new(notifier: impl Notifier) -> Self {
method headless (line 15) | pub fn headless() -> Self {
method tick (line 29) | pub fn tick(&self) {
method request_redraw (line 34) | pub fn request_redraw(&self) {
method invalidate_layout (line 39) | pub fn invalidate_layout(&self) {
type Notifier (line 45) | pub trait Notifier: Send + Sync + 'static {
method tick (line 48) | fn tick(&self);
method request_redraw (line 51) | fn request_redraw(&self);
method invalidate_layout (line 54) | fn invalidate_layout(&self);
FILE: graphics/src/text.rs
type Text (line 23) | pub enum Text {
method visible_bounds (line 79) | pub fn visible_bounds(&self) -> Option<Rectangle> {
constant FIRA_SANS_REGULAR (line 116) | pub const FIRA_SANS_REGULAR: &[u8] = include_bytes!("../fonts/FiraSans-R...
function font_system (line 119) | pub fn font_system() -> &'static RwLock<FontSystem> {
type FontSystem (line 146) | pub struct FontSystem {
method raw (line 154) | pub fn raw(&mut self) -> &mut cosmic_text::FontSystem {
method load_font (line 159) | pub fn load_font(&mut self, bytes: Cow<'static, [u8]>) {
method families (line 180) | pub fn families(&self) -> impl Iterator<Item = &str> {
method version (line 191) | pub fn version(&self) -> Version {
type Version (line 198) | pub struct Version(u32);
type Raw (line 202) | pub struct Raw {
method eq (line 214) | fn eq(&self, _other: &Self) -> bool {
function measure (line 224) | pub fn measure(buffer: &cosmic_text::Buffer) -> (Size, bool) {
function align (line 241) | pub fn align(
function to_attributes (line 278) | pub fn to_attributes(font: Font) -> cosmic_text::Attrs<'static> {
function to_family (line 286) | fn to_family(family: font::Family) -> cosmic_text::Family<'static> {
function to_weight (line 297) | fn to_weight(weight: font::Weight) -> cosmic_text::Weight {
function to_stretch (line 311) | fn to_stretch(stretch: font::Stretch) -> cosmic_text::Stretch {
function to_style (line 325) | fn to_style(style: font::Style) -> cosmic_text::Style {
function to_align (line 333) | fn to_align(alignment: Alignment) -> Option<cosmic_text::Align> {
function to_shaping (line 344) | pub fn to_shaping(shaping: Shaping, text: &str) -> cosmic_text::Shaping {
function to_wrap (line 359) | pub fn to_wrap(wrapping: Wrapping) -> cosmic_text::Wrap {
function to_ellipsize (line 369) | pub fn to_ellipsize(ellipsis: Ellipsis, max_height: f32) -> cosmic_text:...
function to_color (line 381) | pub fn to_color(color: Color) -> cosmic_text::Color {
function hint_factor (line 388) | pub fn hint_factor(_size: Pixels, _scale_factor: Option<f32>) -> Option<...
type Renderer (line 404) | pub trait Renderer {
method fill_raw (line 406) | fn fill_raw(&mut self, raw: Raw);
FILE: graphics/src/text/cache.rs
type Cache (line 11) | pub struct Cache {
method new (line 19) | pub fn new() -> Self {
method get (line 24) | pub fn get(&self, key: &KeyHash) -> Option<&Entry> {
method allocate (line 29) | pub fn allocate(
method trim (line 92) | pub fn trim(&mut self) {
type Key (line 105) | pub struct Key<'a> {
function hash (line 127) | fn hash<H: Hasher>(self, mut hasher: H) -> KeyHash {
type KeyHash (line 142) | pub type KeyHash = u64;
type Entry (line 146) | pub struct Entry {
FILE: graphics/src/text/editor.rs
type Editor (line 18) | pub struct Editor(Option<Arc<Internal>>);
method new (line 33) | pub fn new() -> Self {
method buffer (line 38) | pub fn buffer(&self) -> &cosmic_text::Buffer {
method downgrade (line 47) | pub fn downgrade(&self) -> Weak {
method internal (line 56) | fn internal(&self) -> &Arc<Internal> {
method with_internal_mut (line 62) | fn with_internal_mut<T>(&mut self, f: impl FnOnce(&mut Internal) -> T)...
type Font (line 85) | type Font = Font;
method with_text (line 87) | fn with_text(text: &str) -> Self {
method is_empty (line 110) | fn is_empty(&self) -> bool {
method line (line 116) | fn line(&self, index: usize) -> Option<editor::Line<'_>> {
method line_count (line 129) | fn line_count(&self) -> usize {
method copy (line 133) | fn copy(&self) -> Option<String> {
method selection (line 137) | fn selection(&self) -> editor::Selection {
method cursor (line 260) | fn cursor(&self) -> Cursor {
method perform (line 288) | fn perform(&mut self, action: Action) {
method move_to (line 462) | fn move_to(&mut self, cursor: Cursor) {
method bounds (line 483) | fn bounds(&self) -> Size {
method min_bounds (line 487) | fn min_bounds(&self) -> Size {
method hint_factor (line 495) | fn hint_factor(&self) -> Option<f32> {
method update (line 501) | fn update(
method highlight (line 610) | fn highlight<H: Highlighter>(
type Internal (line 20) | struct Internal {
method fmt (line 726) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
method default (line 691) | fn default() -> Self {
method eq (line 697) | fn eq(&self, other: &Self) -> bool {
method default (line 706) | fn default() -> Self {
type Weak (line 736) | pub struct Weak {
method upgrade (line 744) | pub fn upgrade(&self) -> Option<Editor> {
method eq (line 750) | fn eq(&self, other: &Self) -> bool {
function highlight_line (line 758) | fn highlight_line(
function visual_lines_offset (line 804) | fn visual_lines_offset(line: usize, buffer: &cosmic_text::Buffer) -> i32 {
function to_motion (line 819) | fn to_motion(motion: Motion) -> cosmic_text::Motion {
function buffer_from_editor (line 836) | fn buffer_from_editor<'a, 'b>(editor: &'a impl cosmic_text::Edit<'b>) ->...
function buffer_mut_from_editor (line 847) | fn buffer_mut_from_editor<'a, 'b>(
FILE: graphics/src/text/paragraph.rs
type Paragraph (line 13) | pub struct Paragraph(Arc<Internal>);
method new (line 33) | pub fn new() -> Self {
method buffer (line 38) | pub fn buffer(&self) -> &cosmic_text::Buffer {
method downgrade (line 47) | pub fn downgrade(&self) -> Weak {
method internal (line 58) | fn internal(&self) -> &Arc<Internal> {
type Font (line 64) | type Font = Font;
method with_text (line 66) | fn with_text(text: Text<&str>) -> Self {
method with_spans (line 126) | fn with_spans<Link>(text: Text<&[Span<'_, Link>]>) -> Self {
method resize (line 208) | fn resize(&mut self, new_bounds: Size) {
method compare (line 226) | fn compare(&self, text: Text<()>) -> core::text::Difference {
method hint_factor (line 252) | fn hint_factor(&self) -> Option<f32> {
method size (line 256) | fn size(&self) -> Pixels {
method font (line 260) | fn font(&self) -> Font {
method line_height (line 264) | fn line_height(&self) -> LineHeight {
method align_x (line 270) | fn align_x(&self) -> Alignment {
method align_y (line 274) | fn align_y(&self) -> alignment::Vertical {
method wrapping (line 278) | fn wrapping(&self) -> Wrapping {
method ellipsis (line 282) | fn ellipsis(&self) -> Ellipsis {
method shaping (line 286) | fn shaping(&self) -> Shaping {
method bounds (line 290) | fn bounds(&self) -> Size {
method min_bounds (line 294) | fn min_bounds(&self) -> Size {
method hit_test (line 298) | fn hit_test(&self, point: Point) -> Option<Hit> {
method hit_span (line 307) | fn hit_span(&self, point: Point) -> Option<usize> {
method span_bounds (line 341) | fn span_bounds(&self, index: usize) -> Vec<Rectangle> {
method grapheme_position (line 389) | fn grapheme_position(&self, line: usize, index: usize) -> Option<Point> {
method fmt (line 437) | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
type Internal (line 16) | struct Internal {
method default (line 431) | fn default() -> Self {
method eq (line 452) | fn eq(&self, other: &Self) -> bool {
method default (line 464) | fn default() -> Self {
type Weak (line 487) | pub struct Weak {
method upgrade (line 499) | pub fn upgrade(&self) -> Option<Paragraph> {
method eq (line 505) | fn eq(&self, other: &Self) -> bool {
FILE: graphics/src/viewport.rs
type Viewport (line 5) | pub struct Viewport {
method with_physical_size (line 15) | pub fn with_physical_size(size: Size<u32>, scale_factor: f32) -> Viewp...
method physical_size (line 28) | pub fn physical_size(&self) -> Size<u32> {
method physical_width (line 33) | pub fn physical_width(&self) -> u32 {
method physical_height (line 38) | pub fn physical_height(&self) -> u32 {
method logical_size (line 43) | pub fn logical_size(&self) -> Size<f32> {
method scale_factor (line 48) | pub fn scale_factor(&self) -> f32 {
method projection (line 53) | pub fn projection(&self) -> Transformation {
FILE: highlighter/src/lib.rs
constant LINES_PER_SNAPSHOT (line 20) | const LINES_PER_SNAPSHOT: usize = 50;
type Highlighter (line 24) | pub struct Highlighter {
type Settings (line 32) | type Settings = Settings;
type Highlight (line 33) | type Highlight = Highlight;
type Iterator (line 35) | type Iterator<'a> = Box<dyn Iterator<Item = (Range<usize>, Self::Highl...
method new (line 37) | fn new(settings: &Self::Settings) -> Self {
method update (line 55) | fn update(&mut self, new_settings: &Self::Settings) {
method change_line (line 66) | fn change_line(&mut self, line: usize) {
method highlight_line (line 87) | fn highlight_line(&mut self, line: &str) -> Self::Iterator<'_> {
method current_line (line 103) | fn current_line(&self) -> usize {
function scope_iterator (line 108) | fn scope_iterator<'a>(
type Stream (line 138) | pub struct Stream {
method new (line 148) | pub fn new(settings: &Settings) -> Self {
method highlight_line (line 168) | pub fn highlight_line(
method commit (line 180) | pub fn commit(&mut self) {
method reset (line 185) | pub fn reset(&mut self) {
type Settings (line 194) | pub struct Settings {
type Highlight (line 208) | pub struct Highlight(highlighting::StyleModifier);
method color (line 214) | pub fn color(&self) -> Option<Color> {
method font (line 223) | pub fn font(&self) -> Option<Font> {
method to_format (line 254) | pub fn to_format(&self) -> Format<Font> {
type Theme (line 265) | pub enum Theme {
constant ALL (line 275) | pub const ALL: &'static [Self] = &[
method is_dark (line 284) | pub fn is_dark(self) -> bool {
method key (line 293) | fn key(self) -> &'static str {
method fmt (line 305) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
type ScopeRangeIterator (line 316) | struct ScopeRangeIterator {
type Item (line 324) | type Item = (std::ops::Range<usize>, parsing::ScopeStackOp);
method next (line 326) | fn next(&mut self) -> Option<Self::Item> {
FILE: program/src/lib.rs
type Program (line 27) | pub trait Program: Sized {
method name (line 44) | fn name() -> &'static str;
method settings (line 46) | fn settings(&self) -> Settings;
method window (line 48) | fn window(&self) -> Option<window::Settings>;
method boot (line 50) | fn boot(&self) -> (Self::State, Task<Self::Message>);
method update (line 52) | fn update(&self, state: &mut Self::State, message: Self::Message) -> T...
method view (line 54) | fn view<'a>(
method title (line 60) | fn title(&self, _state: &Self::State, _window: window::Id) -> String {
method subscription (line 89) | fn subscription(&self, _state: &Self::State) -> Subscription<Self::Mes...
method theme (line 93) | fn theme(&self, _state: &Self::State, _window: window::Id) -> Option<S...
method style (line 97) | fn style(&self, _state: &Self::State, theme: &Self::Theme) -> theme::S...
method scale_factor (line 101) | fn scale_factor(&self, _state: &Self::State, _window: window::Id) -> f...
method presets (line 105) | fn presets(&self) -> &[Preset<Self::State, Self::Message>] {
function with_title (line 111) | pub fn with_title<P: Program>(
function with_subscription (line 184) | pub fn with_subscription<P: Program>(
function with_theme (line 259) | pub fn with_theme<P: Program>(
function with_style (line 331) | pub fn with_style<P: Program>(
function with_scale_factor (line 403) | pub fn with_scale_factor<P: Program>(
function with_executor (line 478) | pub fn with_executor<P: Program, E
Condensed preview — 542 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (3,222K chars).
[
{
"path": ".cargo/config.toml",
"chars": 188,
"preview": "[alias]\nlint = \"clippy --workspace --benches --all-features --no-deps -- -D warnings\"\nlint-fix = \"clippy --fix --allow-d"
},
{
"path": ".github/FUNDING.yml",
"chars": 28,
"preview": "github: hecrj\nko_fi: hecrj_\n"
},
{
"path": ".github/ISSUE_TEMPLATE/BUG-REPORT.yml",
"chars": 3857,
"preview": "name: I have a problem with the library\ndescription: File a bug report.\nlabels: [\"bug\"]\nbody:\n - type: markdown\n att"
},
{
"path": ".github/ISSUE_TEMPLATE/config.yml",
"chars": 571,
"preview": "blank_issues_enabled: false\ncontact_links:\n - name: I have a question\n url: https://iced.zulipchat.com/#narrow/chann"
},
{
"path": ".github/PULL_REQUEST_TEMPLATE.md",
"chars": 482,
"preview": "The core team is busy and does not have time to mentor nor babysit new contributors. If a member of the core team thinks"
},
{
"path": ".github/workflows/audit.yml",
"chars": 867,
"preview": "name: Audit\non:\n push: {}\n pull_request: {}\n schedule:\n - cron: '0 0 * * *'\njobs:\n vulnerabilities:\n runs-on: "
},
{
"path": ".github/workflows/build.yml",
"chars": 3338,
"preview": "name: Build\non:\n push:\n branches:\n - master\njobs:\n todos_linux:\n runs-on: ubuntu-latest\n steps:\n - us"
},
{
"path": ".github/workflows/check.yml",
"chars": 876,
"preview": "name: Check\non: [push, pull_request]\njobs:\n wasm:\n runs-on: ubuntu-latest\n env:\n RUSTFLAGS: --cfg=web_sys_un"
},
{
"path": ".github/workflows/document.yml",
"chars": 1291,
"preview": "name: Document\non: [push, pull_request]\njobs:\n all:\n runs-on: ubuntu-latest\n concurrency:\n group: ${{ github"
},
{
"path": ".github/workflows/format.yml",
"chars": 277,
"preview": "name: Format\non: [push, pull_request]\njobs:\n all:\n runs-on: ubuntu-latest\n steps:\n - uses: hecrj/setup-rust-ac"
},
{
"path": ".github/workflows/lint.yml",
"chars": 432,
"preview": "name: Lint\non: [push, pull_request]\njobs:\n all:\n runs-on: ubuntu-latest\n steps:\n - uses: hecrj/setup-rust-acti"
},
{
"path": ".github/workflows/test.yml",
"chars": 828,
"preview": "name: Test\non: [push, pull_request]\njobs:\n all:\n runs-on: ${{ matrix.os }}\n env:\n RUSTFLAGS: --deny warnings"
},
{
"path": ".gitignore",
"chars": 38,
"preview": "target/\npkg/\n**/*.rs.bk\ndist/\ntraces/\n"
},
{
"path": "CHANGELOG.md",
"chars": 86972,
"preview": "# Changelog\nAll notable changes to this project will be documented in this file.\n\nThe format is based on [Keep a Changel"
},
{
"path": "CONTRIBUTING.md",
"chars": 1726,
"preview": "# Contributing\n\nThank you for considering contributing to Iced! Take a look at [the roadmap] to get an idea of the curre"
},
{
"path": "Cargo.toml",
"chars": 8843,
"preview": "[package]\nname = \"iced\"\ndescription = \"A cross-platform GUI library inspired by Elm\"\nversion.workspace = true\nedition.wo"
},
{
"path": "Cross.toml",
"chars": 183,
"preview": "[target.aarch64-unknown-linux-gnu]\nimage = \"ghcr.io/iced-rs/aarch64:latest\"\nxargo = false\n\n[target.armv7-unknown-linux-g"
},
{
"path": "DEPENDENCIES.md",
"chars": 2010,
"preview": "# Dependencies\n\nIced requires some system dependencies to work, and not\nall operating systems come with them installed.\n"
},
{
"path": "LICENSE",
"chars": 1071,
"preview": "Copyright 2019 Héctor Ramón, Iced contributors\n\nPermission is hereby granted, free of charge, to any person obtaining a "
},
{
"path": "README.md",
"chars": 7203,
"preview": "<div align=\"center\">\n\n<img src=\"docs/logo.svg\" width=\"140px\" />\n\n# Iced\n\n[!\n"
},
{
"path": "beacon/Cargo.toml",
"chars": 712,
"preview": "[package]\nname = \"iced_beacon\"\ndescription = \"A client/server protocol to monitor and supervise iced applications\"\nversi"
},
{
"path": "beacon/src/client.rs",
"chars": 7718,
"preview": "use crate::Error;\nuse crate::core::theme::palette;\nuse crate::core::time::{Duration, SystemTime};\nuse crate::span;\n\nuse "
},
{
"path": "beacon/src/error.rs",
"chars": 242,
"preview": "use std::io;\n\n#[derive(Debug, thiserror::Error)]\npub enum Error {\n #[error(\"input/output operation failed: {0}\")]\n "
},
{
"path": "beacon/src/lib.rs",
"chars": 11916,
"preview": "pub use iced_core as core;\npub use semver::Version;\n\npub mod client;\npub mod span;\n\nmod error;\nmod stream;\n\npub use clie"
},
{
"path": "beacon/src/span.rs",
"chars": 2106,
"preview": "use crate::core::window;\n\nuse serde::{Deserialize, Serialize};\n\n#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, H"
},
{
"path": "beacon/src/stream.rs",
"chars": 372,
"preview": "use futures::Future;\nuse futures::channel::mpsc;\nuse futures::stream::{self, Stream, StreamExt};\n\npub fn channel<T, F>(f"
},
{
"path": "benches/ipsum.txt",
"chars": 2962,
"preview": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur at elit mollis, dictum nunc non, tempus metus. Sed ia"
},
{
"path": "benches/wgpu.rs",
"chars": 7502,
"preview": "#![allow(missing_docs)]\nuse criterion::{Bencher, Criterion, criterion_group, criterion_main};\n\nuse iced::alignment;\nuse "
},
{
"path": "clippy.toml",
"chars": 67,
"preview": "too-many-arguments-threshold = 20\nenum-variant-name-threshold = 10\n"
},
{
"path": "core/Cargo.toml",
"chars": 735,
"preview": "[package]\nname = \"iced_core\"\ndescription = \"The essential ideas of iced\"\nversion.workspace = true\nedition.workspace = tr"
},
{
"path": "core/README.md",
"chars": 811,
"preview": "# `iced_core`\n[][documentation]\n[ within a space.\nuse crate::Size;\n\nuse std::fmt;\n\n/// The strategy us"
},
{
"path": "core/src/element.rs",
"chars": 15390,
"preview": "use crate::layout;\nuse crate::mouse;\nuse crate::overlay;\nuse crate::renderer;\nuse crate::widget;\nuse crate::widget::tree"
},
{
"path": "core/src/event.rs",
"chars": 1731,
"preview": "//! Handle events of a user interface.\nuse crate::clipboard;\nuse crate::input_method;\nuse crate::keyboard;\nuse crate::mo"
},
{
"path": "core/src/font.rs",
"chars": 5096,
"preview": "//! Load and use fonts.\nuse std::hash::Hash;\n\n/// A font.\n#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default)]\npu"
},
{
"path": "core/src/gradient.rs",
"chars": 3086,
"preview": "//! Colors that transition progressively.\nuse crate::{Color, Radians};\n\nuse std::cmp::Ordering;\n\n#[derive(Debug, Clone, "
},
{
"path": "core/src/image.rs",
"chars": 10078,
"preview": "//! Load and draw raster graphics.\nuse crate::border;\nuse crate::{Bytes, Radians, Rectangle, Size};\n\nuse rustc_hash::FxH"
},
{
"path": "core/src/input_method.rs",
"chars": 6232,
"preview": "//! Listen to input method events.\nuse crate::{Pixels, Rectangle};\n\nuse std::ops::Range;\n\n/// The input method strategy "
},
{
"path": "core/src/keyboard/event.rs",
"chars": 1507,
"preview": "use crate::SmolStr;\nuse crate::keyboard::key;\nuse crate::keyboard::{Key, Location, Modifiers};\n\n/// A keyboard event.\n//"
},
{
"path": "core/src/keyboard/key.rs",
"chars": 51008,
"preview": "//! Identify keyboard keys.\nuse crate::SmolStr;\n\n/// A key on the keyboard.\n///\n/// This is mostly the `Key` type found "
},
{
"path": "core/src/keyboard/location.rs",
"chars": 324,
"preview": "/// The location of a key on the keyboard.\n#[derive(Debug, Clone, Copy, PartialEq, Eq)]\npub enum Location {\n /// The "
},
{
"path": "core/src/keyboard/modifiers.rs",
"chars": 3286,
"preview": "use bitflags::bitflags;\n\nbitflags! {\n /// The current state of the keyboard modifiers.\n #[derive(Debug, Clone, Cop"
},
{
"path": "core/src/keyboard.rs",
"chars": 184,
"preview": "//! Listen to keyboard events.\npub mod key;\n\nmod event;\nmod location;\nmod modifiers;\n\npub use event::Event;\npub use key:"
},
{
"path": "core/src/layout/DRUID_LICENSE",
"chars": 11358,
"preview": "\n Apache License\n Version 2.0, January 2004\n "
},
{
"path": "core/src/layout/flex.rs",
"chars": 9739,
"preview": "//! Distribute elements using a flex-based layout.\n// This code is heavily inspired by the [`druid`] codebase.\n//\n// [`d"
},
{
"path": "core/src/layout/limits.rs",
"chars": 5307,
"preview": "#![allow(clippy::manual_clamp)]\nuse crate::{Length, Size};\n\n/// A set of size constraints for layouting.\n#[derive(Debug,"
},
{
"path": "core/src/layout/node.rs",
"chars": 3187,
"preview": "use crate::{Alignment, Padding, Point, Rectangle, Size, Vector};\n\n/// The bounds of an element and its children.\n#[deriv"
},
{
"path": "core/src/layout.rs",
"chars": 5884,
"preview": "//! Position your widgets properly.\nmod limits;\nmod node;\n\npub mod flex;\n\npub use limits::Limits;\npub use node::Node;\n\nu"
},
{
"path": "core/src/length.rs",
"chars": 2401,
"preview": "use crate::Pixels;\n\n/// The strategy used to fill space in a specific dimension.\n#[derive(Debug, Clone, Copy, PartialEq)"
},
{
"path": "core/src/lib.rs",
"chars": 4104,
"preview": "//! The core library of [Iced].\n//!\n//! This library holds basic types that can be reused and re-exported in\n//! differe"
},
{
"path": "core/src/mouse/button.rs",
"chars": 365,
"preview": "/// The button of a mouse.\n#[derive(Debug, Hash, PartialEq, Eq, Clone, Copy)]\npub enum Button {\n /// The left mouse b"
},
{
"path": "core/src/mouse/click.rs",
"chars": 2215,
"preview": "//! Track mouse clicks.\nuse crate::mouse::Button;\nuse crate::time::Instant;\nuse crate::{Point, Transformation};\n\nuse std"
},
{
"path": "core/src/mouse/cursor.rs",
"chars": 3631,
"preview": "use crate::{Point, Rectangle, Transformation, Vector};\n\n/// The mouse cursor state.\n#[derive(Debug, Clone, Copy, Partial"
},
{
"path": "core/src/mouse/event.rs",
"chars": 1323,
"preview": "use crate::Point;\n\nuse super::Button;\n\n/// A mouse event.\n///\n/// _**Note:** This type is largely incomplete! If you nee"
},
{
"path": "core/src/mouse/interaction.rs",
"chars": 568,
"preview": "/// The interaction of a mouse cursor.\n#[derive(Debug, Eq, PartialEq, Clone, Copy, PartialOrd, Ord, Default)]\n#[allow(mi"
},
{
"path": "core/src/mouse.rs",
"chars": 235,
"preview": "//! Handle mouse events.\npub mod click;\n\nmod button;\nmod cursor;\nmod event;\nmod interaction;\n\npub use button::Button;\npu"
},
{
"path": "core/src/overlay/element.rs",
"chars": 3378,
"preview": "pub use crate::Overlay;\n\nuse crate::layout;\nuse crate::mouse;\nuse crate::renderer;\nuse crate::widget;\nuse crate::{Event,"
},
{
"path": "core/src/overlay/group.rs",
"chars": 4611,
"preview": "use crate::layout;\nuse crate::mouse;\nuse crate::overlay;\nuse crate::renderer;\nuse crate::widget;\nuse crate::{Event, Layo"
},
{
"path": "core/src/overlay/nested.rs",
"chars": 8660,
"preview": "use crate::event;\nuse crate::layout;\nuse crate::mouse;\nuse crate::overlay;\nuse crate::renderer;\nuse crate::widget;\nuse c"
},
{
"path": "core/src/overlay.rs",
"chars": 3286,
"preview": "//! Display interactive elements on top of other widgets.\nmod element;\nmod group;\nmod nested;\n\npub use element::Element;"
},
{
"path": "core/src/padding.rs",
"chars": 6067,
"preview": "//! Space stuff around the perimeter.\nuse crate::{Pixels, Size};\n\n/// An amount of space to pad for each side of a box\n/"
},
{
"path": "core/src/pixels.rs",
"chars": 1784,
"preview": "/// An amount of logical pixels.\n///\n/// Normally used to represent an amount of space, or the size of something.\n///\n//"
},
{
"path": "core/src/point.rs",
"chars": 2850,
"preview": "use crate::Vector;\n\nuse num_traits::{Float, Num};\nuse std::fmt;\n\n/// A 2D point.\n#[derive(Debug, Clone, Copy, PartialEq,"
},
{
"path": "core/src/rectangle.rs",
"chars": 11721,
"preview": "use crate::alignment;\nuse crate::{Padding, Point, Radians, Size, Vector};\n\n/// An axis-aligned rectangle.\n#[derive(Debug"
},
{
"path": "core/src/renderer/null.rs",
"chars": 6164,
"preview": "use crate::alignment;\nuse crate::image::{self, Image};\nuse crate::renderer::{self, Renderer};\nuse crate::svg;\nuse crate:"
},
{
"path": "core/src/renderer.rs",
"chars": 5305,
"preview": "//! Write your own renderer.\n#[cfg(debug_assertions)]\nmod null;\n\nuse crate::image;\nuse crate::{\n Background, Border, "
},
{
"path": "core/src/rotation.rs",
"chars": 2199,
"preview": "//! Control the rotation of some content (like an image) within a space.\nuse crate::{Degrees, Radians, Size};\n\n/// The s"
},
{
"path": "core/src/settings.rs",
"chars": 1893,
"preview": "//! Configure your application.\nuse crate::renderer;\nuse crate::{Font, Pixels};\n\nuse std::borrow::Cow;\n\n/// The settings"
},
{
"path": "core/src/shadow.rs",
"chars": 295,
"preview": "use crate::{Color, Vector};\n\n/// A shadow.\n#[derive(Debug, Clone, Copy, PartialEq, Default)]\npub struct Shadow {\n ///"
},
{
"path": "core/src/shell.rs",
"chars": 6394,
"preview": "use crate::clipboard;\nuse crate::event;\nuse crate::window;\nuse crate::{Clipboard, InputMethod};\n\n/// A connection to the"
},
{
"path": "core/src/size.rs",
"chars": 4635,
"preview": "use crate::{Length, Radians, Vector};\n\n/// An amount of space in 2 dimensions.\n#[derive(Debug, Clone, Copy, PartialEq, E"
},
{
"path": "core/src/svg.rs",
"chars": 4183,
"preview": "//! Load and draw vector graphics.\nuse crate::{Color, Radians, Rectangle, Size};\n\nuse rustc_hash::FxHasher;\nuse std::bor"
},
{
"path": "core/src/text/editor.rs",
"chars": 6712,
"preview": "//! Edit text.\nuse crate::text::highlighter::{self, Highlighter};\nuse crate::text::{LineHeight, Wrapping};\nuse crate::{P"
},
{
"path": "core/src/text/highlighter.rs",
"chars": 2387,
"preview": "//! Highlight text.\nuse crate::Color;\n\nuse std::ops::Range;\n\n/// A type capable of highlighting text.\n///\n/// A [`Highli"
},
{
"path": "core/src/text/paragraph.rs",
"chars": 5820,
"preview": "//! Draw paragraphs.\nuse crate::alignment;\nuse crate::text::{\n Alignment, Difference, Ellipsis, Hit, LineHeight, Shap"
},
{
"path": "core/src/text.rs",
"chars": 19454,
"preview": "//! Draw and interact with text.\npub mod editor;\npub mod highlighter;\npub mod paragraph;\n\npub use editor::Editor;\npub us"
},
{
"path": "core/src/theme/palette.rs",
"chars": 22898,
"preview": "//! Define the colors of a theme.\nuse crate::{Color, color};\n\nuse std::sync::LazyLock;\n\n/// An extended set of colors ge"
},
{
"path": "core/src/theme.rs",
"chars": 10723,
"preview": "//! Use the built-in theme and styles.\npub mod palette;\n\npub use palette::Palette;\n\nuse crate::Color;\n\nuse std::borrow::"
},
{
"path": "core/src/time.rs",
"chars": 863,
"preview": "//! Keep track of time, both in native and web platforms!\n\npub use web_time::Duration;\npub use web_time::Instant;\npub us"
},
{
"path": "core/src/touch.rs",
"chars": 673,
"preview": "//! Build touch events.\nuse crate::Point;\n\n/// A touch interaction.\n#[derive(Debug, Clone, Copy, PartialEq)]\n#[allow(mis"
},
{
"path": "core/src/transformation.rs",
"chars": 3086,
"preview": "use crate::{Point, Rectangle, Size, Vector};\n\nuse glam::{Mat4, Vec3, Vec4};\nuse std::ops::Mul;\n\n/// A 2D transformation "
},
{
"path": "core/src/vector.rs",
"chars": 2572,
"preview": "/// A 2D vector.\n#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]\npub struct Vector<T = f32> {\n /// The X compon"
},
{
"path": "core/src/widget/id.rs",
"chars": 1213,
"preview": "use std::borrow;\nuse std::sync::atomic::{self, AtomicUsize};\n\nstatic NEXT_ID: AtomicUsize = AtomicUsize::new(0);\n\n/// Th"
},
{
"path": "core/src/widget/operation/focusable.rs",
"chars": 6780,
"preview": "//! Operate on widgets that can be focused.\nuse crate::Rectangle;\nuse crate::widget::Id;\nuse crate::widget::operation::{"
},
{
"path": "core/src/widget/operation/scrollable.rs",
"chars": 4531,
"preview": "//! Operate on widgets that can be scrolled.\nuse crate::widget::{Id, Operation};\nuse crate::{Rectangle, Vector};\n\n/// Th"
},
{
"path": "core/src/widget/operation/text_input.rs",
"chars": 4584,
"preview": "//! Operate on widgets that have text input.\nuse crate::Rectangle;\nuse crate::widget::Id;\nuse crate::widget::operation::"
},
{
"path": "core/src/widget/operation.rs",
"chars": 13707,
"preview": "//! Query or update internal widget state.\npub mod focusable;\npub mod scrollable;\npub mod text_input;\n\npub use focusable"
},
{
"path": "core/src/widget/text.rs",
"chars": 12775,
"preview": "//! Text widgets display information through writing.\n//!\n//! # Example\n//! ```no_run\n//! # mod iced { pub mod widget { "
},
{
"path": "core/src/widget/tree.rs",
"chars": 7570,
"preview": "//! Store internal widget state in a state tree to ensure continuity.\nuse crate::Widget;\n\nuse std::any::{self, Any};\nuse"
},
{
"path": "core/src/widget.rs",
"chars": 4087,
"preview": "//! Create custom widgets and operate on them.\npub mod operation;\npub mod text;\npub mod tree;\n\nmod id;\n\npub use id::Id;\n"
},
{
"path": "core/src/window/direction.rs",
"chars": 620,
"preview": "/// The cardinal directions relative to the center of a window.\n#[derive(Debug, Clone, Copy)]\npub enum Direction {\n /"
},
{
"path": "core/src/window/event.rs",
"chars": 2129,
"preview": "use crate::time::Instant;\nuse crate::{Point, Size};\n\nuse std::path::PathBuf;\n\n/// A window-related event.\n#[derive(Parti"
},
{
"path": "core/src/window/icon.rs",
"chars": 2528,
"preview": "//! Change the icon of a window.\nuse crate::Size;\n\nuse std::mem;\n\n/// Builds an [`Icon`] from its RGBA pixels in the `s"
},
{
"path": "core/src/window/id.rs",
"chars": 585,
"preview": "use std::fmt;\nuse std::hash::Hash;\nuse std::sync::atomic::{self, AtomicU64};\n\n/// The id of the window.\n#[derive(Debug, "
},
{
"path": "core/src/window/level.rs",
"chars": 596,
"preview": "/// A window level groups windows with respect to their z-position.\n///\n/// The relative ordering between windows in dif"
},
{
"path": "core/src/window/mode.rs",
"chars": 307,
"preview": "/// The mode of a window-based application.\n#[derive(Debug, Clone, Copy, PartialEq, Eq)]\npub enum Mode {\n /// The app"
},
{
"path": "core/src/window/position.rs",
"chars": 1017,
"preview": "use crate::{Point, Size};\n\n/// The position of a window in a given screen.\n#[derive(Debug, Clone, Copy, Default)]\npub en"
},
{
"path": "core/src/window/redraw_request.rs",
"chars": 1559,
"preview": "use crate::time::Instant;\n\n/// A request to redraw a window.\n#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord"
},
{
"path": "core/src/window/screenshot.rs",
"chars": 3129,
"preview": "//! Take screenshots of a window.\nuse crate::{Bytes, Rectangle, Size};\n\nuse std::fmt::{Debug, Formatter};\n\n/// Data of a"
},
{
"path": "core/src/window/settings/linux.rs",
"chars": 682,
"preview": "//! Platform specific settings for Linux.\n\n/// The platform specific window settings of an application.\n#[derive(Debug, "
},
{
"path": "core/src/window/settings/macos.rs",
"chars": 467,
"preview": "//! Platform specific settings for macOS.\n\n/// The platform specific window settings of an application.\n#[derive(Debug, "
},
{
"path": "core/src/window/settings/other.rs",
"chars": 144,
"preview": "/// The platform specific window settings of an application.\n#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]\npub s"
},
{
"path": "core/src/window/settings/wasm.rs",
"chars": 586,
"preview": "//! Platform specific settings for WebAssembly.\n\n/// The platform specific window settings of an application.\n#[derive(D"
},
{
"path": "core/src/window/settings/windows.rs",
"chars": 1653,
"preview": "//! Platform specific settings for Windows.\n\n/// The platform specific window settings of an application.\n#[derive(Debug"
},
{
"path": "core/src/window/settings.rs",
"chars": 3461,
"preview": "//! Configure your windows.\n#[cfg(target_os = \"windows\")]\n#[path = \"settings/windows.rs\"]\npub mod platform;\n\n#[cfg(targe"
},
{
"path": "core/src/window/user_attention.rs",
"chars": 741,
"preview": "/// The type of user attention to request.\n///\n/// ## Platform-specific\n///\n/// - **X11:** Sets the WM's `XUrgencyHint`."
},
{
"path": "core/src/window.rs",
"chars": 500,
"preview": "//! Build window-based GUI applications.\npub mod icon;\npub mod screenshot;\npub mod settings;\n\nmod direction;\nmod event;\n"
},
{
"path": "debug/Cargo.toml",
"chars": 640,
"preview": "[package]\nname = \"iced_debug\"\ndescription = \"A pluggable API for debugging iced applications\"\nversion.workspace = true\ne"
},
{
"path": "debug/src/lib.rs",
"chars": 11500,
"preview": "pub use iced_core as core;\npub use iced_futures as futures;\n\nuse crate::core::theme::palette;\nuse crate::core::window;\nu"
},
{
"path": "devtools/Cargo.toml",
"chars": 575,
"preview": "[package]\nname = \"iced_devtools\"\ndescription = \"Attachable developer tools for any iced program\"\nversion.workspace = tru"
},
{
"path": "devtools/src/comet.rs",
"chars": 3607,
"preview": "use crate::runtime::task::{self, Task};\n\nuse std::process;\n\npub const COMPATIBLE_REVISION: &str = \"fbef808eed51562f0ea60"
},
{
"path": "devtools/src/lib.rs",
"chars": 16174,
"preview": "#![allow(missing_docs)]\nuse iced_debug as debug;\nuse iced_program as program;\nuse iced_program::runtime;\nuse iced_progra"
},
{
"path": "devtools/src/time_machine.rs",
"chars": 1781,
"preview": "use crate::Program;\n\n#[cfg(feature = \"time-travel\")]\npub struct TimeMachine<P>\nwhere\n P: Program,\n{\n state: Option"
},
{
"path": "docs/redirect.html",
"chars": 416,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=ed"
},
{
"path": "docs/release_summary.py",
"chars": 1995,
"preview": "import requests\nimport os\n\ndef get_merged_prs(repo, milestone, token):\n url = f'https://api.github.com/repos/{repo}/p"
},
{
"path": "examples/README.md",
"chars": 5324,
"preview": "# Examples\n__Iced moves fast and the `master` branch can contain breaking changes!__ If you want to browse examples that"
},
{
"path": "examples/arc/Cargo.toml",
"chars": 205,
"preview": "[package]\nname = \"arc\"\nversion = \"0.1.0\"\nauthors = [\"ThatsNoMoon <git@thatsnomoon.dev>\"]\nedition = \"2024\"\npublish = fals"
},
{
"path": "examples/arc/README.md",
"chars": 297,
"preview": "## Arc\n\nAn application that uses the `Canvas` widget to draw a rotating arc.\n\nThis is a simple demo for https://github.c"
},
{
"path": "examples/arc/src/main.rs",
"chars": 2427,
"preview": "use std::{f32::consts::PI, time::Instant};\n\nuse iced::mouse;\nuse iced::widget::canvas::{self, Cache, Canvas, Geometry, P"
},
{
"path": "examples/bezier_tool/Cargo.toml",
"chars": 214,
"preview": "[package]\nname = \"bezier_tool\"\nversion = \"0.1.0\"\nauthors = [\"Héctor Ramón Jiménez <hector0193@gmail.com>\"]\nedition = \"20"
},
{
"path": "examples/bezier_tool/README.md",
"chars": 329,
"preview": "## Bézier tool\n\nA Paint-like tool for drawing Bézier curves using the `Canvas` widget.\n\nThe __[`main`]__ file contains a"
},
{
"path": "examples/bezier_tool/src/main.rs",
"chars": 7064,
"preview": "//! This example showcases an interactive `Canvas` for drawing Bézier curves.\nuse iced::widget::{button, container, hove"
},
{
"path": "examples/changelog/Cargo.toml",
"chars": 562,
"preview": "[package]\nname = \"changelog\"\nversion = \"0.1.0\"\nauthors = [\"Héctor Ramón Jiménez <hector0193@gmail.com>\"]\nedition = \"2024"
},
{
"path": "examples/changelog/src/changelog.rs",
"chars": 11908,
"preview": "use jiff::Timestamp;\nuse serde::Deserialize;\nuse tokio::fs;\nuse tokio::process;\n\nuse std::collections::{BTreeMap, BTreeS"
},
{
"path": "examples/changelog/src/icon.rs",
"chars": 251,
"preview": "use iced::widget::{text, Text};\nuse iced::Font;\n\npub const FONT_BYTES: &[u8] = include_bytes!(\"../fonts/changelog-icons."
},
{
"path": "examples/changelog/src/main.rs",
"chars": 12059,
"preview": "mod changelog;\n\nuse crate::changelog::Changelog;\n\nuse iced::font;\nuse iced::widget::{\n button, center, column, contai"
},
{
"path": "examples/checkbox/Cargo.toml",
"chars": 175,
"preview": "[package]\nname = \"checkbox\"\nversion = \"0.1.0\"\nauthors = [\"Casper Rogild Storm<casper@rogildstorm.com>\"]\nedition = \"2024\""
},
{
"path": "examples/checkbox/README.md",
"chars": 195,
"preview": "## Checkbox\n\nA box that can be checked.\n\nThe __[`main`]__ file contains all the code of the example.\n\nYou can run it wit"
},
{
"path": "examples/checkbox/src/main.rs",
"chars": 2160,
"preview": "use iced::widget::{center, checkbox, column, row, text};\nuse iced::{Element, Font};\n\nconst ICON_FONT: Font = Font::new(\""
},
{
"path": "examples/clock/Cargo.toml",
"chars": 259,
"preview": "[package]\nname = \"clock\"\nversion = \"0.1.0\"\nauthors = [\"Héctor Ramón Jiménez <hector0193@gmail.com>\"]\nedition = \"2024\"\npu"
},
{
"path": "examples/clock/README.md",
"chars": 408,
"preview": "## Clock\n\nAn application that uses the `Canvas` widget to draw a clock and its hands to display the current time.\n\nThe _"
},
{
"path": "examples/clock/src/main.rs",
"chars": 6165,
"preview": "use iced::alignment;\nuse iced::mouse;\nuse iced::time::{self, milliseconds};\nuse iced::widget::canvas::{Cache, Geometry, "
},
{
"path": "examples/color_palette/Cargo.toml",
"chars": 215,
"preview": "[package]\nname = \"color_palette\"\nversion = \"0.1.0\"\nauthors = [\"Clark Moody <clark@clarkmoody.com>\"]\nedition = \"2024\"\npub"
},
{
"path": "examples/color_palette/README.md",
"chars": 216,
"preview": "## Color palette\n\nA color palette generator, based on a user-defined root color.\n\n<div align=\"center\">\n <img src=\"scree"
},
{
"path": "examples/color_palette/src/main.rs",
"chars": 13458,
"preview": "use iced::alignment;\nuse iced::mouse;\nuse iced::theme;\nuse iced::widget::canvas::{self, Canvas, Frame, Geometry, Path};\n"
},
{
"path": "examples/combo_box/Cargo.toml",
"chars": 191,
"preview": "[package]\nname = \"combo_box\"\nversion = \"0.1.0\"\nauthors = [\"Joao Freitas <jhff.15@gmail.com>\"]\nedition = \"2024\"\npublish ="
},
{
"path": "examples/combo_box/README.md",
"chars": 364,
"preview": "## Combo-Box\n\nA dropdown list of searchable and selectable options.\n\nIt displays and positions an overlay based on the w"
},
{
"path": "examples/combo_box/src/main.rs",
"chars": 3573,
"preview": "use iced::widget::{center, column, combo_box, scrollable, space, text};\nuse iced::{Center, Element, Fill};\n\npub fn main("
},
{
"path": "examples/counter/Cargo.toml",
"chars": 335,
"preview": "[package]\nname = \"counter\"\nversion = \"0.1.0\"\nauthors = [\"Héctor Ramón Jiménez <hector0193@gmail.com>\"]\nedition = \"2024\"\n"
},
{
"path": "examples/counter/README.md",
"chars": 437,
"preview": "## Counter\n\nThe classic counter example explained in the [`README`](../../README.md).\n\nThe __[`main`]__ file contains al"
},
{
"path": "examples/counter/index.html",
"chars": 365,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"utf-8\" content=\"text/html; charset=utf-8\" />\n <meta name=\""
},
{
"path": "examples/counter/src/main.rs",
"chars": 1464,
"preview": "use iced::Center;\nuse iced::widget::{Column, button, column, text};\n\npub fn main() -> iced::Result {\n iced::run(Count"
},
{
"path": "examples/custom_quad/Cargo.toml",
"chars": 176,
"preview": "[package]\nname = \"custom_quad\"\nversion = \"0.1.0\"\nauthors = [\"Robert Krahn\"]\nedition = \"2024\"\npublish = false\n\n[dependenc"
},
{
"path": "examples/custom_quad/src/main.rs",
"chars": 6251,
"preview": "//! This example showcases a drawing a quad.\nuse iced::border;\nuse iced::widget::{center, column, slider, text, toggler}"
},
{
"path": "examples/custom_shader/Cargo.toml",
"chars": 318,
"preview": "[package]\nname = \"custom_shader\"\nversion = \"0.1.0\"\nauthors = [\"Bingus <shankern@protonmail.com>\"]\nedition = \"2024\"\n\n[dep"
},
{
"path": "examples/custom_shader/src/main.rs",
"chars": 3918,
"preview": "mod scene;\n\nuse scene::Scene;\n\nuse iced::time::Instant;\nuse iced::wgpu;\nuse iced::widget::{center, checkbox, column, row"
},
{
"path": "examples/custom_shader/src/scene/camera.rs",
"chars": 1111,
"preview": "use glam::{mat4, vec3, vec4};\nuse iced::Rectangle;\n\n#[derive(Copy, Clone)]\npub struct Camera {\n eye: glam::Vec3,\n "
},
{
"path": "examples/custom_shader/src/scene/pipeline/buffer.rs",
"chars": 1000,
"preview": "use crate::wgpu;\n\n// A custom buffer container for dynamic resizing.\npub struct Buffer {\n pub raw: wgpu::Buffer,\n "
},
{
"path": "examples/custom_shader/src/scene/pipeline/cube.rs",
"chars": 10163,
"preview": "use crate::scene::pipeline::Vertex;\nuse crate::wgpu;\n\nuse glam::{Vec3, vec2, vec3};\nuse rand::{Rng, thread_rng};\n\n/// A "
},
{
"path": "examples/custom_shader/src/scene/pipeline/uniforms.rs",
"chars": 579,
"preview": "use crate::scene::Camera;\n\nuse iced::{Color, Rectangle};\n\n#[derive(Copy, Clone, Debug, bytemuck::Pod, bytemuck::Zeroable"
},
{
"path": "examples/custom_shader/src/scene/pipeline/vertex.rs",
"chars": 762,
"preview": "use crate::wgpu;\n\n#[derive(Debug, Copy, Clone, bytemuck::Pod, bytemuck::Zeroable)]\n#[repr(C)]\npub struct Vertex {\n pu"
},
{
"path": "examples/custom_shader/src/scene/pipeline.rs",
"chars": 21919,
"preview": "pub mod cube;\n\nmod buffer;\nmod uniforms;\nmod vertex;\n\npub use uniforms::Uniforms;\n\nuse buffer::Buffer;\nuse vertex::Verte"
},
{
"path": "examples/custom_shader/src/scene.rs",
"chars": 4268,
"preview": "mod camera;\nmod pipeline;\n\nuse camera::Camera;\nuse pipeline::Pipeline;\n\nuse crate::wgpu;\nuse pipeline::cube::{self, Cube"
},
{
"path": "examples/custom_shader/src/shaders/cubes.wgsl",
"chars": 4110,
"preview": "struct Uniforms {\n projection: mat4x4<f32>,\n camera_pos: vec4<f32>,\n light_color: vec4<f32>,\n}\n\nconst LIGHT_POS"
},
{
"path": "examples/custom_shader/src/shaders/depth.wgsl",
"chars": 1092,
"preview": "var<private> positions: array<vec2<f32>, 6> = array<vec2<f32>, 6>(\n vec2<f32>(-1.0, 1.0),\n vec2<f32>(-1.0, -1.0),\n"
},
{
"path": "examples/custom_widget/Cargo.toml",
"chars": 209,
"preview": "[package]\nname = \"custom_widget\"\nversion = \"0.1.0\"\nauthors = [\"Héctor Ramón Jiménez <hector0193@gmail.com>\"]\nedition = \""
},
{
"path": "examples/custom_widget/README.md",
"chars": 333,
"preview": "## Custom widget\n\nA demonstration of how to build a custom widget that draws a circle.\n\nThe __[`main`]__ file contains a"
},
{
"path": "examples/custom_widget/src/main.rs",
"chars": 2962,
"preview": "//! This example showcases a simple native custom widget that draws a circle.\nmod circle {\n use iced::advanced::layou"
},
{
"path": "examples/delineate/Cargo.toml",
"chars": 214,
"preview": "[package]\nname = \"delineate\"\nversion = \"0.1.0\"\nauthors = [\"Héctor Ramón Jiménez <hector0193@gmail.com>\"]\nedition = \"2024"
},
{
"path": "examples/delineate/src/main.rs",
"chars": 4937,
"preview": "use iced::event::{self, Event};\nuse iced::mouse;\nuse iced::widget::{self, column, container, row, scrollable, selector, "
},
{
"path": "examples/download_progress/Cargo.toml",
"chars": 305,
"preview": "[package]\nname = \"download_progress\"\nversion = \"0.1.0\"\nauthors = [\"Songtronix <contact@songtronix.com>\", \"Folyd <lyshuho"
},
{
"path": "examples/download_progress/README.md",
"chars": 503,
"preview": "## Download progress\n\nA basic application that asynchronously downloads multiple dummy files of 100 MB and tracks the do"
},
{
"path": "examples/download_progress/index.html",
"chars": 438,
"preview": "<!DOCTYPE html>\n<html lang=\"en\" style=\"height: 100%\">\n<head>\n <meta charset=\"utf-8\" content=\"text/html; charset=utf-8"
},
{
"path": "examples/download_progress/src/download.rs",
"chars": 1155,
"preview": "use iced::futures::StreamExt;\nuse iced::task::{Straw, sipper};\n\nuse std::sync::Arc;\n\npub fn download(url: impl AsRef<str"
},
{
"path": "examples/download_progress/src/main.rs",
"chars": 5053,
"preview": "mod download;\n\nuse download::download;\n\nuse iced::task;\nuse iced::widget::{Column, button, center, column, progress_bar,"
},
{
"path": "examples/editor/Cargo.toml",
"chars": 289,
"preview": "[package]\nname = \"editor\"\nversion = \"0.1.0\"\nauthors = [\"Héctor Ramón Jiménez <hector@hecrj.dev>\"]\nedition = \"2024\"\npubli"
},
{
"path": "examples/editor/src/main.rs",
"chars": 9317,
"preview": "use iced::highlighter;\nuse iced::keyboard;\nuse iced::widget::{\n button, center_x, column, container, operation, pick_"
},
{
"path": "examples/events/Cargo.toml",
"chars": 199,
"preview": "[package]\nname = \"events\"\nversion = \"0.1.0\"\nauthors = [\"Héctor Ramón Jiménez <hector0193@gmail.com>\"]\nedition = \"2024\"\np"
},
{
"path": "examples/events/README.md",
"chars": 233,
"preview": "## Events\n\nA log of native events displayed using a conditional `Subscription`.\n\nThe __[`main`]__ file contains all the "
},
{
"path": "examples/events/src/main.rs",
"chars": 2248,
"preview": "use iced::event::{self, Event};\nuse iced::widget::{Column, button, center, checkbox, text};\nuse iced::window;\nuse iced::"
},
{
"path": "examples/exit/Cargo.toml",
"chars": 113,
"preview": "[package]\nname = \"exit\"\nversion = \"0.1.0\"\nedition = \"2024\"\npublish = false\n\n[dependencies]\niced.workspace = true\n"
},
{
"path": "examples/exit/README.md",
"chars": 208,
"preview": "## Exit\n\nHow to exit an application based on user input.\n\nThe __[`main`]__ file contains all the code of the example.\n\nY"
},
{
"path": "examples/exit/src/main.rs",
"chars": 1192,
"preview": "use iced::widget::{button, center, column};\nuse iced::window;\nuse iced::{Center, Element, Task};\n\npub fn main() -> iced:"
},
{
"path": "examples/ferris/Cargo.toml",
"chars": 217,
"preview": "[package]\nname = \"ferris\"\nversion = \"0.1.0\"\nauthors = [\"Héctor Ramón Jiménez <hector0193@gmail.com>\"]\nedition = \"2024\"\np"
},
{
"path": "examples/ferris/src/main.rs",
"chars": 6211,
"preview": "use iced::time::Instant;\nuse iced::widget::{center, checkbox, column, container, image, pick_list, row, slider, text};\nu"
},
{
"path": "examples/gallery/Cargo.toml",
"chars": 473,
"preview": "[package]\nname = \"gallery\"\nversion = \"0.1.0\"\nauthors = [\"Héctor Ramón Jiménez <hector0193@gmail.com>\"]\nedition = \"2024\"\n"
},
{
"path": "examples/gallery/src/civitai.rs",
"chars": 4692,
"preview": "use serde::Deserialize;\nuse sipper::{Straw, sipper};\nuse tokio::task;\n\nuse std::fmt;\nuse std::io;\nuse std::sync::{Arc, L"
},
{
"path": "examples/gallery/src/main.rs",
"chars": 17081,
"preview": "//! A simple gallery that displays the daily featured images of Civitai.\n//!\n//! Showcases lazy loading of images in the"
},
{
"path": "examples/game_of_life/Cargo.toml",
"chars": 349,
"preview": "[package]\nname = \"game_of_life\"\nversion = \"0.1.0\"\nauthors = [\"Héctor Ramón Jiménez <hector0193@gmail.com>\"]\nedition = \"2"
},
{
"path": "examples/game_of_life/README.md",
"chars": 650,
"preview": "## Game of Life\n\nAn interactive version of the [Game of Life], invented by [John Horton Conway].\n\nIt runs a simulation i"
},
{
"path": "examples/game_of_life/src/main.rs",
"chars": 27451,
"preview": "//! This example showcases an interactive version of the Game of Life, invented\n//! by John Conway. It leverages a `Canv"
},
{
"path": "examples/game_of_life/src/preset.rs",
"chars": 3794,
"preview": "#[derive(Debug, Clone, Copy, Default, PartialEq, Eq)]\npub enum Preset {\n Custom,\n #[default]\n Xkcd,\n Glider,"
},
{
"path": "examples/geometry/Cargo.toml",
"chars": 204,
"preview": "[package]\nname = \"geometry\"\nversion = \"0.1.0\"\nauthors = [\"Héctor Ramón Jiménez <hector0193@gmail.com>\"]\nedition = \"2024\""
},
{
"path": "examples/geometry/README.md",
"chars": 355,
"preview": "## Geometry\n\nA custom widget showcasing how to draw geometry with the `Mesh2D` primitive in [`iced_wgpu`](../../wgpu).\n\n"
},
{
"path": "examples/geometry/src/main.rs",
"chars": 6508,
"preview": "//! This example showcases a simple native custom widget that renders using\n//! arbitrary low-level geometry.\nmod rainbo"
},
{
"path": "examples/gradient/Cargo.toml",
"chars": 171,
"preview": "[package]\nname = \"gradient\"\nversion = \"0.1.0\"\nedition = \"2024\"\npublish = false\n\n[dependencies]\niced.workspace = true\nice"
},
{
"path": "examples/gradient/src/main.rs",
"chars": 3393,
"preview": "use iced::gradient;\nuse iced::theme;\nuse iced::widget::{checkbox, column, container, row, slider, space, text};\nuse iced"
},
{
"path": "examples/integration/.gitignore",
"chars": 12,
"preview": "*.wasm\n*.js\n"
},
{
"path": "examples/integration/Cargo.toml",
"chars": 737,
"preview": "[package]\nname = \"integration\"\nversion = \"0.1.0\"\nauthors = [\"Héctor Ramón Jiménez <hector0193@gmail.com>\"]\nedition = \"20"
},
{
"path": "examples/integration/README.md",
"chars": 384,
"preview": "## `wgpu` integration\n\nA demonstration of how to integrate Iced in an existing [`wgpu`] application.\n\nThe __[`main`]__ f"
},
{
"path": "examples/integration/src/controls.rs",
"chars": 2193,
"preview": "use iced_wgpu::Renderer;\nuse iced_widget::{bottom, column, row, slider, text, text_input};\nuse iced_winit::core::{Color,"
},
{
"path": "examples/integration/src/main.rs",
"chars": 13529,
"preview": "mod controls;\nmod scene;\n\nuse controls::Controls;\nuse scene::Scene;\n\nuse iced_wgpu::graphics::{Shell, Viewport};\nuse ice"
}
]
// ... and 342 more files (download for full content)
About this extraction
This page contains the full source code of the iced-rs/iced GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 542 files (2.9 MB), approximately 796.5k tokens, and a symbol index with 5744 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.