-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
86b9e3d
commit 3a626dc
Showing
1 changed file
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,29 @@ | ||
# taitank-safe | ||
# Taitank Safe | ||
|
||
(In Progress) Rust binding of [tencent/taitank](https:://github.com/tencent/taitank) provides safe binding to the Taitank Layout Library. | ||
|
||
## Usage | ||
|
||
```toml | ||
[dependencies] | ||
taitank_safe = "0.0.1" | ||
``` | ||
|
||
```rust | ||
use taitank_safe::*; | ||
|
||
let mut root = node_create(); | ||
set_width(&mut root, 100.0); | ||
set_height(&mut root, 100.0); | ||
|
||
let mut root_child0 = node_create(); | ||
set_flex_grow(&mut root_child0, 1.0); | ||
set_flex_basis(&mut root_child0, 50.0); | ||
insert_child(&mut root, &mut root_child0, 0); | ||
|
||
let mut root_child1 = node_create(); | ||
set_flex_grow(&mut root_child1, 1.0); | ||
insert_child(&mut root, &mut root_child1, 1); | ||
|
||
layout!(&mut root); | ||
``` |