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.
use ;
use ;
;
Getting started
Instatllation is simple with:
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.
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::<()>::new().start();
let window = Window::new().start();
Window::insert(&mut window.cx(), &event_loop);
let app = App.start();
window.bind(&app, App::event);
EventLoop::run(event_loop);
}
Instatllation is simple with:
cargo add viewbuilder --features full