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:
Tushar Maheshwari
2021-07-20 13:29:47 +05:30
committed by GitHub
parent 210e8c5863
commit 09805e5e86
15 changed files with 100 additions and 142 deletions

View File

@@ -1,7 +1,7 @@
#include <memory> // for make_shared
#include <utility> // for move
#include "ftxui/dom/elements.hpp" // for Element, unpack, Elements, blink
#include "ftxui/dom/elements.hpp" // for Element, blink
#include "ftxui/dom/node.hpp" // for Node
#include "ftxui/dom/node_decorator.hpp" // for NodeDecorator
#include "ftxui/screen/box.hpp" // for Box
@@ -26,7 +26,7 @@ class Blink : public NodeDecorator {
/// @brief The text drawn alternates in between visible and hidden.
/// @ingroup dom
Element blink(Element child) {
return std::make_shared<Blink>(unpack(std::move(child)));
return std::make_shared<Blink>(std::move(child));
}
} // namespace ftxui