Fix build issues.

This commit is contained in:
ArthurSonzogni 2024-12-01 17:50:41 +01:00
parent b22241ec52
commit 2aafd068cc
No known key found for this signature in database
GPG Key ID: 41D98248C074CD6C
2 changed files with 0 additions and 39 deletions

View File

@ -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

View File

@ -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<Selectable>(std::move(child));
}
Decorator selectable(void) {
return [](Element child) { return selectable(std::move(child)); };
}
} // namespace ftxui