viewbuilder 0.9.3

Cross-platform UI framework
Documentation

A cross-platform user interface framework for Rust.

Viewbuilder is a moduler GUI library that can be used as an entire framework, or with individual parts. This crate provides reactive objects for UI using the concoct runtime.

use concoct::{Context, Object};
use viewbuilder::{event_loop::WindowEvent, EventLoop, Window};

struct App;

impl App {
    pub fn event(_cx: &mut Context<Self>, event: WindowEvent) {
        dbg!(event);
    }
}

impl Object for App {}

fn main() {
    let event_loop = EventLoop::<()>::create();

    let window = Window::create();
    Window::insert(&mut window.cx(), &event_loop);

    let app = App.start();
    window.bind(&app, App::event);

    EventLoop::run(event_loop);
}

Getting started

Instatllation is simple with:

cargo add viewbuilder --features full