FTXUI/ftxui/include/ftxui/component/delegate.hpp
Arthur Sonzogni 5887114793 Refactor directory structure.
The goal is to increase the separation in between:

 * ftxui::screen
 * ftxui::dom
 * ftxui::component
2019-01-06 17:10:35 +01:00

33 lines
742 B
C++

#ifndef FTXUI_COMPONENT_DELEGATE_HPP
#define FTXUI_COMPONENT_DELEGATE_HPP
#include "ftxui/dom/elements.hpp"
namespace ftxui::component {
class Component;
class Delegate {
public:
Delegate() {}
virtual ~Delegate() {}
// A Delegate shadows a component.
virtual void Register(Component* component) = 0;
virtual Component* component() = 0;
// Create new children.
virtual Delegate* NewChild() = 0;
virtual std::vector<Delegate*> children() = 0;
// Navigate in the tree.
virtual Delegate* PreviousSibling() = 0;
virtual Delegate* NextSibling() = 0;
virtual Delegate* Parent() = 0;
virtual Delegate* Root() = 0;
};
} // namespace ftxui::component
#endif /* end of include guard: FTXUI_COMPONENT_DELEGATE_HPP */