mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-05-08 11:11:15 +08:00

* Reorganize ContainerBase - Reduce Container overloads using default arguments - Extract member function pointers to virtual functions - Separate classes for Vertical, Horizontal and Tab containers * Collect unpack from NodeDecorator subclasses * Reduce redundant expansion for aliases
27 lines
686 B
C++
27 lines
686 B
C++
#ifndef FTXUI_DOM_NODE_DECORATOR_H_
|
|
#define FTXUI_DOM_NODE_DECORATOR_H_
|
|
|
|
#include <utility> // for move
|
|
|
|
#include "ftxui/dom/elements.hpp" // for Element, unpack
|
|
#include "ftxui/dom/node.hpp" // for Node
|
|
|
|
namespace ftxui {
|
|
struct Box;
|
|
|
|
// Helper class.
|
|
class NodeDecorator : public Node {
|
|
public:
|
|
NodeDecorator(Element child) : Node(unpack(std::move(child))) {}
|
|
void ComputeRequirement() override;
|
|
void SetBox(Box box) override;
|
|
};
|
|
|
|
} // namespace ftxui
|
|
|
|
#endif /* end of include guard: FTXUI_DOM_NODE_DECORATOR_H_ */
|
|
|
|
// 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.
|