| Crates.io | shoji |
| lib.rs | shoji |
| version | 0.1.0 |
| created_at | 2020-05-30 16:45:41.204181+00 |
| updated_at | 2020-05-31 04:35:03.313542+00 |
| description | A vbox/hbox layout system |
| homepage | |
| repository | https://github.com/richardanaya/shoji |
| max_upload_size | |
| id | 247741 |
| size | 21,163 |
A vbox/hbox layout library implemented in Rust.
[dependencies]
shoji = "0.0"
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)?);
}
This project is licensed under either of
at your option.
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.