#ifndef FTXUI_COMPONENT_COMPONENT_OPTIONS_HPP #define FTXUI_COMPONENT_COMPONENT_OPTIONS_HPP #include namespace ftxui { struct MenuOption { Decorator normal_style = nothing; Decorator focused_style = inverted; Decorator selected_style = bold; Decorator selected_focused_style = focused_style | selected_style; // State update callback. std::function on_change = []() {}; std::function on_enter = []() {}; }; struct ButtonOption { bool border = true; }; struct CheckboxOption { std::wstring checked = L"▣ "; /// Prefix for a "checked" state. std::wstring unchecked = L"☐ "; /// Prefix for a "unchecked" state. Decorator focused_style = inverted; /// Decorator used when focused. Decorator unfocused_style = nothing; /// Decorator used when unfocused. /// Called when the user change the state. std::function on_change = []() {}; }; struct InputOption { std::function on_change = [] {}; std::function on_enter = [] {}; }; struct RadioboxOption { std::wstring checked = L"◉ "; std::wstring unchecked = L"○ "; Decorator focused_style = inverted; Decorator unfocused_style = nothing; std::function on_change = []() {}; }; struct ToggleOption { Decorator normal_style = dim; Decorator focused_style = inverted; Decorator selected_style = bold; Decorator selected_focused_style = focused_style | selected_style; // Callback. std::function on_change = []() {}; std::function on_enter = []() {}; }; }; // namespace ftxui #endif /* end of include guard: FTXUI_COMPONENT_COMPONENT_OPTIONS_HPP */