Update examples to use std::string. (#182)

In examples and tests, use std::string.

In addtion:
1. Address follow-up from:
https://github.com/ArthurSonzogni/FTXUI/pull/179
2. Fix a bug when Input is used with std::string.
This commit is contained in:
Arthur Sonzogni
2021-08-09 00:27:37 +02:00
committed by GitHub
parent 3b4ab618a3
commit 9a54528bca
60 changed files with 817 additions and 836 deletions

View File

@@ -1,6 +1,6 @@
#include <functional> // for function
#include <iostream> // for basic_ostream::operator<<, operator<<, endl, basic_ostream, basic_ostream<>::__ostream_type, cout, ostream
#include <string> // for wstring, basic_string, allocator
#include <string> // for string, basic_string, allocator
#include <vector> // for vector
#include "ftxui/component/captured_mouse.hpp" // for ftxui
@@ -12,10 +12,10 @@ int main(int argc, const char* argv[]) {
using namespace ftxui;
auto screen = ScreenInteractive::TerminalOutput();
std::vector<std::wstring> entries = {
L"entry 1",
L"entry 2",
L"entry 3",
std::vector<std::string> entries = {
"entry 1",
"entry 2",
"entry 3",
};
int selected = 0;