Loading...
Searching...
No Matches
node_decorator.hpp
Go to the documentation of this file.
// 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.
#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:
explicit 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_ */
ftxui::NodeDecorator
Definition node_decorator.hpp:16
ftxui::NodeDecorator::NodeDecorator
NodeDecorator(Element child)
Definition node_decorator.hpp:18
ftxui::NodeDecorator::SetBox
void SetBox(Box box) override
Assign a position and a dimension to an element for drawing.
Definition node_decorator.cpp:17
ftxui::NodeDecorator::ComputeRequirement
void ComputeRequirement() override
Compute how much space an elements needs.
Definition node_decorator.cpp:12
ftxui::Node
Definition node.hpp:23
elements.hpp
ftxui
Definition animation.hpp:10
ftxui::Element
std::shared_ptr< Node > Element
Definition elements.hpp:22
ftxui::Make
std::shared_ptr< T > Make(Args &&... args)
Definition component.hpp:26
node.hpp
ftxui::Box
Definition box.hpp:9