Skip to content
You are viewing documentation for v0.11. Switch to latest (main).

ftxui::CheckboxOption ​

cpp
#include <ftxui/component/component_options.hpp>

Option for the Checkbox component.

Summary ​

SymbolDescription
style_checkedPrefix for a "checked" state.
style_uncheckedPrefix for a "unchecked" state.
style_normalstyle.
style_focusedStyle when focused.
style_selectedStyle when selected.
style_selected_focusedStyle when selected and focused.
on_changeCalled when the user change the state.

Public Attributes ​

style_checked ​

cpp
std::string style_checked = "▣ ";

Prefix for a "checked" state.

style_unchecked ​

cpp
std::string style_unchecked = "☐ ";

Prefix for a "unchecked" state.

style_normal ​

cpp
Decorator style_normal = nothing;

style.

style_focused ​

cpp
Decorator style_focused = inverted;

Style when focused.

style_selected ​

cpp
Decorator style_selected = bold;

Style when selected.

style_selected_focused ​

cpp
Decorator style_selected_focused =
      Decorator(inverted) | bold;

Style when selected and focused.

on_change ​

cpp
std::function< void()> on_change = []() {};

Called when the user change the state.