tuix

Crates.iotuix
lib.rstuix
version0.2.0
sourcesrc
created_at2020-12-16 14:55:56.082766
updated_at2021-09-18 01:07:44.160285
descriptionCross-platform GUI toolkit
homepage
repositoryhttps://github.com/geom3trik/tuix
max_upload_size
id323610
size9,772,616
Dr George Atkinson (geom3trik)

documentation

README

logo


GitHub Build Discord

Tuix is a cross-platform GUI toolkit written in Rust.

The driving principle behind tuix is to be a self-contained, small-as-possible, but still fast, toolkit for creating graphical user interfaces in Rust.

calculator

Features

  • Build Cross-Platform Applications
  • Flexible Layout
  • Fully Customisable Styling
  • Animatable Style Properties
  • A Reactive Data Model
  • Numerous Built-In Widgets
  • Custom Widgets

editor

Including tuix

Add tuix to your project by adding tuix = {git = "https://github.com/geom3trik/tuix", branch = "main"} to your projects Cargo.toml under dependencies.

Getting Started

Running Examples

You can run any of the examples with:

cargo run --example example_name

To run any example with the baseview backend:

cargo run --example example_name --no-default-features --features "baseview"

Hello GUI

Since it's probably best to learn by example, here is the "hello world" of GUI applications in tuix:

use tuix::*;

fn main() {

    let app = Application::new(WindowDescription::new().with_title("Hello GUI"), |state, window| {
        
        Button::with_label("Button")
            .build(state, window.entity(), |builder| {
                builder
                    .set_width(Pixels(100.0))
                    .set_height(Pixels(30.0))
                    .set_background_color(Color::from("#ff5e1a"))
                    .set_child_space(Stretch(1.0))
            });
    });

    app.run();
}

You can run this example with: cargo run --example hello_gui

Tuix Book (In Development)

The Book

Commit count: 489

cargo fmt