Add flex_grow and flex_shrink.

Two new elements:
- flex_grow  : Expand the element to occupy free space.
- flex_shrink: Minimize the element leave away missing space.

flex = flex_grow | flex_shrink.

Other changes:
- hbox and vbox are now non flexible by default.
- the vtext element has been added to help writting tests.
- Many new tests.
This commit is contained in:
ArthurSonzogni
2020-06-01 23:40:32 +02:00
committed by Arthur Sonzogni
parent 7f7775ba62
commit 08ee49f3e6
17 changed files with 929 additions and 189 deletions

View File

@@ -41,10 +41,10 @@ A simple C++ library for terminal based user interface.
hbox({
text(L"left") | border,
text(L"middle") | border | flex,
text(L"right") | border
text(L"right") | border,
}),
gauge(0.5) | border
})
gauge(0.5) | border,
});
~~~
~~~bash