FTXUI/README.md
ArthurSonzogni 08ee49f3e6 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.
2020-06-07 02:30:45 +02:00

79 lines
3.5 KiB
Markdown

# FTXUI
[![travis][badge.travis]][travis]
[![issues][badge.issues]][issues]
[![license][badge.license]][license]
[![contributors][badge.contributors]][contributors]
[badge.travis]: https://img.shields.io/travis/com/arthursonzogni/FTXUI
[badge.issues]: https://img.shields.io/github/issues-raw/arthursonzogni/FTXUI
[badge.license]: https://img.shields.io/github/license/arthursonzogni/FTXUI?color=black
[badge.contributors]: https://img.shields.io/github/contributors/arthursonzogni/FTXUI?color=blue
[travis]: https://travis-ci.com/ArthurSonzogni/FTXUI
[issues]: https://github.com/ArthurSonzogni/FTXUI/issues
[license]: http://opensource.org/licenses/MIT
[contributors]: https://github.com/ArthurSonzogni/FTXUI/graphs/contributors
**Functional Terminal (X) User interface**
A simple C++ library for terminal based user interface.
## Demo:
![Demo image](./examples/component/homescreen.gif)
## Feature
* Functional style. Inspired by
[[1]](https://hackernoon.com/building-reactive-terminal-interfaces-in-c-d392ce34e649?gi=d9fb9ce35901)
and [React](https://reactjs.org/)
* Simple and elegant syntax (in my opinion).
* Support for [UTF8](https://en.wikipedia.org/wiki/UTF-8) and [fullwidth chars](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) (→ 测试)
* No dependencies.
* Cross platform:
- Linux (main target)
- Windows (experimental, thanks to mauve@)
- Mac (never tested, but must WORK)
## Example:
~~~cpp
vbox({
hbox({
text(L"left") | border,
text(L"middle") | border | flex,
text(L"right") | border,
}),
gauge(0.5) | border,
});
~~~
~~~bash
┌────┐┌───────────────────────────────────────────────────────────────┐┌─────┐
│left││middle ││right│
└────┘└───────────────────────────────────────────────────────────────┘└─────┘
┌────────────────────────────────────────────────────────────────────────────┐
│██████████████████████████████████████ │
└────────────────────────────────────────────────────────────────────────────┘
~~~
## Build
* [CMake](https://cmake.org) → [Instructions](./tutorial/build-with-cmake.md)
* [nxxm](https://nxxm.github.io) → [Instructions](./tutorial/build-with-nxxm.md)
## Tutorial
- [Starter cmake project](https://github.com/ArthurSonzogni/ftxui-starter)
- [Tutorial](./tutorial/tutorial.md)
## Project using FTXUI
Feel free to add your projects here:
- [chrome-log-beautifier](https://github.com/ArthurSonzogni/chrome-log-beautifier)
- [x86-64 CPU Architecture Simulation](https://github.com/AnisBdz/CPU)
- [i3-termdialogs](https://github.com/mibli/i3-termdialogs)
- [Just-Fast](https://github.com/GiuseppeCesarano/just-fast)
## Hosted on:
* [github](https://github.com/ArthurSonzogni/ftxui)
* [gitlab](https://gitlab.com/ArthurSonzogni/ftxui)