Feature: Add multi-line input. (#630)

This commit is contained in:
Arthur Sonzogni
2023-05-02 13:32:37 +02:00
committed by GitHub
parent 6215240b37
commit 7de4f8683d
33 changed files with 1471 additions and 690 deletions

View File

@@ -1,9 +1,9 @@
#include <gtest/gtest.h>
#include <string> // for allocator
#include <string> // for allocator, string
#include "ftxui/dom/elements.hpp" // for operator|, text, blink, Element
#include "ftxui/dom/node.hpp" // for Render
#include "ftxui/screen/screen.hpp" // for Screen, Pixel
#include "gtest/gtest.h" // for Test, AssertionResult, EXPECT_TRUE, Message, TEST, TestPartResult
// NOLINTBEGIN
namespace ftxui {

View File

@@ -1,9 +1,9 @@
#include <gtest/gtest.h>
#include <string> // for allocator
#include <string> // for allocator, string
#include "ftxui/dom/elements.hpp" // for operator|, text, bold, Element
#include "ftxui/dom/node.hpp" // for Render
#include "ftxui/screen/screen.hpp" // for Screen, Pixel
#include "gtest/gtest.h" // for Test, AssertionResult, EXPECT_TRUE, Message, TEST, TestPartResult
// NOLINTBEGIN
namespace ftxui {

View File

@@ -1,9 +1,9 @@
#include <gtest/gtest.h>
#include <string> // for allocator
#include <string> // for allocator, string
#include "ftxui/dom/elements.hpp" // for operator|, text, dim, Element
#include "ftxui/dom/node.hpp" // for Render
#include "ftxui/screen/screen.hpp" // for Screen, Pixel
#include "gtest/gtest.h" // for Test, AssertionResult, EXPECT_TRUE, Message, TEST, TestPartResult
// NOLINTBEGIN
namespace ftxui {

View File

@@ -35,6 +35,9 @@ class Text : public Node {
if (x > box_.x_max) {
return;
}
if (cell == "\n") {
continue;
}
screen.PixelAt(x, y).character = cell;
++x;
}

View File

@@ -1,9 +1,9 @@
#include <gtest/gtest.h>
#include <string> // for allocator
#include <string> // for allocator, string
#include "ftxui/dom/elements.hpp" // for operator|, text, underlined, Element
#include "ftxui/dom/node.hpp" // for Render
#include "ftxui/screen/screen.hpp" // for Screen, Pixel
#include "gtest/gtest.h" // for Test, AssertionResult, EXPECT_TRUE, Message, TEST, TestPartResult
// NOLINTBEGIN
namespace ftxui {