Commit Graph

13 Commits

Author SHA1 Message Date
Jason Turner
1a7a550bfe
Use globally set CMAKE_CXX_STANDARD if it is set (#620) 2023-05-18 11:23:22 +02:00
ArthurSonzogni
d301fab1f4
Release v4.0.0 2023-02-12 18:02:40 +01:00
Arthur Sonzogni
65848d1e5f
cmake: support gtest from the package manager (#552)
Some developers would be happier with the gtest version provided from
their package manager. Use it if it is installed the package provide
cmake support.

Fixed: https://github.com/ArthurSonzogni/FTXUI/issues/551
2023-01-14 20:37:42 +01:00
Arthur Sonzogni
c8ec151154
Bring back C++17 minimal requirement. (#475) 2022-09-03 13:03:04 +02:00
Arthur Sonzogni
b3ba747d82
Feature: Slider in any directions. (#468)
Add the `SliderOption` option supporting:
```cpp
{
  Ref<T> value;
  ConstRef<T> min = T(0);
  ConstRef<T> max = T(100);
  ConstRef<T> increment = (max() - min()) / 20;
  GaugeDirection direction = GaugeDirection::Right;
  Color color_active = Color::White;
  Color color_inactive = Color::GrayDark;
};
```

In particular, this supports multiple direction. This resolves:
https://github.com/ArthurSonzogni/FTXUI/issues/467

This one do not support adding a label. The old constructors can still
be used to have a label.
2022-08-30 18:52:33 +02:00
Vebjørn Johansen Rognli
bb3231695f
Set includes as system interface to suppress warnings for other users (#415)
Set includes as system interface to suppress warnings for other users

Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
2022-06-11 18:39:07 +02:00
Arthur Sonzogni
aebde94352
Add clang-tidy. (#368) 2022-03-31 02:17:43 +02:00
ericLemanissier
f95ed885bb
Don't override PREFIX target property (#340)
PREFIX is by default "lib", which most of the libraries use.
this changes makes the library files libftxui-foo.a
as ArthurSonzogni/FTXUI#140 intended originally
2022-02-19 10:48:07 +01:00
Tushar Maheshwari
6a19371c9c
Merge Documentation and Emscripten workflow (#166)
Unify Documentation and Emscripten workflow
2021-07-25 19:31:45 +02:00
Tushar Maheshwari
5ee4ec40de
Update CMake usage to enable C++17 (#156)
The target_compile_features command allows setting PUBLIC compile features for the library, making it implicit for the applications linking it. This reduces the CMake boilerplate required to set up a dependent project (eg. ftxui-starter).
2021-07-17 09:16:02 +02:00
Arthur Sonzogni
82adc3b410
Rename library for vcpkg. (#140)
Instead of putting the archive as:
- <lib_dir>/ftxui/libcomponent.a
- <lib_dir>/ftxui/libdom.a
- <lib_dir>/ftxui/libscreen.a

Use:
- <lib_dir>/libftxui-component.a
- <lib_dir>/libftxui-dom.a
- <lib_dir>/libftxui-screen.a

This fixes an issue users have with VCPKG.

See:
https://github.com/microsoft/vcpkg/issues/16327#issuecomment-868942370
2021-07-06 02:10:35 +02:00
Arthur Sonzogni
81b428af5a
Implement Fallback for microsoft's terminals. (#138)
I finally got access to a computer using the Microsoft's Windows OS.
That's the opportunity to find and mitigate all the problems
encountered. This patch:

1. Introduce an option and a C++ definition to enable fallback for
   Microsoft's terminal emulators. This allows me to see/test the
   Microsoft output from Linux. This also allows Windows users to remove
   the fallback and target non Microsoft terminals on Windows if needed.

2. Microsoft's terminal suffer from a race condition bug when reporting
   the cursor position:
   https://github.com/microsoft/terminal/pull/7583.
   The mitigation is not to ask for the cursor position in fullscreen
   mode where it isn't really needed and request it less often.
   This fixes: https://github.com/ArthurSonzogni/FTXUI/issues/136

3. Microsoft's terminal do not handle properly hidding the cursor. Instead
   the character under the cursor is hidden, which is a big problem. As
   a result, we don't enable setting the cursor to the best position for
   [input method editors](https://en.wikipedia.org/wiki/Input_method),
   It will be displayed at the bottom right corner.
   See:
   - https://github.com/microsoft/terminal/issues/1203
   - https://github.com/microsoft/terminal/issues/3093

4. Microsoft's terminals do not provide a way to query if they support
   colors. As a fallback, assume true colors is supported.
   See issue:
   - https://github.com/microsoft/terminal/issues/1040
   This mitigates:
   - https://github.com/ArthurSonzogni/FTXUI/issues/135

5. The "cmd" on Windows do not properly report its dimension. Powershell
   works correctly. As a fallback, use a 80x80 size instead of 0x0.

6. There are several dom elements and component displayed incorrectly,
   because the font used is missing several unicode glyph. Use
   alternatives or less detailled one as a fallback.
2021-07-04 17:38:31 +02:00
Arthur Sonzogni
a2e7ff852e
Cleanup. (#132)
- Split the large CMakeList.
- Remove travis
- Remove gitlab-ci.yml
2021-06-26 15:14:27 +02:00