29 class Impl :
public ComponentBase {
31 Impl(ConstStringRef label, Component child, Ref<bool> show)
32 : label_(label), show_(std::move(show)) {
34 opt.style_checked =
"▼ ";
35 opt.style_unchecked =
"▶ ";
36 Add(Container::Vertical({
37 Checkbox(label_, show_.operator->(), opt),
38 Maybe(std::move(child), show_.operator->()),
41 ConstStringRef label_;
45 return Make<Impl>(label, std::move(child), std::move(show));
Component Checkbox(ConstStringRef label, bool *checked, Ref< CheckboxOption > option={})
Draw checkable element.
std::shared_ptr< T > Make(Args &&... args)
Component Maybe(Component, const bool *show)
std::shared_ptr< ComponentBase > Component
Component Collapsible(ConstStringRef label, Component child, Ref< bool > show=false)