17 return [a = std::move(a), b = std::move(b)](
Element element) {
18 return b(a(std::move(element)));
46 for (
auto& it : elements)
47 output.push_back(std::move(it) | decorator);
65 return decorator(std::move(element));
72 e->ComputeRequirement();
74 return {std::min(e->requirement().min_x,
size.dimx),
75 std::min(e->requirement().min_y,
size.dimy)};
81 class Impl :
public Node {
82 void ComputeRequirement()
override {
83 requirement_.min_x = 0;
84 requirement_.min_x = 0;
87 return std::make_unique<Impl>();
Dimensions Fit(Element &)
std::function< Element(Element)> Decorator
Element nothing(Element element)
A decoration doing absolutely nothing.
std::shared_ptr< Node > Element
std::vector< Element > Elements
Element operator|(Element, Decorator)
From an element, apply a decorator.
Decorator size(Direction, Constraint, int value)
Apply a constraint on the size of an element.