mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-12-16 01:48:56 +08:00
Compare commits
48 Commits
v6.0.2
...
88a9132d75
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
88a9132d75 | ||
|
|
83b83e30ec | ||
|
|
bc45cd6ad5 | ||
|
|
cdf8144bf1 | ||
|
|
ed5f04ccc0 | ||
|
|
4b8c8ea00d | ||
|
|
08b8a3b28f | ||
|
|
9e1120c146 | ||
|
|
5cfed50702 | ||
|
|
b307a175ed | ||
|
|
4604adb502 | ||
|
|
006ec1cbed | ||
|
|
add5f40d31 | ||
|
|
16c25ae441 | ||
|
|
805db9bdea | ||
|
|
784f53fd7e | ||
|
|
799d8a267e | ||
|
|
f4513702b0 | ||
|
|
ba6716c6e1 | ||
|
|
694fa6bf5c | ||
|
|
625915b52c | ||
|
|
2d4c114008 | ||
|
|
aa80d8bac9 | ||
|
|
05b4bffe3b | ||
|
|
bcdcf70348 | ||
|
|
4231c4903b | ||
|
|
10d73d365f | ||
|
|
ffc6dcd3bf | ||
|
|
f6dceabdc9 | ||
|
|
cb8ebdeb44 | ||
|
|
dd37fba100 | ||
|
|
4d627c1ffb | ||
|
|
1dff6a5c35 | ||
|
|
0c67566427 | ||
|
|
85c3dc45ca | ||
|
|
84f691e9d3 | ||
|
|
07fd3e685a | ||
|
|
2e36aa061a | ||
|
|
8ed06a4812 | ||
|
|
571f6dcdcf | ||
|
|
e57c275512 | ||
|
|
1c37cdd192 | ||
|
|
772d4ebeed | ||
|
|
5f5bc9019d | ||
|
|
f87b6a4d12 | ||
|
|
0d50fa25fe | ||
|
|
730ebeed1d | ||
|
|
69928b374e |
7
.bazelrc
Normal file
7
.bazelrc
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
build --features=layering_check
|
||||||
|
build --enable_bzlmod
|
||||||
|
|
||||||
|
build --enable_platform_specific_config
|
||||||
|
build:linux --cxxopt=-std=c++20
|
||||||
|
build:macos --cxxopt=-std=c++20
|
||||||
|
build:windows --cxxopt=-std:c++20
|
||||||
9
.bcr/README.md
Normal file
9
.bcr/README.md
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# Bazel Central Registry
|
||||||
|
|
||||||
|
When the ruleset is released, we want it to be published to the
|
||||||
|
Bazel Central Registry automatically:
|
||||||
|
<https://registry.bazel.build>
|
||||||
|
|
||||||
|
This folder contains configuration files to automate the publish step.
|
||||||
|
See <https://github.com/bazel-contrib/publish-to-bcr/blob/main/templates/README.md>
|
||||||
|
for authoritative documentation about these files.
|
||||||
16
.bcr/metadata.template.json
Normal file
16
.bcr/metadata.template.json
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"homepage": "https://github.com/ArthurSonzogni/FTXUI",
|
||||||
|
"maintainers": [
|
||||||
|
{
|
||||||
|
"name": "Arthur Sonzogni",
|
||||||
|
"email": "sonzogniarthur@gmail.com",
|
||||||
|
"github": "ArthurSonzogni",
|
||||||
|
"github_user_id": 4759106
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"repository": [
|
||||||
|
"github:ArthurSonzogni/FTXUI"
|
||||||
|
],
|
||||||
|
"versions": [],
|
||||||
|
"yanked_versions": {}
|
||||||
|
}
|
||||||
36
.bcr/presubmit.yml
Normal file
36
.bcr/presubmit.yml
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
matrix:
|
||||||
|
bazel:
|
||||||
|
- 7.x
|
||||||
|
- 8.x
|
||||||
|
- rolling
|
||||||
|
unix_platform:
|
||||||
|
- debian11
|
||||||
|
- ubuntu2204
|
||||||
|
- macos
|
||||||
|
- macos_arm64
|
||||||
|
win_platform:
|
||||||
|
- windows
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
|
||||||
|
unix_test:
|
||||||
|
name: Verify build targets on Unix
|
||||||
|
platform: ${{ unix_platform }}
|
||||||
|
bazel: ${{ bazel }}
|
||||||
|
build_flags:
|
||||||
|
- --cxxopt=-std=c++20
|
||||||
|
build_targets:
|
||||||
|
- '@ftxui//:dom'
|
||||||
|
- '@ftxui//:component'
|
||||||
|
- '@ftxui//:screen'
|
||||||
|
|
||||||
|
windows_test:
|
||||||
|
name: Verify build targets
|
||||||
|
platform: ${{ win_platform }}
|
||||||
|
bazel: ${{ bazel }}
|
||||||
|
build_flags:
|
||||||
|
- --cxxopt=/std:c++20
|
||||||
|
build_targets:
|
||||||
|
- '@ftxui//:dom'
|
||||||
|
- '@ftxui//:component'
|
||||||
|
- '@ftxui//:screen'
|
||||||
5
.bcr/source.template.json
Normal file
5
.bcr/source.template.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"integrity": "",
|
||||||
|
"strip_prefix": "",
|
||||||
|
"url": "https://github.com/ArthurSonzogni/FTXUI/releases/download/{TAG}/source.tar.gz"
|
||||||
|
}
|
||||||
125
.github/workflows/build.yaml
vendored
125
.github/workflows/build.yaml
vendored
@@ -1,17 +1,63 @@
|
|||||||
name: Build
|
name: Build
|
||||||
|
|
||||||
on:
|
on:
|
||||||
create:
|
# On new commits to main:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
|
# On pull requests:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
|
||||||
name: "Tests"
|
test_bazel:
|
||||||
|
name: "Bazel, ${{ matrix.cxx }}, ${{ matrix.os }}"
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: ubuntu-latest
|
||||||
|
cxx: g++
|
||||||
|
cc: gcc
|
||||||
|
|
||||||
|
- os: ubuntu-latest
|
||||||
|
cxx: clang++
|
||||||
|
cc: clang
|
||||||
|
|
||||||
|
- os: macos-latest
|
||||||
|
cxx: g++
|
||||||
|
cc: gcc
|
||||||
|
|
||||||
|
- os: macos-latest
|
||||||
|
cxx: clang++
|
||||||
|
cc: clang
|
||||||
|
|
||||||
|
- os: windows-latest
|
||||||
|
cxx: cl
|
||||||
|
cc: cl
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- name: "Checkout repository"
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: "Build with Bazel"
|
||||||
|
env:
|
||||||
|
CC: ${{ matrix.cc }}
|
||||||
|
CXX: ${{ matrix.cxx }}
|
||||||
|
run: bazel build ...
|
||||||
|
|
||||||
|
- name: "Tests with Bazel"
|
||||||
|
env:
|
||||||
|
CC: ${{ matrix.cc }}
|
||||||
|
CXX: ${{ matrix.cxx }}
|
||||||
|
run: bazel test --test_output=all ...
|
||||||
|
|
||||||
|
test_cmake:
|
||||||
|
name: "CMake, ${{ matrix.compiler }}, ${{ matrix.os }}"
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -120,9 +166,55 @@ jobs:
|
|||||||
name: ${{ runner.os }}-coverage
|
name: ${{ runner.os }}-coverage
|
||||||
files: ./build/coverage.xml
|
files: ./build/coverage.xml
|
||||||
|
|
||||||
|
test_modules:
|
||||||
|
name: "Test modules"
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: ubuntu-latest
|
||||||
|
compiler: llvm
|
||||||
|
# TODO add gcc / msvc
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- name: "Checkout repository"
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: "Setup Cpp"
|
||||||
|
uses: aminya/setup-cpp@v1
|
||||||
|
with:
|
||||||
|
compiler: ${{ matrix.compiler }}
|
||||||
|
vcvarsall: ${{ contains(matrix.os, 'windows' )}}
|
||||||
|
cmake: true
|
||||||
|
ninja: true
|
||||||
|
clangtidy: false
|
||||||
|
cppcheck: false
|
||||||
|
opencppcoverage: false
|
||||||
|
|
||||||
|
- name: "Generate ./examples_modules"
|
||||||
|
run: >
|
||||||
|
./tools/generate_examples_modules.sh
|
||||||
|
|
||||||
|
- name: "Build modules"
|
||||||
|
run: >
|
||||||
|
mkdir build;
|
||||||
|
cd build;
|
||||||
|
cmake ..
|
||||||
|
-DCMAKE_GENERATOR=Ninja
|
||||||
|
-DFTXUI_BUILD_MODULES=ON
|
||||||
|
-DFTXUI_BUILD_EXAMPLES=ON
|
||||||
|
-DCMAKE_BUILD_TYPE=Debug
|
||||||
|
-DFTXUI_BUILD_DOCS=OFF
|
||||||
|
-DFTXUI_BUILD_TESTS=OFF
|
||||||
|
-DFTXUI_BUILD_TESTS_FUZZER=OFF
|
||||||
|
-DFTXUI_ENABLE_INSTALL=ON
|
||||||
|
-DFTXUI_DEV_WARNINGS=ON ;
|
||||||
|
cmake --build .
|
||||||
|
|
||||||
# Create a release on new v* tags
|
# Create a release on new v* tags
|
||||||
release:
|
release:
|
||||||
needs: test
|
needs:
|
||||||
|
- test_cmake
|
||||||
|
- test_bazel
|
||||||
if: ${{ github.event_name == 'create' && startsWith(github.ref, 'refs/tags/v') }}
|
if: ${{ github.event_name == 'create' && startsWith(github.ref, 'refs/tags/v') }}
|
||||||
name: "Create release"
|
name: "Create release"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -138,7 +230,7 @@ jobs:
|
|||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
# Build artifact for the release
|
# Build artifact for the release
|
||||||
package:
|
package_compiled:
|
||||||
name: "Build packages"
|
name: "Build packages"
|
||||||
needs: release
|
needs: release
|
||||||
strategy:
|
strategy:
|
||||||
@@ -182,6 +274,29 @@ jobs:
|
|||||||
upload_url: ${{ needs.release.outputs.upload_url }}
|
upload_url: ${{ needs.release.outputs.upload_url }}
|
||||||
asset_path: ${{ matrix.asset_path }}
|
asset_path: ${{ matrix.asset_path }}
|
||||||
overwrite: true
|
overwrite: true
|
||||||
|
|
||||||
|
# Build "source" artifact for the release. This is the same as the github
|
||||||
|
# "source" archive, but with a stable URL. This is useful for the Bazel
|
||||||
|
# Central Repository.
|
||||||
|
package_source:
|
||||||
|
name: "Build source package"
|
||||||
|
needs: release
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: "Checkout repository"
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: "Create source package"
|
||||||
|
run: >
|
||||||
|
git archive --format=tar.gz -o source.tar.gz HEAD
|
||||||
|
|
||||||
|
- name: "Upload source package"
|
||||||
|
uses: shogo82148/actions-upload-release-asset@v1
|
||||||
|
with:
|
||||||
|
upload_url: ${{ needs.release.outputs.upload_url }}
|
||||||
|
asset_path: source.tar.gz
|
||||||
|
overwrite: true
|
||||||
|
|
||||||
|
|
||||||
documentation:
|
documentation:
|
||||||
if: github.ref == 'refs/heads/main'
|
if: github.ref == 'refs/heads/main'
|
||||||
|
|||||||
60
.github/workflows/documentation.yaml
vendored
Normal file
60
.github/workflows/documentation.yaml
vendored
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
name: Documentation
|
||||||
|
|
||||||
|
on:
|
||||||
|
# On new commits to main:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
documentation:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: "Checkout repository"
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: "Install cmake"
|
||||||
|
uses: lukka/get-cmake@latest
|
||||||
|
|
||||||
|
- name: "Install emsdk"
|
||||||
|
uses: mymindstorm/setup-emsdk@v7
|
||||||
|
|
||||||
|
- name: "Install Doxygen/Graphviz"
|
||||||
|
run: >
|
||||||
|
sudo apt-get update;
|
||||||
|
sudo apt-get install doxygen graphviz;
|
||||||
|
|
||||||
|
- name: "Build documentation"
|
||||||
|
run: >
|
||||||
|
mkdir build;
|
||||||
|
cd build;
|
||||||
|
emcmake cmake ..
|
||||||
|
-DCMAKE_BUILD_TYPE=Release
|
||||||
|
-DFTXUI_BUILD_DOCS=ON
|
||||||
|
-DFTXUI_BUILD_EXAMPLES=ON
|
||||||
|
-DFTXUI_BUILD_TESTS=OFF
|
||||||
|
-DFTXUI_BUILD_TESTS_FUZZER=OFF
|
||||||
|
-DFTXUI_ENABLE_INSTALL=OFF
|
||||||
|
-DFTXUI_DEV_WARNINGS=ON ;
|
||||||
|
cmake --build . --target doc;
|
||||||
|
cmake --build . ;
|
||||||
|
rsync -amv
|
||||||
|
--include='*/'
|
||||||
|
--include='*.html'
|
||||||
|
--include='*.css'
|
||||||
|
--include='*.mjs'
|
||||||
|
--include='*.js'
|
||||||
|
--include='*.wasm'
|
||||||
|
--exclude='*'
|
||||||
|
examples
|
||||||
|
doc/doxygen/html;
|
||||||
|
|
||||||
|
- name: "Deploy"
|
||||||
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
publish_dir: build/doc/doxygen/html/
|
||||||
|
enable_jekyll: false
|
||||||
|
allow_empty_commit: false
|
||||||
|
force_orphan: true
|
||||||
|
publish_branch: gh-pages
|
||||||
24
.github/workflows/publish.yaml
vendored
Normal file
24
.github/workflows/publish.yaml
vendored
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
name: "Publish to Bazel Central Registry"
|
||||||
|
|
||||||
|
on:
|
||||||
|
# Manual kick-off (you type the tag)
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
tag_name:
|
||||||
|
description: "Tag to publish"
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
uses: bazel-contrib/publish-to-bcr/.github/workflows/publish.yaml@v0.0.4
|
||||||
|
with:
|
||||||
|
tag_name: ${{ github.event.inputs.tag_name }}
|
||||||
|
registry_fork: ArthurSonzogni/bazel-central-registry
|
||||||
|
attest: false
|
||||||
|
|
||||||
|
secrets:
|
||||||
|
publish_token: ${{ secrets.PUBLISH_TOKEN }}
|
||||||
100
.github/workflows/release.yaml
vendored
Normal file
100
.github/workflows/release.yaml
vendored
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
name: Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
# On push to a tag:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
|
||||||
|
# On manual trigger:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
# Needed to mint attestations
|
||||||
|
id-token: write
|
||||||
|
attestations: write
|
||||||
|
# Needed to upload release assets
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
name: "Create release"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
|
steps:
|
||||||
|
- name: "Create release"
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
id: create_release
|
||||||
|
with:
|
||||||
|
draft: true
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
# Build artifact for the release
|
||||||
|
package_compiled:
|
||||||
|
name: "Build packages"
|
||||||
|
needs: release
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: ubuntu-latest
|
||||||
|
asset_path: build/ftxui*Linux*
|
||||||
|
- os: macos-latest
|
||||||
|
asset_path: build/ftxui*Darwin*
|
||||||
|
- os: windows-latest
|
||||||
|
asset_path: build/ftxui*Win64*
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- name: Get number of CPU cores
|
||||||
|
uses: SimenB/github-actions-cpu-cores@v1
|
||||||
|
id: cpu-cores
|
||||||
|
|
||||||
|
- name: "Checkout repository"
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: "Install cmake"
|
||||||
|
uses: lukka/get-cmake@latest
|
||||||
|
|
||||||
|
- name: "Build packages"
|
||||||
|
run: >
|
||||||
|
mkdir build;
|
||||||
|
cd build;
|
||||||
|
cmake ..
|
||||||
|
-DCMAKE_BUILD_TYPE=Release
|
||||||
|
-DCMAKE_BUILD_PARALLEL_LEVEL=${{ steps.cpu-cores.outputs.count }}
|
||||||
|
-DFTXUI_BUILD_DOCS=OFF
|
||||||
|
-DFTXUI_BUILD_EXAMPLES=OFF
|
||||||
|
-DFTXUI_BUILD_TESTS=OFF
|
||||||
|
-DFTXUI_BUILD_TESTS_FUZZER=OFF
|
||||||
|
-DFTXUI_ENABLE_INSTALL=ON
|
||||||
|
-DFTXUI_DEV_WARNINGS=ON ;
|
||||||
|
cmake --build . --target package;
|
||||||
|
|
||||||
|
- uses: shogo82148/actions-upload-release-asset@v1
|
||||||
|
with:
|
||||||
|
upload_url: ${{ needs.release.outputs.upload_url }}
|
||||||
|
asset_path: ${{ matrix.asset_path }}
|
||||||
|
overwrite: true
|
||||||
|
|
||||||
|
# Build "source" artifact for the release. This is the same as the github
|
||||||
|
# "source" archive, but with a stable URL. This is useful for the Bazel
|
||||||
|
# Central Repository.
|
||||||
|
package_source:
|
||||||
|
name: "Build source package"
|
||||||
|
needs: release
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: "Checkout repository"
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: "Create source package"
|
||||||
|
run: >
|
||||||
|
git archive --format=tar.gz -o source.tar.gz HEAD
|
||||||
|
|
||||||
|
- name: "Upload source package"
|
||||||
|
uses: shogo82148/actions-upload-release-asset@v1
|
||||||
|
with:
|
||||||
|
upload_url: ${{ needs.release.outputs.upload_url }}
|
||||||
|
asset_path: source.tar.gz
|
||||||
|
overwrite: true
|
||||||
10
.gitignore
vendored
10
.gitignore
vendored
@@ -20,6 +20,10 @@ out/
|
|||||||
!flake.nix
|
!flake.nix
|
||||||
!ftxui.pc.in
|
!ftxui.pc.in
|
||||||
!iwyu.imp
|
!iwyu.imp
|
||||||
|
!WORKSPACE.bazel
|
||||||
|
!BUILD.bazel
|
||||||
|
!MODULE.bazel
|
||||||
|
!.bazelrc
|
||||||
|
|
||||||
# .github directory:
|
# .github directory:
|
||||||
!.github/**/*.yaml
|
!.github/**/*.yaml
|
||||||
@@ -29,6 +33,10 @@ out/
|
|||||||
!cmake/**/*.in
|
!cmake/**/*.in
|
||||||
!cmake/**/*.cmake
|
!cmake/**/*.cmake
|
||||||
|
|
||||||
|
# bazel directory:
|
||||||
|
!bazel/**/*.bzl
|
||||||
|
!.bcr/*
|
||||||
|
|
||||||
# doc directory:
|
# doc directory:
|
||||||
!doc/**/Doxyfile.in
|
!doc/**/Doxyfile.in
|
||||||
!doc/**/*.txt
|
!doc/**/*.txt
|
||||||
@@ -54,8 +62,10 @@ out/
|
|||||||
!include/ftxui/**/*.cpp
|
!include/ftxui/**/*.cpp
|
||||||
|
|
||||||
# src directory:
|
# src directory:
|
||||||
|
!src/ftxui/*.cppm
|
||||||
!src/ftxui/**/*.hpp
|
!src/ftxui/**/*.hpp
|
||||||
!src/ftxui/**/*.cpp
|
!src/ftxui/**/*.cpp
|
||||||
|
!src/ftxui/**/*.cppm
|
||||||
|
|
||||||
# tools directory:
|
# tools directory:
|
||||||
!tools/**/*.sh
|
!tools/**/*.sh
|
||||||
|
|||||||
270
BUILD.bazel
Normal file
270
BUILD.bazel
Normal file
@@ -0,0 +1,270 @@
|
|||||||
|
# Copyright 2025 Arthur Sonzogni. All rights reserved.
|
||||||
|
# Use of this source code is governed by the MIT license that can be found in
|
||||||
|
# the LICENSE file.
|
||||||
|
|
||||||
|
# TODO:
|
||||||
|
# - Build benchmark.
|
||||||
|
# - Build fuzzers.
|
||||||
|
# - Build documentation.
|
||||||
|
# - Enable the two tests timing out.
|
||||||
|
# - Support WebAssembly
|
||||||
|
|
||||||
|
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_test")
|
||||||
|
load(":bazel/ftxui.bzl", "ftxui_cc_library")
|
||||||
|
load(":bazel/ftxui.bzl", "generate_examples")
|
||||||
|
load(":bazel/ftxui.bzl", "windows_copts")
|
||||||
|
load(":bazel/ftxui.bzl", "pthread_linkopts")
|
||||||
|
|
||||||
|
# A meta target depending on all of the ftxui submodules.
|
||||||
|
# Note that component depends on dom and screen, so ftxui is just an alias for
|
||||||
|
# component.
|
||||||
|
# ┌component──┐
|
||||||
|
# │┌dom──────┐│
|
||||||
|
# ││┌screen─┐││
|
||||||
|
# └┴┴───────┴┴┘
|
||||||
|
alias(name = "ftxui", actual = ":component")
|
||||||
|
|
||||||
|
# @ftxui:screen is a module that provides a screen buffer and color management
|
||||||
|
# for terminal applications. A screen is a 2D array of cells, each cell can
|
||||||
|
# contain a glyph, a color, and other attributes. The library also provides
|
||||||
|
# functions to manipulate the screen.
|
||||||
|
ftxui_cc_library(
|
||||||
|
name = "screen",
|
||||||
|
srcs = [
|
||||||
|
"src/ftxui/screen/box.cpp",
|
||||||
|
"src/ftxui/screen/color.cpp",
|
||||||
|
"src/ftxui/screen/color_info.cpp",
|
||||||
|
"src/ftxui/screen/image.cpp",
|
||||||
|
"src/ftxui/screen/screen.cpp",
|
||||||
|
"src/ftxui/screen/string.cpp",
|
||||||
|
"src/ftxui/screen/string_internal.hpp",
|
||||||
|
"src/ftxui/screen/terminal.cpp",
|
||||||
|
"src/ftxui/screen/util.hpp",
|
||||||
|
],
|
||||||
|
hdrs = [
|
||||||
|
"include/ftxui/screen/box.hpp",
|
||||||
|
"include/ftxui/screen/color.hpp",
|
||||||
|
"include/ftxui/screen/color_info.hpp",
|
||||||
|
"include/ftxui/screen/deprecated.hpp",
|
||||||
|
"include/ftxui/screen/image.hpp",
|
||||||
|
"include/ftxui/screen/pixel.hpp",
|
||||||
|
"include/ftxui/screen/screen.hpp",
|
||||||
|
"include/ftxui/screen/string.hpp",
|
||||||
|
"include/ftxui/screen/terminal.hpp",
|
||||||
|
"include/ftxui/util/autoreset.hpp",
|
||||||
|
"include/ftxui/util/ref.hpp",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
# @ftxui:dom is a library that provides a way to create and manipulate a
|
||||||
|
# "document" that can be rendered to a screen. The document is a tree of nodes.
|
||||||
|
# Nodes can be text, layouts, or various decorators. Users needs to compose
|
||||||
|
# nodes to create a document. A document is responsive to the size of the
|
||||||
|
# screen.
|
||||||
|
ftxui_cc_library(
|
||||||
|
name = "dom",
|
||||||
|
srcs = [
|
||||||
|
"src/ftxui/dom/automerge.cpp",
|
||||||
|
"src/ftxui/dom/blink.cpp",
|
||||||
|
"src/ftxui/dom/bold.cpp",
|
||||||
|
"src/ftxui/dom/border.cpp",
|
||||||
|
"src/ftxui/dom/box_helper.cpp",
|
||||||
|
"src/ftxui/dom/box_helper.hpp",
|
||||||
|
"src/ftxui/dom/canvas.cpp",
|
||||||
|
"src/ftxui/dom/clear_under.cpp",
|
||||||
|
"src/ftxui/dom/color.cpp",
|
||||||
|
"src/ftxui/dom/composite_decorator.cpp",
|
||||||
|
"src/ftxui/dom/dbox.cpp",
|
||||||
|
"src/ftxui/dom/dim.cpp",
|
||||||
|
"src/ftxui/dom/flex.cpp",
|
||||||
|
"src/ftxui/dom/flexbox.cpp",
|
||||||
|
"src/ftxui/dom/flexbox_config.cpp",
|
||||||
|
"src/ftxui/dom/flexbox_helper.cpp",
|
||||||
|
"src/ftxui/dom/flexbox_helper.hpp",
|
||||||
|
"src/ftxui/dom/focus.cpp",
|
||||||
|
"src/ftxui/dom/frame.cpp",
|
||||||
|
"src/ftxui/dom/gauge.cpp",
|
||||||
|
"src/ftxui/dom/graph.cpp",
|
||||||
|
"src/ftxui/dom/gridbox.cpp",
|
||||||
|
"src/ftxui/dom/hbox.cpp",
|
||||||
|
"src/ftxui/dom/hyperlink.cpp",
|
||||||
|
"src/ftxui/dom/inverted.cpp",
|
||||||
|
"src/ftxui/dom/italic.cpp",
|
||||||
|
"src/ftxui/dom/linear_gradient.cpp",
|
||||||
|
"src/ftxui/dom/node.cpp",
|
||||||
|
"src/ftxui/dom/node_decorator.cpp",
|
||||||
|
"src/ftxui/dom/node_decorator.hpp",
|
||||||
|
"src/ftxui/dom/paragraph.cpp",
|
||||||
|
"src/ftxui/dom/reflect.cpp",
|
||||||
|
"src/ftxui/dom/scroll_indicator.cpp",
|
||||||
|
"src/ftxui/dom/selection.cpp",
|
||||||
|
"src/ftxui/dom/selection_style.cpp",
|
||||||
|
"src/ftxui/dom/separator.cpp",
|
||||||
|
"src/ftxui/dom/size.cpp",
|
||||||
|
"src/ftxui/dom/spinner.cpp",
|
||||||
|
"src/ftxui/dom/strikethrough.cpp",
|
||||||
|
"src/ftxui/dom/table.cpp",
|
||||||
|
"src/ftxui/dom/text.cpp",
|
||||||
|
"src/ftxui/dom/underlined.cpp",
|
||||||
|
"src/ftxui/dom/underlined_double.cpp",
|
||||||
|
"src/ftxui/dom/util.cpp",
|
||||||
|
"src/ftxui/dom/vbox.cpp",
|
||||||
|
],
|
||||||
|
hdrs = [
|
||||||
|
"include/ftxui/dom/canvas.hpp",
|
||||||
|
"include/ftxui/dom/deprecated.hpp",
|
||||||
|
"include/ftxui/dom/direction.hpp",
|
||||||
|
"include/ftxui/dom/elements.hpp",
|
||||||
|
"include/ftxui/dom/flexbox_config.hpp",
|
||||||
|
"include/ftxui/dom/linear_gradient.hpp",
|
||||||
|
"include/ftxui/dom/node.hpp",
|
||||||
|
"include/ftxui/dom/requirement.hpp",
|
||||||
|
"include/ftxui/dom/selection.hpp",
|
||||||
|
"include/ftxui/dom/table.hpp",
|
||||||
|
"include/ftxui/dom/take_any_args.hpp",
|
||||||
|
],
|
||||||
|
deps = [":screen"],
|
||||||
|
)
|
||||||
|
|
||||||
|
# @ftxui:component is a library to create "dynamic" component renderering and
|
||||||
|
# updating a ftxui::dom document on the screen. It is a higher level API than
|
||||||
|
# ftxui:dom.
|
||||||
|
#
|
||||||
|
# The module is required if your program needs to respond to user input. It
|
||||||
|
# defines a set of ftxui::Component. These components can be utilized to
|
||||||
|
# navigate using the arrow keys and/or cursor. There are several builtin widgets
|
||||||
|
# like checkbox/inputbox/etc to interact with. You can combine them, or even
|
||||||
|
# define your own custom components.
|
||||||
|
ftxui_cc_library(
|
||||||
|
name = "component",
|
||||||
|
srcs = [
|
||||||
|
"src/ftxui/component/animation.cpp",
|
||||||
|
"src/ftxui/component/button.cpp",
|
||||||
|
"src/ftxui/component/catch_event.cpp",
|
||||||
|
"src/ftxui/component/checkbox.cpp",
|
||||||
|
"src/ftxui/component/collapsible.cpp",
|
||||||
|
"src/ftxui/component/component.cpp",
|
||||||
|
"src/ftxui/component/component_options.cpp",
|
||||||
|
"src/ftxui/component/container.cpp",
|
||||||
|
"src/ftxui/component/dropdown.cpp",
|
||||||
|
"src/ftxui/component/event.cpp",
|
||||||
|
"src/ftxui/component/hoverable.cpp",
|
||||||
|
"src/ftxui/component/input.cpp",
|
||||||
|
"src/ftxui/component/loop.cpp",
|
||||||
|
"src/ftxui/component/maybe.cpp",
|
||||||
|
"src/ftxui/component/menu.cpp",
|
||||||
|
"src/ftxui/component/modal.cpp",
|
||||||
|
"src/ftxui/component/radiobox.cpp",
|
||||||
|
"src/ftxui/component/renderer.cpp",
|
||||||
|
"src/ftxui/component/resizable_split.cpp",
|
||||||
|
"src/ftxui/component/screen_interactive.cpp",
|
||||||
|
"src/ftxui/component/slider.cpp",
|
||||||
|
"src/ftxui/component/terminal_input_parser.cpp",
|
||||||
|
"src/ftxui/component/terminal_input_parser.hpp",
|
||||||
|
"src/ftxui/component/util.cpp",
|
||||||
|
"src/ftxui/component/window.cpp",
|
||||||
|
|
||||||
|
# Private header from ftxui:dom.
|
||||||
|
"src/ftxui/dom/node_decorator.hpp",
|
||||||
|
|
||||||
|
# Private header from ftxui:screen.
|
||||||
|
"src/ftxui/screen/string_internal.hpp",
|
||||||
|
"src/ftxui/screen/util.hpp",
|
||||||
|
],
|
||||||
|
hdrs = [
|
||||||
|
"include/ftxui/component/animation.hpp",
|
||||||
|
"include/ftxui/component/captured_mouse.hpp",
|
||||||
|
"include/ftxui/component/component.hpp",
|
||||||
|
"include/ftxui/component/component_base.hpp",
|
||||||
|
"include/ftxui/component/component_options.hpp",
|
||||||
|
"include/ftxui/component/event.hpp",
|
||||||
|
"include/ftxui/component/loop.hpp",
|
||||||
|
"include/ftxui/component/mouse.hpp",
|
||||||
|
"include/ftxui/component/receiver.hpp",
|
||||||
|
"include/ftxui/component/screen_interactive.hpp",
|
||||||
|
"include/ftxui/component/task.hpp",
|
||||||
|
],
|
||||||
|
linkopts = pthread_linkopts(),
|
||||||
|
deps = [
|
||||||
|
":dom",
|
||||||
|
":screen",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
# FTXUI's tests
|
||||||
|
cc_test(
|
||||||
|
name = "tests",
|
||||||
|
testonly = True,
|
||||||
|
srcs = [
|
||||||
|
"src/ftxui/component/animation_test.cpp",
|
||||||
|
"src/ftxui/component/button_test.cpp",
|
||||||
|
"src/ftxui/component/collapsible_test.cpp",
|
||||||
|
"src/ftxui/component/component_test.cpp",
|
||||||
|
"src/ftxui/component/container_test.cpp",
|
||||||
|
"src/ftxui/component/dropdown_test.cpp",
|
||||||
|
"src/ftxui/component/hoverable_test.cpp",
|
||||||
|
"src/ftxui/component/input_test.cpp",
|
||||||
|
"src/ftxui/component/menu_test.cpp",
|
||||||
|
"src/ftxui/component/modal_test.cpp",
|
||||||
|
"src/ftxui/component/radiobox_test.cpp",
|
||||||
|
"src/ftxui/component/receiver_test.cpp",
|
||||||
|
"src/ftxui/component/resizable_split_test.cpp",
|
||||||
|
"src/ftxui/component/slider_test.cpp",
|
||||||
|
"src/ftxui/component/terminal_input_parser_test.cpp",
|
||||||
|
"src/ftxui/component/toggle_test.cpp",
|
||||||
|
"src/ftxui/dom/blink_test.cpp",
|
||||||
|
"src/ftxui/dom/bold_test.cpp",
|
||||||
|
"src/ftxui/dom/border_test.cpp",
|
||||||
|
"src/ftxui/dom/canvas_test.cpp",
|
||||||
|
"src/ftxui/dom/color_test.cpp",
|
||||||
|
"src/ftxui/dom/dbox_test.cpp",
|
||||||
|
"src/ftxui/dom/dim_test.cpp",
|
||||||
|
"src/ftxui/dom/flexbox_helper_test.cpp",
|
||||||
|
"src/ftxui/dom/flexbox_test.cpp",
|
||||||
|
"src/ftxui/dom/gauge_test.cpp",
|
||||||
|
"src/ftxui/dom/gridbox_test.cpp",
|
||||||
|
"src/ftxui/dom/hbox_test.cpp",
|
||||||
|
"src/ftxui/dom/hyperlink_test.cpp",
|
||||||
|
"src/ftxui/dom/italic_test.cpp",
|
||||||
|
"src/ftxui/dom/linear_gradient_test.cpp",
|
||||||
|
"src/ftxui/dom/scroll_indicator_test.cpp",
|
||||||
|
"src/ftxui/dom/separator_test.cpp",
|
||||||
|
"src/ftxui/dom/spinner_test.cpp",
|
||||||
|
"src/ftxui/dom/table_test.cpp",
|
||||||
|
"src/ftxui/dom/text_test.cpp",
|
||||||
|
"src/ftxui/dom/underlined_test.cpp",
|
||||||
|
"src/ftxui/dom/vbox_test.cpp",
|
||||||
|
"src/ftxui/screen/color_test.cpp",
|
||||||
|
"src/ftxui/screen/string_test.cpp",
|
||||||
|
"src/ftxui/util/ref_test.cpp",
|
||||||
|
|
||||||
|
# Private header from ftxui:screen for string_test.cpp.
|
||||||
|
"src/ftxui/screen/string_internal.hpp",
|
||||||
|
|
||||||
|
# Private header from ftxui::component for
|
||||||
|
# terminal_input_parser_test.cpp.
|
||||||
|
"src/ftxui/component/terminal_input_parser.hpp",
|
||||||
|
|
||||||
|
# Private header from ftxui::dom for
|
||||||
|
# flexbox_helper_test.cpp.
|
||||||
|
"src/ftxui/dom/flexbox_helper.hpp",
|
||||||
|
|
||||||
|
# TODO: Enable the two tests timing out with Bazel:
|
||||||
|
# - "src/ftxui/component/screen_interactive_test.cpp",
|
||||||
|
# - "src/ftxui/dom/selection_test.cpp",
|
||||||
|
],
|
||||||
|
includes = [
|
||||||
|
"include",
|
||||||
|
"src",
|
||||||
|
],
|
||||||
|
copts = windows_copts(),
|
||||||
|
deps = [
|
||||||
|
":screen",
|
||||||
|
":dom",
|
||||||
|
":component",
|
||||||
|
"@googletest//:gtest",
|
||||||
|
"@googletest//:gtest_main",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
generate_examples()
|
||||||
67
CHANGELOG.md
67
CHANGELOG.md
@@ -1,6 +1,73 @@
|
|||||||
Changelog
|
Changelog
|
||||||
=========
|
=========
|
||||||
|
|
||||||
|
Development
|
||||||
|
-----------
|
||||||
|
|
||||||
|
### Build
|
||||||
|
- Feature: Support C++20 modules.
|
||||||
|
This requires:
|
||||||
|
- Using the Ninja or MSVC generator
|
||||||
|
- A recent Clang/GCC/MSVC compiler.
|
||||||
|
- Cmake 3.28 or higher.
|
||||||
|
Usage:
|
||||||
|
```cpp
|
||||||
|
import ftxui;
|
||||||
|
import ftxui.component;
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
```
|
||||||
|
Thanks @mikomikotaishi for PR #1015.
|
||||||
|
|
||||||
|
|
||||||
|
Future release
|
||||||
|
=======
|
||||||
|
6.1.9 (2025-05-07
|
||||||
|
|
||||||
|
### Build
|
||||||
|
If all goes well (pending), ftxui should appear in the Bazel central repository.
|
||||||
|
It can be imported into your project using the following lines:
|
||||||
|
|
||||||
|
**MODULE.bazel**
|
||||||
|
```bazel
|
||||||
|
bazel_dep(name = "ftxui", version = "6.1.9")
|
||||||
|
```
|
||||||
|
|
||||||
|
Thanks @robinlinden and @kcc for the reviews.
|
||||||
|
|
||||||
|
### dom
|
||||||
|
- Bugfix: Restore the `dbox` behavior from ftxui 5.0.0. To apply bgcolor
|
||||||
|
blending between the two layers, a new `dboxBlend` will be added.
|
||||||
|
|
||||||
|
6.1.8 (2025-05-01)
|
||||||
|
------------------
|
||||||
|
|
||||||
|
### Build
|
||||||
|
- Feature: Support `bazel` build system. See #1032.
|
||||||
|
Proposed by Kostya Serebryany @kcc
|
||||||
|
|
||||||
|
**BUILD.bazel**
|
||||||
|
```bazel
|
||||||
|
deps = [
|
||||||
|
// Depend on the whole library:
|
||||||
|
"@ftxui//:ftxui",
|
||||||
|
|
||||||
|
// Choose a specific submodule:
|
||||||
|
"@ftxui//:component",
|
||||||
|
"@ftxui//:dom",
|
||||||
|
"@ftxui//:screen",
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
|
### Component
|
||||||
|
- Bugfix: Fix a crash with ResizeableSplit. See #1023.
|
||||||
|
- Clamp screen size to terminal size.
|
||||||
|
- Disallow `ResizeableSplit` with negative size.
|
||||||
|
|
||||||
|
### Dom
|
||||||
|
- Bugfix: Disallow specifying a negative size constraint. See #1023.
|
||||||
|
|
||||||
|
|
||||||
6.0.2 (2025-03-30)
|
6.0.2 (2025-03-30)
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
|||||||
@@ -1,20 +1,26 @@
|
|||||||
cmake_minimum_required(VERSION 3.12)
|
option(FTXUI_BUILD_DOCS "Set to ON to build docs" OFF)
|
||||||
|
option(FTXUI_BUILD_EXAMPLES "Set to ON to build examples" OFF)
|
||||||
|
option(FTXUI_BUILD_MODULES "Build the C++20 modules" OFF)
|
||||||
|
option(FTXUI_BUILD_TESTS "Set to ON to build tests" OFF)
|
||||||
|
option(FTXUI_BUILD_TESTS_FUZZER "Set to ON to enable fuzzing" OFF)
|
||||||
|
option(FTXUI_CLANG_TIDY "Execute clang-tidy" OFF)
|
||||||
|
option(FTXUI_DEV_WARNINGS "Enable more compiler warnings and warnings as errors" OFF)
|
||||||
|
option(FTXUI_ENABLE_COVERAGE "Execute code coverage" OFF)
|
||||||
|
option(FTXUI_ENABLE_INSTALL "Generate the install target" ON)
|
||||||
|
option(FTXUI_QUIET "Set to ON for FTXUI to be quiet" OFF)
|
||||||
|
|
||||||
|
if (FTXUI_BUILD_MODULES)
|
||||||
|
cmake_minimum_required(VERSION 3.28.2)
|
||||||
|
else()
|
||||||
|
cmake_minimum_required(VERSION 3.12)
|
||||||
|
endif()
|
||||||
|
|
||||||
project(ftxui
|
project(ftxui
|
||||||
LANGUAGES CXX
|
LANGUAGES CXX
|
||||||
VERSION 6.0.2
|
VERSION 6.1.9
|
||||||
DESCRIPTION "C++ Functional Terminal User Interface."
|
DESCRIPTION "C++ Functional Terminal User Interface."
|
||||||
)
|
)
|
||||||
|
|
||||||
option(FTXUI_QUIET "Set to ON for FTXUI to be quiet" OFF)
|
|
||||||
option(FTXUI_BUILD_EXAMPLES "Set to ON to build examples" OFF)
|
|
||||||
option(FTXUI_BUILD_DOCS "Set to ON to build docs" OFF)
|
|
||||||
option(FTXUI_BUILD_TESTS "Set to ON to build tests" OFF)
|
|
||||||
option(FTXUI_BUILD_TESTS_FUZZER "Set to ON to enable fuzzing" OFF)
|
|
||||||
option(FTXUI_ENABLE_INSTALL "Generate the install target" ON)
|
|
||||||
option(FTXUI_CLANG_TIDY "Execute clang-tidy" OFF)
|
|
||||||
option(FTXUI_ENABLE_COVERAGE "Execute code coverage" OFF)
|
|
||||||
option(FTXUI_DEV_WARNINGS "Enable more compiler warnings and warnings as errors" OFF)
|
|
||||||
|
|
||||||
set(FTXUI_MICROSOFT_TERMINAL_FALLBACK_HELP_TEXT "On windows, assume the \
|
set(FTXUI_MICROSOFT_TERMINAL_FALLBACK_HELP_TEXT "On windows, assume the \
|
||||||
terminal used will be one of Microsoft and use a set of reasonnable fallback \
|
terminal used will be one of Microsoft and use a set of reasonnable fallback \
|
||||||
@@ -176,6 +182,13 @@ include(cmake/iwyu.cmake)
|
|||||||
include(cmake/ftxui_export.cmake)
|
include(cmake/ftxui_export.cmake)
|
||||||
include(cmake/ftxui_install.cmake)
|
include(cmake/ftxui_install.cmake)
|
||||||
include(cmake/ftxui_package.cmake)
|
include(cmake/ftxui_package.cmake)
|
||||||
|
include(cmake/ftxui_modules.cmake)
|
||||||
|
|
||||||
add_subdirectory(examples)
|
|
||||||
add_subdirectory(doc)
|
add_subdirectory(doc)
|
||||||
|
add_subdirectory(examples)
|
||||||
|
|
||||||
|
# You can generate ./examples_modules/ by running
|
||||||
|
# ./tools/generate_examples_modules.sh
|
||||||
|
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/examples_modules/CMakeLists.txt")
|
||||||
|
add_subdirectory(examples_modules)
|
||||||
|
endif()
|
||||||
|
|||||||
13
MODULE.bazel
Normal file
13
MODULE.bazel
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# FTXUI module.
|
||||||
|
module(
|
||||||
|
name = "ftxui",
|
||||||
|
version = "6.1.9",
|
||||||
|
compatibility_level = 6,
|
||||||
|
)
|
||||||
|
|
||||||
|
# Build dependencies.
|
||||||
|
bazel_dep(name = "rules_cc", version = "0.1.1")
|
||||||
|
bazel_dep(name = "platforms", version = "0.0.10")
|
||||||
|
|
||||||
|
# Test dependencies.
|
||||||
|
bazel_dep(name = "googletest", version = "1.14.0.bcr.1", dev_dependency = True)
|
||||||
74
README.md
74
README.md
@@ -40,17 +40,27 @@ A simple cross-platform C++ library for terminal based user interfaces!
|
|||||||
* Support for animations. [Demo 1](https://arthursonzogni.github.io/FTXUI/examples/?file=component/menu_underline_animated_gallery), [Demo 2](https://arthursonzogni.github.io/FTXUI/examples/?file=component/button_style)
|
* Support for animations. [Demo 1](https://arthursonzogni.github.io/FTXUI/examples/?file=component/menu_underline_animated_gallery), [Demo 2](https://arthursonzogni.github.io/FTXUI/examples/?file=component/button_style)
|
||||||
* Support for drawing. [Demo](https://arthursonzogni.github.io/FTXUI/examples/?file=component/canvas_animated)
|
* Support for drawing. [Demo](https://arthursonzogni.github.io/FTXUI/examples/?file=component/canvas_animated)
|
||||||
* No dependencies
|
* No dependencies
|
||||||
|
* Module support
|
||||||
* **Cross platform**: Linux/MacOS (main target), WebAssembly, Windows (Thanks to contributors!).
|
* **Cross platform**: Linux/MacOS (main target), WebAssembly, Windows (Thanks to contributors!).
|
||||||
* Learn by [examples](#documentation), and [tutorials](#documentation)
|
* Learn by [examples](#documentation), and [tutorials](#documentation)
|
||||||
* Multiple packages: CMake [FetchContent]([https://bewagner.net/programming/2020/05/02/cmake-fetchcontent/](https://cmake.org/cmake/help/latest/module/FetchContent.html)) (preferred), vcpkg, pkgbuild, conan.
|
* Multiple packages:
|
||||||
|
- CMake [FetchContent]([https://bewagner.net/programming/2020/05/02/cmake-fetchcontent/](https://cmake.org/cmake/help/latest/module/FetchContent.html)) (preferred)
|
||||||
|
- [Bazel](https://registry.bazel.build/modules/ftxui)
|
||||||
|
- [vcpkg](https://vcpkg.link/ports/ftxui)
|
||||||
|
- [Conan](https://conan.io/center/recipes/ftxui) [Debian package](https://tracker.debian.org/pkg/ftxui)
|
||||||
|
- [Ubuntu package](https://launchpad.net/ubuntu/+source/ftxui)
|
||||||
|
- [Arch Linux](https://aur.archlinux.org/packages/ftxui/)
|
||||||
|
- [OpenSUSE](https://build.opensuse.org/package/show/devel:libraries:c_c++/ftxui)
|
||||||
* Good practices: documentation, tests, fuzzers, performance tests, automated CI, automated packaging, etc...
|
* Good practices: documentation, tests, fuzzers, performance tests, automated CI, automated packaging, etc...
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
- [Starter example project](https://github.com/ArthurSonzogni/ftxui-starter)
|
- [Starter CMake](https://github.com/ArthurSonzogni/ftxui-starter)
|
||||||
|
- [Starter Bazel](https://github.com/ArthurSonzogni/ftxui-bazel)
|
||||||
- [Documentation](https://arthursonzogni.github.io/FTXUI/)
|
- [Documentation](https://arthursonzogni.github.io/FTXUI/)
|
||||||
- [Examples (WebAssembly)](https://arthursonzogni.github.io/FTXUI/examples/)
|
- [Examples (WebAssembly)](https://arthursonzogni.github.io/FTXUI/examples/)
|
||||||
- [Build using CMake](https://arthursonzogni.github.io/FTXUI/#build-cmake)
|
- [Build using CMake](https://arthursonzogni.github.io/FTXUI/#build-cmake)
|
||||||
|
- [Build using Bazel](https://arthursonzogni.github.io/FTXUI/#build-bazel)
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
~~~cpp
|
~~~cpp
|
||||||
@@ -348,6 +358,8 @@ Feel free to add your projects here:
|
|||||||
- [terminal-rain](https://github.com/Oakamoore/terminal-rain)
|
- [terminal-rain](https://github.com/Oakamoore/terminal-rain)
|
||||||
- [keywords](https://github.com/Oakamoore/keywords) ([Play web version :heart:](https://oakamoore.itch.io/keywords))
|
- [keywords](https://github.com/Oakamoore/keywords) ([Play web version :heart:](https://oakamoore.itch.io/keywords))
|
||||||
- [FTB - tertminal file browser](https://github.com/Cyxuan0311/FTB)
|
- [FTB - tertminal file browser](https://github.com/Cyxuan0311/FTB)
|
||||||
|
- [openJuice](https://github.com/mikomikotaishi/openJuice)
|
||||||
|
- [SHOOT!](https://github.com/ShingZhanho/ENGG1340-Project-25Spring)
|
||||||
|
|
||||||
### [cpp-best-practices/game_jam](https://github.com/cpp-best-practices/game_jam)
|
### [cpp-best-practices/game_jam](https://github.com/cpp-best-practices/game_jam)
|
||||||
|
|
||||||
@@ -364,38 +376,68 @@ Several games using the FTXUI have been made during the Game Jam:
|
|||||||
- [smoothlife](https://github.com/cpp-best-practices/game_jam/blob/main/Jam1_April_2022/smoothlife.md)
|
- [smoothlife](https://github.com/cpp-best-practices/game_jam/blob/main/Jam1_April_2022/smoothlife.md)
|
||||||
- [Consu](https://github.com/cpp-best-practices/game_jam/blob/main/Jam1_April_2022/consu.md)
|
- [Consu](https://github.com/cpp-best-practices/game_jam/blob/main/Jam1_April_2022/consu.md)
|
||||||
|
|
||||||
## Utilization
|
## Build using CMake
|
||||||
|
|
||||||
It is **highly** recommended to use CMake FetchContent to depend on FTXUI so you may specify which commit you would like to depend on.
|
It is **highly** recommended to use CMake FetchContent to depend on FTXUI so you may specify which commit you would like to depend on.
|
||||||
```cmake
|
```cmake
|
||||||
include(FetchContent)
|
include(FetchContent)
|
||||||
|
|
||||||
FetchContent_Declare(ftxui
|
FetchContent_Declare(ftxui
|
||||||
GIT_REPOSITORY https://github.com/ArthurSonzogni/ftxui
|
GIT_REPOSITORY https://github.com/ArthurSonzogni/ftxui
|
||||||
GIT_TAG v6.0.2
|
GIT_TAG v6.1.9
|
||||||
)
|
)
|
||||||
|
FetchContent_MakeAvailable(ftxui)
|
||||||
|
|
||||||
FetchContent_GetProperties(ftxui)
|
target_link_libraries(your_target PRIVATE
|
||||||
if(NOT ftxui_POPULATED)
|
# Chose a submodule
|
||||||
FetchContent_Populate(ftxui)
|
ftxui::component
|
||||||
add_subdirectory(${ftxui_SOURCE_DIR} ${ftxui_BINARY_DIR} EXCLUDE_FROM_ALL)
|
ftxui::dom
|
||||||
endif()
|
ftxui::screen
|
||||||
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
# Build using Bazel
|
||||||
|
|
||||||
|
**MODULE.bazel**
|
||||||
|
```starlark
|
||||||
|
bazel_dep(
|
||||||
|
name = "ftxui",
|
||||||
|
version = "v6.1.9",
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
**BUILD.bazel**
|
||||||
|
```starlark
|
||||||
|
cc_binary(
|
||||||
|
name = "your_target",
|
||||||
|
srcs = ["your_source.cc"],
|
||||||
|
deps = [
|
||||||
|
"@ftxui//:ftxui_component",
|
||||||
|
"@ftxui//:ftxui_dom",
|
||||||
|
"@ftxui//:ftxui_screen",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
# Build with something else:
|
||||||
If you don't, FTXUI may be used from the following packages:
|
If you don't, FTXUI may be used from the following packages:
|
||||||
- [vcpkg](https://vcpkgx.com/details.html?package=ftxui)
|
- CMake [FetchContent]([https://bewagner.net/programming/2020/05/02/cmake-fetchcontent/](https://cmake.org/cmake/help/latest/module/FetchContent.html)) (preferred),
|
||||||
- [Arch Linux PKGBUILD](https://aur.archlinux.org/packages/ftxui-git/).
|
- [Bazel](https://registry.bazel.build/modules/ftxui),
|
||||||
- [conan.io](https://conan.io/center/ftxui)
|
- [vcpkg](https://vcpkg.link/ports/ftxui),
|
||||||
- [openSUSE](https://build.opensuse.org/package/show/devel:libraries:c_c++/ftxui)
|
- [Conan](https://conan.io/center/recipes/ftxui)
|
||||||
-
|
- [Debian package](https://tracker.debian.org/pkg/ftxui),
|
||||||
|
- [Ubuntu package](https://launchpad.net/ubuntu/+source/ftxui),
|
||||||
|
- [Arch Linux](https://aur.archlinux.org/packages/ftxui/),
|
||||||
|
- [OpenSUSE](https://build.opensuse.org/package/show/devel:libraries:c_c++/ftxui),
|
||||||
[](https://repology.org/project/libftxui/versions)
|
[](https://repology.org/project/libftxui/versions)
|
||||||
|
|
||||||
|
|
||||||
If you choose to build and link FTXUI yourself, `ftxui-component` must be first in the linking order relative to the other FTXUI libraries, i.e.
|
If you choose to build and link FTXUI yourself, `ftxui-component` must be first in the linking order relative to the other FTXUI libraries, i.e.
|
||||||
```bash
|
```bash
|
||||||
g++ . . . -lftxui-component -lftxui-dom -lftxui-screen . . .
|
g++ . . . -lftxui-component -lftxui-dom -lftxui-screen . . .
|
||||||
```
|
```
|
||||||
|
|
||||||
|
To build FTXUI with modules, ensure that you are using a generator like Ninja or Visual Studio that supports modules, and pass the flag `FTXUI_BUILD_MODULES`.
|
||||||
|
|
||||||
## Contributors
|
## Contributors
|
||||||
|
|
||||||
|
|||||||
4
WORKSPACE.bazel
Normal file
4
WORKSPACE.bazel
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# Copyright 2025 Arthur Sonzogni. All rights reserved.
|
||||||
|
# Use of this source code is governed by the MIT license that can be found in
|
||||||
|
# the LICENSE file.
|
||||||
|
workspace(name = "ftxui")
|
||||||
104
bazel/ftxui.bzl
Normal file
104
bazel/ftxui.bzl
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
# ftxui_common.bzl
|
||||||
|
|
||||||
|
load("@rules_cc//cc:defs.bzl", "cc_library")
|
||||||
|
load("@rules_cc//cc:defs.bzl", "cc_binary")
|
||||||
|
|
||||||
|
# Microsoft terminal is a bit buggy ¯\_(ツ)_/¯ and MSVC uses bad defaults.
|
||||||
|
def windows_copts():
|
||||||
|
MSVC_COPTS = [
|
||||||
|
# Microsoft Visual Studio must decode sources files as UTF-8.
|
||||||
|
"/utf-8",
|
||||||
|
|
||||||
|
# Microsoft Visual Studio must interpret the codepoint using unicode.
|
||||||
|
"/DUNICODE",
|
||||||
|
"/D_UNICODE",
|
||||||
|
|
||||||
|
# Fallback for Microsoft Terminal.
|
||||||
|
# This
|
||||||
|
# - Replace missing font symbols by others.
|
||||||
|
# - Reduce screen position pooling frequency to deals against a Microsoft
|
||||||
|
# race condition. This was fixed in 2020, but clients never not updated.
|
||||||
|
# - https://github.com/microsoft/terminal/pull/7583
|
||||||
|
# - https://github.com/ArthurSonzogni/FTXUI/issues/136
|
||||||
|
"/DFTXUI_MICROSOFT_TERMINAL_FALLBACK",
|
||||||
|
]
|
||||||
|
|
||||||
|
WINDOWS_COPTS = [
|
||||||
|
# Fallback for Microsoft Terminal.
|
||||||
|
# This
|
||||||
|
# - Replace missing font symbols by others.
|
||||||
|
# - Reduce screen position pooling frequency to deals against a Microsoft
|
||||||
|
# race condition. This was fixed in 2020, but clients are still using
|
||||||
|
# old versions.
|
||||||
|
# - https://github.com/microsoft/terminal/pull/7583
|
||||||
|
# - https://github.com/ArthurSonzogni/FTXUI/issues/136
|
||||||
|
"-DFTXUI_MICROSOFT_TERMINAL_FALLBACK",
|
||||||
|
];
|
||||||
|
|
||||||
|
return select({
|
||||||
|
# MSVC:
|
||||||
|
"@rules_cc//cc/compiler:msvc-cl": MSVC_COPTS,
|
||||||
|
"@rules_cc//cc/compiler:clang-cl": MSVC_COPTS,
|
||||||
|
"@platforms//os:windows": WINDOWS_COPTS,
|
||||||
|
"//conditions:default": [],
|
||||||
|
})
|
||||||
|
|
||||||
|
def pthread_linkopts():
|
||||||
|
return select({
|
||||||
|
# With MSVC, threading is already built-in (you don't need -pthread.
|
||||||
|
"@rules_cc//cc/compiler:msvc-cl": [],
|
||||||
|
"@rules_cc//cc/compiler:clang-cl": [],
|
||||||
|
"@rules_cc//cc/compiler:clang": ["-pthread"],
|
||||||
|
"@rules_cc//cc/compiler:gcc": ["-pthread"],
|
||||||
|
"//conditions:default": ["-pthread"],
|
||||||
|
})
|
||||||
|
|
||||||
|
def ftxui_cc_library(
|
||||||
|
name,
|
||||||
|
srcs = [],
|
||||||
|
hdrs = [],
|
||||||
|
linkopts = [],
|
||||||
|
deps = []):
|
||||||
|
|
||||||
|
cc_library(
|
||||||
|
name = name,
|
||||||
|
srcs = srcs,
|
||||||
|
hdrs = hdrs,
|
||||||
|
linkopts = linkopts,
|
||||||
|
deps = deps,
|
||||||
|
strip_include_prefix = "",
|
||||||
|
include_prefix = "",
|
||||||
|
includes = [
|
||||||
|
"include",
|
||||||
|
"src",
|
||||||
|
],
|
||||||
|
copts = windows_copts(),
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
||||||
|
|
||||||
|
# Compile all the examples in the examples/ directory.
|
||||||
|
# This is useful to check the Bazel is always synchronized against CMake
|
||||||
|
# definitions.
|
||||||
|
def generate_examples():
|
||||||
|
cpp_files = native.glob(["examples/**/*.cpp"])
|
||||||
|
|
||||||
|
for src in cpp_files:
|
||||||
|
# Skip failing examples due to the color_info_sorted_2d.ipp dependency.
|
||||||
|
if src == "examples/component/homescreen.cpp" or \
|
||||||
|
src == "examples/dom/color_info_palette256.cpp" or \
|
||||||
|
src == "examples/dom/color_gallery.cpp":
|
||||||
|
continue
|
||||||
|
|
||||||
|
# Turn "examples/component/button.cpp" → "example_component_button"
|
||||||
|
name = src.replace("/", "_").replace(".cpp", "")
|
||||||
|
|
||||||
|
cc_binary(
|
||||||
|
name = name,
|
||||||
|
srcs = [src],
|
||||||
|
deps = [
|
||||||
|
":component",
|
||||||
|
":dom",
|
||||||
|
":screen",
|
||||||
|
],
|
||||||
|
copts = windows_copts(),
|
||||||
|
)
|
||||||
@@ -5,13 +5,14 @@ function(ftxui_message msg)
|
|||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
ftxui_message("┌─ FTXUI options ─────────────────────")
|
ftxui_message("┌─ FTXUI options ─────────────────────")
|
||||||
ftxui_message("│ FTXUI_ENABLE_INSTALL : ${FTXUI_ENABLE_INSTALL}")
|
|
||||||
ftxui_message("│ FTXUI_BUILD_EXAMPLES : ${FTXUI_BUILD_EXAMPLES}")
|
|
||||||
ftxui_message("│ FTXUI_QUIET : ${FTXUI_QUIET}")
|
|
||||||
ftxui_message("│ FTXUI_BUILD_DOCS : ${FTXUI_BUILD_DOCS}")
|
ftxui_message("│ FTXUI_BUILD_DOCS : ${FTXUI_BUILD_DOCS}")
|
||||||
|
ftxui_message("│ FTXUI_BUILD_EXAMPLES : ${FTXUI_BUILD_EXAMPLES}")
|
||||||
|
ftxui_message("│ FTXUI_BUILD_MODULES : ${FTXUI_BUILD_MODULES}")
|
||||||
ftxui_message("│ FTXUI_BUILD_TESTS : ${FTXUI_BUILD_TESTS}")
|
ftxui_message("│ FTXUI_BUILD_TESTS : ${FTXUI_BUILD_TESTS}")
|
||||||
ftxui_message("│ FTXUI_BUILD_TESTS_FUZZER : ${FTXUI_BUILD_TESTS_FUZZER}")
|
ftxui_message("│ FTXUI_BUILD_TESTS_FUZZER : ${FTXUI_BUILD_TESTS_FUZZER}")
|
||||||
ftxui_message("│ FTXUI_ENABLE_COVERAGE : ${FTXUI_ENABLE_COVERAGE}")
|
|
||||||
ftxui_message("│ FTXUI_DEV_WARNINGS : ${FTXUI_DEV_WARNINGS}")
|
|
||||||
ftxui_message("│ FTXUI_CLANG_TIDY : ${FTXUI_CLANG_TIDY}")
|
ftxui_message("│ FTXUI_CLANG_TIDY : ${FTXUI_CLANG_TIDY}")
|
||||||
|
ftxui_message("│ FTXUI_DEV_WARNINGS : ${FTXUI_DEV_WARNINGS}")
|
||||||
|
ftxui_message("│ FTXUI_ENABLE_COVERAGE : ${FTXUI_ENABLE_COVERAGE}")
|
||||||
|
ftxui_message("│ FTXUI_ENABLE_INSTALL : ${FTXUI_ENABLE_INSTALL}")
|
||||||
|
ftxui_message("│ FTXUI_QUIET : ${FTXUI_QUIET}")
|
||||||
ftxui_message("└─────────────────────────────────────")
|
ftxui_message("└─────────────────────────────────────")
|
||||||
|
|||||||
81
cmake/ftxui_modules.cmake
Normal file
81
cmake/ftxui_modules.cmake
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
if (NOT FTXUI_BUILD_MODULES)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_library(ftxui-modules)
|
||||||
|
|
||||||
|
target_sources(ftxui-modules
|
||||||
|
PUBLIC FILE_SET CXX_MODULES FILES
|
||||||
|
src/ftxui/component.cppm
|
||||||
|
src/ftxui/component/Animation.cppm
|
||||||
|
src/ftxui/component/CapturedMouse.cppm
|
||||||
|
src/ftxui/component/Component.cppm
|
||||||
|
src/ftxui/component/ComponentBase.cppm
|
||||||
|
src/ftxui/component/ComponentOptions.cppm
|
||||||
|
src/ftxui/component/Event.cppm
|
||||||
|
src/ftxui/component/Loop.cppm
|
||||||
|
src/ftxui/component/Mouse.cppm
|
||||||
|
src/ftxui/component/Receiver.cppm
|
||||||
|
src/ftxui/component/ScreenInteractive.cppm
|
||||||
|
src/ftxui/component/Task.cppm
|
||||||
|
src/ftxui/dom.cppm
|
||||||
|
src/ftxui/dom/Canvas.cppm
|
||||||
|
src/ftxui/dom/Deprecated.cppm
|
||||||
|
src/ftxui/dom/Direction.cppm
|
||||||
|
src/ftxui/dom/Elements.cppm
|
||||||
|
src/ftxui/dom/FlexboxConfig.cppm
|
||||||
|
src/ftxui/dom/LinearGradient.cppm
|
||||||
|
src/ftxui/dom/Node.cppm
|
||||||
|
src/ftxui/dom/Requirement.cppm
|
||||||
|
src/ftxui/dom/Selection.cppm
|
||||||
|
src/ftxui/dom/Table.cppm
|
||||||
|
src/ftxui/screen.cppm
|
||||||
|
src/ftxui/screen/Box.cppm
|
||||||
|
src/ftxui/screen/Color.cppm
|
||||||
|
src/ftxui/screen/ColorInfo.cppm
|
||||||
|
src/ftxui/screen/Deprecated.cppm
|
||||||
|
src/ftxui/screen/Image.cppm
|
||||||
|
src/ftxui/screen/Pixel.cppm
|
||||||
|
src/ftxui/screen/Screen.cppm
|
||||||
|
src/ftxui/screen/String.cppm
|
||||||
|
src/ftxui/screen/Terminal.cppm
|
||||||
|
src/ftxui/util.cppm
|
||||||
|
src/ftxui/util/AutoReset.cppm
|
||||||
|
src/ftxui/util/Ref.cppm
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(ftxui-modules
|
||||||
|
PUBLIC
|
||||||
|
ftxui::screen
|
||||||
|
ftxui::dom
|
||||||
|
ftxui::component
|
||||||
|
)
|
||||||
|
|
||||||
|
target_compile_features(ftxui-modules PUBLIC cxx_std_20)
|
||||||
|
if (CMAKE_COMPILER_IS_GNUCXX)
|
||||||
|
target_compile_options(${name} PUBLIC -fmodules-ts)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
add_library(ftxui::modules ALIAS ftxui-modules)
|
||||||
|
|
||||||
|
if(FTXUI_ENABLE_INSTALL)
|
||||||
|
|
||||||
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
|
install(TARGETS ftxui-modules
|
||||||
|
EXPORT ftxui-targets
|
||||||
|
FILE_SET CXX_MODULES
|
||||||
|
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ftxui
|
||||||
|
FILE_SET HEADERS
|
||||||
|
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ftxui
|
||||||
|
INCLUDES
|
||||||
|
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ftxui
|
||||||
|
)
|
||||||
|
install(EXPORT ftxui-targets
|
||||||
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ftxui
|
||||||
|
CXX_MODULES_DIRECTORY ${CMAKE_INSTALL_LIBDIR}/cmake/ftxui
|
||||||
|
)
|
||||||
|
install(FILES my_package-config.cmake
|
||||||
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ftxui
|
||||||
|
)
|
||||||
|
endif()
|
||||||
@@ -81,7 +81,7 @@ include(FetchContent)
|
|||||||
set(FETCHCONTENT_UPDATES_DISCONNECTED TRUE)
|
set(FETCHCONTENT_UPDATES_DISCONNECTED TRUE)
|
||||||
FetchContent_Declare(ftxui
|
FetchContent_Declare(ftxui
|
||||||
GIT_REPOSITORY https://github.com/ArthurSonzogni/ftxui
|
GIT_REPOSITORY https://github.com/ArthurSonzogni/ftxui
|
||||||
GIT_TAG main # Important: Specify a version or a commit hash here.
|
GIT_TAG 6.1.9
|
||||||
)
|
)
|
||||||
FetchContent_MakeAvailable(ftxui)
|
FetchContent_MakeAvailable(ftxui)
|
||||||
|
|
||||||
@@ -94,13 +94,33 @@ target_link_libraries(ftxui-starter
|
|||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
## Build
|
### Using Bazel {#build-bazel}
|
||||||
|
|
||||||
```bash
|
See [ftxui module](https://registry.bazel.build/modules/ftxui) from the Bazel
|
||||||
mkdir build && cd build
|
Central Registry.
|
||||||
cmake ..
|
|
||||||
make
|
See also this [starter](https://github.com/ArthurSonzogni/ftxui-bazel) project.
|
||||||
./main
|
|
||||||
|
**Module.bazel**
|
||||||
|
```starlark
|
||||||
|
bazel_dep(
|
||||||
|
name = "ftxui",
|
||||||
|
version = "6.1.9",
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
**BUILD.bazel**
|
||||||
|
```starlark
|
||||||
|
cc_binary(
|
||||||
|
name = "main",
|
||||||
|
srcs = ["main.cpp"],
|
||||||
|
deps = [
|
||||||
|
# Choose one of the following:
|
||||||
|
"@ftxui//:dom",
|
||||||
|
"@ftxui//:screen",
|
||||||
|
"@ftxui//:component",
|
||||||
|
],
|
||||||
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
# List of modules. {#modules}
|
# List of modules. {#modules}
|
||||||
|
|||||||
@@ -1,9 +1,71 @@
|
|||||||
#include "ftxui/component/component.hpp"
|
// Copyright 2020 Arthur Sonzogni. All rights reserved.
|
||||||
#include "ftxui/component/screen_interactive.hpp"
|
// Use of this source code is governed by the MIT license that can be found in
|
||||||
|
// the LICENSE file.
|
||||||
|
#include <memory> // for shared_ptr, __shared_ptr_access
|
||||||
|
#include <string> // for operator+, to_string
|
||||||
|
|
||||||
int main(){
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
auto screen = ftxui::ScreenInteractive::Fullscreen();
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
auto testComponent = ftxui::Renderer([](){return ftxui::text("test Component");});
|
#include "ftxui/component/component.hpp" // for Button, Horizontal, Renderer
|
||||||
screen.Loop(testComponent);
|
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||||
return 0;
|
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
||||||
|
#include "ftxui/dom/elements.hpp" // for separator, gauge, text, Element, operator|, vbox, border
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
using namespace ftxui;
|
||||||
|
|
||||||
|
// This is a helper function to create a button with a custom style.
|
||||||
|
// The style is defined by a lambda function that takes an EntryState and
|
||||||
|
// returns an Element.
|
||||||
|
// We are using `center` to center the text inside the button, then `border` to
|
||||||
|
// add a border around the button, and finally `flex` to make the button fill
|
||||||
|
// the available space.
|
||||||
|
ButtonOption ButtonStyle() {
|
||||||
|
auto option = ButtonOption::Animated();
|
||||||
|
option.transform = [](const EntryState& s) {
|
||||||
|
auto element = text(s.label);
|
||||||
|
if (s.focused) {
|
||||||
|
element |= bold;
|
||||||
|
}
|
||||||
|
return element | center | borderEmpty | flex;
|
||||||
|
};
|
||||||
|
return option;
|
||||||
|
}
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
int value = 50;
|
||||||
|
|
||||||
|
// The tree of components. This defines how to navigate using the keyboard.
|
||||||
|
auto buttons = Container::Vertical({
|
||||||
|
Container::Horizontal({
|
||||||
|
Button(
|
||||||
|
"-1", [&] { value--; }, ButtonStyle()),
|
||||||
|
Button(
|
||||||
|
"+1", [&] { value++; }, ButtonStyle()),
|
||||||
|
}) | flex,
|
||||||
|
Container::Horizontal({
|
||||||
|
Button(
|
||||||
|
"-10", [&] { value -= 10; }, ButtonStyle()),
|
||||||
|
Button(
|
||||||
|
"+10", [&] { value += 10; }, ButtonStyle()),
|
||||||
|
}) | flex,
|
||||||
|
});
|
||||||
|
|
||||||
|
// Modify the way to render them on screen:
|
||||||
|
auto component = Renderer(buttons, [&] {
|
||||||
|
return vbox({
|
||||||
|
text("value = " + std::to_string(value)),
|
||||||
|
separator(),
|
||||||
|
buttons->Render() | flex,
|
||||||
|
}) |
|
||||||
|
flex | border;
|
||||||
|
});
|
||||||
|
|
||||||
|
auto screen = ScreenInteractive::Fullscreen();
|
||||||
|
screen.Loop(component);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#include <memory> // for shared_ptr, __shared_ptr_access
|
#include <memory> // for shared_ptr, __shared_ptr_access
|
||||||
#include <string> // for operator+, to_string
|
#include <string> // for operator+, to_string
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
#include "ftxui/component/component.hpp" // for Button, Horizontal, Renderer
|
#include "ftxui/component/component.hpp" // for Button, Horizontal, Renderer
|
||||||
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||||
@@ -11,6 +12,11 @@
|
|||||||
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
||||||
#include "ftxui/dom/elements.hpp" // for gauge, separator, text, vbox, operator|, Element, border
|
#include "ftxui/dom/elements.hpp" // for gauge, separator, text, vbox, operator|, Element, border
|
||||||
#include "ftxui/screen/color.hpp" // for Color, Color::Blue, Color::Green, Color::Red
|
#include "ftxui/screen/color.hpp" // for Color, Color::Blue, Color::Green, Color::Red
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#include <memory> // for allocator, __shared_ptr_access, shared_ptr
|
#include <memory> // for allocator, __shared_ptr_access, shared_ptr
|
||||||
#include <string> // for to_string, operator+
|
#include <string> // for to_string, operator+
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
#include "ftxui/component/component.hpp" // for Button, Renderer, Vertical
|
#include "ftxui/component/component.hpp" // for Button, Renderer, Vertical
|
||||||
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||||
@@ -11,6 +12,11 @@
|
|||||||
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
||||||
#include "ftxui/dom/elements.hpp" // for operator|, text, Element, hbox, separator, size, vbox, border, frame, vscroll_indicator, HEIGHT, LESS_THAN
|
#include "ftxui/dom/elements.hpp" // for operator|, text, Element, hbox, separator, size, vbox, border, frame, vscroll_indicator, HEIGHT, LESS_THAN
|
||||||
#include "ftxui/screen/color.hpp" // for Color, Color::Default, Color::GrayDark, Color::White
|
#include "ftxui/screen/color.hpp" // for Color, Color::Default, Color::GrayDark, Color::White
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
// the LICENSE file.
|
// the LICENSE file.
|
||||||
#include <string> // for operator+, to_string
|
#include <string> // for operator+, to_string
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
#include "ftxui/component/component.hpp" // for Button, Vertical, Renderer, Horizontal, operator|
|
#include "ftxui/component/component.hpp" // for Button, Vertical, Renderer, Horizontal, operator|
|
||||||
#include "ftxui/component/component_base.hpp" // for Component
|
#include "ftxui/component/component_base.hpp" // for Component
|
||||||
@@ -10,6 +11,11 @@
|
|||||||
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
||||||
#include "ftxui/dom/elements.hpp" // for Element, separator, text, border
|
#include "ftxui/dom/elements.hpp" // for Element, separator, text, border
|
||||||
#include "ftxui/screen/color.hpp" // for Color, Color::Blue, Color::Green, Color::Red
|
#include "ftxui/screen/color.hpp" // for Color, Color::Blue, Color::Green, Color::Red
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|
||||||
|
|||||||
@@ -2,13 +2,18 @@
|
|||||||
// Use of this source code is governed by the MIT license that can be found in
|
// Use of this source code is governed by the MIT license that can be found in
|
||||||
// the LICENSED file.
|
// the LICENSED file.
|
||||||
#include <cmath> // for sin, cos
|
#include <cmath> // for sin, cos
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include <ftxui/dom/elements.hpp> // for canvas, Element, separator, hbox, operator|, border
|
#include <ftxui/dom/elements.hpp> // for canvas, Element, separator, hbox, operator|, border
|
||||||
#include <ftxui/screen/screen.hpp> // for Pixel
|
#include <ftxui/screen/screen.hpp> // for Pixel
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <memory> // for allocator, shared_ptr, __shared_ptr_access
|
#include <memory> // for allocator, shared_ptr, __shared_ptr_access
|
||||||
#include <string> // for string, basic_string
|
#include <string> // for string, basic_string
|
||||||
#include <utility> // for move
|
#include <utility> // for move
|
||||||
#include <vector> // for vector, __alloc_traits<>::value_type
|
#include <vector> // for vector, __alloc_traits<>::value_type
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/component/component.hpp" // for Renderer, CatchEvent, Horizontal, Menu, Tab
|
#include "ftxui/component/component.hpp" // for Renderer, CatchEvent, Horizontal, Menu, Tab
|
||||||
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||||
#include "ftxui/component/event.hpp" // for Event
|
#include "ftxui/component/event.hpp" // for Event
|
||||||
@@ -16,6 +21,11 @@
|
|||||||
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
||||||
#include "ftxui/dom/canvas.hpp" // for Canvas
|
#include "ftxui/dom/canvas.hpp" // for Canvas
|
||||||
#include "ftxui/screen/color.hpp" // for Color, Color::Red, Color::Blue, Color::Green, ftxui
|
#include "ftxui/screen/color.hpp" // for Color, Color::Red, Color::Blue, Color::Green, ftxui
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
#endif
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|||||||
@@ -6,11 +6,16 @@
|
|||||||
#include <memory> // for shared_ptr, __shared_ptr_access
|
#include <memory> // for shared_ptr, __shared_ptr_access
|
||||||
#include <string> // for operator+, to_string
|
#include <string> // for operator+, to_string
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
#include "ftxui/component/component.hpp" // for Checkbox, Renderer, Vertical
|
#include "ftxui/component/component.hpp" // for Checkbox, Renderer, Vertical
|
||||||
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
||||||
#include "ftxui/dom/elements.hpp" // for operator|, Element, size, border, frame, vscroll_indicator, HEIGHT, LESS_THAN
|
#include "ftxui/dom/elements.hpp" // for operator|, Element, size, border, frame, vscroll_indicator, HEIGHT, LESS_THAN
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
import ftxui.dom;
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|
||||||
|
|||||||
@@ -5,11 +5,16 @@
|
|||||||
#include <memory> // for shared_ptr, __shared_ptr_access
|
#include <memory> // for shared_ptr, __shared_ptr_access
|
||||||
#include <string> // for operator+, to_string
|
#include <string> // for operator+, to_string
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
#include "ftxui/component/component.hpp" // for Checkbox, Renderer, Vertical
|
#include "ftxui/component/component.hpp" // for Checkbox, Renderer, Vertical
|
||||||
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
||||||
#include "ftxui/dom/elements.hpp" // for operator|, Element, size, border, frame, vscroll_indicator, HEIGHT, LESS_THAN
|
#include "ftxui/dom/elements.hpp" // for operator|, Element, size, border, frame, vscroll_indicator, HEIGHT, LESS_THAN
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
import ftxui.dom;
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|
||||||
|
|||||||
@@ -5,11 +5,16 @@
|
|||||||
#include <utility> // for move
|
#include <utility> // for move
|
||||||
#include <vector> // for vector
|
#include <vector> // for vector
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
#include "ftxui/component/component.hpp" // for Collapsible, Renderer, Vertical
|
#include "ftxui/component/component.hpp" // for Collapsible, Renderer, Vertical
|
||||||
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for Component, ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for Component, ScreenInteractive
|
||||||
#include "ftxui/dom/elements.hpp" // for text, hbox, Element
|
#include "ftxui/dom/elements.hpp" // for text, hbox, Element
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
import ftxui.dom;
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|
||||||
|
|||||||
@@ -4,11 +4,16 @@
|
|||||||
#include <memory> // for allocator, shared_ptr, __shared_ptr_access
|
#include <memory> // for allocator, shared_ptr, __shared_ptr_access
|
||||||
#include <string> // for operator+, to_string
|
#include <string> // for operator+, to_string
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
#include "ftxui/component/component.hpp" // for Button, Horizontal, Renderer
|
#include "ftxui/component/component.hpp" // for Button, Horizontal, Renderer
|
||||||
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
||||||
#include "ftxui/dom/elements.hpp" // for text, separator, Element, operator|, vbox, border
|
#include "ftxui/dom/elements.hpp" // for text, separator, Element, operator|, vbox, border
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
import ftxui.dom;
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|
||||||
|
|||||||
@@ -3,16 +3,25 @@
|
|||||||
// the LICENSE file.
|
// the LICENSE file.
|
||||||
#include <stdlib.h> // for EXIT_SUCCESS
|
#include <stdlib.h> // for EXIT_SUCCESS
|
||||||
#include <chrono> // for milliseconds
|
#include <chrono> // for milliseconds
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include <ftxui/component/event.hpp> // for Event
|
#include <ftxui/component/event.hpp> // for Event
|
||||||
#include <ftxui/component/mouse.hpp> // for ftxui
|
#include <ftxui/component/mouse.hpp> // for ftxui
|
||||||
#include <ftxui/dom/elements.hpp> // for text, separator, Element, operator|, vbox, border
|
#include <ftxui/dom/elements.hpp> // for text, separator, Element, operator|, vbox, border
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <memory> // for allocator, shared_ptr
|
#include <memory> // for allocator, shared_ptr
|
||||||
#include <string> // for operator+, to_string
|
#include <string> // for operator+, to_string
|
||||||
#include <thread> // for sleep_for
|
#include <thread> // for sleep_for
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/component/component.hpp" // for CatchEvent, Renderer, operator|=
|
#include "ftxui/component/component.hpp" // for CatchEvent, Renderer, operator|=
|
||||||
#include "ftxui/component/loop.hpp" // for Loop
|
#include "ftxui/component/loop.hpp" // for Loop
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
import ftxui.dom;
|
||||||
|
#endif
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|||||||
@@ -4,9 +4,13 @@
|
|||||||
#include <string> // for basic_string, string, allocator
|
#include <string> // for basic_string, string, allocator
|
||||||
#include <vector> // for vector
|
#include <vector> // for vector
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
#include "ftxui/component/component.hpp" // for Dropdown, Horizontal, Vertical
|
#include "ftxui/component/component.hpp" // for Dropdown, Horizontal, Vertical
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
#endif
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|||||||
@@ -4,9 +4,13 @@
|
|||||||
#include <string> // for basic_string, string, allocator
|
#include <string> // for basic_string, string, allocator
|
||||||
#include <vector> // for vector
|
#include <vector> // for vector
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
#include "ftxui/component/component.hpp" // for Dropdown, Horizontal, Vertical
|
#include "ftxui/component/component.hpp" // for Dropdown, Horizontal, Vertical
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
#endif
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
#include <string> // for string, basic_string, to_string, operator+, char_traits
|
#include <string> // for string, basic_string, to_string, operator+, char_traits
|
||||||
#include <vector> // for vector
|
#include <vector> // for vector
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
#include "ftxui/component/component.hpp" // for Radiobox, Vertical, Checkbox, Horizontal, Renderer, ResizableSplitBottom, ResizableSplitRight
|
#include "ftxui/component/component.hpp" // for Radiobox, Vertical, Checkbox, Horizontal, Renderer, ResizableSplitBottom, ResizableSplitRight
|
||||||
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||||
@@ -13,6 +14,11 @@
|
|||||||
#include "ftxui/dom/elements.hpp" // for text, window, operator|, vbox, hbox, Element, flexbox, bgcolor, filler, flex, size, border, hcenter, color, EQUAL, bold, dim, notflex, xflex_grow, yflex_grow, HEIGHT, WIDTH
|
#include "ftxui/dom/elements.hpp" // for text, window, operator|, vbox, hbox, Element, flexbox, bgcolor, filler, flex, size, border, hcenter, color, EQUAL, bold, dim, notflex, xflex_grow, yflex_grow, HEIGHT, WIDTH
|
||||||
#include "ftxui/dom/flexbox_config.hpp" // for FlexboxConfig, FlexboxConfig::AlignContent, FlexboxConfig::JustifyContent, FlexboxConfig::AlignContent::Center, FlexboxConfig::AlignItems, FlexboxConfig::Direction, FlexboxConfig::JustifyContent::Center, FlexboxConfig::Wrap
|
#include "ftxui/dom/flexbox_config.hpp" // for FlexboxConfig, FlexboxConfig::AlignContent, FlexboxConfig::JustifyContent, FlexboxConfig::AlignContent::Center, FlexboxConfig::AlignItems, FlexboxConfig::Direction, FlexboxConfig::JustifyContent::Center, FlexboxConfig::Wrap
|
||||||
#include "ftxui/screen/color.hpp" // for Color, Color::Black
|
#include "ftxui/screen/color.hpp" // for Color, Color::Black
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|
||||||
|
|||||||
@@ -5,12 +5,18 @@
|
|||||||
#include <string> // for operator+, char_traits, to_string, string
|
#include <string> // for operator+, char_traits, to_string, string
|
||||||
#include <vector> // for vector
|
#include <vector> // for vector
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
#include "ftxui/component/component.hpp" // for Slider, Renderer, Vertical
|
#include "ftxui/component/component.hpp" // for Slider, Renderer, Vertical
|
||||||
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
||||||
#include "ftxui/dom/elements.hpp" // for Elements, Element, operator|, separator, text, focusPositionRelative, size, border, flex, frame, bgcolor, gridbox, vbox, EQUAL, center, HEIGHT, WIDTH
|
#include "ftxui/dom/elements.hpp" // for Elements, Element, operator|, separator, text, focusPositionRelative, size, border, flex, frame, bgcolor, gridbox, vbox, EQUAL, center, HEIGHT, WIDTH
|
||||||
#include "ftxui/screen/color.hpp" // for Color
|
#include "ftxui/screen/color.hpp" // for Color
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,20 @@
|
|||||||
// Copyright 2020 Arthur Sonzogni. All rights reserved.
|
// Copyright 2020 Arthur Sonzogni. All rights reserved.
|
||||||
// Use of this source code is governed by the MIT license that can be found in
|
// Use of this source code is governed by the MIT license that can be found in
|
||||||
// the LICENSE file.
|
// the LICENSE file.
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include <ftxui/component/captured_mouse.hpp> // for ftxui
|
#include <ftxui/component/captured_mouse.hpp> // for ftxui
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <string> // for allocator, operator+, char_traits, string
|
#include <string> // for allocator, operator+, char_traits, string
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/component/component.hpp" // for Renderer, Vertical
|
#include "ftxui/component/component.hpp" // for Renderer, Vertical
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive, Component
|
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive, Component
|
||||||
#include "ftxui/dom/elements.hpp" // for text, Decorator, focus, focusCursorBar, focusCursorBarBlinking, focusCursorBlock, focusCursorBlockBlinking, focusCursorUnderline, focusCursorUnderlineBlinking, hbox, Element
|
#include "ftxui/dom/elements.hpp" // for text, Decorator, focus, focusCursorBar, focusCursorBarBlinking, focusCursorBlock, focusCursorBlockBlinking, focusCursorUnderline, focusCursorUnderlineBlinking, hbox, Element
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
import ftxui.dom;
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|
||||||
|
|||||||
@@ -6,11 +6,16 @@
|
|||||||
#include <string> // for string, basic_string
|
#include <string> // for string, basic_string
|
||||||
#include <vector> // for vector
|
#include <vector> // for vector
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
#include "ftxui/component/component.hpp" // for Slider, Checkbox, Vertical, Renderer, Button, Input, Menu, Radiobox, Toggle
|
#include "ftxui/component/component.hpp" // for Slider, Checkbox, Vertical, Renderer, Button, Input, Menu, Radiobox, Toggle
|
||||||
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for Component, ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for Component, ScreenInteractive
|
||||||
#include "ftxui/dom/elements.hpp" // for separator, operator|, Element, size, xflex, text, WIDTH, hbox, vbox, EQUAL, border, GREATER_THAN
|
#include "ftxui/dom/elements.hpp" // for separator, operator|, Element, size, xflex, text, WIDTH, hbox, vbox, EQUAL, border, GREATER_THAN
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
import ftxui.dom;
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,8 @@
|
|||||||
#include <vector> // for vector
|
#include <vector> // for vector
|
||||||
|
|
||||||
#include "../dom/color_info_sorted_2d.ipp" // for ColorInfoSorted2D
|
#include "../dom/color_info_sorted_2d.ipp" // for ColorInfoSorted2D
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/component/component.hpp" // for Checkbox, Renderer, Horizontal, Vertical, Input, Menu, Radiobox, ResizableSplitLeft, Tab
|
#include "ftxui/component/component.hpp" // for Checkbox, Renderer, Horizontal, Vertical, Input, Menu, Radiobox, ResizableSplitLeft, Tab
|
||||||
#include "ftxui/component/component_base.hpp" // for ComponentBase, Component
|
#include "ftxui/component/component_base.hpp" // for ComponentBase, Component
|
||||||
#include "ftxui/component/component_options.hpp" // for MenuOption, InputOption
|
#include "ftxui/component/component_options.hpp" // for MenuOption, InputOption
|
||||||
@@ -24,6 +26,11 @@
|
|||||||
#include "ftxui/screen/color.hpp" // for Color, Color::BlueLight, Color::RedLight, Color::Black, Color::Blue, Color::Cyan, Color::CyanLight, Color::GrayDark, Color::GrayLight, Color::Green, Color::GreenLight, Color::Magenta, Color::MagentaLight, Color::Red, Color::White, Color::Yellow, Color::YellowLight, Color::Default, Color::Palette256, ftxui
|
#include "ftxui/screen/color.hpp" // for Color, Color::BlueLight, Color::RedLight, Color::Black, Color::Blue, Color::Cyan, Color::CyanLight, Color::GrayDark, Color::GrayLight, Color::Green, Color::GreenLight, Color::Magenta, Color::MagentaLight, Color::Red, Color::White, Color::Yellow, Color::YellowLight, Color::Default, Color::Palette256, ftxui
|
||||||
#include "ftxui/screen/color_info.hpp" // for ColorInfo
|
#include "ftxui/screen/color_info.hpp" // for ColorInfo
|
||||||
#include "ftxui/screen/terminal.hpp" // for Size, Dimensions
|
#include "ftxui/screen/terminal.hpp" // for Size, Dimensions
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#include <memory> // for allocator, __shared_ptr_access
|
#include <memory> // for allocator, __shared_ptr_access
|
||||||
#include <string> // for char_traits, operator+, string, basic_string
|
#include <string> // for char_traits, operator+, string, basic_string
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
#include "ftxui/component/component.hpp" // for Input, Renderer, Vertical
|
#include "ftxui/component/component.hpp" // for Input, Renderer, Vertical
|
||||||
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||||
@@ -11,6 +12,11 @@
|
|||||||
#include "ftxui/component/screen_interactive.hpp" // for Component, ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for Component, ScreenInteractive
|
||||||
#include "ftxui/dom/elements.hpp" // for text, hbox, separator, Element, operator|, vbox, border
|
#include "ftxui/dom/elements.hpp" // for text, hbox, separator, Element, operator|, vbox, border
|
||||||
#include "ftxui/util/ref.hpp" // for Ref
|
#include "ftxui/util/ref.hpp" // for Ref
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.util;
|
||||||
|
#endif
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|||||||
@@ -5,11 +5,16 @@
|
|||||||
#include <string> // for string, basic_string, operator+, to_string
|
#include <string> // for string, basic_string, operator+, to_string
|
||||||
#include <vector> // for vector
|
#include <vector> // for vector
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
#include "ftxui/component/component.hpp" // for Input, Renderer, Vertical
|
#include "ftxui/component/component.hpp" // for Input, Renderer, Vertical
|
||||||
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for Component, ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for Component, ScreenInteractive
|
||||||
#include "ftxui/dom/elements.hpp" // for operator|, Element, size, border, frame, vscroll_indicator, HEIGHT, LESS_THAN
|
#include "ftxui/dom/elements.hpp" // for operator|, Element, size, border, frame, vscroll_indicator, HEIGHT, LESS_THAN
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
import ftxui.dom;
|
||||||
|
#endif
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|||||||
@@ -1,17 +1,26 @@
|
|||||||
// Copyright 2020 Arthur Sonzogni. All rights reserved.
|
// Copyright 2020 Arthur Sonzogni. All rights reserved.
|
||||||
// Use of this source code is governed by the MIT license that can be found in
|
// Use of this source code is governed by the MIT license that can be found in
|
||||||
// the LICENSE file.
|
// the LICENSE file.
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include <ftxui/dom/linear_gradient.hpp> // for LinearGradient
|
#include <ftxui/dom/linear_gradient.hpp> // for LinearGradient
|
||||||
#include <ftxui/screen/color.hpp> // for Color, Color::White, Color::Red, Color::Blue, Color::Black, Color::GrayDark, ftxui
|
#include <ftxui/screen/color.hpp> // for Color, Color::White, Color::Red, Color::Blue, Color::Black, Color::GrayDark, ftxui
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <functional> // for function
|
#include <functional> // for function
|
||||||
#include <string> // for allocator, string
|
#include <string> // for allocator, string
|
||||||
#include <utility> // for move
|
#include <utility> // for move
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/component/component.hpp" // for Input, Horizontal, Vertical, operator|
|
#include "ftxui/component/component.hpp" // for Input, Horizontal, Vertical, operator|
|
||||||
#include "ftxui/component/component_base.hpp" // for Component
|
#include "ftxui/component/component_base.hpp" // for Component
|
||||||
#include "ftxui/component/component_options.hpp" // for InputState, InputOption
|
#include "ftxui/component/component_options.hpp" // for InputState, InputOption
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
||||||
#include "ftxui/dom/elements.hpp" // for operator|=, Element, bgcolor, operator|, separatorEmpty, color, borderEmpty, separator, text, center, dim, hbox, vbox, border, borderDouble, borderRounded
|
#include "ftxui/dom/elements.hpp" // for operator|=, Element, bgcolor, operator|, separatorEmpty, color, borderEmpty, separator, text, center, dim, hbox, vbox, border, borderDouble, borderRounded
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
#endif
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|||||||
@@ -1,16 +1,25 @@
|
|||||||
// Copyright 2023 Arthur Sonzogni. All rights reserved.
|
// Copyright 2023 Arthur Sonzogni. All rights reserved.
|
||||||
// Use of this source code is governed by the MIT license that can be found in
|
// Use of this source code is governed by the MIT license that can be found in
|
||||||
// the LICENSE file.
|
// the LICENSE file.
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include <ftxui/component/component_base.hpp> // for ComponentBase, Component
|
#include <ftxui/component/component_base.hpp> // for ComponentBase, Component
|
||||||
#include <ftxui/dom/elements.hpp> // for operator|, Element, flex, bgcolor, text, vbox, center
|
#include <ftxui/dom/elements.hpp> // for operator|, Element, flex, bgcolor, text, vbox, center
|
||||||
#include <ftxui/dom/linear_gradient.hpp> // for LinearGradient
|
#include <ftxui/dom/linear_gradient.hpp> // for LinearGradient
|
||||||
#include <ftxui/screen/color.hpp> // for Color, Color::Blue, Color::Red
|
#include <ftxui/screen/color.hpp> // for Color, Color::Blue, Color::Red
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <memory> // for __shared_ptr_access, shared_ptr
|
#include <memory> // for __shared_ptr_access, shared_ptr
|
||||||
#include <string> // for allocator, operator+, char_traits, string, to_string
|
#include <string> // for allocator, operator+, char_traits, string, to_string
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
#include "ftxui/component/component.hpp" // for Slider, Renderer, Vertical
|
#include "ftxui/component/component.hpp" // for Slider, Renderer, Vertical
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
#endif
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|||||||
@@ -4,12 +4,18 @@
|
|||||||
#include <string> // for string, allocator, basic_string
|
#include <string> // for string, allocator, basic_string
|
||||||
#include <vector> // for vector
|
#include <vector> // for vector
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
#include "ftxui/component/component.hpp" // for operator|, Maybe, Checkbox, Radiobox, Renderer, Vertical
|
#include "ftxui/component/component.hpp" // for operator|, Maybe, Checkbox, Radiobox, Renderer, Vertical
|
||||||
#include "ftxui/component/component_base.hpp" // for Component
|
#include "ftxui/component/component_base.hpp" // for Component
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
||||||
#include "ftxui/dom/elements.hpp" // for Element, border, color, operator|, text
|
#include "ftxui/dom/elements.hpp" // for Element, border, color, operator|, text
|
||||||
#include "ftxui/screen/color.hpp" // for Color, Color::Red
|
#include "ftxui/screen/color.hpp" // for Color, Color::Red
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|
||||||
|
|||||||
@@ -6,10 +6,14 @@
|
|||||||
#include <string> // for string, basic_string, allocator
|
#include <string> // for string, basic_string, allocator
|
||||||
#include <vector> // for vector
|
#include <vector> // for vector
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
#include "ftxui/component/component.hpp" // for Menu
|
#include "ftxui/component/component.hpp" // for Menu
|
||||||
#include "ftxui/component/component_options.hpp" // for MenuOption
|
#include "ftxui/component/component_options.hpp" // for MenuOption
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
#endif
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|||||||
@@ -6,12 +6,17 @@
|
|||||||
#include <string> // for string, basic_string, operator+, to_string
|
#include <string> // for string, basic_string, operator+, to_string
|
||||||
#include <vector> // for vector
|
#include <vector> // for vector
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
#include "ftxui/component/component.hpp" // for Menu, Horizontal, Renderer
|
#include "ftxui/component/component.hpp" // for Menu, Horizontal, Renderer
|
||||||
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||||
#include "ftxui/component/component_options.hpp" // for MenuOption
|
#include "ftxui/component/component_options.hpp" // for MenuOption
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for Component, ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for Component, ScreenInteractive
|
||||||
#include "ftxui/dom/elements.hpp" // for text, separator, bold, hcenter, vbox, hbox, gauge, Element, operator|, border
|
#include "ftxui/dom/elements.hpp" // for text, separator, bold, hcenter, vbox, hbox, gauge, Element, operator|, border
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
import ftxui.dom;
|
||||||
|
#endif
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
#include <memory> // for allocator, shared_ptr, __shared_ptr_access
|
#include <memory> // for allocator, shared_ptr, __shared_ptr_access
|
||||||
#include <string> // for char_traits, to_string, operator+, string, basic_string
|
#include <string> // for char_traits, to_string, operator+, string, basic_string
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
#include "ftxui/component/component.hpp" // for MenuEntry, Renderer, Vertical
|
#include "ftxui/component/component.hpp" // for MenuEntry, Renderer, Vertical
|
||||||
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||||
@@ -13,6 +14,11 @@
|
|||||||
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
||||||
#include "ftxui/dom/elements.hpp" // for operator|, Element, separator, text, hbox, size, frame, color, vbox, HEIGHT, LESS_THAN, bold, border, inverted
|
#include "ftxui/dom/elements.hpp" // for operator|, Element, separator, text, hbox, size, frame, color, vbox, HEIGHT, LESS_THAN, bold, border, inverted
|
||||||
#include "ftxui/screen/color.hpp" // for Color, Color::Blue, Color::Cyan, Color::Green, Color::Red, Color::Yellow
|
#include "ftxui/screen/color.hpp" // for Color, Color::Blue, Color::Cyan, Color::Green, Color::Red, Color::Yellow
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
#include <memory> // for shared_ptr, __shared_ptr_access
|
#include <memory> // for shared_ptr, __shared_ptr_access
|
||||||
#include <string> // for to_string, allocator
|
#include <string> // for to_string, allocator
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
#include "ftxui/component/component.hpp" // for MenuEntryAnimated, Renderer, Vertical
|
#include "ftxui/component/component.hpp" // for MenuEntryAnimated, Renderer, Vertical
|
||||||
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||||
@@ -12,6 +13,11 @@
|
|||||||
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
||||||
#include "ftxui/dom/elements.hpp" // for operator|, separator, Element, Decorator, color, text, hbox, size, bold, frame, inverted, vbox, HEIGHT, LESS_THAN, border
|
#include "ftxui/dom/elements.hpp" // for operator|, separator, Element, Decorator, color, text, hbox, size, bold, frame, inverted, vbox, HEIGHT, LESS_THAN, border
|
||||||
#include "ftxui/screen/color.hpp" // for Color, Color::Blue, Color::Cyan, Color::Green, Color::Red, Color::Yellow
|
#include "ftxui/screen/color.hpp" // for Color, Color::Blue, Color::Cyan, Color::Green, Color::Red, Color::Yellow
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|
||||||
|
|||||||
@@ -5,11 +5,16 @@
|
|||||||
#include <string> // for string, basic_string, operator+, to_string
|
#include <string> // for string, basic_string, operator+, to_string
|
||||||
#include <vector> // for vector
|
#include <vector> // for vector
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
#include "ftxui/component/component.hpp" // for Radiobox, Renderer
|
#include "ftxui/component/component.hpp" // for Radiobox, Renderer
|
||||||
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
||||||
#include "ftxui/dom/elements.hpp" // for operator|, Element, size, border, frame, HEIGHT, LESS_THAN
|
#include "ftxui/dom/elements.hpp" // for operator|, Element, size, border, frame, HEIGHT, LESS_THAN
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
import ftxui.dom;
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|
||||||
|
|||||||
@@ -5,11 +5,16 @@
|
|||||||
#include <string> // for string, basic_string, operator+, to_string
|
#include <string> // for string, basic_string, operator+, to_string
|
||||||
#include <vector> // for vector
|
#include <vector> // for vector
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
#include "ftxui/component/component.hpp" // for Radiobox, Renderer
|
#include "ftxui/component/component.hpp" // for Radiobox, Renderer
|
||||||
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
||||||
#include "ftxui/dom/elements.hpp" // for operator|, Element, size, border, frame, HEIGHT, LESS_THAN
|
#include "ftxui/dom/elements.hpp" // for operator|, Element, size, border, frame, HEIGHT, LESS_THAN
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
import ftxui.dom;
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|
||||||
|
|||||||
@@ -6,11 +6,16 @@
|
|||||||
#include <string> // for string, operator+, basic_string, to_string, char_traits
|
#include <string> // for string, operator+, basic_string, to_string, char_traits
|
||||||
#include <vector> // for vector, __alloc_traits<>::value_type
|
#include <vector> // for vector, __alloc_traits<>::value_type
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
#include "ftxui/component/component.hpp" // for Menu, Renderer, Horizontal, Vertical
|
#include "ftxui/component/component.hpp" // for Menu, Renderer, Horizontal, Vertical
|
||||||
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for Component, ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for Component, ScreenInteractive
|
||||||
#include "ftxui/dom/elements.hpp" // for text, Element, operator|, window, flex, vbox
|
#include "ftxui/dom/elements.hpp" // for text, Element, operator|, window, flex, vbox
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
import ftxui.dom;
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
#include <string> // for string, char_traits, operator+, basic_string
|
#include <string> // for string, char_traits, operator+, basic_string
|
||||||
#include <vector> // for vector
|
#include <vector> // for vector
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/component/animation.hpp" // for ElasticOut, Linear
|
#include "ftxui/component/animation.hpp" // for ElasticOut, Linear
|
||||||
#include "ftxui/component/component.hpp" // for Menu, Horizontal, Renderer, Vertical
|
#include "ftxui/component/component.hpp" // for Menu, Horizontal, Renderer, Vertical
|
||||||
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||||
@@ -16,6 +17,11 @@
|
|||||||
#include "ftxui/component/screen_interactive.hpp" // for Component, ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for Component, ScreenInteractive
|
||||||
#include "ftxui/dom/elements.hpp" // for separator, operator|, Element, text, bgcolor, hbox, bold, color, filler, border, vbox, borderDouble, dim, flex, hcenter
|
#include "ftxui/dom/elements.hpp" // for separator, operator|, Element, text, bgcolor, hbox, bold, color, filler, border, vbox, borderDouble, dim, flex, hcenter
|
||||||
#include "ftxui/screen/color.hpp" // for Color, Color::Red, Color::Black, Color::Yellow, Color::Blue, Color::Default, Color::White
|
#include "ftxui/screen/color.hpp" // for Color, Color::Red, Color::Black, Color::Yellow, Color::Blue, Color::Default, Color::White
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
#include <string> // for string, operator+, to_string, basic_string
|
#include <string> // for string, operator+, to_string, basic_string
|
||||||
#include <vector> // for vector
|
#include <vector> // for vector
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/component/animation.hpp" // for BackOut, Duration
|
#include "ftxui/component/animation.hpp" // for BackOut, Duration
|
||||||
#include "ftxui/component/component.hpp" // for Menu, Renderer, Vertical
|
#include "ftxui/component/component.hpp" // for Menu, Renderer, Vertical
|
||||||
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||||
@@ -14,6 +15,11 @@
|
|||||||
#include "ftxui/component/screen_interactive.hpp" // for Component, ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for Component, ScreenInteractive
|
||||||
#include "ftxui/dom/elements.hpp" // for text, Element, operator|, borderEmpty, inverted
|
#include "ftxui/dom/elements.hpp" // for text, Element, operator|, borderEmpty, inverted
|
||||||
#include "ftxui/screen/color.hpp" // for Color, Color::Blue, Color::Red
|
#include "ftxui/screen/color.hpp" // for Color, Color::Blue, Color::Red
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,22 @@
|
|||||||
// Copyright 2022 Arthur Sonzogni. All rights reserved.
|
// Copyright 2022 Arthur Sonzogni. All rights reserved.
|
||||||
// Use of this source code is governed by the MIT license that can be found in
|
// Use of this source code is governed by the MIT license that can be found in
|
||||||
// the LICENSE file.
|
// the LICENSE file.
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include <ftxui/component/component_options.hpp> // for ButtonOption
|
#include <ftxui/component/component_options.hpp> // for ButtonOption
|
||||||
#include <ftxui/component/mouse.hpp> // for ftxui
|
#include <ftxui/component/mouse.hpp> // for ftxui
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <functional> // for function
|
#include <functional> // for function
|
||||||
#include <memory> // for allocator, shared_ptr
|
#include <memory> // for allocator, shared_ptr
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/component/component.hpp" // for Button, operator|=, Renderer, Vertical, Modal
|
#include "ftxui/component/component.hpp" // for Button, operator|=, Renderer, Vertical, Modal
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive, Component
|
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive, Component
|
||||||
#include "ftxui/dom/elements.hpp" // for operator|, separator, text, size, Element, vbox, border, GREATER_THAN, WIDTH, center, HEIGHT
|
#include "ftxui/dom/elements.hpp" // for operator|, separator, text, size, Element, vbox, border, GREATER_THAN, WIDTH, center, HEIGHT
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
import ftxui.dom;
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|
||||||
|
|||||||
@@ -5,11 +5,16 @@
|
|||||||
#include <string> // for string, basic_string, char_traits, operator+
|
#include <string> // for string, basic_string, char_traits, operator+
|
||||||
#include <vector> // for vector
|
#include <vector> // for vector
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
#include "ftxui/component/component.hpp" // for Button, Renderer, Horizontal, Tab
|
#include "ftxui/component/component.hpp" // for Button, Renderer, Horizontal, Tab
|
||||||
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
||||||
#include "ftxui/dom/elements.hpp" // for operator|, Element, filler, text, hbox, separator, center, vbox, bold, border, clear_under, dbox, size, GREATER_THAN, HEIGHT
|
#include "ftxui/dom/elements.hpp" // for operator|, Element, filler, text, hbox, separator, center, vbox, bold, border, clear_under, dbox, size, GREATER_THAN, HEIGHT
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
import ftxui.dom;
|
||||||
|
#endif
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|||||||
@@ -4,11 +4,16 @@
|
|||||||
#include <memory> // for allocator, shared_ptr, __shared_ptr_access
|
#include <memory> // for allocator, shared_ptr, __shared_ptr_access
|
||||||
#include <string> // for operator+, string, char_traits, basic_string
|
#include <string> // for operator+, string, char_traits, basic_string
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
#include "ftxui/component/component.hpp" // for Button, Vertical, Renderer
|
#include "ftxui/component/component.hpp" // for Button, Vertical, Renderer
|
||||||
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
||||||
#include "ftxui/dom/elements.hpp" // for separator, text, Element, operator|, vbox, border
|
#include "ftxui/dom/elements.hpp" // for separator, text, Element, operator|, vbox, border
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
import ftxui.dom;
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|
||||||
|
|||||||
@@ -9,12 +9,17 @@
|
|||||||
#include <utility> // for move
|
#include <utility> // for move
|
||||||
#include <vector> // for vector
|
#include <vector> // for vector
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
#include "ftxui/component/component.hpp" // for CatchEvent, Renderer
|
#include "ftxui/component/component.hpp" // for CatchEvent, Renderer
|
||||||
#include "ftxui/component/event.hpp" // for Event
|
#include "ftxui/component/event.hpp" // for Event
|
||||||
#include "ftxui/component/mouse.hpp" // for Mouse, Mouse::Left, Mouse::Middle, Mouse::None, Mouse::Pressed, Mouse::Released, Mouse::Right, Mouse::WheelDown, Mouse::WheelUp
|
#include "ftxui/component/mouse.hpp" // for Mouse, Mouse::Left, Mouse::Middle, Mouse::None, Mouse::Pressed, Mouse::Released, Mouse::Right, Mouse::WheelDown, Mouse::WheelUp
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
||||||
#include "ftxui/dom/elements.hpp" // for text, vbox, window, Element, Elements
|
#include "ftxui/dom/elements.hpp" // for text, vbox, window, Element, Elements
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
import ftxui.dom;
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|
||||||
|
|||||||
@@ -4,9 +4,13 @@
|
|||||||
#include <string> // for string, allocator, basic_string
|
#include <string> // for string, allocator, basic_string
|
||||||
#include <vector> // for vector
|
#include <vector> // for vector
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
#include "ftxui/component/component.hpp" // for Radiobox
|
#include "ftxui/component/component.hpp" // for Radiobox
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|
||||||
|
|||||||
@@ -5,11 +5,16 @@
|
|||||||
#include <string> // for string, basic_string, operator+, to_string
|
#include <string> // for string, basic_string, operator+, to_string
|
||||||
#include <vector> // for vector
|
#include <vector> // for vector
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
#include "ftxui/component/component.hpp" // for Radiobox, Renderer
|
#include "ftxui/component/component.hpp" // for Radiobox, Renderer
|
||||||
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
||||||
#include "ftxui/dom/elements.hpp" // for operator|, Element, size, border, frame, HEIGHT, LESS_THAN
|
#include "ftxui/dom/elements.hpp" // for operator|, Element, size, border, frame, HEIGHT, LESS_THAN
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
import ftxui.dom;
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|
||||||
|
|||||||
@@ -3,12 +3,18 @@
|
|||||||
// the LICENSE file.
|
// the LICENSE file.
|
||||||
#include <memory> // for shared_ptr, allocator, __shared_ptr_access
|
#include <memory> // for shared_ptr, allocator, __shared_ptr_access
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
#include "ftxui/component/component.hpp" // for Renderer, Button, Vertical
|
#include "ftxui/component/component.hpp" // for Renderer, Button, Vertical
|
||||||
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
||||||
#include "ftxui/dom/elements.hpp" // for operator|, Element, text, bold, border, center, color
|
#include "ftxui/dom/elements.hpp" // for operator|, Element, text, bold, border, center, color
|
||||||
#include "ftxui/screen/color.hpp" // for Color, Color::Red
|
#include "ftxui/screen/color.hpp" // for Color, Color::Red
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
#endif
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|||||||
@@ -3,11 +3,17 @@
|
|||||||
// the LICENSE file.
|
// the LICENSE file.
|
||||||
#include <memory> // for shared_ptr, allocator, __shared_ptr_access
|
#include <memory> // for shared_ptr, allocator, __shared_ptr_access
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
#include "ftxui/component/component.hpp" // for Renderer, ResizableSplitBottom, ResizableSplitLeft, ResizableSplitRight, ResizableSplitTop
|
#include "ftxui/component/component.hpp" // for Renderer, ResizableSplitBottom, ResizableSplitLeft, ResizableSplitRight, ResizableSplitTop
|
||||||
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
||||||
#include "ftxui/dom/elements.hpp" // for Element, operator|, text, center, border
|
#include "ftxui/dom/elements.hpp" // for Element, operator|, text, center, border
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,17 @@
|
|||||||
// Copyright 2023 Arthur Sonzogni. All rights reserved.
|
// Copyright 2023 Arthur Sonzogni. All rights reserved.
|
||||||
// Use of this source code is governed by the MIT license that can be found in
|
// Use of this source code is governed by the MIT license that can be found in
|
||||||
// the LICENSE file.
|
// the LICENSE file.
|
||||||
|
#include <cstdlib>
|
||||||
|
#include <functional>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include <ftxui/component/component.hpp>
|
#include <ftxui/component/component.hpp>
|
||||||
#include <ftxui/component/screen_interactive.hpp>
|
#include <ftxui/component/screen_interactive.hpp>
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
import ftxui.dom;
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|
||||||
|
|||||||
@@ -3,12 +3,18 @@
|
|||||||
// the LICENSE file.
|
// the LICENSE file.
|
||||||
#include <string> // for char_traits, operator+, string, basic_string
|
#include <string> // for char_traits, operator+, string, basic_string
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/component/component.hpp" // for Input, Renderer, Vertical
|
#include "ftxui/component/component.hpp" // for Input, Renderer, Vertical
|
||||||
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||||
#include "ftxui/component/component_options.hpp" // for InputOption
|
#include "ftxui/component/component_options.hpp" // for InputOption
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for Component, ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for Component, ScreenInteractive
|
||||||
#include "ftxui/dom/elements.hpp" // for text, hbox, separator, Element, operator|, vbox, border
|
#include "ftxui/dom/elements.hpp" // for text, hbox, separator, Element, operator|, vbox, border
|
||||||
#include "ftxui/util/ref.hpp" // for Ref
|
#include "ftxui/util/ref.hpp" // for Ref
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.util;
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
#include "ftxui/component/component.hpp" // for Slider
|
#include "ftxui/component/component.hpp" // for Slider
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|
||||||
|
|||||||
@@ -3,23 +3,31 @@
|
|||||||
// the LICENSE file.
|
// the LICENSE file.
|
||||||
#include <array> // for array
|
#include <array> // for array
|
||||||
#include <cmath> // for sin
|
#include <cmath> // for sin
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include <ftxui/component/component_base.hpp> // for ComponentBase
|
#include <ftxui/component/component_base.hpp> // for ComponentBase
|
||||||
#include <ftxui/component/component_options.hpp> // for SliderOption
|
#include <ftxui/component/component_options.hpp> // for SliderOption
|
||||||
#include <ftxui/dom/direction.hpp> // for Direction, Direction::Up
|
#include <ftxui/dom/direction.hpp> // for Direction, Direction::Up
|
||||||
#include <ftxui/dom/elements.hpp> // for size, GREATER_THAN, HEIGHT
|
#include <ftxui/dom/elements.hpp> // for size, GREATER_THAN, HEIGHT
|
||||||
#include <ftxui/util/ref.hpp> // for ConstRef, Ref
|
#include <ftxui/util/ref.hpp> // for ConstRef, Ref
|
||||||
|
#endif
|
||||||
#include <memory> // for shared_ptr, __shared_ptr_access
|
#include <memory> // for shared_ptr, __shared_ptr_access
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
#include "ftxui/component/component.hpp" // for Horizontal, Slider, operator|=
|
#include "ftxui/component/component.hpp" // for Horizontal, Slider, operator|=
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.util;
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
auto screen = ScreenInteractive::TerminalOutput();
|
auto screen = ScreenInteractive::TerminalOutput();
|
||||||
std::array<int, 30> values;
|
std::array<int, 30> values;
|
||||||
for (int i = 0; i < values.size(); ++i) {
|
for (size_t i = 0; i < values.size(); ++i) {
|
||||||
values[i] = 50 + 20 * std::sin(i * 0.3);
|
values[i] = 50 + 20 * std::sin(i * 0.3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,12 +4,18 @@
|
|||||||
#include <memory> // for allocator, shared_ptr, __shared_ptr_access
|
#include <memory> // for allocator, shared_ptr, __shared_ptr_access
|
||||||
#include <string> // for char_traits, operator+, to_string
|
#include <string> // for char_traits, operator+, to_string
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
#include "ftxui/component/component.hpp" // for Slider, Renderer, Vertical
|
#include "ftxui/component/component.hpp" // for Slider, Renderer, Vertical
|
||||||
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
||||||
#include "ftxui/dom/elements.hpp" // for separator, operator|, Element, size, text, vbox, xflex, bgcolor, hbox, GREATER_THAN, WIDTH, border, HEIGHT, LESS_THAN
|
#include "ftxui/dom/elements.hpp" // for separator, operator|, Element, size, text, vbox, xflex, bgcolor, hbox, GREATER_THAN, WIDTH, border, HEIGHT, LESS_THAN
|
||||||
#include "ftxui/screen/color.hpp" // for Color
|
#include "ftxui/screen/color.hpp" // for Color
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|
||||||
|
|||||||
@@ -5,11 +5,16 @@
|
|||||||
#include <string> // for string, basic_string
|
#include <string> // for string, basic_string
|
||||||
#include <vector> // for vector
|
#include <vector> // for vector
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
#include "ftxui/component/component.hpp" // for Radiobox, Renderer, Tab, Toggle, Vertical
|
#include "ftxui/component/component.hpp" // for Radiobox, Renderer, Tab, Toggle, Vertical
|
||||||
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
||||||
#include "ftxui/dom/elements.hpp" // for Element, separator, operator|, vbox, border
|
#include "ftxui/dom/elements.hpp" // for Element, separator, operator|, vbox, border
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
import ftxui.dom;
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|
||||||
|
|||||||
@@ -5,11 +5,16 @@
|
|||||||
#include <string> // for string, basic_string
|
#include <string> // for string, basic_string
|
||||||
#include <vector> // for vector
|
#include <vector> // for vector
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
#include "ftxui/component/component.hpp" // for Radiobox, Horizontal, Menu, Renderer, Tab
|
#include "ftxui/component/component.hpp" // for Radiobox, Horizontal, Menu, Renderer, Tab
|
||||||
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
||||||
#include "ftxui/dom/elements.hpp" // for Element, separator, hbox, operator|, border
|
#include "ftxui/dom/elements.hpp" // for Element, separator, hbox, operator|, border
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
import ftxui.dom;
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|
||||||
|
|||||||
@@ -4,11 +4,16 @@
|
|||||||
#include <memory> // for allocator, __shared_ptr_access, shared_ptr
|
#include <memory> // for allocator, __shared_ptr_access, shared_ptr
|
||||||
#include <string> // for string
|
#include <string> // for string
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
#include "ftxui/component/component.hpp" // for Input, Renderer, ResizableSplitLeft
|
#include "ftxui/component/component.hpp" // for Input, Renderer, ResizableSplitLeft
|
||||||
#include "ftxui/component/component_base.hpp" // for ComponentBase, Component
|
#include "ftxui/component/component_base.hpp" // for ComponentBase, Component
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
||||||
#include "ftxui/dom/elements.hpp" // for operator|, separator, text, Element, flex, vbox, border
|
#include "ftxui/dom/elements.hpp" // for operator|, separator, text, Element, flex, vbox, border
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
import ftxui.dom;
|
||||||
|
#endif
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|||||||
@@ -5,11 +5,16 @@
|
|||||||
#include <string> // for string, basic_string
|
#include <string> // for string, basic_string
|
||||||
#include <vector> // for vector
|
#include <vector> // for vector
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
#include "ftxui/component/component.hpp" // for Toggle, Renderer, Vertical
|
#include "ftxui/component/component.hpp" // for Toggle, Renderer, Vertical
|
||||||
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for Component, ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for Component, ScreenInteractive
|
||||||
#include "ftxui/dom/elements.hpp" // for text, hbox, vbox, Element
|
#include "ftxui/dom/elements.hpp" // for text, hbox, vbox, Element
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
import ftxui.dom;
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,16 @@
|
|||||||
// Copyright 2023 Arthur Sonzogni. All rights reserved.
|
// Copyright 2023 Arthur Sonzogni. All rights reserved.
|
||||||
// Use of this source code is governed by the MIT license that can be found in
|
// Use of this source code is governed by the MIT license that can be found in
|
||||||
// the LICENSE file.
|
// the LICENSE file.
|
||||||
|
#include <cstdlib>
|
||||||
|
#include <functional>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include <ftxui/component/component.hpp>
|
#include <ftxui/component/component.hpp>
|
||||||
#include <ftxui/component/screen_interactive.hpp>
|
#include <ftxui/component/screen_interactive.hpp>
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|
||||||
|
|||||||
@@ -6,11 +6,16 @@
|
|||||||
#include <memory> // for shared_ptr, __shared_ptr_access, allocator
|
#include <memory> // for shared_ptr, __shared_ptr_access, allocator
|
||||||
#include <string> // for getline, string
|
#include <string> // for getline, string
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
#include "ftxui/component/captured_mouse.hpp" // for ftxui
|
||||||
#include "ftxui/component/component.hpp" // for Button, Horizontal, Renderer
|
#include "ftxui/component/component.hpp" // for Button, Horizontal, Renderer
|
||||||
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
#include "ftxui/component/component_base.hpp" // for ComponentBase
|
||||||
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
#include "ftxui/component/screen_interactive.hpp" // for ScreenInteractive
|
||||||
#include "ftxui/dom/elements.hpp" // for operator|, filler, Element, borderEmpty, hbox, size, paragraph, vbox, LESS_THAN, border, center, HEIGHT, WIDTH
|
#include "ftxui/dom/elements.hpp" // for operator|, filler, Element, borderEmpty, hbox, size, paragraph, vbox, LESS_THAN, border, center, HEIGHT, WIDTH
|
||||||
|
#else
|
||||||
|
import ftxui.component;
|
||||||
|
import ftxui.dom;
|
||||||
|
#endif
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|||||||
@@ -2,12 +2,19 @@
|
|||||||
// Use of this source code is governed by the MIT license that can be found in
|
// Use of this source code is governed by the MIT license that can be found in
|
||||||
// the LICENSE file.
|
// the LICENSE file.
|
||||||
#include <stdlib.h> // for EXIT_SUCCESS
|
#include <stdlib.h> // for EXIT_SUCCESS
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include <ftxui/dom/elements.hpp> // for text, operator|, vbox, border, Element, Fit, hbox
|
#include <ftxui/dom/elements.hpp> // for text, operator|, vbox, border, Element, Fit, hbox
|
||||||
#include <ftxui/screen/screen.hpp> // for Full, Screen
|
#include <ftxui/screen/screen.hpp> // for Full, Screen
|
||||||
|
#endif
|
||||||
#include <memory> // for allocator
|
#include <memory> // for allocator
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/dom/node.hpp" // for Render
|
#include "ftxui/dom/node.hpp" // for Render
|
||||||
#include "ftxui/screen/color.hpp" // for ftxui
|
#include "ftxui/screen/color.hpp" // for ftxui
|
||||||
|
#else
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
#endif
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|||||||
@@ -1,13 +1,21 @@
|
|||||||
// Copyright 2020 Arthur Sonzogni. All rights reserved.
|
// Copyright 2020 Arthur Sonzogni. All rights reserved.
|
||||||
// Use of this source code is governed by the MIT license that can be found in
|
// Use of this source code is governed by the MIT license that can be found in
|
||||||
// the LICENSE file.
|
// the LICENSE file.
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include <ftxui/dom/elements.hpp> // for operator|, text, Element, Fit, borderDouble, borderHeavy, borderLight, borderRounded, vbox
|
#include <ftxui/dom/elements.hpp> // for operator|, text, Element, Fit, borderDouble, borderHeavy, borderLight, borderRounded, vbox
|
||||||
#include <ftxui/screen/screen.hpp> // for Screen
|
#include <ftxui/screen/screen.hpp> // for Screen
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <iostream> // for endl, cout, ostream
|
#include <iostream> // for endl, cout, ostream
|
||||||
#include <memory> // for allocator
|
#include <memory> // for allocator
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/dom/node.hpp" // for Render
|
#include "ftxui/dom/node.hpp" // for Render
|
||||||
#include "ftxui/screen/color.hpp" // for ftxui
|
#include "ftxui/screen/color.hpp" // for ftxui
|
||||||
|
#else
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
#endif
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|||||||
@@ -1,13 +1,21 @@
|
|||||||
// Copyright 2020 Arthur Sonzogni. All rights reserved.
|
// Copyright 2020 Arthur Sonzogni. All rights reserved.
|
||||||
// Use of this source code is governed by the MIT license that can be found in
|
// Use of this source code is governed by the MIT license that can be found in
|
||||||
// the LICENSE file.
|
// the LICENSE file.
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include <ftxui/dom/elements.hpp> // for operator|, text, Element, Fit, borderDouble, borderHeavy, borderLight, borderRounded, vbox
|
#include <ftxui/dom/elements.hpp> // for operator|, text, Element, Fit, borderDouble, borderHeavy, borderLight, borderRounded, vbox
|
||||||
#include <ftxui/screen/screen.hpp> // for Screen
|
#include <ftxui/screen/screen.hpp> // for Screen
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <iostream> // for endl, cout, ostream
|
#include <iostream> // for endl, cout, ostream
|
||||||
#include <memory> // for allocator
|
#include <memory> // for allocator
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/dom/node.hpp" // for Render
|
#include "ftxui/dom/node.hpp" // for Render
|
||||||
#include "ftxui/screen/color.hpp" // for ftxui
|
#include "ftxui/screen/color.hpp" // for ftxui
|
||||||
|
#else
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
#endif
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|||||||
@@ -3,13 +3,22 @@
|
|||||||
// the LICENSE file.
|
// the LICENSE file.
|
||||||
#include <stdio.h> // for getchar
|
#include <stdio.h> // for getchar
|
||||||
#include <cmath> // for cos
|
#include <cmath> // for cos
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include <ftxui/dom/elements.hpp> // for Fit, canvas, operator|, border, Element
|
#include <ftxui/dom/elements.hpp> // for Fit, canvas, operator|, border, Element
|
||||||
#include <ftxui/screen/screen.hpp> // for Pixel, Screen
|
#include <ftxui/screen/screen.hpp> // for Pixel, Screen
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <vector> // for vector, allocator
|
#include <vector> // for vector, allocator
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/dom/canvas.hpp" // for Canvas
|
#include "ftxui/dom/canvas.hpp" // for Canvas
|
||||||
#include "ftxui/dom/node.hpp" // for Render
|
#include "ftxui/dom/node.hpp" // for Render
|
||||||
#include "ftxui/screen/color.hpp" // for Color, Color::Red, Color::Blue, Color::Green, ftxui
|
#include "ftxui/screen/color.hpp" // for Color, Color::Red, Color::Blue, Color::Green, ftxui
|
||||||
|
#else
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
#endif
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|||||||
@@ -1,16 +1,24 @@
|
|||||||
// Copyright 2020 Arthur Sonzogni. All rights reserved.
|
// Copyright 2020 Arthur Sonzogni. All rights reserved.
|
||||||
// Use of this source code is governed by the MIT license that can be found in
|
// Use of this source code is governed by the MIT license that can be found in
|
||||||
// the LICENSE file.
|
// the LICENSE file.
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include <ftxui/screen/color_info.hpp> // for ColorInfo
|
#include <ftxui/screen/color_info.hpp> // for ColorInfo
|
||||||
#include <ftxui/screen/screen.hpp> // for Full, Screen
|
#include <ftxui/screen/screen.hpp> // for Full, Screen
|
||||||
#include <ftxui/screen/terminal.hpp> // for ColorSupport, Color, Palette16, Palette256, TrueColor
|
#include <ftxui/screen/terminal.hpp> // for ColorSupport, Color, Palette16, Palette256, TrueColor
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <memory> // for allocator, shared_ptr
|
#include <memory> // for allocator, shared_ptr
|
||||||
#include <utility> // for move
|
#include <utility> // for move
|
||||||
#include <vector> // for vector
|
#include <vector> // for vector
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/dom/elements.hpp" // for text, bgcolor, color, vbox, hbox, separator, operator|, Elements, Element, Fit, border
|
#include "ftxui/dom/elements.hpp" // for text, bgcolor, color, vbox, hbox, separator, operator|, Elements, Element, Fit, border
|
||||||
#include "ftxui/dom/node.hpp" // for Render
|
#include "ftxui/dom/node.hpp" // for Render
|
||||||
#include "ftxui/screen/color.hpp" // for Color, Color::Black, Color::Blue, Color::BlueLight, Color::Cyan, Color::CyanLight, Color::Default, Color::GrayDark, Color::GrayLight, Color::Green, Color::GreenLight, Color::Magenta, Color::MagentaLight, Color::Red, Color::RedLight, Color::White, Color::Yellow, Color::YellowLight, Color::Palette256, ftxui
|
#include "ftxui/screen/color.hpp" // for Color, Color::Black, Color::Blue, Color::BlueLight, Color::Cyan, Color::CyanLight, Color::Default, Color::GrayDark, Color::GrayLight, Color::Green, Color::GreenLight, Color::Magenta, Color::MagentaLight, Color::Red, Color::RedLight, Color::White, Color::Yellow, Color::YellowLight, Color::Palette256, ftxui
|
||||||
|
#else
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
#include "./color_info_sorted_2d.ipp" // for ColorInfoSorted2D
|
#include "./color_info_sorted_2d.ipp" // for ColorInfoSorted2D
|
||||||
|
|||||||
@@ -1,14 +1,22 @@
|
|||||||
// Copyright 2020 Arthur Sonzogni. All rights reserved.
|
// Copyright 2020 Arthur Sonzogni. All rights reserved.
|
||||||
// Use of this source code is governed by the MIT license that can be found in
|
// Use of this source code is governed by the MIT license that can be found in
|
||||||
// the LICENSE file.
|
// the LICENSE file.
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include <ftxui/dom/elements.hpp> // for text, bgcolor, hbox, operator|, Elements, Fit, vbox, Element
|
#include <ftxui/dom/elements.hpp> // for text, bgcolor, hbox, operator|, Elements, Fit, vbox, Element
|
||||||
#include <ftxui/screen/color_info.hpp> // for ColorInfo
|
#include <ftxui/screen/color_info.hpp> // for ColorInfo
|
||||||
#include <ftxui/screen/screen.hpp> // for Full, Screen
|
#include <ftxui/screen/screen.hpp> // for Full, Screen
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <utility> // for move
|
#include <utility> // for move
|
||||||
#include <vector> // for vector, allocator
|
#include <vector> // for vector, allocator
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/dom/node.hpp" // for Render
|
#include "ftxui/dom/node.hpp" // for Render
|
||||||
#include "ftxui/screen/color.hpp" // for Color, Color::Palette256, ftxui
|
#include "ftxui/screen/color.hpp" // for Color, Color::Palette256, ftxui
|
||||||
|
#else
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
#include "./color_info_sorted_2d.ipp" // for ColorInfoSorted2D
|
#include "./color_info_sorted_2d.ipp" // for ColorInfoSorted2D
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <ftxui/screen/color_info.hpp> // for ftxui::ColorInfo
|
#include <ftxui/screen/color_info.hpp> // for ftxui::ColorInfo
|
||||||
|
|||||||
@@ -1,13 +1,21 @@
|
|||||||
// Copyright 2020 Arthur Sonzogni. All rights reserved.
|
// Copyright 2020 Arthur Sonzogni. All rights reserved.
|
||||||
// Use of this source code is governed by the MIT license that can be found in
|
// Use of this source code is governed by the MIT license that can be found in
|
||||||
// the LICENSE file.
|
// the LICENSE file.
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include <ftxui/dom/elements.hpp> // for operator|, Elements, Fit, bgcolor, color, hbox, text, vbox, Element
|
#include <ftxui/dom/elements.hpp> // for operator|, Elements, Fit, bgcolor, color, hbox, text, vbox, Element
|
||||||
#include <ftxui/screen/screen.hpp> // for Full, Screen
|
#include <ftxui/screen/screen.hpp> // for Full, Screen
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <memory> // for allocator
|
#include <memory> // for allocator
|
||||||
#include <utility> // for move
|
#include <utility> // for move
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/dom/node.hpp" // for Render
|
#include "ftxui/dom/node.hpp" // for Render
|
||||||
#include "ftxui/screen/color.hpp" // for Color, ftxui
|
#include "ftxui/screen/color.hpp" // for Color, ftxui
|
||||||
|
#else
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
#endif
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|||||||
@@ -1,18 +1,25 @@
|
|||||||
// Copyright 2020 Arthur Sonzogni. All rights reserved.
|
// Copyright 2020 Arthur Sonzogni. All rights reserved.
|
||||||
// Use of this source code is governed by the MIT license that can be found in
|
// Use of this source code is governed by the MIT license that can be found in
|
||||||
// the LICENSE file.
|
// the LICENSE file.
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include <ftxui/dom/elements.hpp> // for hbox, text, bgcolor, operator|, vbox, Elements, window, Element, Fit
|
#include <ftxui/dom/elements.hpp> // for hbox, text, bgcolor, operator|, vbox, Elements, window, Element, Fit
|
||||||
#include <ftxui/screen/screen.hpp> // for Full, Screen
|
#include <ftxui/screen/screen.hpp> // for Full, Screen
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <memory> // for allocator
|
#include <memory> // for allocator
|
||||||
#include <utility> // for move
|
#include <utility> // for move
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/dom/node.hpp" // for Render
|
#include "ftxui/dom/node.hpp" // for Render
|
||||||
#include "ftxui/screen/color.hpp" // for Color, ftxui
|
#include "ftxui/screen/color.hpp" // for Color, ftxui
|
||||||
|
#else
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
#endif
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|
||||||
int saturation = 255;
|
|
||||||
Elements red_line;
|
Elements red_line;
|
||||||
Elements green_line;
|
Elements green_line;
|
||||||
Elements blue_line;
|
Elements blue_line;
|
||||||
|
|||||||
@@ -1,12 +1,20 @@
|
|||||||
// Copyright 2020 Arthur Sonzogni. All rights reserved.
|
// Copyright 2020 Arthur Sonzogni. All rights reserved.
|
||||||
// Use of this source code is governed by the MIT license that can be found in
|
// Use of this source code is governed by the MIT license that can be found in
|
||||||
// the LICENSE file.
|
// the LICENSE file.
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include <ftxui/dom/elements.hpp> // for text, operator|, border, Element, vbox, center, Fit, dbox
|
#include <ftxui/dom/elements.hpp> // for text, operator|, border, Element, vbox, center, Fit, dbox
|
||||||
#include <ftxui/screen/screen.hpp> // for Full, Screen
|
#include <ftxui/screen/screen.hpp> // for Full, Screen
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <memory> // for allocator
|
#include <memory> // for allocator
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/dom/node.hpp" // for Render
|
#include "ftxui/dom/node.hpp" // for Render
|
||||||
#include "ftxui/screen/color.hpp" // for ftxui
|
#include "ftxui/screen/color.hpp" // for ftxui
|
||||||
|
#else
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
#endif
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|||||||
@@ -2,14 +2,23 @@
|
|||||||
// Use of this source code is governed by the MIT license that can be found in
|
// Use of this source code is governed by the MIT license that can be found in
|
||||||
// the LICENSE file.
|
// the LICENSE file.
|
||||||
#include <chrono> // for operator""s, chrono_literals
|
#include <chrono> // for operator""s, chrono_literals
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include <ftxui/dom/elements.hpp> // for text, gauge, operator|, flex, hbox, Element
|
#include <ftxui/dom/elements.hpp> // for text, gauge, operator|, flex, hbox, Element
|
||||||
#include <ftxui/screen/screen.hpp> // for Screen
|
#include <ftxui/screen/screen.hpp> // for Screen
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <iostream> // for cout, endl, ostream
|
#include <iostream> // for cout, endl, ostream
|
||||||
#include <string> // for allocator, char_traits, operator+, operator<<, string, to_string, basic_string
|
#include <string> // for allocator, char_traits, operator+, operator<<, string, to_string, basic_string
|
||||||
#include <thread> // for sleep_for
|
#include <thread> // for sleep_for
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/dom/node.hpp" // for Render
|
#include "ftxui/dom/node.hpp" // for Render
|
||||||
#include "ftxui/screen/color.hpp" // for ftxui
|
#include "ftxui/screen/color.hpp" // for ftxui
|
||||||
|
#else
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
#endif
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|||||||
@@ -2,14 +2,23 @@
|
|||||||
// Use of this source code is governed by the MIT license that can be found in
|
// Use of this source code is governed by the MIT license that can be found in
|
||||||
// the LICENSE file.
|
// the LICENSE file.
|
||||||
#include <chrono> // for operator""s, chrono_literals
|
#include <chrono> // for operator""s, chrono_literals
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include <ftxui/dom/elements.hpp> // for filler, operator|, separator, text, border, Element, vbox, vtext, hbox, center, gaugeDown, gaugeLeft, gaugeRight, gaugeUp
|
#include <ftxui/dom/elements.hpp> // for filler, operator|, separator, text, border, Element, vbox, vtext, hbox, center, gaugeDown, gaugeLeft, gaugeRight, gaugeUp
|
||||||
#include <ftxui/screen/screen.hpp> // for Screen
|
#include <ftxui/screen/screen.hpp> // for Screen
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <iostream> // for cout, endl, ostream
|
#include <iostream> // for cout, endl, ostream
|
||||||
#include <string> // for allocator, operator+, operator<<, string, to_string
|
#include <string> // for allocator, operator+, operator<<, string, to_string
|
||||||
#include <thread> // for sleep_for
|
#include <thread> // for sleep_for
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/dom/node.hpp" // for Render
|
#include "ftxui/dom/node.hpp" // for Render
|
||||||
#include "ftxui/screen/color.hpp" // for ftxui
|
#include "ftxui/screen/color.hpp" // for ftxui
|
||||||
|
#else
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
#endif
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|||||||
@@ -3,17 +3,27 @@
|
|||||||
// the LICENSE file.
|
// the LICENSE file.
|
||||||
#include <chrono> // for operator""s, chrono_literals
|
#include <chrono> // for operator""s, chrono_literals
|
||||||
#include <cmath> // for sin
|
#include <cmath> // for sin
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include <ftxui/dom/elements.hpp> // for graph, operator|, separator, color, Element, vbox, flex, inverted, operator|=, Fit, hbox, size, border, GREATER_THAN, HEIGHT
|
#include <ftxui/dom/elements.hpp> // for graph, operator|, separator, color, Element, vbox, flex, inverted, operator|=, Fit, hbox, size, border, GREATER_THAN, HEIGHT
|
||||||
#include <ftxui/screen/screen.hpp> // for Full, Screen
|
#include <ftxui/screen/screen.hpp> // for Full, Screen
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <functional> // for ref, reference_wrapper
|
#include <functional> // for ref, reference_wrapper
|
||||||
#include <iostream> // for cout, ostream
|
#include <iostream> // for cout, ostream
|
||||||
#include <memory> // for shared_ptr
|
#include <memory> // for shared_ptr
|
||||||
#include <string> // for operator<<, string
|
#include <string> // for operator<<, string
|
||||||
#include <thread> // for sleep_for
|
#include <thread> // for sleep_for
|
||||||
|
#include <utility> // for ignore
|
||||||
#include <vector> // for vector
|
#include <vector> // for vector
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/dom/node.hpp" // for Render
|
#include "ftxui/dom/node.hpp" // for Render
|
||||||
#include "ftxui/screen/color.hpp" // for Color, Color::BlueLight, Color::RedLight, Color::YellowLight, ftxui
|
#include "ftxui/screen/color.hpp" // for Color, Color::BlueLight, Color::RedLight, Color::YellowLight, ftxui
|
||||||
|
#else
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
#endif
|
||||||
|
|
||||||
class Graph {
|
class Graph {
|
||||||
public:
|
public:
|
||||||
@@ -49,6 +59,7 @@ int main() {
|
|||||||
|
|
||||||
std::string reset_position;
|
std::string reset_position;
|
||||||
for (int i = 0;; ++i) {
|
for (int i = 0;; ++i) {
|
||||||
|
std::ignore = i;
|
||||||
auto document = hbox({
|
auto document = hbox({
|
||||||
vbox({
|
vbox({
|
||||||
graph(std::ref(my_graph)),
|
graph(std::ref(my_graph)),
|
||||||
|
|||||||
@@ -2,12 +2,21 @@
|
|||||||
// Use of this source code is governed by the MIT license that can be found in
|
// Use of this source code is governed by the MIT license that can be found in
|
||||||
// the LICENSE file.
|
// the LICENSE file.
|
||||||
#include <stdio.h> // for getchar
|
#include <stdio.h> // for getchar
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include <ftxui/dom/elements.hpp> // for Elements, gridbox, Fit, operator|, text, border, Element
|
#include <ftxui/dom/elements.hpp> // for Elements, gridbox, Fit, operator|, text, border, Element
|
||||||
#include <ftxui/screen/screen.hpp> // for Screen
|
#include <ftxui/screen/screen.hpp> // for Screen
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <memory> // for allocator, shared_ptr
|
#include <memory> // for allocator, shared_ptr
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/dom/node.hpp" // for Render
|
#include "ftxui/dom/node.hpp" // for Render
|
||||||
#include "ftxui/screen/color.hpp" // for ftxui
|
#include "ftxui/screen/color.hpp" // for ftxui
|
||||||
|
#else
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
#endif
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|||||||
@@ -2,12 +2,21 @@
|
|||||||
// Use of this source code is governed by the MIT license that can be found in
|
// Use of this source code is governed by the MIT license that can be found in
|
||||||
// the LICENSE file.
|
// the LICENSE file.
|
||||||
#include <stdio.h> // for getchar
|
#include <stdio.h> // for getchar
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include <ftxui/dom/elements.hpp> // for operator|, size, Element, text, hcenter, Decorator, Fit, WIDTH, hflow, window, EQUAL, GREATER_THAN, HEIGHT, bold, border, dim, LESS_THAN
|
#include <ftxui/dom/elements.hpp> // for operator|, size, Element, text, hcenter, Decorator, Fit, WIDTH, hflow, window, EQUAL, GREATER_THAN, HEIGHT, bold, border, dim, LESS_THAN
|
||||||
#include <ftxui/screen/screen.hpp> // for Full, Screen
|
#include <ftxui/screen/screen.hpp> // for Full, Screen
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <string> // for allocator, char_traits, operator+, to_string, string
|
#include <string> // for allocator, char_traits, operator+, to_string, string
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/dom/node.hpp" // for Render
|
#include "ftxui/dom/node.hpp" // for Render
|
||||||
#include "ftxui/screen/color.hpp" // for ftxui
|
#include "ftxui/screen/color.hpp" // for ftxui
|
||||||
|
#else
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
#endif
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|||||||
@@ -2,15 +2,24 @@
|
|||||||
// Use of this source code is governed by the MIT license that can be found in
|
// Use of this source code is governed by the MIT license that can be found in
|
||||||
// the LICENSE file.
|
// the LICENSE file.
|
||||||
#include <chrono> // for operator""s, chrono_literals
|
#include <chrono> // for operator""s, chrono_literals
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include <ftxui/screen/screen.hpp> // for Screen
|
#include <ftxui/screen/screen.hpp> // for Screen
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <iostream> // for cout, ostream
|
#include <iostream> // for cout, ostream
|
||||||
#include <string> // for allocator, operator<<, string
|
#include <string> // for allocator, operator<<, string
|
||||||
#include <thread> // for sleep_for
|
#include <thread> // for sleep_for
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/dom/elements.hpp" // for paragraph, text, operator|, Element, border, Fit, color, hflow, spinner, vbox, bold, dim, underlined
|
#include "ftxui/dom/elements.hpp" // for paragraph, text, operator|, Element, border, Fit, color, hflow, spinner, vbox, bold, dim, underlined
|
||||||
#include "ftxui/dom/node.hpp" // for Render
|
#include "ftxui/dom/node.hpp" // for Render
|
||||||
#include "ftxui/screen/box.hpp" // for ftxui
|
#include "ftxui/screen/box.hpp" // for ftxui
|
||||||
#include "ftxui/screen/color.hpp" // for Color, Color::Red
|
#include "ftxui/screen/color.hpp" // for Color, Color::Red
|
||||||
|
#else
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
#endif
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|||||||
@@ -1,13 +1,21 @@
|
|||||||
// Copyright 2023 Arthur Sonzogni. All rights reserved.
|
// Copyright 2023 Arthur Sonzogni. All rights reserved.
|
||||||
// Use of this source code is governed by the MIT license that can be found in
|
// Use of this source code is governed by the MIT license that can be found in
|
||||||
// the LICENSE file.
|
// the LICENSE file.
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include <ftxui/dom/elements.hpp> // for bgcolor, operator|, operator|=, text, center, Element
|
#include <ftxui/dom/elements.hpp> // for bgcolor, operator|, operator|=, text, center, Element
|
||||||
#include <ftxui/dom/linear_gradient.hpp> // for LinearGradient::Stop, LinearGradient
|
#include <ftxui/dom/linear_gradient.hpp> // for LinearGradient::Stop, LinearGradient
|
||||||
#include <ftxui/screen/screen.hpp> // for Full, Screen
|
#include <ftxui/screen/screen.hpp> // for Full, Screen
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <memory> // for allocator, shared_ptr
|
#include <memory> // for allocator, shared_ptr
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/dom/node.hpp" // for Render
|
#include "ftxui/dom/node.hpp" // for Render
|
||||||
#include "ftxui/screen/color.hpp" // for Color, Color::DeepPink1, Color::DeepSkyBlue1, Color::Yellow, ftxui
|
#include "ftxui/screen/color.hpp" // for Color, Color::DeepPink1, Color::DeepSkyBlue1, Color::Yellow, ftxui
|
||||||
|
#else
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
#endif
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|||||||
@@ -2,8 +2,12 @@
|
|||||||
// Use of this source code is governed by the MIT license that can be found in
|
// Use of this source code is governed by the MIT license that can be found in
|
||||||
// the LICENSE file.
|
// the LICENSE file.
|
||||||
#include <chrono> // for operator""s, chrono_literals
|
#include <chrono> // for operator""s, chrono_literals
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include <ftxui/dom/elements.hpp> // for operator|, text, Element, hbox, bold, color, filler, separator, vbox, window, gauge, Fit, size, dim, EQUAL, WIDTH
|
#include <ftxui/dom/elements.hpp> // for operator|, text, Element, hbox, bold, color, filler, separator, vbox, window, gauge, Fit, size, dim, EQUAL, WIDTH
|
||||||
#include <ftxui/screen/screen.hpp> // for Full, Screen
|
#include <ftxui/screen/screen.hpp> // for Full, Screen
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <iostream> // for cout, endl, ostream
|
#include <iostream> // for cout, endl, ostream
|
||||||
#include <list> // for list, operator==, _List_iterator, _List_iterator<>::_Self
|
#include <list> // for list, operator==, _List_iterator, _List_iterator<>::_Self
|
||||||
#include <memory> // for allocator, shared_ptr, allocator_traits<>::value_type
|
#include <memory> // for allocator, shared_ptr, allocator_traits<>::value_type
|
||||||
@@ -12,8 +16,13 @@
|
|||||||
#include <utility> // for move
|
#include <utility> // for move
|
||||||
#include <vector> // for vector
|
#include <vector> // for vector
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/dom/node.hpp" // for Render
|
#include "ftxui/dom/node.hpp" // for Render
|
||||||
#include "ftxui/screen/color.hpp" // for Color, Color::Green, Color::Red, Color::RedLight, ftxui
|
#include "ftxui/screen/color.hpp" // for Color, Color::Green, Color::Red, Color::RedLight, ftxui
|
||||||
|
#else
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
#endif
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|||||||
@@ -2,15 +2,24 @@
|
|||||||
// Use of this source code is governed by the MIT license that can be found in
|
// Use of this source code is governed by the MIT license that can be found in
|
||||||
// the LICENSE file.
|
// the LICENSE file.
|
||||||
#include <chrono> // for operator""s, chrono_literals
|
#include <chrono> // for operator""s, chrono_literals
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include <ftxui/screen/screen.hpp> // for Full, Screen
|
#include <ftxui/screen/screen.hpp> // for Full, Screen
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <iostream> // for cout, ostream
|
#include <iostream> // for cout, ostream
|
||||||
#include <memory> // for allocator, shared_ptr
|
#include <memory> // for allocator, shared_ptr
|
||||||
#include <string> // for string, operator<<
|
#include <string> // for string, operator<<
|
||||||
#include <thread> // for sleep_for
|
#include <thread> // for sleep_for
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/dom/elements.hpp" // for hflow, paragraph, separator, hbox, vbox, filler, operator|, border, Element
|
#include "ftxui/dom/elements.hpp" // for hflow, paragraph, separator, hbox, vbox, filler, operator|, border, Element
|
||||||
#include "ftxui/dom/node.hpp" // for Render
|
#include "ftxui/dom/node.hpp" // for Render
|
||||||
#include "ftxui/screen/box.hpp" // for ftxui
|
#include "ftxui/screen/box.hpp" // for ftxui
|
||||||
|
#else
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace std::chrono_literals;
|
using namespace std::chrono_literals;
|
||||||
int main() {
|
int main() {
|
||||||
|
|||||||
@@ -1,12 +1,20 @@
|
|||||||
// Copyright 2020 Arthur Sonzogni. All rights reserved.
|
// Copyright 2020 Arthur Sonzogni. All rights reserved.
|
||||||
// Use of this source code is governed by the MIT license that can be found in
|
// Use of this source code is governed by the MIT license that can be found in
|
||||||
// the LICENSE file.
|
// the LICENSE file.
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include <ftxui/dom/elements.hpp> // for text, center, separator, operator|, flex, Element, vbox, Fit, hbox, border
|
#include <ftxui/dom/elements.hpp> // for text, center, separator, operator|, flex, Element, vbox, Fit, hbox, border
|
||||||
#include <ftxui/screen/screen.hpp> // for Full, Screen
|
#include <ftxui/screen/screen.hpp> // for Full, Screen
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <memory> // for allocator
|
#include <memory> // for allocator
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/dom/node.hpp" // for Render
|
#include "ftxui/dom/node.hpp" // for Render
|
||||||
#include "ftxui/screen/color.hpp" // for ftxui
|
#include "ftxui/screen/color.hpp" // for ftxui
|
||||||
|
#else
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
#endif
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|||||||
@@ -1,13 +1,21 @@
|
|||||||
// Copyright 2020 Arthur Sonzogni. All rights reserved.
|
// Copyright 2020 Arthur Sonzogni. All rights reserved.
|
||||||
// Use of this source code is governed by the MIT license that can be found in
|
// Use of this source code is governed by the MIT license that can be found in
|
||||||
// the LICENSE file.
|
// the LICENSE file.
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include <ftxui/screen/screen.hpp> // for Screen
|
#include <ftxui/screen/screen.hpp> // for Screen
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <iostream> // for endl, cout, ostream
|
#include <iostream> // for endl, cout, ostream
|
||||||
#include <memory> // for allocator
|
#include <memory> // for allocator
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/dom/elements.hpp" // for text, hbox, separatorDouble, separatorHeavy, separatorLight, vbox, operator|, Element, Fit, borderDouble, borderHeavy, borderLight
|
#include "ftxui/dom/elements.hpp" // for text, hbox, separatorDouble, separatorHeavy, separatorLight, vbox, operator|, Element, Fit, borderDouble, borderHeavy, borderLight
|
||||||
#include "ftxui/dom/node.hpp" // for Render
|
#include "ftxui/dom/node.hpp" // for Render
|
||||||
#include "ftxui/screen/box.hpp" // for ftxui
|
#include "ftxui/screen/box.hpp" // for ftxui
|
||||||
|
#else
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
#endif
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|||||||
@@ -1,14 +1,22 @@
|
|||||||
// Copyright 2020 Arthur Sonzogni. All rights reserved.
|
// Copyright 2020 Arthur Sonzogni. All rights reserved.
|
||||||
// Use of this source code is governed by the MIT license that can be found in
|
// Use of this source code is governed by the MIT license that can be found in
|
||||||
// the LICENSE file.
|
// the LICENSE file.
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include <ftxui/dom/elements.hpp> // for operator|, text, Element, hcenter, Fit, hbox, size, window, Elements, bold, dim, EQUAL, WIDTH
|
#include <ftxui/dom/elements.hpp> // for operator|, text, Element, hcenter, Fit, hbox, size, window, Elements, bold, dim, EQUAL, WIDTH
|
||||||
#include <ftxui/screen/screen.hpp> // for Screen
|
#include <ftxui/screen/screen.hpp> // for Screen
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <memory> // for allocator, shared_ptr
|
#include <memory> // for allocator, shared_ptr
|
||||||
#include <string> // for string, to_string
|
#include <string> // for string, to_string
|
||||||
#include <utility> // for move
|
#include <utility> // for move
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/dom/node.hpp" // for Render
|
#include "ftxui/dom/node.hpp" // for Render
|
||||||
#include "ftxui/screen/color.hpp" // for ftxui
|
#include "ftxui/screen/color.hpp" // for ftxui
|
||||||
|
#else
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
#endif
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|||||||
@@ -2,16 +2,25 @@
|
|||||||
// Use of this source code is governed by the MIT license that can be found in
|
// Use of this source code is governed by the MIT license that can be found in
|
||||||
// the LICENSE file.
|
// the LICENSE file.
|
||||||
#include <chrono> // for operator""s, chrono_literals
|
#include <chrono> // for operator""s, chrono_literals
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include <ftxui/dom/elements.hpp> // for Element, operator|, separator, filler, hbox, size, spinner, text, vbox, bold, border, Fit, EQUAL, WIDTH
|
#include <ftxui/dom/elements.hpp> // for Element, operator|, separator, filler, hbox, size, spinner, text, vbox, bold, border, Fit, EQUAL, WIDTH
|
||||||
#include <ftxui/screen/screen.hpp> // for Full, Screen
|
#include <ftxui/screen/screen.hpp> // for Full, Screen
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <iostream> // for cout, endl, ostream
|
#include <iostream> // for cout, endl, ostream
|
||||||
#include <string> // for to_string, operator<<, string
|
#include <string> // for to_string, operator<<, string
|
||||||
#include <thread> // for sleep_for
|
#include <thread> // for sleep_for
|
||||||
#include <utility> // for move
|
#include <utility> // for move
|
||||||
#include <vector> // for vector
|
#include <vector> // for vector
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/dom/node.hpp" // for Render
|
#include "ftxui/dom/node.hpp" // for Render
|
||||||
#include "ftxui/screen/color.hpp" // for ftxui
|
#include "ftxui/screen/color.hpp" // for ftxui
|
||||||
|
#else
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
#endif
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|||||||
@@ -1,12 +1,20 @@
|
|||||||
// Copyright 2020 Arthur Sonzogni. All rights reserved.
|
// Copyright 2020 Arthur Sonzogni. All rights reserved.
|
||||||
// Use of this source code is governed by the MIT license that can be found in
|
// Use of this source code is governed by the MIT license that can be found in
|
||||||
// the LICENSE file.
|
// the LICENSE file.
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include <ftxui/dom/elements.hpp> // for text, operator|, blink, Fit, hbox, Element
|
#include <ftxui/dom/elements.hpp> // for text, operator|, blink, Fit, hbox, Element
|
||||||
#include <ftxui/screen/screen.hpp> // for Full, Screen
|
#include <ftxui/screen/screen.hpp> // for Full, Screen
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <memory> // for allocator
|
#include <memory> // for allocator
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/dom/node.hpp" // for Render
|
#include "ftxui/dom/node.hpp" // for Render
|
||||||
#include "ftxui/screen/color.hpp" // for ftxui
|
#include "ftxui/screen/color.hpp" // for ftxui
|
||||||
|
#else
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
#endif
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|||||||
@@ -1,12 +1,20 @@
|
|||||||
// Copyright 2020 Arthur Sonzogni. All rights reserved.
|
// Copyright 2020 Arthur Sonzogni. All rights reserved.
|
||||||
// Use of this source code is governed by the MIT license that can be found in
|
// Use of this source code is governed by the MIT license that can be found in
|
||||||
// the LICENSE file.
|
// the LICENSE file.
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include <ftxui/dom/elements.hpp> // for text, operator|, bold, Fit, hbox, Element
|
#include <ftxui/dom/elements.hpp> // for text, operator|, bold, Fit, hbox, Element
|
||||||
#include <ftxui/screen/screen.hpp> // for Full, Screen
|
#include <ftxui/screen/screen.hpp> // for Full, Screen
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <memory> // for allocator
|
#include <memory> // for allocator
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/dom/node.hpp" // for Render
|
#include "ftxui/dom/node.hpp" // for Render
|
||||||
#include "ftxui/screen/color.hpp" // for ftxui
|
#include "ftxui/screen/color.hpp" // for ftxui
|
||||||
|
#else
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
#endif
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|||||||
@@ -1,13 +1,21 @@
|
|||||||
// Copyright 2020 Arthur Sonzogni. All rights reserved.
|
// Copyright 2020 Arthur Sonzogni. All rights reserved.
|
||||||
// Use of this source code is governed by the MIT license that can be found in
|
// Use of this source code is governed by the MIT license that can be found in
|
||||||
// the LICENSE file.
|
// the LICENSE file.
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include <ftxui/dom/linear_gradient.hpp> // for LinearGradient
|
#include <ftxui/dom/linear_gradient.hpp> // for LinearGradient
|
||||||
#include <ftxui/screen/screen.hpp> // for Full, Screen
|
#include <ftxui/screen/screen.hpp> // for Full, Screen
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <memory> // for allocator
|
#include <memory> // for allocator
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/dom/elements.hpp" // for text, bgcolor, color, vbox, filler, Fit, hbox
|
#include "ftxui/dom/elements.hpp" // for text, bgcolor, color, vbox, filler, Fit, hbox
|
||||||
#include "ftxui/dom/node.hpp" // for Render
|
#include "ftxui/dom/node.hpp" // for Render
|
||||||
#include "ftxui/screen/color.hpp" // for Color, operator""_rgb, Color::Black, Color::Blue, Color::BlueLight, Color::Cyan, Color::CyanLight, Color::DeepSkyBlue4, Color::Default, Color::GrayDark, Color::GrayLight, Color::Green, Color::GreenLight, Color::Magenta, Color::MagentaLight, Color::Red, Color::RedLight, Color::SkyBlue1, Color::White, Color::Yellow, Color::YellowLight, ftxui
|
#include "ftxui/screen/color.hpp" // for Color, operator""_rgb, Color::Black, Color::Blue, Color::BlueLight, Color::Cyan, Color::CyanLight, Color::DeepSkyBlue4, Color::Default, Color::GrayDark, Color::GrayLight, Color::Green, Color::GreenLight, Color::Magenta, Color::MagentaLight, Color::Red, Color::RedLight, Color::SkyBlue1, Color::White, Color::Yellow, Color::YellowLight, ftxui
|
||||||
|
#else
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
#endif
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|||||||
@@ -1,12 +1,20 @@
|
|||||||
// Copyright 2020 Arthur Sonzogni. All rights reserved.
|
// Copyright 2020 Arthur Sonzogni. All rights reserved.
|
||||||
// Use of this source code is governed by the MIT license that can be found in
|
// Use of this source code is governed by the MIT license that can be found in
|
||||||
// the LICENSE file.
|
// the LICENSE file.
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include <ftxui/dom/elements.hpp> // for text, operator|, dim, Fit, hbox, Element
|
#include <ftxui/dom/elements.hpp> // for text, operator|, dim, Fit, hbox, Element
|
||||||
#include <ftxui/screen/screen.hpp> // for Full, Screen
|
#include <ftxui/screen/screen.hpp> // for Full, Screen
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <memory> // for allocator
|
#include <memory> // for allocator
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/dom/node.hpp" // for Render
|
#include "ftxui/dom/node.hpp" // for Render
|
||||||
#include "ftxui/screen/color.hpp" // for ftxui
|
#include "ftxui/screen/color.hpp" // for ftxui
|
||||||
|
#else
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
#endif
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|||||||
@@ -1,12 +1,20 @@
|
|||||||
// Copyright 2020 Arthur Sonzogni. All rights reserved.
|
// Copyright 2020 Arthur Sonzogni. All rights reserved.
|
||||||
// Use of this source code is governed by the MIT license that can be found in
|
// Use of this source code is governed by the MIT license that can be found in
|
||||||
// the LICENSE file.
|
// the LICENSE file.
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include <ftxui/dom/elements.hpp> // for text, operator|, Element, bgcolor, color, blink, bold, dim, inverted, underlined, Fit, hbox
|
#include <ftxui/dom/elements.hpp> // for text, operator|, Element, bgcolor, color, blink, bold, dim, inverted, underlined, Fit, hbox
|
||||||
#include <ftxui/screen/screen.hpp> // for Full, Screen
|
#include <ftxui/screen/screen.hpp> // for Full, Screen
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <memory> // for allocator
|
#include <memory> // for allocator
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/dom/node.hpp" // for Render
|
#include "ftxui/dom/node.hpp" // for Render
|
||||||
#include "ftxui/screen/color.hpp" // for Color, Color::Blue, ftxui
|
#include "ftxui/screen/color.hpp" // for Color, Color::Blue, ftxui
|
||||||
|
#else
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
#endif
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|||||||
@@ -1,12 +1,20 @@
|
|||||||
// Copyright 2020 Arthur Sonzogni. All rights reserved.
|
// Copyright 2020 Arthur Sonzogni. All rights reserved.
|
||||||
// Use of this source code is governed by the MIT license that can be found in
|
// Use of this source code is governed by the MIT license that can be found in
|
||||||
// the LICENSE file.
|
// the LICENSE file.
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include <ftxui/dom/elements.hpp> // for text, operator|, bold, Fit, hbox, Element
|
#include <ftxui/dom/elements.hpp> // for text, operator|, bold, Fit, hbox, Element
|
||||||
#include <ftxui/screen/screen.hpp> // for Full, Screen
|
#include <ftxui/screen/screen.hpp> // for Full, Screen
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <memory> // for allocator
|
#include <memory> // for allocator
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/dom/node.hpp" // for Render
|
#include "ftxui/dom/node.hpp" // for Render
|
||||||
#include "ftxui/screen/color.hpp" // for ftxui
|
#include "ftxui/screen/color.hpp" // for ftxui
|
||||||
|
#else
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
#endif
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|||||||
@@ -1,12 +1,20 @@
|
|||||||
// Copyright 2020 Arthur Sonzogni. All rights reserved.
|
// Copyright 2020 Arthur Sonzogni. All rights reserved.
|
||||||
// Use of this source code is governed by the MIT license that can be found in
|
// Use of this source code is governed by the MIT license that can be found in
|
||||||
// the LICENSE file.
|
// the LICENSE file.
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include <ftxui/dom/elements.hpp> // for text, operator|, inverted, Fit, hbox, Element
|
#include <ftxui/dom/elements.hpp> // for text, operator|, inverted, Fit, hbox, Element
|
||||||
#include <ftxui/screen/screen.hpp> // for Full, Screen
|
#include <ftxui/screen/screen.hpp> // for Full, Screen
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <memory> // for allocator
|
#include <memory> // for allocator
|
||||||
|
|
||||||
|
#ifndef FTXUI_BUILD_MODULES
|
||||||
#include "ftxui/dom/node.hpp" // for Render
|
#include "ftxui/dom/node.hpp" // for Render
|
||||||
#include "ftxui/screen/color.hpp" // for ftxui
|
#include "ftxui/screen/color.hpp" // for ftxui
|
||||||
|
#else
|
||||||
|
import ftxui.dom;
|
||||||
|
import ftxui.screen;
|
||||||
|
#endif
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace ftxui;
|
using namespace ftxui;
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user