FTXUI/README.md

75 lines
3.3 KiB
Markdown
Raw Normal View History

2019-01-06 08:37:26 +08:00
# FTXUI
2019-01-27 23:56:37 +08:00
2020-04-10 20:46:42 +08:00
[![travis][badge.travis]][travis]
[![issues][badge.issues]][issues]
[![license][badge.license]][license]
2020-04-10 20:48:52 +08:00
[![contributors][badge.contributors]][contributors]
2020-03-27 08:20:06 +08:00
2020-04-10 20:46:42 +08:00
[badge.travis]: https://img.shields.io/travis/com/arthursonzogni/FTXUI?logo=travis
[badge.issues]: https://img.shields.io/github/issues-raw/arthursonzogni/FTXUI
[badge.license]: https://img.shields.io/github/license/arthursonzogni/FTXUI?color=black
2020-04-10 20:48:52 +08:00
[badge.contributors]: https://img.shields.io/github/contributors/arthursonzogni/FTXUI?color=blue
2020-04-10 20:46:42 +08:00
2020-04-10 20:50:52 +08:00
[travis]: https://travis-ci.org/ArthurSonzogni/FTXUI
2020-04-10 20:46:42 +08:00
[issues]: https://github.com/ArthurSonzogni/FTXUI/issues
[license]: http://opensource.org/licenses/MIT
2020-04-10 20:48:52 +08:00
[contributors]: https://github.com/ArthurSonzogni/FTXUI/graphs/contributors
2020-04-10 20:46:42 +08:00
2020-04-10 20:28:12 +08:00
**Functional Terminal (X) User interface**
A simple C++ library for terminal based user interface.
2019-01-27 23:56:37 +08:00
## Demo:
![Demo image](./examples/component/homescreen.gif)
2019-01-06 08:37:26 +08:00
## Feature
2019-01-28 00:20:55 +08:00
* Functional style. Inspired by
2019-06-30 01:05:22 +08:00
[[1]](https://hackernoon.com/building-reactive-terminal-interfaces-in-c-d392ce34e649?gi=d9fb9ce35901)
2019-01-28 00:20:55 +08:00
and [React](https://reactjs.org/)
2019-01-06 08:37:26 +08:00
* Simple and elegant syntax (in my opinion).
2019-06-30 01:05:22 +08:00
* Support for [UTF8](https://en.wikipedia.org/wiki/UTF-8) and [fullwidth chars](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) (→ 测试)
2019-01-06 08:37:26 +08:00
* No dependencies.
* Cross platform:
- Linux (main target)
- Windows (experimental, thanks to mauve@)
- Mac (never tested, but must WORK)
2019-01-19 05:45:25 +08:00
2019-01-06 08:37:26 +08:00
## Example:
~~~cpp
vbox(
hbox(
2019-01-20 05:06:05 +08:00
text(L"left") | border,
text(L"middle") | border | flex,
text(L"right") | border
2019-01-06 08:37:26 +08:00
),
2019-01-20 05:06:05 +08:00
gauge(0.5) | border
2019-01-06 08:37:26 +08:00
)
~~~
~~~bash
┌────┐┌───────────────────────────────────────────────────────────────┐┌─────┐
│left││middle ││right│
└────┘└───────────────────────────────────────────────────────────────┘└─────┘
┌────────────────────────────────────────────────────────────────────────────┐
│██████████████████████████████████████ │
└────────────────────────────────────────────────────────────────────────────┘
~~~
## Build
2019-06-30 01:05:22 +08:00
* [CMake](https://cmake.org) → [Instructions](./tutorial/build-with-cmake.md)
* [nxxm](https://nxxm.github.io) → [Instructions](./tutorial/build-with-nxxm.md)
2019-01-06 08:37:26 +08:00
## Tutorial
2020-02-12 20:54:13 +08:00
- [Starter cmake project](https://github.com/ArthurSonzogni/ftxui-starter)
- [Tutorial](./tutorial/tutorial.md)
2019-01-06 08:37:26 +08:00
2019-01-28 00:11:43 +08:00
## Project using FTXUI
2019-06-30 01:05:22 +08:00
None! This is still a newborn project. Feel free to add a link to your project
here.
2019-01-28 00:11:43 +08:00
2019-01-28 00:20:55 +08:00
## Hosted on:
* [github](https://github.com/ArthurSonzogni/ftxui)
* [gitlab](https://gitlab.com/ArthurSonzogni/ftxui)