mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-15 23:48:15 +08:00
Flatten the namespaces.
Remove: * ftxui::screen * ftxui::dom * ftxui::component Keep: * ftxui
This commit is contained in:
@@ -7,8 +7,7 @@
|
||||
#include "ftxui/component/screen_interactive.hpp"
|
||||
#include "ftxui/util/string.hpp"
|
||||
|
||||
using namespace ftxui::component;
|
||||
using namespace ftxui::dom;
|
||||
using namespace ftxui;
|
||||
|
||||
class MyComponent : ComponentVertical {
|
||||
public:
|
||||
|
@@ -6,8 +6,7 @@
|
||||
#include "ftxui/component/screen_interactive.hpp"
|
||||
|
||||
int main(int argc, const char* argv[]) {
|
||||
using namespace ftxui::component;
|
||||
using namespace ftxui::screen;
|
||||
using namespace ftxui;
|
||||
auto screen = ScreenInteractive::FixedSize(30, 3);
|
||||
Menu menu(screen.delegate());
|
||||
menu.entries = {L"entry 1", L"entry 2", L"entry 3"};
|
||||
|
@@ -8,8 +8,7 @@
|
||||
#include "ftxui/component/screen_interactive.hpp"
|
||||
#include "ftxui/util/string.hpp"
|
||||
|
||||
using namespace ftxui::component;
|
||||
using namespace ftxui::dom;
|
||||
using namespace ftxui;
|
||||
|
||||
class MyComponent : ComponentHorizontal {
|
||||
public:
|
||||
|
@@ -6,8 +6,7 @@
|
||||
#include "ftxui/component/screen_interactive.hpp"
|
||||
#include "ftxui/util/string.hpp"
|
||||
|
||||
using namespace ftxui::component;
|
||||
using namespace ftxui::dom;
|
||||
using namespace ftxui;
|
||||
|
||||
class MyComponent : ComponentHorizontal {
|
||||
public:
|
||||
|
@@ -7,8 +7,7 @@
|
||||
#include "ftxui/component/toggle.hpp"
|
||||
#include "ftxui/util/string.hpp"
|
||||
|
||||
using namespace ftxui::component;
|
||||
using namespace ftxui::dom;
|
||||
using namespace ftxui;
|
||||
|
||||
class MyComponent : ComponentVertical {
|
||||
public:
|
||||
|
@@ -8,8 +8,7 @@
|
||||
#include "ftxui/component/toggle.hpp"
|
||||
#include "ftxui/util/string.hpp"
|
||||
|
||||
using namespace ftxui::component;
|
||||
using namespace ftxui::dom;
|
||||
using namespace ftxui;
|
||||
|
||||
class MyComponent : ComponentVertical {
|
||||
public:
|
||||
|
@@ -4,8 +4,7 @@
|
||||
|
||||
int main(int argc, const char *argv[])
|
||||
{
|
||||
using namespace ftxui::screen;
|
||||
using namespace ftxui::dom;
|
||||
using namespace ftxui;
|
||||
auto document =
|
||||
hbox(
|
||||
text(L"This text is "),
|
||||
|
@@ -4,8 +4,7 @@
|
||||
|
||||
int main(int argc, const char *argv[])
|
||||
{
|
||||
using namespace ftxui::screen;
|
||||
using namespace ftxui::dom;
|
||||
using namespace ftxui;
|
||||
auto document =
|
||||
hbox(
|
||||
text(L"This text is "),
|
||||
|
@@ -4,8 +4,7 @@
|
||||
|
||||
int main(int argc, const char *argv[])
|
||||
{
|
||||
using namespace ftxui::screen;
|
||||
using namespace ftxui::dom;
|
||||
using namespace ftxui;
|
||||
auto document =
|
||||
hbox(
|
||||
vbox(
|
||||
|
@@ -4,8 +4,7 @@
|
||||
|
||||
int main(int argc, const char *argv[])
|
||||
{
|
||||
using namespace ftxui::dom;
|
||||
using namespace ftxui::screen;
|
||||
using namespace ftxui;
|
||||
auto document =
|
||||
dbox(
|
||||
frame(
|
||||
|
@@ -4,8 +4,7 @@
|
||||
|
||||
int main(int argc, const char *argv[])
|
||||
{
|
||||
using namespace ftxui::screen;
|
||||
using namespace ftxui::dom;
|
||||
using namespace ftxui;
|
||||
auto document =
|
||||
hbox(
|
||||
text(L"This text is "),
|
||||
|
@@ -7,8 +7,7 @@
|
||||
|
||||
int main(int argc, const char *argv[])
|
||||
{
|
||||
using namespace ftxui::dom;
|
||||
using namespace ftxui::screen;
|
||||
using namespace ftxui;
|
||||
auto document =
|
||||
hbox(
|
||||
window(text(L" main frame ") | hcenter,
|
||||
|
@@ -7,8 +7,7 @@
|
||||
|
||||
int main(int argc, const char *argv[])
|
||||
{
|
||||
using namespace ftxui::dom;
|
||||
using namespace ftxui::screen;
|
||||
using namespace ftxui;
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
std::string reset_position;
|
||||
|
@@ -4,8 +4,7 @@
|
||||
|
||||
int main(int argc, const char *argv[])
|
||||
{
|
||||
using namespace ftxui::screen;
|
||||
using namespace ftxui::dom;
|
||||
using namespace ftxui;
|
||||
auto document =
|
||||
hbox(
|
||||
text(L"This text is "),
|
||||
|
@@ -10,8 +10,7 @@
|
||||
|
||||
int main(int argc, const char *argv[])
|
||||
{
|
||||
using namespace ftxui::screen;
|
||||
using namespace ftxui::dom;
|
||||
using namespace ftxui;
|
||||
|
||||
struct Task {
|
||||
std::wstring name;
|
||||
|
@@ -4,8 +4,7 @@
|
||||
|
||||
int main(int argc, const char *argv[])
|
||||
{
|
||||
using namespace ftxui::dom;
|
||||
using namespace ftxui::screen;
|
||||
using namespace ftxui;
|
||||
auto document =
|
||||
hbox(
|
||||
text(L"left-column"),
|
||||
|
@@ -9,8 +9,6 @@
|
||||
int main(int argc, const char *argv[])
|
||||
{
|
||||
using namespace ftxui;
|
||||
using namespace ftxui::dom;
|
||||
using namespace ftxui::screen;
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
std::string reset_position;
|
||||
|
@@ -4,8 +4,7 @@
|
||||
|
||||
int main(int argc, const char *argv[])
|
||||
{
|
||||
using namespace ftxui::screen;
|
||||
using namespace ftxui::dom;
|
||||
using namespace ftxui;
|
||||
auto document =
|
||||
hbox(
|
||||
text(L"normal") , text(L" ") ,
|
||||
|
@@ -4,8 +4,7 @@
|
||||
|
||||
int main(int argc, const char *argv[])
|
||||
{
|
||||
using namespace ftxui::screen;
|
||||
using namespace ftxui::dom;
|
||||
using namespace ftxui;
|
||||
auto document =
|
||||
hbox(
|
||||
text(L"This text is "),
|
||||
|
@@ -5,8 +5,7 @@
|
||||
|
||||
int main(int argc, const char *argv[])
|
||||
{
|
||||
using namespace ftxui::screen;
|
||||
using namespace ftxui::dom;
|
||||
using namespace ftxui;
|
||||
auto document =
|
||||
vbox(
|
||||
hbox(
|
||||
|
@@ -6,15 +6,14 @@
|
||||
#include "ftxui/component/screen_interactive.hpp"
|
||||
#include "ftxui/util/string.hpp"
|
||||
|
||||
using namespace ftxui::component;
|
||||
using namespace ftxui;
|
||||
|
||||
class DrawKey : public Component {
|
||||
public:
|
||||
DrawKey(Delegate* delegate)
|
||||
DrawKey(Component::Delegate* delegate)
|
||||
: Component(delegate) {}
|
||||
|
||||
ftxui::dom::Element Render() override {
|
||||
using namespace ftxui::dom;
|
||||
Element Render() override {
|
||||
Children children;
|
||||
for (size_t i = std::max(0, (int)keys.size() - 10); i < keys.size(); ++i) {
|
||||
std::string code = "";
|
||||
|
Reference in New Issue
Block a user