From 2aafd068cc399492a74a34726c7570bb1d0de047 Mon Sep 17 00:00:00 2001 From: ArthurSonzogni Date: Sun, 1 Dec 2024 17:50:41 +0100 Subject: [PATCH] Fix build issues. --- CMakeLists.txt | 1 - src/ftxui/dom/selectable.cpp | 38 ------------------------------------ 2 files changed, 39 deletions(-) delete mode 100644 src/ftxui/dom/selectable.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index bdb87bc..c2e800e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -89,7 +89,6 @@ add_library(dom src/ftxui/dom/paragraph.cpp src/ftxui/dom/reflect.cpp src/ftxui/dom/scroll_indicator.cpp - src/ftxui/dom/selectable.cpp src/ftxui/dom/selection.cpp src/ftxui/dom/separator.cpp src/ftxui/dom/size.cpp diff --git a/src/ftxui/dom/selectable.cpp b/src/ftxui/dom/selectable.cpp deleted file mode 100644 index c7831c0..0000000 --- a/src/ftxui/dom/selectable.cpp +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2024 Arthur Sonzogni. All rights reserved. -// Use of this source code is governed by the MIT license that can be found in -// the LICENSE file. - -#include "ftxui/component/event.hpp" // for Event -#include "ftxui/dom/elements.hpp" // for Element, Decorator -#include "ftxui/dom/node_decorator.hpp" // for NodeDecorator - -namespace ftxui { -namespace { - -class Selectable : public NodeDecorator { - public: - explicit Selectable(Element child) : NodeDecorator(std::move(child)) {} - - private: - void Render(Screen& screen) override { - for (int y = box_.y_min; y <= box_.y_max; ++y) { - for (int x = box_.x_min; x <= box_.x_max; ++x) { - screen.PixelAt(x, y).selectable = true; - } - } - - NodeDecorator::Render(screen); - } -}; - -} // namespace - -Element selectable(Element child) { - return std::make_shared(std::move(child)); -} - -Decorator selectable(void) { - return [](Element child) { return selectable(std::move(child)); }; -} - -} // namespace ftxui