mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-12-16 01:48:56 +08:00
Miscellaneous refactoring (#160)
* 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
This commit is contained in:
committed by
GitHub
parent
210e8c5863
commit
09805e5e86
@@ -3,7 +3,8 @@
|
||||
|
||||
#include <utility> // for move
|
||||
|
||||
#include "ftxui/dom/node.hpp" // for Node, Elements
|
||||
#include "ftxui/dom/elements.hpp" // for Element, unpack
|
||||
#include "ftxui/dom/node.hpp" // for Node
|
||||
|
||||
namespace ftxui {
|
||||
struct Box;
|
||||
@@ -11,7 +12,7 @@ struct Box;
|
||||
// Helper class.
|
||||
class NodeDecorator : public Node {
|
||||
public:
|
||||
NodeDecorator(Elements children) : Node(std::move(children)) {}
|
||||
NodeDecorator(Element child) : Node(unpack(std::move(child))) {}
|
||||
void ComputeRequirement() override;
|
||||
void SetBox(Box box) override;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user