No description
Find a file
Jonathan Johnson 0f6d3838b1
LayoutContext
measure() now is layout(). LayoutContext can either persist layout
information or be used temporarily for measurement. While this caching
is constantly thrown out currently, this is a step towards being able to
only re-layout widgets if they've been invalidated.
2023-11-05 11:50:59 -08:00
.github/workflows Adding CI 2023-11-02 10:46:43 -07:00
.rustme Animation docs, on_complete 2023-11-03 09:37:22 -07:00
examples LayoutContext 2023-11-05 11:50:59 -08:00
src LayoutContext 2023-11-05 11:50:59 -08:00
.crate-docs.md Animation docs, on_complete 2023-11-03 09:37:22 -07:00
.gitignore Initial commit 2023-10-18 08:22:41 -07:00
Cargo.lock Async, better scroll, Input::on_key 2023-11-03 07:15:34 -07:00
Cargo.toml Async, better scroll, Input::on_key 2023-11-03 07:15:34 -07:00
CODE_OF_CONDUCT.md Resize/Expand rework + basic readme 2023-11-02 14:23:36 -07:00
CONTRIBUTING.md Resize/Expand rework + basic readme 2023-11-02 14:23:36 -07:00
LICENSE-APACHE Resize/Expand rework + basic readme 2023-11-02 14:23:36 -07:00
LICENSE-MIT Resize/Expand rework + basic readme 2023-11-02 14:23:36 -07:00
README.md Animation docs, on_complete 2023-11-03 09:37:22 -07:00
rustfmt.toml Initial commit 2023-10-18 08:22:41 -07:00

Gooey

Gooey is considered experimental and unsupported crate version Documentation for main branch

Gooey is an experimental Graphical User Interface (GUI) crate for the Rust programming language. It is built using Kludgine, which is powered by winit and wgpu. It is incredibly early in development, and is being developed for a game that will hopefully be developed shortly.

The Widget trait is the building block of Gooey: Every user interface element implements Widget. A full list of built-in widgets can be found in the gooey::widgets module.

Gooey uses a reactive data model. To see an example of how reactive data models work, consider this example that displays a button that increments its own label:

// Create a dynamic usize.
let count = Dynamic::new(0_usize);

// Create a new button with a label that is produced by mapping the contents
// of `count`.
Button::new(count.map_each(ToString::to_string))
    // Set the `on_click` callback to a closure that increments the counter.
    .on_click(count.with_clone(|count| move |_| count.set(count.get() + 1)))
    // Run the button as an an application.
    .run()

Open-source Licenses

This project, like all projects from Khonsu Labs, is open-source. This repository is available under the MIT License or the Apache License 2.0.

To learn more about contributing, please see CONTRIBUTING.md.