Expand description
§Rust Widget Toolkit
Wtk is a simple widget toolkit.
use wtk::prelude::*;
fn main() {
let mut app = App::<SDLBackend>::new("WTK button example");
let button = Button::new("clickme", |b| {
b.set_text("clicked");
});
app.add_widget(button.shared());
app.run();
}§Embedding
You don’t need to use App, you may embed wtk by directly utilizing a DrawBackend. See the embedded.rs example.
§log crate compatibility
Enable the log feature in wtk to make wtk log using log. You can then display those logs with something like env_logger. See the logger.rs example.
Modules§
- app
- backends
- draw
- Home of most drawing functions.
- elm
- A collection of helper traits and macros for creating an Elm Architecture like app.
- event
- font
- macros
- pixels
- prelude
- rect
- theme
- widgets