Files
FTXUI/ftxui/include/ftxui/component/component_direction.hpp
Arthur Sonzogni 21644eea6b Flatten the namespaces.
Remove:
* ftxui::screen
* ftxui::dom
* ftxui::component

Keep:
* ftxui
2019-01-12 15:00:08 +01:00

25 lines
670 B
C++

#ifndef FTXUI_COMPONENT_COMPONENT_DIRECTION_H_
#define FTXUI_COMPONENT_COMPONENT_DIRECTION_H_
#include "ftxui/component/component.hpp"
namespace ftxui {
// A component where focus and events are automatically handled for you.
// Please use ComponentVertical or ComponentHorizontal.
class ComponentDirection : public Component {
public:
ComponentDirection(Delegate* delegate);
bool OnEvent(Event) override;
Component* GetActiveChild() override;
protected:
void Focus(Component* child);
virtual bool HandleDirection(Event) = 0;
Component* active_child_;
};
} // namespace ftxui
#endif /* end of include guard: FTXUI_COMPONENT_COMPONENT_DIRECTION_H_ */