2018-10-12 09:23:37 +02:00
|
|
|
#ifndef FTXUI_DOM_NODE_DECORATOR_H_
|
|
|
|
|
#define FTXUI_DOM_NODE_DECORATOR_H_
|
|
|
|
|
|
2021-05-01 20:40:35 +02:00
|
|
|
#include <utility> // for move
|
|
|
|
|
|
2021-07-20 13:29:47 +05:30
|
|
|
#include "ftxui/dom/elements.hpp" // for Element, unpack
|
2021-08-06 20:32:33 +02:00
|
|
|
#include "ftxui/dom/node.hpp" // for Node
|
2018-10-12 09:23:37 +02:00
|
|
|
|
2019-01-12 15:00:08 +01:00
|
|
|
namespace ftxui {
|
2021-05-01 20:40:35 +02:00
|
|
|
struct Box;
|
2018-10-12 09:23:37 +02:00
|
|
|
|
|
|
|
|
// Helper class.
|
|
|
|
|
class NodeDecorator : public Node {
|
|
|
|
|
public:
|
2021-07-20 13:29:47 +05:30
|
|
|
NodeDecorator(Element child) : Node(unpack(std::move(child))) {}
|
2018-10-12 09:23:37 +02:00
|
|
|
void ComputeRequirement() override;
|
|
|
|
|
void SetBox(Box box) override;
|
|
|
|
|
};
|
|
|
|
|
|
2020-02-11 21:44:55 +01:00
|
|
|
} // namespace ftxui
|
2018-10-12 09:23:37 +02:00
|
|
|
|
|
|
|
|
#endif /* end of include guard: FTXUI_DOM_NODE_DECORATOR_H_ */
|
2020-08-16 00:24:18 +02:00
|
|
|
|
|
|
|
|
// Copyright 2020 Arthur Sonzogni. All rights reserved.
|
|
|
|
|
// Use of this source code is governed by the MIT license that can be found in
|
|
|
|
|
// the LICENSE file.
|