Fix Event.Control test.

This commit is contained in:
ArthurSonzogni
2024-04-27 20:49:49 +02:00
parent 2b73998d56
commit 092482f63b
11 changed files with 216 additions and 170 deletions

View File

@@ -59,12 +59,12 @@ class ScreenInteractive : public Screen {
// temporarily uninstalled.
Closure WithRestoredIO(Closure);
// FTXUI implements handlers for Ctrl-C and Ctrl-Z. By default, these handlers
// FTXUI implements handlers for Ctrl-C and Ctrl-Z. By default, these handlers
// are executed, even if the component catches the event. This avoid users
// handling every event to be trapped in the application. However, in some
// cases, the application may want to handle these events itself. In this case,
// the application can force FTXUI to not handle these events by calling the
// following functions with force=true.
// cases, the application may want to handle these events itself. In this
// case, the application can force FTXUI to not handle these events by calling
// the following functions with force=true.
void ForceHandleCtrlC(bool force);
void ForceHandleCtrlZ(bool force);

View File

@@ -9,8 +9,8 @@
#include <string> // for string
#include <unordered_map> // for unordered_map
#include "ftxui/screen/color.hpp" // for Color
#include "ftxui/screen/image.hpp" // for Pixel, Image
#include "ftxui/screen/color.hpp" // for Color
#include "ftxui/screen/image.hpp" // for Pixel, Image
#ifdef DrawText
// Workaround for WinUsr.h (via Windows.h) defining macros that break things.
@@ -94,7 +94,7 @@ struct Canvas {
void DrawText(int x, int y, const std::string& value);
void DrawText(int x, int y, const std::string& value, const Color& color);
void DrawText(int x, int y, const std::string& value, const Stylizer& style);
// Draw using directly pixels or images --------------------------------------
// x is considered to be a multiple of 2.
// y is considered to be a multiple of 4.

View File

@@ -36,7 +36,8 @@ class Screen : public Image {
// Print the Screen on to the terminal.
void Print() const;
// Fill the screen with space and reset any screen state, like hyperlinks, and cursor
// Fill the screen with space and reset any screen state, like hyperlinks, and
// cursor
void Clear();
// Move the terminal cursor n-lines up with n = dimy().