mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2024-11-22 18:59:59 +08:00
95c766e9e4
Add decorator variants for decorator components Add the "pipe" operator for components, similar to what was done for Elements. We are able to put something like: ``` Button(...) | Maybe(&show_button) ``` Add decorators for: - `Maybe` - `CatchEvent` - `Renderer` Signed-off-by: Kefu Chai <tchaikov@gmail.com> Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
19 lines
536 B
C++
19 lines
536 B
C++
#ifndef FTXUI_COMPONENT_DEPRECATED_HPP
|
|
#define FTXUI_COMPONENT_DEPRECATED_HPP
|
|
|
|
#include "ftxui/component/component.hpp"
|
|
|
|
namespace ftxui {
|
|
|
|
[[deprecated("use Input with normal std::string instead.")]] Component Input(
|
|
WideStringRef content,
|
|
ConstStringRef placeholder,
|
|
Ref<InputOption> option = {});
|
|
} // namespace ftxui
|
|
|
|
#endif /* FTXUI_COMPONENT_DEPRECATED_HPP */
|
|
|
|
// 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.
|