Skip to content

Commit

Permalink
Fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
matthunz committed Dec 15, 2023
1 parent 7016143 commit 004025f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "viewbuilder"
version = "0.9.0"
version = "0.9.1"
edition = "2021"
license = "MIT OR Apache-2.0"
description = "Cross-platform UI framework"
Expand Down
16 changes: 13 additions & 3 deletions src/window/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,24 @@ enum WindowState {
/// 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 {}
///
/// 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);
/// ```
pub struct Window {
Expand Down

0 comments on commit 004025f

Please sign in to comment.