mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2024-11-22 18:59:59 +08:00
parent
a7b6785420
commit
d0634e1ca0
@ -86,6 +86,32 @@ class CheckboxBase : public ComponentBase, public CheckboxOption {
|
|||||||
};
|
};
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
|
/// @brief Draw checkable element.
|
||||||
|
/// @param option Additional optional parameters.
|
||||||
|
/// @ingroup component
|
||||||
|
/// @see CheckboxBase
|
||||||
|
///
|
||||||
|
/// ### Example
|
||||||
|
///
|
||||||
|
/// ```cpp
|
||||||
|
/// auto screen = ScreenInteractive::FitComponent();
|
||||||
|
/// CheckboxOption option;
|
||||||
|
/// option.label = "Make a sandwidth";
|
||||||
|
/// option.checked = false;
|
||||||
|
/// Component checkbox = Checkbox(option);
|
||||||
|
/// screen.Loop(checkbox)
|
||||||
|
/// ```
|
||||||
|
///
|
||||||
|
/// ### Output
|
||||||
|
///
|
||||||
|
/// ```bash
|
||||||
|
/// ☐ Make a sandwitch
|
||||||
|
/// ```
|
||||||
|
// NOLINTNEXTLINE
|
||||||
|
Component Checkbox(CheckboxOption option) {
|
||||||
|
return Make<CheckboxBase>(std::move(option));
|
||||||
|
}
|
||||||
|
|
||||||
/// @brief Draw checkable element.
|
/// @brief Draw checkable element.
|
||||||
/// @param label The label of the checkbox.
|
/// @param label The label of the checkbox.
|
||||||
/// @param checked Whether the checkbox is checked or not.
|
/// @param checked Whether the checkbox is checked or not.
|
||||||
|
Loading…
Reference in New Issue
Block a user