shoji

Crates.ioshoji
lib.rsshoji
version0.1.0
sourcesrc
created_at2020-05-30 16:45:41.204181
updated_at2020-05-31 04:35:03.313542
descriptionA vbox/hbox layout system
homepage
repositoryhttps://github.com/richardanaya/shoji
max_upload_size
id247741
size21,163
RICHΛRD ΛNΛYΛ (richardanaya)

documentation

README

shoji

docs.rs docs

A vbox/hbox layout library implemented in Rust.

[dependencies]
shoji = "0.0"

Example

use shoji::*;

fn main() -> Result<(), &'static str> {
    let mut shoji = Shoji::new();
    
    let child = shoji.new_node(
        LayoutStyle { ..Default::default() },
        vec![],
    )?;

    let node = shoji.new_node(
        LayoutStyle {
            direction: Direction::TopBottom,
            ..Default::default()
        },
        vec![child],
    )?;

    shoji.compute_layout(node, Size::undefined())?;
    dbg!(shoji.layout(node)?);
}

License

This project is licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in shoji by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Commit count: 38

cargo fmt