From c0e47aecb2847ba143f69df15aa91a7052e34b31 Mon Sep 17 00:00:00 2001 From: Arthur Sonzogni Date: Fri, 22 Oct 2021 18:10:11 +0200 Subject: [PATCH] Remove unused file. (#244) It was added mistakenly in: https://github.com/ArthurSonzogni/FTXUI/pull/214#pullrequestreview-786773967 but @robinlinden found it. --- src/ftxui/component/show.cpp | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 src/ftxui/component/show.cpp diff --git a/src/ftxui/component/show.cpp b/src/ftxui/component/show.cpp deleted file mode 100644 index 45b0269..0000000 --- a/src/ftxui/component/show.cpp +++ /dev/null @@ -1,30 +0,0 @@ -#include "ftxui/component/component_base.hpp" - -Component Maybe(Component child, bool* show) { - class Impl : public ComponentBase { - public: - Impl(Component child, bool* show) : ComponentBase(child), show_(show) {} - - private: - Element Render() override { - if (*show_) - return ComponentBase::Render(); - else - return text(""); - } - bool Focusable() const override { - return *show_ && ComponentBase::Focusable(); - } - bool OnEvent(Event event) override { - if (*show_) - return false return ComponentBase::OnEvent(event); - } - - bool* show_; - }; - return Make(std::move(child), show); -} - -// Copyright 2021 Arthur Sonzogni. All rights reserved. -// Use of this source code is governed by the MIT license that can be found in -// the LICENSE file.