20class CheckboxBase :
public ComponentBase,
public CheckboxOption {
22 explicit CheckboxBase(CheckboxOption
option)
42 bool OnEvent(Event
event)
override {
43 if (!CaptureMouse(
event)) {
47 if (
event.is_mouse()) {
48 return OnMouseEvent(
event);
61 bool OnMouseEvent(Event
event) {
62 hovered_ = box_.Contain(
event.mouse().x,
event.mouse().y);
64 if (!CaptureMouse(
event)) {
84 bool hovered_ =
false;
An adapter. Own or reference a constant string. For convenience, this class convert multiple immutabl...
Element nothing(Element element)
A decoration doing absolutely nothing.
Component Checkbox(CheckboxOption options)
std::shared_ptr< Node > Element
std::shared_ptr< ComponentBase > Component
Element select(Element)
Set the child to be the one selected among its siblings.
Element focus(Element)
Set the child to be the one in focus globally.
Component Slider(SliderOption< T > options)
A slider in any direction.
Decorator reflect(Box &box)
void Render(Screen &screen, const Element &element)
Display an element on a ftxui::Screen.
Option for the Checkbox component.
static CheckboxOption Simple()
Option for standard Checkbox.
std::function< Element(const EntryState &)> transform
static const Event Return