blob: 64370981e11526dd88442f63241078b0485b2b93 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#include "CheckedConditionEditor.h"
#include "cru/common/ClonablePtr.h"
#include "cru/ui/style/Condition.h"
namespace cru::theme_builder::components::conditions {
CheckedConditionEditor::CheckedConditionEditor() {
SetLabel(u"Checked Condition");
checked_check_box_.SetLabel(u"Checked");
GetContainer()->AddChild(checked_check_box_.GetRootControl());
ConnectChangeEvent(checked_check_box_);
}
CheckedConditionEditor::~CheckedConditionEditor() {}
ClonablePtr<ui::style::CheckedCondition> CheckedConditionEditor::GetValue()
const {
return ui::style::CheckedCondition::Create(checked_check_box_.GetValue());
}
void CheckedConditionEditor::SetValue(ui::style::CheckedCondition* value,
bool trigger_change) {
checked_check_box_.SetValue(value->IsChecked(), trigger_change);
}
} // namespace cru::theme_builder::components::conditions
|