mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-17 00:18:11 +08:00
Introduce CatchEvent (#104)
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
namespace ftxui {
|
||||
|
||||
class ComponentBase;
|
||||
struct Event;
|
||||
|
||||
using Component = std::shared_ptr<ComponentBase>;
|
||||
using Components = std::vector<Component>;
|
||||
@@ -30,10 +31,11 @@ Component Input(StringRef content, ConstStringRef placeholder);
|
||||
Component Menu(const std::vector<std::wstring>* entries, int* selected_);
|
||||
Component Radiobox(const std::vector<std::wstring>* entries, int* selected_);
|
||||
Component Toggle(const std::vector<std::wstring>* entries, int* selected);
|
||||
Component Renderer(Component child, std::function<Element()>);
|
||||
Component Renderer(std::function<Element()>);
|
||||
template <class T> // T = {int, float}
|
||||
Component Slider(StringRef label, T* value, T min, T max, T increment);
|
||||
Component Renderer(Component child, std::function<Element()>);
|
||||
Component Renderer(std::function<Element()>);
|
||||
Component CatchEvent(Component child, std::function<bool(Event)>);
|
||||
|
||||
namespace Container {
|
||||
Component Vertical(Components children);
|
||||
|
Reference in New Issue
Block a user